feat: implement SalesInvoiceTspSwitchService and SalesInvoiceTspService for handling TSP provider interactions
- Add SalesInvoiceTspSwitchService to manage TSP provider selection and sending invoices. - Introduce SalesInvoiceTspService for creating, sending, and retrieving sales invoices. - Implement NamaProviderSwitchAdapter for communication with the NAMA TSP provider API. - Define DTOs for request and response structures specific to the NAMA provider. - Enhance error handling and logging for TSP provider interactions.
This commit is contained in:
Vendored
+1
@@ -18,6 +18,7 @@
|
|||||||
"Cardex",
|
"Cardex",
|
||||||
"fkey",
|
"fkey",
|
||||||
"iban",
|
"iban",
|
||||||
|
"inno",
|
||||||
"MAYKET"
|
"MAYKET"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
-- DropForeignKey
|
||||||
|
ALTER TABLE `admin_accounts` DROP FOREIGN KEY `admin_accounts_account_id_fkey`;
|
||||||
|
|
||||||
|
-- DropForeignKey
|
||||||
|
ALTER TABLE `partner_accounts` DROP FOREIGN KEY `partner_accounts_account_id_fkey`;
|
||||||
|
|
||||||
|
-- DropForeignKey
|
||||||
|
ALTER TABLE `provider_accounts` DROP FOREIGN KEY `provider_accounts_account_id_fkey`;
|
||||||
|
|
||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE `guilds` ADD COLUMN `invoice_template` ENUM('SALE', 'FX_SALE', 'GOLD_JEWELRY', 'CONTRACT', 'UTILITY', 'AIR_TICKET', 'EXPORT', 'BILL_OF_LADING', 'PETROCHEMICAL', 'COMMODITY_EXCHANGE', 'INSURANCE') NOT NULL DEFAULT 'GOLD_JEWELRY';
|
||||||
|
|
||||||
|
-- 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;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `partner_accounts` ADD CONSTRAINT `partner_accounts_account_id_fkey` FOREIGN KEY (`account_id`) REFERENCES `accounts`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `provider_accounts` ADD CONSTRAINT `provider_accounts_account_id_fkey` FOREIGN KEY (`account_id`) REFERENCES `accounts`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
/*
|
||||||
|
Warnings:
|
||||||
|
|
||||||
|
- You are about to drop the column `fiscal_switch_type` on the `partners` table. All the data in the column will be lost.
|
||||||
|
- The values [CHECK] on the enum `sales_invoice_payments_payment_method` will be removed. If these variants are still used in the database, this will fail.
|
||||||
|
- You are about to drop the `sale_invoice_fiscal_attempts` table. If the table is not empty, all the data it contains will be lost.
|
||||||
|
- You are about to drop the `sale_invoice_fiscals` table. If the table is not empty, all the data it contains will be lost.
|
||||||
|
- Made the column `good_snapshot` on table `sales_invoice_items` required. This step will fail if there are existing NULL values in that column.
|
||||||
|
- Made the column `good_id` on table `sales_invoice_items` required. This step will fail if there are existing NULL values in that column.
|
||||||
|
|
||||||
|
*/
|
||||||
|
-- DropForeignKey
|
||||||
|
ALTER TABLE `sale_invoice_fiscal_attempts` DROP FOREIGN KEY `sale_invoice_fiscal_attempts_fiscal_id_fkey`;
|
||||||
|
|
||||||
|
-- DropForeignKey
|
||||||
|
ALTER TABLE `sale_invoice_fiscals` DROP FOREIGN KEY `sale_invoice_fiscals_invoice_id_fkey`;
|
||||||
|
|
||||||
|
-- DropForeignKey
|
||||||
|
ALTER TABLE `sales_invoice_items` DROP FOREIGN KEY `sales_invoice_items_good_id_fkey`;
|
||||||
|
|
||||||
|
-- DropIndex
|
||||||
|
DROP INDEX `sales_invoice_items_good_id_fkey` ON `sales_invoice_items`;
|
||||||
|
|
||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE `business_activities` ADD COLUMN `invoice_number_sequence` VARCHAR(191) NOT NULL DEFAULT '1';
|
||||||
|
|
||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE `partners` DROP COLUMN `fiscal_switch_type`,
|
||||||
|
ADD COLUMN `tsp_provider` ENUM('NAMA', 'SUN') NOT NULL DEFAULT 'NAMA';
|
||||||
|
|
||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE `sales_invoice_items` MODIFY `good_snapshot` JSON NOT NULL,
|
||||||
|
MODIFY `good_id` VARCHAR(191) NOT NULL;
|
||||||
|
|
||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE `sales_invoice_payments` MODIFY `payment_method` ENUM('CHEQUE', 'SET_OFF', 'CASH', 'TERMINAL', 'PAYMENT_GATEWAY', 'CARD', 'BANK', 'OTHER') NOT NULL;
|
||||||
|
|
||||||
|
-- DropTable
|
||||||
|
DROP TABLE `sale_invoice_fiscal_attempts`;
|
||||||
|
|
||||||
|
-- DropTable
|
||||||
|
DROP TABLE `sale_invoice_fiscals`;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `sale_invoice_tsp_attempts` (
|
||||||
|
`id` VARCHAR(191) NOT NULL,
|
||||||
|
`attempt_no` INTEGER NOT NULL,
|
||||||
|
`status` ENUM('SUCCESS', 'FAILURE', 'NOT_SEND', 'QUEUED') NOT NULL,
|
||||||
|
`tax_id` VARCHAR(191) NULL,
|
||||||
|
`type` ENUM('MAIN', 'UPDATE', 'REVOKE', 'REMOVE') NOT NULL,
|
||||||
|
`request_payload` JSON NULL,
|
||||||
|
`response_payload` JSON NULL,
|
||||||
|
`error_message` TEXT NULL,
|
||||||
|
`sent_at` TIMESTAMP(0) NULL,
|
||||||
|
`received_at` TIMESTAMP(0) NULL,
|
||||||
|
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||||
|
`invoice_id` VARCHAR(191) NOT NULL,
|
||||||
|
|
||||||
|
UNIQUE INDEX `sale_invoice_tsp_attempts_tax_id_key`(`tax_id`),
|
||||||
|
UNIQUE INDEX `sale_invoice_tsp_attempts_invoice_id_key`(`invoice_id`),
|
||||||
|
INDEX `sale_invoice_tsp_attempts_status_idx`(`status`),
|
||||||
|
INDEX `sale_invoice_tsp_attempts_tax_id_idx`(`tax_id`),
|
||||||
|
INDEX `sale_invoice_tsp_attempts_invoice_id_idx`(`invoice_id`),
|
||||||
|
UNIQUE INDEX `sale_invoice_tsp_attempts_invoice_id_attempt_no_key`(`invoice_id`, `attempt_no`),
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- 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 `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,14 @@
|
|||||||
|
/*
|
||||||
|
Warnings:
|
||||||
|
|
||||||
|
- You are about to alter the column `invoice_number_sequence` on the `business_activities` table. The data in that column could be lost. The data in that column will be cast from `VarChar(191)` to `Decimal(20,0)`.
|
||||||
|
|
||||||
|
*/
|
||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE `business_activities` MODIFY `invoice_number_sequence` DECIMAL(20, 0) NOT NULL DEFAULT 1;
|
||||||
|
|
||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE `guilds` ALTER COLUMN `invoice_template` DROP DEFAULT;
|
||||||
|
|
||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE `stock_keeping_units` ALTER COLUMN `type` DROP DEFAULT;
|
||||||
@@ -19,7 +19,7 @@ model Partner {
|
|||||||
name String
|
name String
|
||||||
code String @unique()
|
code String @unique()
|
||||||
status PartnerStatus @default(ACTIVE)
|
status PartnerStatus @default(ACTIVE)
|
||||||
fiscal_switch_type PartnerFiscalSwitchType
|
tsp_provider TspProviderType @default(NAMA)
|
||||||
logo_url String?
|
logo_url String?
|
||||||
|
|
||||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ model BusinessActivity {
|
|||||||
name String
|
name String
|
||||||
fiscal_id String
|
fiscal_id String
|
||||||
partner_token String
|
partner_token String
|
||||||
|
invoice_number_sequence Decimal @default(1) @db.Decimal(20, 0)
|
||||||
|
|
||||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||||
updated_at DateTime @updatedAt() @db.Timestamp(0)
|
updated_at DateTime @updatedAt() @db.Timestamp(0)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ model StockKeepingUnits {
|
|||||||
code String @unique
|
code String @unique
|
||||||
name String
|
name String
|
||||||
VAT Decimal @db.Decimal(5, 2)
|
VAT Decimal @db.Decimal(5, 2)
|
||||||
type SKUGuildType @default(GOLD)
|
type SKUGuildType
|
||||||
is_public Boolean @default(true)
|
is_public Boolean @default(true)
|
||||||
is_domestic Boolean @default(false)
|
is_domestic Boolean @default(false)
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
enum PaymentMethodType {
|
enum PaymentMethodType {
|
||||||
TERMINAL
|
CHEQUE
|
||||||
CASH
|
|
||||||
SET_OFF
|
SET_OFF
|
||||||
|
CASH
|
||||||
|
TERMINAL
|
||||||
|
PAYMENT_GATEWAY
|
||||||
CARD
|
CARD
|
||||||
BANK
|
BANK
|
||||||
CHECK
|
|
||||||
OTHER
|
OTHER
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -156,26 +157,26 @@ enum ConsumerType {
|
|||||||
LEGAL
|
LEGAL
|
||||||
}
|
}
|
||||||
|
|
||||||
enum PartnerFiscalSwitchType {
|
enum TspProviderType {
|
||||||
NAMA
|
NAMA
|
||||||
SUN
|
SUN
|
||||||
}
|
}
|
||||||
|
|
||||||
enum FiscalResponseStatus {
|
enum TspProviderResponseStatus {
|
||||||
SUCCESS
|
SUCCESS
|
||||||
FAILURE
|
FAILURE
|
||||||
NOT_SEND
|
NOT_SEND
|
||||||
QUEUED
|
QUEUED
|
||||||
}
|
}
|
||||||
|
|
||||||
enum FiscalRequestType {
|
enum TspProviderRequestType {
|
||||||
MAIN
|
MAIN
|
||||||
UPDATE
|
UPDATE
|
||||||
REVOKE
|
REVOKE
|
||||||
REMOVE
|
REMOVE
|
||||||
}
|
}
|
||||||
|
|
||||||
enum FiscalInvoiceCustomerType {
|
enum TspProviderCustomerType {
|
||||||
Unknown
|
Unknown
|
||||||
Known
|
Known
|
||||||
}
|
}
|
||||||
@@ -183,3 +184,17 @@ enum FiscalInvoiceCustomerType {
|
|||||||
enum SKUGuildType {
|
enum SKUGuildType {
|
||||||
GOLD
|
GOLD
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum InvoiceTemplateType {
|
||||||
|
SALE
|
||||||
|
FX_SALE
|
||||||
|
GOLD_JEWELRY
|
||||||
|
CONTRACT
|
||||||
|
UTILITY
|
||||||
|
AIR_TICKET
|
||||||
|
EXPORT
|
||||||
|
BILL_OF_LADING
|
||||||
|
PETROCHEMICAL
|
||||||
|
COMMODITY_EXCHANGE
|
||||||
|
INSURANCE
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
model Guild {
|
model Guild {
|
||||||
id String @id @default(ulid())
|
id String @id @default(ulid())
|
||||||
name String
|
name String
|
||||||
|
invoice_template InvoiceTemplateType
|
||||||
code String?
|
code String?
|
||||||
|
|
||||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||||
|
|||||||
@@ -20,10 +20,9 @@ model SalesInvoice {
|
|||||||
pos_id String
|
pos_id String
|
||||||
pos Pos @relation(fields: [pos_id], references: [id])
|
pos Pos @relation(fields: [pos_id], references: [id])
|
||||||
|
|
||||||
fiscal SaleInvoiceFiscals?
|
|
||||||
|
|
||||||
items SalesInvoiceItem[]
|
items SalesInvoiceItem[]
|
||||||
payments SalesInvoicePayment[]
|
payments SalesInvoicePayment[]
|
||||||
|
tsp_attempts SaleInvoiceTspAttempts[]
|
||||||
|
|
||||||
@@unique([invoice_number, pos_id])
|
@@unique([invoice_number, pos_id])
|
||||||
@@map("sales_invoices")
|
@@map("sales_invoices")
|
||||||
@@ -43,13 +42,13 @@ model SalesInvoiceItem {
|
|||||||
notes String? @db.Text
|
notes String? @db.Text
|
||||||
|
|
||||||
payload Json?
|
payload Json?
|
||||||
good_snapshot Json?
|
good_snapshot Json
|
||||||
|
|
||||||
invoice_id String
|
invoice_id String
|
||||||
invoice SalesInvoice @relation(fields: [invoice_id], references: [id])
|
invoice SalesInvoice @relation(fields: [invoice_id], references: [id])
|
||||||
|
|
||||||
good_id String?
|
good_id String
|
||||||
good Good? @relation(fields: [good_id], references: [id])
|
good Good @relation(fields: [good_id], references: [id])
|
||||||
|
|
||||||
service_id String?
|
service_id String?
|
||||||
service Service? @relation(fields: [service_id], references: [id])
|
service Service? @relation(fields: [service_id], references: [id])
|
||||||
@@ -58,30 +57,13 @@ model SalesInvoiceItem {
|
|||||||
@@map("sales_invoice_items")
|
@@map("sales_invoice_items")
|
||||||
}
|
}
|
||||||
|
|
||||||
model SaleInvoiceFiscals {
|
model SaleInvoiceTspAttempts {
|
||||||
id String @id @default(ulid())
|
|
||||||
|
|
||||||
retry_count Int @default(0)
|
|
||||||
last_attempt_at DateTime? @db.Timestamp(0)
|
|
||||||
|
|
||||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
updated_at DateTime @updatedAt() @db.Timestamp(0)
|
|
||||||
|
|
||||||
invoice_id String @unique
|
|
||||||
invoice SalesInvoice @relation(fields: [invoice_id], references: [id], onDelete: Cascade)
|
|
||||||
|
|
||||||
attempts SaleInvoiceFiscalAttempts[]
|
|
||||||
|
|
||||||
@@map("sale_invoice_fiscals")
|
|
||||||
}
|
|
||||||
|
|
||||||
model SaleInvoiceFiscalAttempts {
|
|
||||||
id String @id @default(ulid())
|
id String @id @default(ulid())
|
||||||
|
|
||||||
attempt_no Int
|
attempt_no Int
|
||||||
status FiscalResponseStatus
|
status TspProviderResponseStatus
|
||||||
tax_id String? @unique @db.VarChar(191)
|
tax_id String? @unique @db.VarChar(191)
|
||||||
type FiscalRequestType
|
type TspProviderRequestType
|
||||||
|
|
||||||
request_payload Json?
|
request_payload Json?
|
||||||
response_payload Json?
|
response_payload Json?
|
||||||
@@ -91,13 +73,14 @@ model SaleInvoiceFiscalAttempts {
|
|||||||
received_at DateTime? @db.Timestamp(0)
|
received_at DateTime? @db.Timestamp(0)
|
||||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||||
|
|
||||||
fiscal_id String
|
invoice_id String @unique
|
||||||
fiscal SaleInvoiceFiscals @relation(fields: [fiscal_id], references: [id], onDelete: Cascade)
|
invoice SalesInvoice @relation(fields: [invoice_id], references: [id], onDelete: Cascade)
|
||||||
|
|
||||||
@@unique([fiscal_id, attempt_no])
|
@@unique([invoice_id, attempt_no])
|
||||||
@@index([status])
|
@@index([status])
|
||||||
@@index([tax_id])
|
@@index([tax_id])
|
||||||
@@map("sale_invoice_fiscal_attempts")
|
@@index([invoice_id])
|
||||||
|
@@map("sale_invoice_tsp_attempts")
|
||||||
}
|
}
|
||||||
|
|
||||||
model SalesInvoicePayment {
|
model SalesInvoicePayment {
|
||||||
|
|||||||
+4
-6
@@ -1,10 +1,6 @@
|
|||||||
import { PasswordUtil } from '@/common/utils/password.util'
|
import { PasswordUtil } from '@/common/utils/password.util'
|
||||||
import { generateTrackingCode } from '@/common/utils/tracking-code-generator.util'
|
import { generateTrackingCode } from '@/common/utils/tracking-code-generator.util'
|
||||||
import {
|
import { ConsumerType, GoodPricingModel, TspProviderType } from '@/generated/prisma/enums'
|
||||||
ConsumerType,
|
|
||||||
GoodPricingModel,
|
|
||||||
PartnerFiscalSwitchType,
|
|
||||||
} from '@/generated/prisma/enums'
|
|
||||||
import { GoodCreateManyInput } from '@/generated/prisma/models'
|
import { GoodCreateManyInput } from '@/generated/prisma/models'
|
||||||
import { prisma } from '../src/lib/prisma'
|
import { prisma } from '../src/lib/prisma'
|
||||||
|
|
||||||
@@ -135,10 +131,12 @@ async function main() {
|
|||||||
{
|
{
|
||||||
name: 'طلا',
|
name: 'طلا',
|
||||||
code: 'Gold',
|
code: 'Gold',
|
||||||
|
invoice_template: 'GOLD_JEWELRY',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'میوه و ترهبار',
|
name: 'میوه و ترهبار',
|
||||||
code: 'Fruit',
|
code: 'Fruit',
|
||||||
|
invoice_template: 'SALE',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
@@ -405,7 +403,7 @@ async function main() {
|
|||||||
name: 'تیس',
|
name: 'تیس',
|
||||||
code: 'TIS',
|
code: 'TIS',
|
||||||
status: 'ACTIVE',
|
status: 'ACTIVE',
|
||||||
fiscal_switch_type: PartnerFiscalSwitchType.NAMA,
|
tsp_provider: TspProviderType.NAMA,
|
||||||
accounts: {
|
accounts: {
|
||||||
create: {
|
create: {
|
||||||
role: 'OWNER',
|
role: 'OWNER',
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { FiscalResponseStatus } from '@/generated/prisma/enums'
|
import { TspProviderResponseStatus } from '@/generated/prisma/enums'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
PaymentMethodType: {
|
PaymentMethodType: {
|
||||||
@@ -132,23 +132,23 @@ export default {
|
|||||||
CAFE_BAZAR: 'کافه بازار',
|
CAFE_BAZAR: 'کافه بازار',
|
||||||
MAYKET: 'مایکت',
|
MAYKET: 'مایکت',
|
||||||
},
|
},
|
||||||
PartnerFiscalSwitchType: {
|
TspProviderType: {
|
||||||
NAMA: 'نما',
|
NAMA: 'نما',
|
||||||
SUN: 'سان',
|
SUN: 'سان',
|
||||||
},
|
},
|
||||||
FiscalResponseStatus: {
|
TspProviderResponseStatus: {
|
||||||
SUCCESS: 'موفق',
|
SUCCESS: 'موفق',
|
||||||
FAILURE: 'ناموفق',
|
FAILURE: 'ناموفق',
|
||||||
NOT_SEND: 'ارسال نشده',
|
NOT_SEND: 'ارسال نشده',
|
||||||
[FiscalResponseStatus.QUEUED]: 'در صف ارسال',
|
[TspProviderResponseStatus.QUEUED]: 'در صف ارسال',
|
||||||
},
|
},
|
||||||
FiscalRequestType: {
|
TspProviderRequestType: {
|
||||||
MAIN: 'اصلی',
|
MAIN: 'اصلی',
|
||||||
UPDATE: 'اصلاح',
|
UPDATE: 'اصلاح',
|
||||||
REVOKE: 'ابطال',
|
REVOKE: 'ابطال',
|
||||||
REMOVE: 'حذف',
|
REMOVE: 'حذف',
|
||||||
},
|
},
|
||||||
FiscalInvoiceCustomerType: {
|
TspProviderCustomerType: {
|
||||||
Unknown: 'ناشناس',
|
Unknown: 'ناشناس',
|
||||||
Known: 'شناسایی شده',
|
Known: 'شناسایی شده',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -4,14 +4,14 @@ export enum GoldKarat {
|
|||||||
KARAT_24 = '24',
|
KARAT_24 = '24',
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum FiscalRequestType {
|
export enum TspProviderRequestType {
|
||||||
MAIN = 'MAIN',
|
MAIN = 'MAIN',
|
||||||
UPDATE = 'UPDATE',
|
UPDATE = 'UPDATE',
|
||||||
REVOKE = 'REVOKE',
|
REVOKE = 'REVOKE',
|
||||||
REMOVE = 'REMOVE',
|
REMOVE = 'REMOVE',
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum FiscalInvoiceCustomerType {
|
export enum TspProviderCustomerType {
|
||||||
Unknown = 'Unknown',
|
Unknown = 'Unknown',
|
||||||
Known = 'Known',
|
Known = 'Known',
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,63 @@
|
|||||||
|
export interface FetchRequestContext {
|
||||||
|
url: string
|
||||||
|
init: RequestInit
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface FetchRequestInterceptor {
|
||||||
|
onRequest?(
|
||||||
|
context: FetchRequestContext,
|
||||||
|
): Promise<FetchRequestContext> | FetchRequestContext
|
||||||
|
onResponse?(
|
||||||
|
context: FetchRequestContext,
|
||||||
|
response: Response,
|
||||||
|
): Promise<Response> | Response
|
||||||
|
onError?(context: FetchRequestContext, error: unknown): Promise<void> | void
|
||||||
|
}
|
||||||
|
|
||||||
|
function mergeHeaders(
|
||||||
|
currentHeaders: HeadersInit | undefined,
|
||||||
|
newHeaders: HeadersInit,
|
||||||
|
): Headers {
|
||||||
|
const mergedHeaders = new Headers(currentHeaders)
|
||||||
|
const incomingHeaders = new Headers(newHeaders)
|
||||||
|
|
||||||
|
incomingHeaders.forEach((value, key) => {
|
||||||
|
mergedHeaders.set(key, value)
|
||||||
|
})
|
||||||
|
|
||||||
|
return mergedHeaders
|
||||||
|
}
|
||||||
|
|
||||||
|
export function createHeaderRequestInterceptor(
|
||||||
|
headers: HeadersInit,
|
||||||
|
): FetchRequestInterceptor {
|
||||||
|
return {
|
||||||
|
onRequest(context) {
|
||||||
|
return {
|
||||||
|
...context,
|
||||||
|
init: {
|
||||||
|
...context.init,
|
||||||
|
headers: mergeHeaders(context.init.headers, headers),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export function createEnsureSuccessResponseInterceptor(): FetchRequestInterceptor {
|
||||||
|
return {
|
||||||
|
async onResponse(_, response) {
|
||||||
|
if (response.ok) {
|
||||||
|
return response
|
||||||
|
}
|
||||||
|
|
||||||
|
const errorBody = await response.text().catch(() => '')
|
||||||
|
const normalizedBody = errorBody
|
||||||
|
return Promise.reject({
|
||||||
|
status: response.status,
|
||||||
|
statusText: response.statusText,
|
||||||
|
body: normalizedBody,
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,6 +4,7 @@ export interface SaleInvoiceGoldTypePayload {
|
|||||||
karat: keyof typeof GoldKarat
|
karat: keyof typeof GoldKarat
|
||||||
wages: number
|
wages: number
|
||||||
profit: number
|
profit: number
|
||||||
|
commission: number
|
||||||
}
|
}
|
||||||
export interface SaleInvoiceStandardPayload {}
|
export interface SaleInvoiceStandardPayload {}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,47 @@
|
|||||||
|
import {
|
||||||
|
FetchRequestContext,
|
||||||
|
FetchRequestInterceptor,
|
||||||
|
} from '@/common/interceptors/fetch-request.interceptor'
|
||||||
|
import { Injectable } from '@nestjs/common'
|
||||||
|
|
||||||
|
@Injectable()
|
||||||
|
export class HttpClientUtil {
|
||||||
|
async request(
|
||||||
|
url: string,
|
||||||
|
init: RequestInit = {},
|
||||||
|
interceptors: FetchRequestInterceptor[] = [],
|
||||||
|
): Promise<Response> {
|
||||||
|
let context: FetchRequestContext = { url, init }
|
||||||
|
|
||||||
|
for (const interceptor of interceptors) {
|
||||||
|
if (!interceptor.onRequest) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
context = await interceptor.onRequest(context)
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
let response = await fetch(context.url, context.init)
|
||||||
|
|
||||||
|
for (const interceptor of interceptors) {
|
||||||
|
if (!interceptor.onResponse) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
response = await interceptor.onResponse(context, response)
|
||||||
|
console.log('response')
|
||||||
|
console.log(response)
|
||||||
|
}
|
||||||
|
|
||||||
|
return response
|
||||||
|
} catch (error: any) {
|
||||||
|
for (const interceptor of interceptors) {
|
||||||
|
if (!interceptor.onError) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
await interceptor.onError(context, error)
|
||||||
|
}
|
||||||
|
throw error
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,3 +3,4 @@ export * from './enum-translator.util'
|
|||||||
export * from './mappers/consumer_mappers.util'
|
export * from './mappers/consumer_mappers.util'
|
||||||
export * from './password.util'
|
export * from './password.util'
|
||||||
export * from './tracking-code-generator.util'
|
export * from './tracking-code-generator.util'
|
||||||
|
export * from './http-client.util'
|
||||||
|
|||||||
@@ -223,15 +223,10 @@ export type SalesInvoice = Prisma.SalesInvoiceModel
|
|||||||
*/
|
*/
|
||||||
export type SalesInvoiceItem = Prisma.SalesInvoiceItemModel
|
export type SalesInvoiceItem = Prisma.SalesInvoiceItemModel
|
||||||
/**
|
/**
|
||||||
* Model SaleInvoiceFiscals
|
* Model SaleInvoiceTspAttempts
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type SaleInvoiceFiscals = Prisma.SaleInvoiceFiscalsModel
|
export type SaleInvoiceTspAttempts = Prisma.SaleInvoiceTspAttemptsModel
|
||||||
/**
|
|
||||||
* Model SaleInvoiceFiscalAttempts
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type SaleInvoiceFiscalAttempts = Prisma.SaleInvoiceFiscalAttemptsModel
|
|
||||||
/**
|
/**
|
||||||
* Model SalesInvoicePayment
|
* Model SalesInvoicePayment
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -245,15 +245,10 @@ export type SalesInvoice = Prisma.SalesInvoiceModel
|
|||||||
*/
|
*/
|
||||||
export type SalesInvoiceItem = Prisma.SalesInvoiceItemModel
|
export type SalesInvoiceItem = Prisma.SalesInvoiceItemModel
|
||||||
/**
|
/**
|
||||||
* Model SaleInvoiceFiscals
|
* Model SaleInvoiceTspAttempts
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type SaleInvoiceFiscals = Prisma.SaleInvoiceFiscalsModel
|
export type SaleInvoiceTspAttempts = Prisma.SaleInvoiceTspAttemptsModel
|
||||||
/**
|
|
||||||
* Model SaleInvoiceFiscalAttempts
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type SaleInvoiceFiscalAttempts = Prisma.SaleInvoiceFiscalAttemptsModel
|
|
||||||
/**
|
/**
|
||||||
* Model SalesInvoicePayment
|
* Model SalesInvoicePayment
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -195,11 +195,11 @@ export type EnumPartnerStatusFilter<$PrismaModel = never> = {
|
|||||||
not?: Prisma.NestedEnumPartnerStatusFilter<$PrismaModel> | $Enums.PartnerStatus
|
not?: Prisma.NestedEnumPartnerStatusFilter<$PrismaModel> | $Enums.PartnerStatus
|
||||||
}
|
}
|
||||||
|
|
||||||
export type EnumPartnerFiscalSwitchTypeFilter<$PrismaModel = never> = {
|
export type EnumTspProviderTypeFilter<$PrismaModel = never> = {
|
||||||
equals?: $Enums.PartnerFiscalSwitchType | Prisma.EnumPartnerFiscalSwitchTypeFieldRefInput<$PrismaModel>
|
equals?: $Enums.TspProviderType | Prisma.EnumTspProviderTypeFieldRefInput<$PrismaModel>
|
||||||
in?: $Enums.PartnerFiscalSwitchType[]
|
in?: $Enums.TspProviderType[]
|
||||||
notIn?: $Enums.PartnerFiscalSwitchType[]
|
notIn?: $Enums.TspProviderType[]
|
||||||
not?: Prisma.NestedEnumPartnerFiscalSwitchTypeFilter<$PrismaModel> | $Enums.PartnerFiscalSwitchType
|
not?: Prisma.NestedEnumTspProviderTypeFilter<$PrismaModel> | $Enums.TspProviderType
|
||||||
}
|
}
|
||||||
|
|
||||||
export type EnumPartnerStatusWithAggregatesFilter<$PrismaModel = never> = {
|
export type EnumPartnerStatusWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
@@ -212,14 +212,14 @@ export type EnumPartnerStatusWithAggregatesFilter<$PrismaModel = never> = {
|
|||||||
_max?: Prisma.NestedEnumPartnerStatusFilter<$PrismaModel>
|
_max?: Prisma.NestedEnumPartnerStatusFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type EnumPartnerFiscalSwitchTypeWithAggregatesFilter<$PrismaModel = never> = {
|
export type EnumTspProviderTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
equals?: $Enums.PartnerFiscalSwitchType | Prisma.EnumPartnerFiscalSwitchTypeFieldRefInput<$PrismaModel>
|
equals?: $Enums.TspProviderType | Prisma.EnumTspProviderTypeFieldRefInput<$PrismaModel>
|
||||||
in?: $Enums.PartnerFiscalSwitchType[]
|
in?: $Enums.TspProviderType[]
|
||||||
notIn?: $Enums.PartnerFiscalSwitchType[]
|
notIn?: $Enums.TspProviderType[]
|
||||||
not?: Prisma.NestedEnumPartnerFiscalSwitchTypeWithAggregatesFilter<$PrismaModel> | $Enums.PartnerFiscalSwitchType
|
not?: Prisma.NestedEnumTspProviderTypeWithAggregatesFilter<$PrismaModel> | $Enums.TspProviderType
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
_min?: Prisma.NestedEnumPartnerFiscalSwitchTypeFilter<$PrismaModel>
|
_min?: Prisma.NestedEnumTspProviderTypeFilter<$PrismaModel>
|
||||||
_max?: Prisma.NestedEnumPartnerFiscalSwitchTypeFilter<$PrismaModel>
|
_max?: Prisma.NestedEnumTspProviderTypeFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type EnumPOSRoleFilter<$PrismaModel = never> = {
|
export type EnumPOSRoleFilter<$PrismaModel = never> = {
|
||||||
@@ -456,6 +456,33 @@ export type EnumConsumerStatusWithAggregatesFilter<$PrismaModel = never> = {
|
|||||||
_max?: Prisma.NestedEnumConsumerStatusFilter<$PrismaModel>
|
_max?: Prisma.NestedEnumConsumerStatusFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type DecimalFilter<$PrismaModel = never> = {
|
||||||
|
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||||
|
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||||
|
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
not?: Prisma.NestedDecimalFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
}
|
||||||
|
|
||||||
|
export type DecimalWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||||
|
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||||
|
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
not?: Prisma.NestedDecimalWithAggregatesFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
|
_avg?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||||
|
_sum?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
export type EnumPOSStatusFilter<$PrismaModel = never> = {
|
export type EnumPOSStatusFilter<$PrismaModel = never> = {
|
||||||
equals?: $Enums.POSStatus | Prisma.EnumPOSStatusFieldRefInput<$PrismaModel>
|
equals?: $Enums.POSStatus | Prisma.EnumPOSStatusFieldRefInput<$PrismaModel>
|
||||||
in?: $Enums.POSStatus[]
|
in?: $Enums.POSStatus[]
|
||||||
@@ -559,17 +586,6 @@ export type DateTimeNullableWithAggregatesFilter<$PrismaModel = never> = {
|
|||||||
_max?: Prisma.NestedDateTimeNullableFilter<$PrismaModel>
|
_max?: Prisma.NestedDateTimeNullableFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type DecimalFilter<$PrismaModel = never> = {
|
|
||||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
|
||||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
|
||||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedDecimalFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
}
|
|
||||||
|
|
||||||
export type EnumSKUGuildTypeFilter<$PrismaModel = never> = {
|
export type EnumSKUGuildTypeFilter<$PrismaModel = never> = {
|
||||||
equals?: $Enums.SKUGuildType | Prisma.EnumSKUGuildTypeFieldRefInput<$PrismaModel>
|
equals?: $Enums.SKUGuildType | Prisma.EnumSKUGuildTypeFieldRefInput<$PrismaModel>
|
||||||
in?: $Enums.SKUGuildType[]
|
in?: $Enums.SKUGuildType[]
|
||||||
@@ -577,22 +593,6 @@ export type EnumSKUGuildTypeFilter<$PrismaModel = never> = {
|
|||||||
not?: Prisma.NestedEnumSKUGuildTypeFilter<$PrismaModel> | $Enums.SKUGuildType
|
not?: Prisma.NestedEnumSKUGuildTypeFilter<$PrismaModel> | $Enums.SKUGuildType
|
||||||
}
|
}
|
||||||
|
|
||||||
export type DecimalWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
|
||||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
|
||||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedDecimalWithAggregatesFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_avg?: Prisma.NestedDecimalFilter<$PrismaModel>
|
|
||||||
_sum?: Prisma.NestedDecimalFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedDecimalFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedDecimalFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type EnumSKUGuildTypeWithAggregatesFilter<$PrismaModel = never> = {
|
export type EnumSKUGuildTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
equals?: $Enums.SKUGuildType | Prisma.EnumSKUGuildTypeFieldRefInput<$PrismaModel>
|
equals?: $Enums.SKUGuildType | Prisma.EnumSKUGuildTypeFieldRefInput<$PrismaModel>
|
||||||
in?: $Enums.SKUGuildType[]
|
in?: $Enums.SKUGuildType[]
|
||||||
@@ -633,38 +633,106 @@ export type EnumCustomerTypeWithAggregatesFilter<$PrismaModel = never> = {
|
|||||||
_max?: Prisma.NestedEnumCustomerTypeFilter<$PrismaModel>
|
_max?: Prisma.NestedEnumCustomerTypeFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type EnumFiscalResponseStatusFilter<$PrismaModel = never> = {
|
export type EnumInvoiceTemplateTypeFilter<$PrismaModel = never> = {
|
||||||
equals?: $Enums.FiscalResponseStatus | Prisma.EnumFiscalResponseStatusFieldRefInput<$PrismaModel>
|
equals?: $Enums.InvoiceTemplateType | Prisma.EnumInvoiceTemplateTypeFieldRefInput<$PrismaModel>
|
||||||
in?: $Enums.FiscalResponseStatus[]
|
in?: $Enums.InvoiceTemplateType[]
|
||||||
notIn?: $Enums.FiscalResponseStatus[]
|
notIn?: $Enums.InvoiceTemplateType[]
|
||||||
not?: Prisma.NestedEnumFiscalResponseStatusFilter<$PrismaModel> | $Enums.FiscalResponseStatus
|
not?: Prisma.NestedEnumInvoiceTemplateTypeFilter<$PrismaModel> | $Enums.InvoiceTemplateType
|
||||||
}
|
}
|
||||||
|
|
||||||
export type EnumFiscalRequestTypeFilter<$PrismaModel = never> = {
|
export type EnumInvoiceTemplateTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
equals?: $Enums.FiscalRequestType | Prisma.EnumFiscalRequestTypeFieldRefInput<$PrismaModel>
|
equals?: $Enums.InvoiceTemplateType | Prisma.EnumInvoiceTemplateTypeFieldRefInput<$PrismaModel>
|
||||||
in?: $Enums.FiscalRequestType[]
|
in?: $Enums.InvoiceTemplateType[]
|
||||||
notIn?: $Enums.FiscalRequestType[]
|
notIn?: $Enums.InvoiceTemplateType[]
|
||||||
not?: Prisma.NestedEnumFiscalRequestTypeFilter<$PrismaModel> | $Enums.FiscalRequestType
|
not?: Prisma.NestedEnumInvoiceTemplateTypeWithAggregatesFilter<$PrismaModel> | $Enums.InvoiceTemplateType
|
||||||
}
|
|
||||||
|
|
||||||
export type EnumFiscalResponseStatusWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.FiscalResponseStatus | Prisma.EnumFiscalResponseStatusFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.FiscalResponseStatus[]
|
|
||||||
notIn?: $Enums.FiscalResponseStatus[]
|
|
||||||
not?: Prisma.NestedEnumFiscalResponseStatusWithAggregatesFilter<$PrismaModel> | $Enums.FiscalResponseStatus
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
_min?: Prisma.NestedEnumFiscalResponseStatusFilter<$PrismaModel>
|
_min?: Prisma.NestedEnumInvoiceTemplateTypeFilter<$PrismaModel>
|
||||||
_max?: Prisma.NestedEnumFiscalResponseStatusFilter<$PrismaModel>
|
_max?: Prisma.NestedEnumInvoiceTemplateTypeFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type EnumFiscalRequestTypeWithAggregatesFilter<$PrismaModel = never> = {
|
export type JsonFilter<$PrismaModel = never> =
|
||||||
equals?: $Enums.FiscalRequestType | Prisma.EnumFiscalRequestTypeFieldRefInput<$PrismaModel>
|
| Prisma.PatchUndefined<
|
||||||
in?: $Enums.FiscalRequestType[]
|
Prisma.Either<Required<JsonFilterBase<$PrismaModel>>, Exclude<keyof Required<JsonFilterBase<$PrismaModel>>, 'path'>>,
|
||||||
notIn?: $Enums.FiscalRequestType[]
|
Required<JsonFilterBase<$PrismaModel>>
|
||||||
not?: Prisma.NestedEnumFiscalRequestTypeWithAggregatesFilter<$PrismaModel> | $Enums.FiscalRequestType
|
>
|
||||||
|
| Prisma.OptionalFlat<Omit<Required<JsonFilterBase<$PrismaModel>>, 'path'>>
|
||||||
|
|
||||||
|
export type JsonFilterBase<$PrismaModel = never> = {
|
||||||
|
equals?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
||||||
|
path?: string
|
||||||
|
mode?: Prisma.QueryMode | Prisma.EnumQueryModeFieldRefInput<$PrismaModel>
|
||||||
|
string_contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
string_starts_with?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
string_ends_with?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
array_starts_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||||
|
array_ends_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||||
|
array_contains?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||||
|
lt?: runtime.InputJsonValue
|
||||||
|
lte?: runtime.InputJsonValue
|
||||||
|
gt?: runtime.InputJsonValue
|
||||||
|
gte?: runtime.InputJsonValue
|
||||||
|
not?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
||||||
|
}
|
||||||
|
|
||||||
|
export type JsonWithAggregatesFilter<$PrismaModel = never> =
|
||||||
|
| Prisma.PatchUndefined<
|
||||||
|
Prisma.Either<Required<JsonWithAggregatesFilterBase<$PrismaModel>>, Exclude<keyof Required<JsonWithAggregatesFilterBase<$PrismaModel>>, 'path'>>,
|
||||||
|
Required<JsonWithAggregatesFilterBase<$PrismaModel>>
|
||||||
|
>
|
||||||
|
| Prisma.OptionalFlat<Omit<Required<JsonWithAggregatesFilterBase<$PrismaModel>>, 'path'>>
|
||||||
|
|
||||||
|
export type JsonWithAggregatesFilterBase<$PrismaModel = never> = {
|
||||||
|
equals?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
||||||
|
path?: string
|
||||||
|
mode?: Prisma.QueryMode | Prisma.EnumQueryModeFieldRefInput<$PrismaModel>
|
||||||
|
string_contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
string_starts_with?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
string_ends_with?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
array_starts_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||||
|
array_ends_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||||
|
array_contains?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||||
|
lt?: runtime.InputJsonValue
|
||||||
|
lte?: runtime.InputJsonValue
|
||||||
|
gt?: runtime.InputJsonValue
|
||||||
|
gte?: runtime.InputJsonValue
|
||||||
|
not?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
_min?: Prisma.NestedEnumFiscalRequestTypeFilter<$PrismaModel>
|
_min?: Prisma.NestedJsonFilter<$PrismaModel>
|
||||||
_max?: Prisma.NestedEnumFiscalRequestTypeFilter<$PrismaModel>
|
_max?: Prisma.NestedJsonFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type EnumTspProviderResponseStatusFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.TspProviderResponseStatus | Prisma.EnumTspProviderResponseStatusFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.TspProviderResponseStatus[]
|
||||||
|
notIn?: $Enums.TspProviderResponseStatus[]
|
||||||
|
not?: Prisma.NestedEnumTspProviderResponseStatusFilter<$PrismaModel> | $Enums.TspProviderResponseStatus
|
||||||
|
}
|
||||||
|
|
||||||
|
export type EnumTspProviderRequestTypeFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.TspProviderRequestType | Prisma.EnumTspProviderRequestTypeFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.TspProviderRequestType[]
|
||||||
|
notIn?: $Enums.TspProviderRequestType[]
|
||||||
|
not?: Prisma.NestedEnumTspProviderRequestTypeFilter<$PrismaModel> | $Enums.TspProviderRequestType
|
||||||
|
}
|
||||||
|
|
||||||
|
export type EnumTspProviderResponseStatusWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.TspProviderResponseStatus | Prisma.EnumTspProviderResponseStatusFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.TspProviderResponseStatus[]
|
||||||
|
notIn?: $Enums.TspProviderResponseStatus[]
|
||||||
|
not?: Prisma.NestedEnumTspProviderResponseStatusWithAggregatesFilter<$PrismaModel> | $Enums.TspProviderResponseStatus
|
||||||
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedEnumTspProviderResponseStatusFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedEnumTspProviderResponseStatusFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type EnumTspProviderRequestTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.TspProviderRequestType | Prisma.EnumTspProviderRequestTypeFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.TspProviderRequestType[]
|
||||||
|
notIn?: $Enums.TspProviderRequestType[]
|
||||||
|
not?: Prisma.NestedEnumTspProviderRequestTypeWithAggregatesFilter<$PrismaModel> | $Enums.TspProviderRequestType
|
||||||
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedEnumTspProviderRequestTypeFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedEnumTspProviderRequestTypeFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type EnumPaymentMethodTypeFilter<$PrismaModel = never> = {
|
export type EnumPaymentMethodTypeFilter<$PrismaModel = never> = {
|
||||||
@@ -882,11 +950,11 @@ export type NestedEnumPartnerStatusFilter<$PrismaModel = never> = {
|
|||||||
not?: Prisma.NestedEnumPartnerStatusFilter<$PrismaModel> | $Enums.PartnerStatus
|
not?: Prisma.NestedEnumPartnerStatusFilter<$PrismaModel> | $Enums.PartnerStatus
|
||||||
}
|
}
|
||||||
|
|
||||||
export type NestedEnumPartnerFiscalSwitchTypeFilter<$PrismaModel = never> = {
|
export type NestedEnumTspProviderTypeFilter<$PrismaModel = never> = {
|
||||||
equals?: $Enums.PartnerFiscalSwitchType | Prisma.EnumPartnerFiscalSwitchTypeFieldRefInput<$PrismaModel>
|
equals?: $Enums.TspProviderType | Prisma.EnumTspProviderTypeFieldRefInput<$PrismaModel>
|
||||||
in?: $Enums.PartnerFiscalSwitchType[]
|
in?: $Enums.TspProviderType[]
|
||||||
notIn?: $Enums.PartnerFiscalSwitchType[]
|
notIn?: $Enums.TspProviderType[]
|
||||||
not?: Prisma.NestedEnumPartnerFiscalSwitchTypeFilter<$PrismaModel> | $Enums.PartnerFiscalSwitchType
|
not?: Prisma.NestedEnumTspProviderTypeFilter<$PrismaModel> | $Enums.TspProviderType
|
||||||
}
|
}
|
||||||
|
|
||||||
export type NestedEnumPartnerStatusWithAggregatesFilter<$PrismaModel = never> = {
|
export type NestedEnumPartnerStatusWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
@@ -899,14 +967,14 @@ export type NestedEnumPartnerStatusWithAggregatesFilter<$PrismaModel = never> =
|
|||||||
_max?: Prisma.NestedEnumPartnerStatusFilter<$PrismaModel>
|
_max?: Prisma.NestedEnumPartnerStatusFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type NestedEnumPartnerFiscalSwitchTypeWithAggregatesFilter<$PrismaModel = never> = {
|
export type NestedEnumTspProviderTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
equals?: $Enums.PartnerFiscalSwitchType | Prisma.EnumPartnerFiscalSwitchTypeFieldRefInput<$PrismaModel>
|
equals?: $Enums.TspProviderType | Prisma.EnumTspProviderTypeFieldRefInput<$PrismaModel>
|
||||||
in?: $Enums.PartnerFiscalSwitchType[]
|
in?: $Enums.TspProviderType[]
|
||||||
notIn?: $Enums.PartnerFiscalSwitchType[]
|
notIn?: $Enums.TspProviderType[]
|
||||||
not?: Prisma.NestedEnumPartnerFiscalSwitchTypeWithAggregatesFilter<$PrismaModel> | $Enums.PartnerFiscalSwitchType
|
not?: Prisma.NestedEnumTspProviderTypeWithAggregatesFilter<$PrismaModel> | $Enums.TspProviderType
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
_min?: Prisma.NestedEnumPartnerFiscalSwitchTypeFilter<$PrismaModel>
|
_min?: Prisma.NestedEnumTspProviderTypeFilter<$PrismaModel>
|
||||||
_max?: Prisma.NestedEnumPartnerFiscalSwitchTypeFilter<$PrismaModel>
|
_max?: Prisma.NestedEnumTspProviderTypeFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type NestedEnumPOSRoleFilter<$PrismaModel = never> = {
|
export type NestedEnumPOSRoleFilter<$PrismaModel = never> = {
|
||||||
@@ -1116,6 +1184,33 @@ export type NestedEnumConsumerStatusWithAggregatesFilter<$PrismaModel = never> =
|
|||||||
_max?: Prisma.NestedEnumConsumerStatusFilter<$PrismaModel>
|
_max?: Prisma.NestedEnumConsumerStatusFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type NestedDecimalFilter<$PrismaModel = never> = {
|
||||||
|
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||||
|
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||||
|
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
not?: Prisma.NestedDecimalFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
}
|
||||||
|
|
||||||
|
export type NestedDecimalWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||||
|
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||||
|
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
not?: Prisma.NestedDecimalWithAggregatesFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
|
_avg?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||||
|
_sum?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
export type NestedEnumPOSStatusFilter<$PrismaModel = never> = {
|
export type NestedEnumPOSStatusFilter<$PrismaModel = never> = {
|
||||||
equals?: $Enums.POSStatus | Prisma.EnumPOSStatusFieldRefInput<$PrismaModel>
|
equals?: $Enums.POSStatus | Prisma.EnumPOSStatusFieldRefInput<$PrismaModel>
|
||||||
in?: $Enums.POSStatus[]
|
in?: $Enums.POSStatus[]
|
||||||
@@ -1219,17 +1314,6 @@ export type NestedDateTimeNullableWithAggregatesFilter<$PrismaModel = never> = {
|
|||||||
_max?: Prisma.NestedDateTimeNullableFilter<$PrismaModel>
|
_max?: Prisma.NestedDateTimeNullableFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type NestedDecimalFilter<$PrismaModel = never> = {
|
|
||||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
|
||||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
|
||||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedDecimalFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedEnumSKUGuildTypeFilter<$PrismaModel = never> = {
|
export type NestedEnumSKUGuildTypeFilter<$PrismaModel = never> = {
|
||||||
equals?: $Enums.SKUGuildType | Prisma.EnumSKUGuildTypeFieldRefInput<$PrismaModel>
|
equals?: $Enums.SKUGuildType | Prisma.EnumSKUGuildTypeFieldRefInput<$PrismaModel>
|
||||||
in?: $Enums.SKUGuildType[]
|
in?: $Enums.SKUGuildType[]
|
||||||
@@ -1237,22 +1321,6 @@ export type NestedEnumSKUGuildTypeFilter<$PrismaModel = never> = {
|
|||||||
not?: Prisma.NestedEnumSKUGuildTypeFilter<$PrismaModel> | $Enums.SKUGuildType
|
not?: Prisma.NestedEnumSKUGuildTypeFilter<$PrismaModel> | $Enums.SKUGuildType
|
||||||
}
|
}
|
||||||
|
|
||||||
export type NestedDecimalWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
|
||||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
|
||||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedDecimalWithAggregatesFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_avg?: Prisma.NestedDecimalFilter<$PrismaModel>
|
|
||||||
_sum?: Prisma.NestedDecimalFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedDecimalFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedDecimalFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedEnumSKUGuildTypeWithAggregatesFilter<$PrismaModel = never> = {
|
export type NestedEnumSKUGuildTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
equals?: $Enums.SKUGuildType | Prisma.EnumSKUGuildTypeFieldRefInput<$PrismaModel>
|
equals?: $Enums.SKUGuildType | Prisma.EnumSKUGuildTypeFieldRefInput<$PrismaModel>
|
||||||
in?: $Enums.SKUGuildType[]
|
in?: $Enums.SKUGuildType[]
|
||||||
@@ -1293,38 +1361,79 @@ export type NestedEnumCustomerTypeWithAggregatesFilter<$PrismaModel = never> = {
|
|||||||
_max?: Prisma.NestedEnumCustomerTypeFilter<$PrismaModel>
|
_max?: Prisma.NestedEnumCustomerTypeFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type NestedEnumFiscalResponseStatusFilter<$PrismaModel = never> = {
|
export type NestedEnumInvoiceTemplateTypeFilter<$PrismaModel = never> = {
|
||||||
equals?: $Enums.FiscalResponseStatus | Prisma.EnumFiscalResponseStatusFieldRefInput<$PrismaModel>
|
equals?: $Enums.InvoiceTemplateType | Prisma.EnumInvoiceTemplateTypeFieldRefInput<$PrismaModel>
|
||||||
in?: $Enums.FiscalResponseStatus[]
|
in?: $Enums.InvoiceTemplateType[]
|
||||||
notIn?: $Enums.FiscalResponseStatus[]
|
notIn?: $Enums.InvoiceTemplateType[]
|
||||||
not?: Prisma.NestedEnumFiscalResponseStatusFilter<$PrismaModel> | $Enums.FiscalResponseStatus
|
not?: Prisma.NestedEnumInvoiceTemplateTypeFilter<$PrismaModel> | $Enums.InvoiceTemplateType
|
||||||
}
|
}
|
||||||
|
|
||||||
export type NestedEnumFiscalRequestTypeFilter<$PrismaModel = never> = {
|
export type NestedEnumInvoiceTemplateTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
equals?: $Enums.FiscalRequestType | Prisma.EnumFiscalRequestTypeFieldRefInput<$PrismaModel>
|
equals?: $Enums.InvoiceTemplateType | Prisma.EnumInvoiceTemplateTypeFieldRefInput<$PrismaModel>
|
||||||
in?: $Enums.FiscalRequestType[]
|
in?: $Enums.InvoiceTemplateType[]
|
||||||
notIn?: $Enums.FiscalRequestType[]
|
notIn?: $Enums.InvoiceTemplateType[]
|
||||||
not?: Prisma.NestedEnumFiscalRequestTypeFilter<$PrismaModel> | $Enums.FiscalRequestType
|
not?: Prisma.NestedEnumInvoiceTemplateTypeWithAggregatesFilter<$PrismaModel> | $Enums.InvoiceTemplateType
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedEnumFiscalResponseStatusWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.FiscalResponseStatus | Prisma.EnumFiscalResponseStatusFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.FiscalResponseStatus[]
|
|
||||||
notIn?: $Enums.FiscalResponseStatus[]
|
|
||||||
not?: Prisma.NestedEnumFiscalResponseStatusWithAggregatesFilter<$PrismaModel> | $Enums.FiscalResponseStatus
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
_min?: Prisma.NestedEnumFiscalResponseStatusFilter<$PrismaModel>
|
_min?: Prisma.NestedEnumInvoiceTemplateTypeFilter<$PrismaModel>
|
||||||
_max?: Prisma.NestedEnumFiscalResponseStatusFilter<$PrismaModel>
|
_max?: Prisma.NestedEnumInvoiceTemplateTypeFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type NestedEnumFiscalRequestTypeWithAggregatesFilter<$PrismaModel = never> = {
|
export type NestedJsonFilter<$PrismaModel = never> =
|
||||||
equals?: $Enums.FiscalRequestType | Prisma.EnumFiscalRequestTypeFieldRefInput<$PrismaModel>
|
| Prisma.PatchUndefined<
|
||||||
in?: $Enums.FiscalRequestType[]
|
Prisma.Either<Required<NestedJsonFilterBase<$PrismaModel>>, Exclude<keyof Required<NestedJsonFilterBase<$PrismaModel>>, 'path'>>,
|
||||||
notIn?: $Enums.FiscalRequestType[]
|
Required<NestedJsonFilterBase<$PrismaModel>>
|
||||||
not?: Prisma.NestedEnumFiscalRequestTypeWithAggregatesFilter<$PrismaModel> | $Enums.FiscalRequestType
|
>
|
||||||
|
| Prisma.OptionalFlat<Omit<Required<NestedJsonFilterBase<$PrismaModel>>, 'path'>>
|
||||||
|
|
||||||
|
export type NestedJsonFilterBase<$PrismaModel = never> = {
|
||||||
|
equals?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
||||||
|
path?: string
|
||||||
|
mode?: Prisma.QueryMode | Prisma.EnumQueryModeFieldRefInput<$PrismaModel>
|
||||||
|
string_contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
string_starts_with?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
string_ends_with?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
array_starts_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||||
|
array_ends_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||||
|
array_contains?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||||
|
lt?: runtime.InputJsonValue
|
||||||
|
lte?: runtime.InputJsonValue
|
||||||
|
gt?: runtime.InputJsonValue
|
||||||
|
gte?: runtime.InputJsonValue
|
||||||
|
not?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
||||||
|
}
|
||||||
|
|
||||||
|
export type NestedEnumTspProviderResponseStatusFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.TspProviderResponseStatus | Prisma.EnumTspProviderResponseStatusFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.TspProviderResponseStatus[]
|
||||||
|
notIn?: $Enums.TspProviderResponseStatus[]
|
||||||
|
not?: Prisma.NestedEnumTspProviderResponseStatusFilter<$PrismaModel> | $Enums.TspProviderResponseStatus
|
||||||
|
}
|
||||||
|
|
||||||
|
export type NestedEnumTspProviderRequestTypeFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.TspProviderRequestType | Prisma.EnumTspProviderRequestTypeFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.TspProviderRequestType[]
|
||||||
|
notIn?: $Enums.TspProviderRequestType[]
|
||||||
|
not?: Prisma.NestedEnumTspProviderRequestTypeFilter<$PrismaModel> | $Enums.TspProviderRequestType
|
||||||
|
}
|
||||||
|
|
||||||
|
export type NestedEnumTspProviderResponseStatusWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.TspProviderResponseStatus | Prisma.EnumTspProviderResponseStatusFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.TspProviderResponseStatus[]
|
||||||
|
notIn?: $Enums.TspProviderResponseStatus[]
|
||||||
|
not?: Prisma.NestedEnumTspProviderResponseStatusWithAggregatesFilter<$PrismaModel> | $Enums.TspProviderResponseStatus
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
_min?: Prisma.NestedEnumFiscalRequestTypeFilter<$PrismaModel>
|
_min?: Prisma.NestedEnumTspProviderResponseStatusFilter<$PrismaModel>
|
||||||
_max?: Prisma.NestedEnumFiscalRequestTypeFilter<$PrismaModel>
|
_max?: Prisma.NestedEnumTspProviderResponseStatusFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type NestedEnumTspProviderRequestTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.TspProviderRequestType | Prisma.EnumTspProviderRequestTypeFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.TspProviderRequestType[]
|
||||||
|
notIn?: $Enums.TspProviderRequestType[]
|
||||||
|
not?: Prisma.NestedEnumTspProviderRequestTypeWithAggregatesFilter<$PrismaModel> | $Enums.TspProviderRequestType
|
||||||
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedEnumTspProviderRequestTypeFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedEnumTspProviderRequestTypeFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type NestedEnumPaymentMethodTypeFilter<$PrismaModel = never> = {
|
export type NestedEnumPaymentMethodTypeFilter<$PrismaModel = never> = {
|
||||||
|
|||||||
@@ -10,12 +10,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
export const PaymentMethodType = {
|
export const PaymentMethodType = {
|
||||||
TERMINAL: 'TERMINAL',
|
CHEQUE: 'CHEQUE',
|
||||||
CASH: 'CASH',
|
|
||||||
SET_OFF: 'SET_OFF',
|
SET_OFF: 'SET_OFF',
|
||||||
|
CASH: 'CASH',
|
||||||
|
TERMINAL: 'TERMINAL',
|
||||||
|
PAYMENT_GATEWAY: 'PAYMENT_GATEWAY',
|
||||||
CARD: 'CARD',
|
CARD: 'CARD',
|
||||||
BANK: 'BANK',
|
BANK: 'BANK',
|
||||||
CHECK: 'CHECK',
|
|
||||||
OTHER: 'OTHER'
|
OTHER: 'OTHER'
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
@@ -248,40 +249,40 @@ export const ConsumerType = {
|
|||||||
export type ConsumerType = (typeof ConsumerType)[keyof typeof ConsumerType]
|
export type ConsumerType = (typeof ConsumerType)[keyof typeof ConsumerType]
|
||||||
|
|
||||||
|
|
||||||
export const PartnerFiscalSwitchType = {
|
export const TspProviderType = {
|
||||||
NAMA: 'NAMA',
|
NAMA: 'NAMA',
|
||||||
SUN: 'SUN'
|
SUN: 'SUN'
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
export type PartnerFiscalSwitchType = (typeof PartnerFiscalSwitchType)[keyof typeof PartnerFiscalSwitchType]
|
export type TspProviderType = (typeof TspProviderType)[keyof typeof TspProviderType]
|
||||||
|
|
||||||
|
|
||||||
export const FiscalResponseStatus = {
|
export const TspProviderResponseStatus = {
|
||||||
SUCCESS: 'SUCCESS',
|
SUCCESS: 'SUCCESS',
|
||||||
FAILURE: 'FAILURE',
|
FAILURE: 'FAILURE',
|
||||||
NOT_SEND: 'NOT_SEND',
|
NOT_SEND: 'NOT_SEND',
|
||||||
QUEUED: 'QUEUED'
|
QUEUED: 'QUEUED'
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
export type FiscalResponseStatus = (typeof FiscalResponseStatus)[keyof typeof FiscalResponseStatus]
|
export type TspProviderResponseStatus = (typeof TspProviderResponseStatus)[keyof typeof TspProviderResponseStatus]
|
||||||
|
|
||||||
|
|
||||||
export const FiscalRequestType = {
|
export const TspProviderRequestType = {
|
||||||
MAIN: 'MAIN',
|
MAIN: 'MAIN',
|
||||||
UPDATE: 'UPDATE',
|
UPDATE: 'UPDATE',
|
||||||
REVOKE: 'REVOKE',
|
REVOKE: 'REVOKE',
|
||||||
REMOVE: 'REMOVE'
|
REMOVE: 'REMOVE'
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
export type FiscalRequestType = (typeof FiscalRequestType)[keyof typeof FiscalRequestType]
|
export type TspProviderRequestType = (typeof TspProviderRequestType)[keyof typeof TspProviderRequestType]
|
||||||
|
|
||||||
|
|
||||||
export const FiscalInvoiceCustomerType = {
|
export const TspProviderCustomerType = {
|
||||||
Unknown: 'Unknown',
|
Unknown: 'Unknown',
|
||||||
Known: 'Known'
|
Known: 'Known'
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
export type FiscalInvoiceCustomerType = (typeof FiscalInvoiceCustomerType)[keyof typeof FiscalInvoiceCustomerType]
|
export type TspProviderCustomerType = (typeof TspProviderCustomerType)[keyof typeof TspProviderCustomerType]
|
||||||
|
|
||||||
|
|
||||||
export const SKUGuildType = {
|
export const SKUGuildType = {
|
||||||
@@ -289,3 +290,20 @@ export const SKUGuildType = {
|
|||||||
} as const
|
} as const
|
||||||
|
|
||||||
export type SKUGuildType = (typeof SKUGuildType)[keyof typeof SKUGuildType]
|
export type SKUGuildType = (typeof SKUGuildType)[keyof typeof SKUGuildType]
|
||||||
|
|
||||||
|
|
||||||
|
export const InvoiceTemplateType = {
|
||||||
|
SALE: 'SALE',
|
||||||
|
FX_SALE: 'FX_SALE',
|
||||||
|
GOLD_JEWELRY: 'GOLD_JEWELRY',
|
||||||
|
CONTRACT: 'CONTRACT',
|
||||||
|
UTILITY: 'UTILITY',
|
||||||
|
AIR_TICKET: 'AIR_TICKET',
|
||||||
|
EXPORT: 'EXPORT',
|
||||||
|
BILL_OF_LADING: 'BILL_OF_LADING',
|
||||||
|
PETROCHEMICAL: 'PETROCHEMICAL',
|
||||||
|
COMMODITY_EXCHANGE: 'COMMODITY_EXCHANGE',
|
||||||
|
INSURANCE: 'INSURANCE'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type InvoiceTemplateType = (typeof InvoiceTemplateType)[keyof typeof InvoiceTemplateType]
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -425,8 +425,7 @@ export const ModelName = {
|
|||||||
Guild: 'Guild',
|
Guild: 'Guild',
|
||||||
SalesInvoice: 'SalesInvoice',
|
SalesInvoice: 'SalesInvoice',
|
||||||
SalesInvoiceItem: 'SalesInvoiceItem',
|
SalesInvoiceItem: 'SalesInvoiceItem',
|
||||||
SaleInvoiceFiscals: 'SaleInvoiceFiscals',
|
SaleInvoiceTspAttempts: 'SaleInvoiceTspAttempts',
|
||||||
SaleInvoiceFiscalAttempts: 'SaleInvoiceFiscalAttempts',
|
|
||||||
SalesInvoicePayment: 'SalesInvoicePayment',
|
SalesInvoicePayment: 'SalesInvoicePayment',
|
||||||
SalesInvoicePaymentTerminalInfo: 'SalesInvoicePaymentTerminalInfo',
|
SalesInvoicePaymentTerminalInfo: 'SalesInvoicePaymentTerminalInfo',
|
||||||
Service: 'Service',
|
Service: 'Service',
|
||||||
@@ -446,7 +445,7 @@ export type TypeMap<ExtArgs extends runtime.Types.Extensions.InternalArgs = runt
|
|||||||
omit: GlobalOmitOptions
|
omit: GlobalOmitOptions
|
||||||
}
|
}
|
||||||
meta: {
|
meta: {
|
||||||
modelProps: "adminAccount" | "admin" | "account" | "deviceBrand" | "device" | "licenseChargeTransaction" | "license" | "licenseActivation" | "licenseRenewChargeTransaction" | "licenseRenew" | "partnerAccountQuotaChargeTransaction" | "partnerAccountQuotaCredit" | "licenseAccountAllocation" | "partnerAccount" | "partner" | "permissionConsumer" | "permissionPos" | "permissionComplex" | "permissionBusiness" | "providerAccount" | "provider" | "consumerDevices" | "applicationReleasedInfo" | "consumerAccount" | "consumer" | "consumerIndividual" | "consumerLegal" | "businessActivity" | "complex" | "pos" | "good" | "goodCategory" | "measureUnits" | "stockKeepingUnits" | "triggerLog" | "customer" | "customerIndividual" | "customerLegal" | "guild" | "salesInvoice" | "salesInvoiceItem" | "saleInvoiceFiscals" | "saleInvoiceFiscalAttempts" | "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" | "consumerDevices" | "applicationReleasedInfo" | "consumerAccount" | "consumer" | "consumerIndividual" | "consumerLegal" | "businessActivity" | "complex" | "pos" | "good" | "goodCategory" | "measureUnits" | "stockKeepingUnits" | "triggerLog" | "customer" | "customerIndividual" | "customerLegal" | "guild" | "salesInvoice" | "salesInvoiceItem" | "saleInvoiceTspAttempts" | "salesInvoicePayment" | "salesInvoicePaymentTerminalInfo" | "service" | "serviceCategory"
|
||||||
txIsolationLevel: TransactionIsolationLevel
|
txIsolationLevel: TransactionIsolationLevel
|
||||||
}
|
}
|
||||||
model: {
|
model: {
|
||||||
@@ -3156,135 +3155,69 @@ export type TypeMap<ExtArgs extends runtime.Types.Extensions.InternalArgs = runt
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SaleInvoiceFiscals: {
|
SaleInvoiceTspAttempts: {
|
||||||
payload: Prisma.$SaleInvoiceFiscalsPayload<ExtArgs>
|
payload: Prisma.$SaleInvoiceTspAttemptsPayload<ExtArgs>
|
||||||
fields: Prisma.SaleInvoiceFiscalsFieldRefs
|
fields: Prisma.SaleInvoiceTspAttemptsFieldRefs
|
||||||
operations: {
|
operations: {
|
||||||
findUnique: {
|
findUnique: {
|
||||||
args: Prisma.SaleInvoiceFiscalsFindUniqueArgs<ExtArgs>
|
args: Prisma.SaleInvoiceTspAttemptsFindUniqueArgs<ExtArgs>
|
||||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SaleInvoiceFiscalsPayload> | null
|
result: runtime.Types.Utils.PayloadToResult<Prisma.$SaleInvoiceTspAttemptsPayload> | null
|
||||||
}
|
}
|
||||||
findUniqueOrThrow: {
|
findUniqueOrThrow: {
|
||||||
args: Prisma.SaleInvoiceFiscalsFindUniqueOrThrowArgs<ExtArgs>
|
args: Prisma.SaleInvoiceTspAttemptsFindUniqueOrThrowArgs<ExtArgs>
|
||||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SaleInvoiceFiscalsPayload>
|
result: runtime.Types.Utils.PayloadToResult<Prisma.$SaleInvoiceTspAttemptsPayload>
|
||||||
}
|
}
|
||||||
findFirst: {
|
findFirst: {
|
||||||
args: Prisma.SaleInvoiceFiscalsFindFirstArgs<ExtArgs>
|
args: Prisma.SaleInvoiceTspAttemptsFindFirstArgs<ExtArgs>
|
||||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SaleInvoiceFiscalsPayload> | null
|
result: runtime.Types.Utils.PayloadToResult<Prisma.$SaleInvoiceTspAttemptsPayload> | null
|
||||||
}
|
}
|
||||||
findFirstOrThrow: {
|
findFirstOrThrow: {
|
||||||
args: Prisma.SaleInvoiceFiscalsFindFirstOrThrowArgs<ExtArgs>
|
args: Prisma.SaleInvoiceTspAttemptsFindFirstOrThrowArgs<ExtArgs>
|
||||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SaleInvoiceFiscalsPayload>
|
result: runtime.Types.Utils.PayloadToResult<Prisma.$SaleInvoiceTspAttemptsPayload>
|
||||||
}
|
}
|
||||||
findMany: {
|
findMany: {
|
||||||
args: Prisma.SaleInvoiceFiscalsFindManyArgs<ExtArgs>
|
args: Prisma.SaleInvoiceTspAttemptsFindManyArgs<ExtArgs>
|
||||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SaleInvoiceFiscalsPayload>[]
|
result: runtime.Types.Utils.PayloadToResult<Prisma.$SaleInvoiceTspAttemptsPayload>[]
|
||||||
}
|
}
|
||||||
create: {
|
create: {
|
||||||
args: Prisma.SaleInvoiceFiscalsCreateArgs<ExtArgs>
|
args: Prisma.SaleInvoiceTspAttemptsCreateArgs<ExtArgs>
|
||||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SaleInvoiceFiscalsPayload>
|
result: runtime.Types.Utils.PayloadToResult<Prisma.$SaleInvoiceTspAttemptsPayload>
|
||||||
}
|
}
|
||||||
createMany: {
|
createMany: {
|
||||||
args: Prisma.SaleInvoiceFiscalsCreateManyArgs<ExtArgs>
|
args: Prisma.SaleInvoiceTspAttemptsCreateManyArgs<ExtArgs>
|
||||||
result: BatchPayload
|
result: BatchPayload
|
||||||
}
|
}
|
||||||
delete: {
|
delete: {
|
||||||
args: Prisma.SaleInvoiceFiscalsDeleteArgs<ExtArgs>
|
args: Prisma.SaleInvoiceTspAttemptsDeleteArgs<ExtArgs>
|
||||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SaleInvoiceFiscalsPayload>
|
result: runtime.Types.Utils.PayloadToResult<Prisma.$SaleInvoiceTspAttemptsPayload>
|
||||||
}
|
}
|
||||||
update: {
|
update: {
|
||||||
args: Prisma.SaleInvoiceFiscalsUpdateArgs<ExtArgs>
|
args: Prisma.SaleInvoiceTspAttemptsUpdateArgs<ExtArgs>
|
||||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SaleInvoiceFiscalsPayload>
|
result: runtime.Types.Utils.PayloadToResult<Prisma.$SaleInvoiceTspAttemptsPayload>
|
||||||
}
|
}
|
||||||
deleteMany: {
|
deleteMany: {
|
||||||
args: Prisma.SaleInvoiceFiscalsDeleteManyArgs<ExtArgs>
|
args: Prisma.SaleInvoiceTspAttemptsDeleteManyArgs<ExtArgs>
|
||||||
result: BatchPayload
|
result: BatchPayload
|
||||||
}
|
}
|
||||||
updateMany: {
|
updateMany: {
|
||||||
args: Prisma.SaleInvoiceFiscalsUpdateManyArgs<ExtArgs>
|
args: Prisma.SaleInvoiceTspAttemptsUpdateManyArgs<ExtArgs>
|
||||||
result: BatchPayload
|
result: BatchPayload
|
||||||
}
|
}
|
||||||
upsert: {
|
upsert: {
|
||||||
args: Prisma.SaleInvoiceFiscalsUpsertArgs<ExtArgs>
|
args: Prisma.SaleInvoiceTspAttemptsUpsertArgs<ExtArgs>
|
||||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SaleInvoiceFiscalsPayload>
|
result: runtime.Types.Utils.PayloadToResult<Prisma.$SaleInvoiceTspAttemptsPayload>
|
||||||
}
|
}
|
||||||
aggregate: {
|
aggregate: {
|
||||||
args: Prisma.SaleInvoiceFiscalsAggregateArgs<ExtArgs>
|
args: Prisma.SaleInvoiceTspAttemptsAggregateArgs<ExtArgs>
|
||||||
result: runtime.Types.Utils.Optional<Prisma.AggregateSaleInvoiceFiscals>
|
result: runtime.Types.Utils.Optional<Prisma.AggregateSaleInvoiceTspAttempts>
|
||||||
}
|
}
|
||||||
groupBy: {
|
groupBy: {
|
||||||
args: Prisma.SaleInvoiceFiscalsGroupByArgs<ExtArgs>
|
args: Prisma.SaleInvoiceTspAttemptsGroupByArgs<ExtArgs>
|
||||||
result: runtime.Types.Utils.Optional<Prisma.SaleInvoiceFiscalsGroupByOutputType>[]
|
result: runtime.Types.Utils.Optional<Prisma.SaleInvoiceTspAttemptsGroupByOutputType>[]
|
||||||
}
|
}
|
||||||
count: {
|
count: {
|
||||||
args: Prisma.SaleInvoiceFiscalsCountArgs<ExtArgs>
|
args: Prisma.SaleInvoiceTspAttemptsCountArgs<ExtArgs>
|
||||||
result: runtime.Types.Utils.Optional<Prisma.SaleInvoiceFiscalsCountAggregateOutputType> | number
|
result: runtime.Types.Utils.Optional<Prisma.SaleInvoiceTspAttemptsCountAggregateOutputType> | number
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
SaleInvoiceFiscalAttempts: {
|
|
||||||
payload: Prisma.$SaleInvoiceFiscalAttemptsPayload<ExtArgs>
|
|
||||||
fields: Prisma.SaleInvoiceFiscalAttemptsFieldRefs
|
|
||||||
operations: {
|
|
||||||
findUnique: {
|
|
||||||
args: Prisma.SaleInvoiceFiscalAttemptsFindUniqueArgs<ExtArgs>
|
|
||||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SaleInvoiceFiscalAttemptsPayload> | null
|
|
||||||
}
|
|
||||||
findUniqueOrThrow: {
|
|
||||||
args: Prisma.SaleInvoiceFiscalAttemptsFindUniqueOrThrowArgs<ExtArgs>
|
|
||||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SaleInvoiceFiscalAttemptsPayload>
|
|
||||||
}
|
|
||||||
findFirst: {
|
|
||||||
args: Prisma.SaleInvoiceFiscalAttemptsFindFirstArgs<ExtArgs>
|
|
||||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SaleInvoiceFiscalAttemptsPayload> | null
|
|
||||||
}
|
|
||||||
findFirstOrThrow: {
|
|
||||||
args: Prisma.SaleInvoiceFiscalAttemptsFindFirstOrThrowArgs<ExtArgs>
|
|
||||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SaleInvoiceFiscalAttemptsPayload>
|
|
||||||
}
|
|
||||||
findMany: {
|
|
||||||
args: Prisma.SaleInvoiceFiscalAttemptsFindManyArgs<ExtArgs>
|
|
||||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SaleInvoiceFiscalAttemptsPayload>[]
|
|
||||||
}
|
|
||||||
create: {
|
|
||||||
args: Prisma.SaleInvoiceFiscalAttemptsCreateArgs<ExtArgs>
|
|
||||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SaleInvoiceFiscalAttemptsPayload>
|
|
||||||
}
|
|
||||||
createMany: {
|
|
||||||
args: Prisma.SaleInvoiceFiscalAttemptsCreateManyArgs<ExtArgs>
|
|
||||||
result: BatchPayload
|
|
||||||
}
|
|
||||||
delete: {
|
|
||||||
args: Prisma.SaleInvoiceFiscalAttemptsDeleteArgs<ExtArgs>
|
|
||||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SaleInvoiceFiscalAttemptsPayload>
|
|
||||||
}
|
|
||||||
update: {
|
|
||||||
args: Prisma.SaleInvoiceFiscalAttemptsUpdateArgs<ExtArgs>
|
|
||||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SaleInvoiceFiscalAttemptsPayload>
|
|
||||||
}
|
|
||||||
deleteMany: {
|
|
||||||
args: Prisma.SaleInvoiceFiscalAttemptsDeleteManyArgs<ExtArgs>
|
|
||||||
result: BatchPayload
|
|
||||||
}
|
|
||||||
updateMany: {
|
|
||||||
args: Prisma.SaleInvoiceFiscalAttemptsUpdateManyArgs<ExtArgs>
|
|
||||||
result: BatchPayload
|
|
||||||
}
|
|
||||||
upsert: {
|
|
||||||
args: Prisma.SaleInvoiceFiscalAttemptsUpsertArgs<ExtArgs>
|
|
||||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SaleInvoiceFiscalAttemptsPayload>
|
|
||||||
}
|
|
||||||
aggregate: {
|
|
||||||
args: Prisma.SaleInvoiceFiscalAttemptsAggregateArgs<ExtArgs>
|
|
||||||
result: runtime.Types.Utils.Optional<Prisma.AggregateSaleInvoiceFiscalAttempts>
|
|
||||||
}
|
|
||||||
groupBy: {
|
|
||||||
args: Prisma.SaleInvoiceFiscalAttemptsGroupByArgs<ExtArgs>
|
|
||||||
result: runtime.Types.Utils.Optional<Prisma.SaleInvoiceFiscalAttemptsGroupByOutputType>[]
|
|
||||||
}
|
|
||||||
count: {
|
|
||||||
args: Prisma.SaleInvoiceFiscalAttemptsCountArgs<ExtArgs>
|
|
||||||
result: runtime.Types.Utils.Optional<Prisma.SaleInvoiceFiscalAttemptsCountAggregateOutputType> | number
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3762,7 +3695,7 @@ export const PartnerScalarFieldEnum = {
|
|||||||
name: 'name',
|
name: 'name',
|
||||||
code: 'code',
|
code: 'code',
|
||||||
status: 'status',
|
status: 'status',
|
||||||
fiscal_switch_type: 'fiscal_switch_type',
|
tsp_provider: 'tsp_provider',
|
||||||
logo_url: 'logo_url',
|
logo_url: 'logo_url',
|
||||||
created_at: 'created_at',
|
created_at: 'created_at',
|
||||||
updated_at: 'updated_at'
|
updated_at: 'updated_at'
|
||||||
@@ -3927,6 +3860,7 @@ export const BusinessActivityScalarFieldEnum = {
|
|||||||
name: 'name',
|
name: 'name',
|
||||||
fiscal_id: 'fiscal_id',
|
fiscal_id: 'fiscal_id',
|
||||||
partner_token: 'partner_token',
|
partner_token: 'partner_token',
|
||||||
|
invoice_number_sequence: 'invoice_number_sequence',
|
||||||
created_at: 'created_at',
|
created_at: 'created_at',
|
||||||
updated_at: 'updated_at',
|
updated_at: 'updated_at',
|
||||||
guild_id: 'guild_id',
|
guild_id: 'guild_id',
|
||||||
@@ -4082,6 +4016,7 @@ export type CustomerLegalScalarFieldEnum = (typeof CustomerLegalScalarFieldEnum)
|
|||||||
export const GuildScalarFieldEnum = {
|
export const GuildScalarFieldEnum = {
|
||||||
id: 'id',
|
id: 'id',
|
||||||
name: 'name',
|
name: 'name',
|
||||||
|
invoice_template: 'invoice_template',
|
||||||
code: 'code',
|
code: 'code',
|
||||||
created_at: 'created_at',
|
created_at: 'created_at',
|
||||||
updated_at: 'updated_at'
|
updated_at: 'updated_at'
|
||||||
@@ -4130,19 +4065,7 @@ export const SalesInvoiceItemScalarFieldEnum = {
|
|||||||
export type SalesInvoiceItemScalarFieldEnum = (typeof SalesInvoiceItemScalarFieldEnum)[keyof typeof SalesInvoiceItemScalarFieldEnum]
|
export type SalesInvoiceItemScalarFieldEnum = (typeof SalesInvoiceItemScalarFieldEnum)[keyof typeof SalesInvoiceItemScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const SaleInvoiceFiscalsScalarFieldEnum = {
|
export const SaleInvoiceTspAttemptsScalarFieldEnum = {
|
||||||
id: 'id',
|
|
||||||
retry_count: 'retry_count',
|
|
||||||
last_attempt_at: 'last_attempt_at',
|
|
||||||
created_at: 'created_at',
|
|
||||||
updated_at: 'updated_at',
|
|
||||||
invoice_id: 'invoice_id'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type SaleInvoiceFiscalsScalarFieldEnum = (typeof SaleInvoiceFiscalsScalarFieldEnum)[keyof typeof SaleInvoiceFiscalsScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const SaleInvoiceFiscalAttemptsScalarFieldEnum = {
|
|
||||||
id: 'id',
|
id: 'id',
|
||||||
attempt_no: 'attempt_no',
|
attempt_no: 'attempt_no',
|
||||||
status: 'status',
|
status: 'status',
|
||||||
@@ -4154,10 +4077,10 @@ export const SaleInvoiceFiscalAttemptsScalarFieldEnum = {
|
|||||||
sent_at: 'sent_at',
|
sent_at: 'sent_at',
|
||||||
received_at: 'received_at',
|
received_at: 'received_at',
|
||||||
created_at: 'created_at',
|
created_at: 'created_at',
|
||||||
fiscal_id: 'fiscal_id'
|
invoice_id: 'invoice_id'
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
export type SaleInvoiceFiscalAttemptsScalarFieldEnum = (typeof SaleInvoiceFiscalAttemptsScalarFieldEnum)[keyof typeof SaleInvoiceFiscalAttemptsScalarFieldEnum]
|
export type SaleInvoiceTspAttemptsScalarFieldEnum = (typeof SaleInvoiceTspAttemptsScalarFieldEnum)[keyof typeof SaleInvoiceTspAttemptsScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const SalesInvoicePaymentScalarFieldEnum = {
|
export const SalesInvoicePaymentScalarFieldEnum = {
|
||||||
@@ -4237,6 +4160,13 @@ export const NullableJsonNullValueInput = {
|
|||||||
export type NullableJsonNullValueInput = (typeof NullableJsonNullValueInput)[keyof typeof NullableJsonNullValueInput]
|
export type NullableJsonNullValueInput = (typeof NullableJsonNullValueInput)[keyof typeof NullableJsonNullValueInput]
|
||||||
|
|
||||||
|
|
||||||
|
export const JsonNullValueInput = {
|
||||||
|
JsonNull: JsonNull
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type JsonNullValueInput = (typeof JsonNullValueInput)[keyof typeof JsonNullValueInput]
|
||||||
|
|
||||||
|
|
||||||
export const AdminAccountOrderByRelevanceFieldEnum = {
|
export const AdminAccountOrderByRelevanceFieldEnum = {
|
||||||
id: 'id',
|
id: 'id',
|
||||||
admin_id: 'admin_id',
|
admin_id: 'admin_id',
|
||||||
@@ -4679,22 +4609,14 @@ export const SalesInvoiceItemOrderByRelevanceFieldEnum = {
|
|||||||
export type SalesInvoiceItemOrderByRelevanceFieldEnum = (typeof SalesInvoiceItemOrderByRelevanceFieldEnum)[keyof typeof SalesInvoiceItemOrderByRelevanceFieldEnum]
|
export type SalesInvoiceItemOrderByRelevanceFieldEnum = (typeof SalesInvoiceItemOrderByRelevanceFieldEnum)[keyof typeof SalesInvoiceItemOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const SaleInvoiceFiscalsOrderByRelevanceFieldEnum = {
|
export const SaleInvoiceTspAttemptsOrderByRelevanceFieldEnum = {
|
||||||
id: 'id',
|
|
||||||
invoice_id: 'invoice_id'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type SaleInvoiceFiscalsOrderByRelevanceFieldEnum = (typeof SaleInvoiceFiscalsOrderByRelevanceFieldEnum)[keyof typeof SaleInvoiceFiscalsOrderByRelevanceFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const SaleInvoiceFiscalAttemptsOrderByRelevanceFieldEnum = {
|
|
||||||
id: 'id',
|
id: 'id',
|
||||||
tax_id: 'tax_id',
|
tax_id: 'tax_id',
|
||||||
error_message: 'error_message',
|
error_message: 'error_message',
|
||||||
fiscal_id: 'fiscal_id'
|
invoice_id: 'invoice_id'
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
export type SaleInvoiceFiscalAttemptsOrderByRelevanceFieldEnum = (typeof SaleInvoiceFiscalAttemptsOrderByRelevanceFieldEnum)[keyof typeof SaleInvoiceFiscalAttemptsOrderByRelevanceFieldEnum]
|
export type SaleInvoiceTspAttemptsOrderByRelevanceFieldEnum = (typeof SaleInvoiceTspAttemptsOrderByRelevanceFieldEnum)[keyof typeof SaleInvoiceTspAttemptsOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const SalesInvoicePaymentOrderByRelevanceFieldEnum = {
|
export const SalesInvoicePaymentOrderByRelevanceFieldEnum = {
|
||||||
@@ -4801,9 +4723,9 @@ export type EnumPartnerStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$Pr
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reference to a field of type 'PartnerFiscalSwitchType'
|
* Reference to a field of type 'TspProviderType'
|
||||||
*/
|
*/
|
||||||
export type EnumPartnerFiscalSwitchTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'PartnerFiscalSwitchType'>
|
export type EnumTspProviderTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'TspProviderType'>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -4898,6 +4820,13 @@ export type EnumConsumerStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$P
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reference to a field of type 'Decimal'
|
||||||
|
*/
|
||||||
|
export type DecimalFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Decimal'>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reference to a field of type 'POSStatus'
|
* Reference to a field of type 'POSStatus'
|
||||||
*/
|
*/
|
||||||
@@ -4919,13 +4848,6 @@ export type EnumGoodPricingModelFieldRefInput<$PrismaModel> = FieldRefInputType<
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reference to a field of type 'Decimal'
|
|
||||||
*/
|
|
||||||
export type DecimalFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Decimal'>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reference to a field of type 'SKUGuildType'
|
* Reference to a field of type 'SKUGuildType'
|
||||||
*/
|
*/
|
||||||
@@ -4941,16 +4863,23 @@ export type EnumCustomerTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$Pri
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reference to a field of type 'FiscalResponseStatus'
|
* Reference to a field of type 'InvoiceTemplateType'
|
||||||
*/
|
*/
|
||||||
export type EnumFiscalResponseStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'FiscalResponseStatus'>
|
export type EnumInvoiceTemplateTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'InvoiceTemplateType'>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reference to a field of type 'FiscalRequestType'
|
* Reference to a field of type 'TspProviderResponseStatus'
|
||||||
*/
|
*/
|
||||||
export type EnumFiscalRequestTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'FiscalRequestType'>
|
export type EnumTspProviderResponseStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'TspProviderResponseStatus'>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reference to a field of type 'TspProviderRequestType'
|
||||||
|
*/
|
||||||
|
export type EnumTspProviderRequestTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'TspProviderRequestType'>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -5103,8 +5032,7 @@ export type GlobalOmitConfig = {
|
|||||||
guild?: Prisma.GuildOmit
|
guild?: Prisma.GuildOmit
|
||||||
salesInvoice?: Prisma.SalesInvoiceOmit
|
salesInvoice?: Prisma.SalesInvoiceOmit
|
||||||
salesInvoiceItem?: Prisma.SalesInvoiceItemOmit
|
salesInvoiceItem?: Prisma.SalesInvoiceItemOmit
|
||||||
saleInvoiceFiscals?: Prisma.SaleInvoiceFiscalsOmit
|
saleInvoiceTspAttempts?: Prisma.SaleInvoiceTspAttemptsOmit
|
||||||
saleInvoiceFiscalAttempts?: Prisma.SaleInvoiceFiscalAttemptsOmit
|
|
||||||
salesInvoicePayment?: Prisma.SalesInvoicePaymentOmit
|
salesInvoicePayment?: Prisma.SalesInvoicePaymentOmit
|
||||||
salesInvoicePaymentTerminalInfo?: Prisma.SalesInvoicePaymentTerminalInfoOmit
|
salesInvoicePaymentTerminalInfo?: Prisma.SalesInvoicePaymentTerminalInfoOmit
|
||||||
service?: Prisma.ServiceOmit
|
service?: Prisma.ServiceOmit
|
||||||
|
|||||||
@@ -92,8 +92,7 @@ export const ModelName = {
|
|||||||
Guild: 'Guild',
|
Guild: 'Guild',
|
||||||
SalesInvoice: 'SalesInvoice',
|
SalesInvoice: 'SalesInvoice',
|
||||||
SalesInvoiceItem: 'SalesInvoiceItem',
|
SalesInvoiceItem: 'SalesInvoiceItem',
|
||||||
SaleInvoiceFiscals: 'SaleInvoiceFiscals',
|
SaleInvoiceTspAttempts: 'SaleInvoiceTspAttempts',
|
||||||
SaleInvoiceFiscalAttempts: 'SaleInvoiceFiscalAttempts',
|
|
||||||
SalesInvoicePayment: 'SalesInvoicePayment',
|
SalesInvoicePayment: 'SalesInvoicePayment',
|
||||||
SalesInvoicePaymentTerminalInfo: 'SalesInvoicePaymentTerminalInfo',
|
SalesInvoicePaymentTerminalInfo: 'SalesInvoicePaymentTerminalInfo',
|
||||||
Service: 'Service',
|
Service: 'Service',
|
||||||
@@ -287,7 +286,7 @@ export const PartnerScalarFieldEnum = {
|
|||||||
name: 'name',
|
name: 'name',
|
||||||
code: 'code',
|
code: 'code',
|
||||||
status: 'status',
|
status: 'status',
|
||||||
fiscal_switch_type: 'fiscal_switch_type',
|
tsp_provider: 'tsp_provider',
|
||||||
logo_url: 'logo_url',
|
logo_url: 'logo_url',
|
||||||
created_at: 'created_at',
|
created_at: 'created_at',
|
||||||
updated_at: 'updated_at'
|
updated_at: 'updated_at'
|
||||||
@@ -452,6 +451,7 @@ export const BusinessActivityScalarFieldEnum = {
|
|||||||
name: 'name',
|
name: 'name',
|
||||||
fiscal_id: 'fiscal_id',
|
fiscal_id: 'fiscal_id',
|
||||||
partner_token: 'partner_token',
|
partner_token: 'partner_token',
|
||||||
|
invoice_number_sequence: 'invoice_number_sequence',
|
||||||
created_at: 'created_at',
|
created_at: 'created_at',
|
||||||
updated_at: 'updated_at',
|
updated_at: 'updated_at',
|
||||||
guild_id: 'guild_id',
|
guild_id: 'guild_id',
|
||||||
@@ -607,6 +607,7 @@ export type CustomerLegalScalarFieldEnum = (typeof CustomerLegalScalarFieldEnum)
|
|||||||
export const GuildScalarFieldEnum = {
|
export const GuildScalarFieldEnum = {
|
||||||
id: 'id',
|
id: 'id',
|
||||||
name: 'name',
|
name: 'name',
|
||||||
|
invoice_template: 'invoice_template',
|
||||||
code: 'code',
|
code: 'code',
|
||||||
created_at: 'created_at',
|
created_at: 'created_at',
|
||||||
updated_at: 'updated_at'
|
updated_at: 'updated_at'
|
||||||
@@ -655,19 +656,7 @@ export const SalesInvoiceItemScalarFieldEnum = {
|
|||||||
export type SalesInvoiceItemScalarFieldEnum = (typeof SalesInvoiceItemScalarFieldEnum)[keyof typeof SalesInvoiceItemScalarFieldEnum]
|
export type SalesInvoiceItemScalarFieldEnum = (typeof SalesInvoiceItemScalarFieldEnum)[keyof typeof SalesInvoiceItemScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const SaleInvoiceFiscalsScalarFieldEnum = {
|
export const SaleInvoiceTspAttemptsScalarFieldEnum = {
|
||||||
id: 'id',
|
|
||||||
retry_count: 'retry_count',
|
|
||||||
last_attempt_at: 'last_attempt_at',
|
|
||||||
created_at: 'created_at',
|
|
||||||
updated_at: 'updated_at',
|
|
||||||
invoice_id: 'invoice_id'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type SaleInvoiceFiscalsScalarFieldEnum = (typeof SaleInvoiceFiscalsScalarFieldEnum)[keyof typeof SaleInvoiceFiscalsScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const SaleInvoiceFiscalAttemptsScalarFieldEnum = {
|
|
||||||
id: 'id',
|
id: 'id',
|
||||||
attempt_no: 'attempt_no',
|
attempt_no: 'attempt_no',
|
||||||
status: 'status',
|
status: 'status',
|
||||||
@@ -679,10 +668,10 @@ export const SaleInvoiceFiscalAttemptsScalarFieldEnum = {
|
|||||||
sent_at: 'sent_at',
|
sent_at: 'sent_at',
|
||||||
received_at: 'received_at',
|
received_at: 'received_at',
|
||||||
created_at: 'created_at',
|
created_at: 'created_at',
|
||||||
fiscal_id: 'fiscal_id'
|
invoice_id: 'invoice_id'
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
export type SaleInvoiceFiscalAttemptsScalarFieldEnum = (typeof SaleInvoiceFiscalAttemptsScalarFieldEnum)[keyof typeof SaleInvoiceFiscalAttemptsScalarFieldEnum]
|
export type SaleInvoiceTspAttemptsScalarFieldEnum = (typeof SaleInvoiceTspAttemptsScalarFieldEnum)[keyof typeof SaleInvoiceTspAttemptsScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const SalesInvoicePaymentScalarFieldEnum = {
|
export const SalesInvoicePaymentScalarFieldEnum = {
|
||||||
@@ -762,6 +751,13 @@ export const NullableJsonNullValueInput = {
|
|||||||
export type NullableJsonNullValueInput = (typeof NullableJsonNullValueInput)[keyof typeof NullableJsonNullValueInput]
|
export type NullableJsonNullValueInput = (typeof NullableJsonNullValueInput)[keyof typeof NullableJsonNullValueInput]
|
||||||
|
|
||||||
|
|
||||||
|
export const JsonNullValueInput = {
|
||||||
|
JsonNull: JsonNull
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type JsonNullValueInput = (typeof JsonNullValueInput)[keyof typeof JsonNullValueInput]
|
||||||
|
|
||||||
|
|
||||||
export const AdminAccountOrderByRelevanceFieldEnum = {
|
export const AdminAccountOrderByRelevanceFieldEnum = {
|
||||||
id: 'id',
|
id: 'id',
|
||||||
admin_id: 'admin_id',
|
admin_id: 'admin_id',
|
||||||
@@ -1204,22 +1200,14 @@ export const SalesInvoiceItemOrderByRelevanceFieldEnum = {
|
|||||||
export type SalesInvoiceItemOrderByRelevanceFieldEnum = (typeof SalesInvoiceItemOrderByRelevanceFieldEnum)[keyof typeof SalesInvoiceItemOrderByRelevanceFieldEnum]
|
export type SalesInvoiceItemOrderByRelevanceFieldEnum = (typeof SalesInvoiceItemOrderByRelevanceFieldEnum)[keyof typeof SalesInvoiceItemOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const SaleInvoiceFiscalsOrderByRelevanceFieldEnum = {
|
export const SaleInvoiceTspAttemptsOrderByRelevanceFieldEnum = {
|
||||||
id: 'id',
|
|
||||||
invoice_id: 'invoice_id'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type SaleInvoiceFiscalsOrderByRelevanceFieldEnum = (typeof SaleInvoiceFiscalsOrderByRelevanceFieldEnum)[keyof typeof SaleInvoiceFiscalsOrderByRelevanceFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const SaleInvoiceFiscalAttemptsOrderByRelevanceFieldEnum = {
|
|
||||||
id: 'id',
|
id: 'id',
|
||||||
tax_id: 'tax_id',
|
tax_id: 'tax_id',
|
||||||
error_message: 'error_message',
|
error_message: 'error_message',
|
||||||
fiscal_id: 'fiscal_id'
|
invoice_id: 'invoice_id'
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
export type SaleInvoiceFiscalAttemptsOrderByRelevanceFieldEnum = (typeof SaleInvoiceFiscalAttemptsOrderByRelevanceFieldEnum)[keyof typeof SaleInvoiceFiscalAttemptsOrderByRelevanceFieldEnum]
|
export type SaleInvoiceTspAttemptsOrderByRelevanceFieldEnum = (typeof SaleInvoiceTspAttemptsOrderByRelevanceFieldEnum)[keyof typeof SaleInvoiceTspAttemptsOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const SalesInvoicePaymentOrderByRelevanceFieldEnum = {
|
export const SalesInvoicePaymentOrderByRelevanceFieldEnum = {
|
||||||
|
|||||||
@@ -49,8 +49,7 @@ export type * from './models/CustomerLegal.js'
|
|||||||
export type * from './models/Guild.js'
|
export type * from './models/Guild.js'
|
||||||
export type * from './models/SalesInvoice.js'
|
export type * from './models/SalesInvoice.js'
|
||||||
export type * from './models/SalesInvoiceItem.js'
|
export type * from './models/SalesInvoiceItem.js'
|
||||||
export type * from './models/SaleInvoiceFiscals.js'
|
export type * from './models/SaleInvoiceTspAttempts.js'
|
||||||
export type * from './models/SaleInvoiceFiscalAttempts.js'
|
|
||||||
export type * from './models/SalesInvoicePayment.js'
|
export type * from './models/SalesInvoicePayment.js'
|
||||||
export type * from './models/SalesInvoicePaymentTerminalInfo.js'
|
export type * from './models/SalesInvoicePaymentTerminalInfo.js'
|
||||||
export type * from './models/Service.js'
|
export type * from './models/Service.js'
|
||||||
|
|||||||
@@ -20,16 +20,27 @@ export type BusinessActivityModel = runtime.Types.Result.DefaultSelection<Prisma
|
|||||||
|
|
||||||
export type AggregateBusinessActivity = {
|
export type AggregateBusinessActivity = {
|
||||||
_count: BusinessActivityCountAggregateOutputType | null
|
_count: BusinessActivityCountAggregateOutputType | null
|
||||||
|
_avg: BusinessActivityAvgAggregateOutputType | null
|
||||||
|
_sum: BusinessActivitySumAggregateOutputType | null
|
||||||
_min: BusinessActivityMinAggregateOutputType | null
|
_min: BusinessActivityMinAggregateOutputType | null
|
||||||
_max: BusinessActivityMaxAggregateOutputType | null
|
_max: BusinessActivityMaxAggregateOutputType | null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type BusinessActivityAvgAggregateOutputType = {
|
||||||
|
invoice_number_sequence: runtime.Decimal | null
|
||||||
|
}
|
||||||
|
|
||||||
|
export type BusinessActivitySumAggregateOutputType = {
|
||||||
|
invoice_number_sequence: runtime.Decimal | null
|
||||||
|
}
|
||||||
|
|
||||||
export type BusinessActivityMinAggregateOutputType = {
|
export type BusinessActivityMinAggregateOutputType = {
|
||||||
id: string | null
|
id: string | null
|
||||||
economic_code: string | null
|
economic_code: string | null
|
||||||
name: string | null
|
name: string | null
|
||||||
fiscal_id: string | null
|
fiscal_id: string | null
|
||||||
partner_token: string | null
|
partner_token: string | null
|
||||||
|
invoice_number_sequence: runtime.Decimal | null
|
||||||
created_at: Date | null
|
created_at: Date | null
|
||||||
updated_at: Date | null
|
updated_at: Date | null
|
||||||
guild_id: string | null
|
guild_id: string | null
|
||||||
@@ -42,6 +53,7 @@ export type BusinessActivityMaxAggregateOutputType = {
|
|||||||
name: string | null
|
name: string | null
|
||||||
fiscal_id: string | null
|
fiscal_id: string | null
|
||||||
partner_token: string | null
|
partner_token: string | null
|
||||||
|
invoice_number_sequence: runtime.Decimal | null
|
||||||
created_at: Date | null
|
created_at: Date | null
|
||||||
updated_at: Date | null
|
updated_at: Date | null
|
||||||
guild_id: string | null
|
guild_id: string | null
|
||||||
@@ -54,6 +66,7 @@ export type BusinessActivityCountAggregateOutputType = {
|
|||||||
name: number
|
name: number
|
||||||
fiscal_id: number
|
fiscal_id: number
|
||||||
partner_token: number
|
partner_token: number
|
||||||
|
invoice_number_sequence: number
|
||||||
created_at: number
|
created_at: number
|
||||||
updated_at: number
|
updated_at: number
|
||||||
guild_id: number
|
guild_id: number
|
||||||
@@ -62,12 +75,21 @@ export type BusinessActivityCountAggregateOutputType = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export type BusinessActivityAvgAggregateInputType = {
|
||||||
|
invoice_number_sequence?: true
|
||||||
|
}
|
||||||
|
|
||||||
|
export type BusinessActivitySumAggregateInputType = {
|
||||||
|
invoice_number_sequence?: true
|
||||||
|
}
|
||||||
|
|
||||||
export type BusinessActivityMinAggregateInputType = {
|
export type BusinessActivityMinAggregateInputType = {
|
||||||
id?: true
|
id?: true
|
||||||
economic_code?: true
|
economic_code?: true
|
||||||
name?: true
|
name?: true
|
||||||
fiscal_id?: true
|
fiscal_id?: true
|
||||||
partner_token?: true
|
partner_token?: true
|
||||||
|
invoice_number_sequence?: true
|
||||||
created_at?: true
|
created_at?: true
|
||||||
updated_at?: true
|
updated_at?: true
|
||||||
guild_id?: true
|
guild_id?: true
|
||||||
@@ -80,6 +102,7 @@ export type BusinessActivityMaxAggregateInputType = {
|
|||||||
name?: true
|
name?: true
|
||||||
fiscal_id?: true
|
fiscal_id?: true
|
||||||
partner_token?: true
|
partner_token?: true
|
||||||
|
invoice_number_sequence?: true
|
||||||
created_at?: true
|
created_at?: true
|
||||||
updated_at?: true
|
updated_at?: true
|
||||||
guild_id?: true
|
guild_id?: true
|
||||||
@@ -92,6 +115,7 @@ export type BusinessActivityCountAggregateInputType = {
|
|||||||
name?: true
|
name?: true
|
||||||
fiscal_id?: true
|
fiscal_id?: true
|
||||||
partner_token?: true
|
partner_token?: true
|
||||||
|
invoice_number_sequence?: true
|
||||||
created_at?: true
|
created_at?: true
|
||||||
updated_at?: true
|
updated_at?: true
|
||||||
guild_id?: true
|
guild_id?: true
|
||||||
@@ -134,6 +158,18 @@ export type BusinessActivityAggregateArgs<ExtArgs extends runtime.Types.Extensio
|
|||||||
* Count returned BusinessActivities
|
* Count returned BusinessActivities
|
||||||
**/
|
**/
|
||||||
_count?: true | BusinessActivityCountAggregateInputType
|
_count?: true | BusinessActivityCountAggregateInputType
|
||||||
|
/**
|
||||||
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
||||||
|
*
|
||||||
|
* Select which fields to average
|
||||||
|
**/
|
||||||
|
_avg?: BusinessActivityAvgAggregateInputType
|
||||||
|
/**
|
||||||
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
||||||
|
*
|
||||||
|
* Select which fields to sum
|
||||||
|
**/
|
||||||
|
_sum?: BusinessActivitySumAggregateInputType
|
||||||
/**
|
/**
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
||||||
*
|
*
|
||||||
@@ -167,6 +203,8 @@ export type BusinessActivityGroupByArgs<ExtArgs extends runtime.Types.Extensions
|
|||||||
take?: number
|
take?: number
|
||||||
skip?: number
|
skip?: number
|
||||||
_count?: BusinessActivityCountAggregateInputType | true
|
_count?: BusinessActivityCountAggregateInputType | true
|
||||||
|
_avg?: BusinessActivityAvgAggregateInputType
|
||||||
|
_sum?: BusinessActivitySumAggregateInputType
|
||||||
_min?: BusinessActivityMinAggregateInputType
|
_min?: BusinessActivityMinAggregateInputType
|
||||||
_max?: BusinessActivityMaxAggregateInputType
|
_max?: BusinessActivityMaxAggregateInputType
|
||||||
}
|
}
|
||||||
@@ -177,11 +215,14 @@ export type BusinessActivityGroupByOutputType = {
|
|||||||
name: string
|
name: string
|
||||||
fiscal_id: string
|
fiscal_id: string
|
||||||
partner_token: string
|
partner_token: string
|
||||||
|
invoice_number_sequence: runtime.Decimal
|
||||||
created_at: Date
|
created_at: Date
|
||||||
updated_at: Date
|
updated_at: Date
|
||||||
guild_id: string
|
guild_id: string
|
||||||
consumer_id: string
|
consumer_id: string
|
||||||
_count: BusinessActivityCountAggregateOutputType | null
|
_count: BusinessActivityCountAggregateOutputType | null
|
||||||
|
_avg: BusinessActivityAvgAggregateOutputType | null
|
||||||
|
_sum: BusinessActivitySumAggregateOutputType | null
|
||||||
_min: BusinessActivityMinAggregateOutputType | null
|
_min: BusinessActivityMinAggregateOutputType | null
|
||||||
_max: BusinessActivityMaxAggregateOutputType | null
|
_max: BusinessActivityMaxAggregateOutputType | null
|
||||||
}
|
}
|
||||||
@@ -210,6 +251,7 @@ export type BusinessActivityWhereInput = {
|
|||||||
name?: Prisma.StringFilter<"BusinessActivity"> | string
|
name?: Prisma.StringFilter<"BusinessActivity"> | string
|
||||||
fiscal_id?: Prisma.StringFilter<"BusinessActivity"> | string
|
fiscal_id?: Prisma.StringFilter<"BusinessActivity"> | string
|
||||||
partner_token?: Prisma.StringFilter<"BusinessActivity"> | string
|
partner_token?: Prisma.StringFilter<"BusinessActivity"> | string
|
||||||
|
invoice_number_sequence?: Prisma.DecimalFilter<"BusinessActivity"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Prisma.DateTimeFilter<"BusinessActivity"> | Date | string
|
created_at?: Prisma.DateTimeFilter<"BusinessActivity"> | Date | string
|
||||||
updated_at?: Prisma.DateTimeFilter<"BusinessActivity"> | Date | string
|
updated_at?: Prisma.DateTimeFilter<"BusinessActivity"> | Date | string
|
||||||
guild_id?: Prisma.StringFilter<"BusinessActivity"> | string
|
guild_id?: Prisma.StringFilter<"BusinessActivity"> | string
|
||||||
@@ -230,6 +272,7 @@ export type BusinessActivityOrderByWithRelationInput = {
|
|||||||
name?: Prisma.SortOrder
|
name?: Prisma.SortOrder
|
||||||
fiscal_id?: Prisma.SortOrder
|
fiscal_id?: Prisma.SortOrder
|
||||||
partner_token?: Prisma.SortOrder
|
partner_token?: Prisma.SortOrder
|
||||||
|
invoice_number_sequence?: Prisma.SortOrder
|
||||||
created_at?: Prisma.SortOrder
|
created_at?: Prisma.SortOrder
|
||||||
updated_at?: Prisma.SortOrder
|
updated_at?: Prisma.SortOrder
|
||||||
guild_id?: Prisma.SortOrder
|
guild_id?: Prisma.SortOrder
|
||||||
@@ -255,6 +298,7 @@ export type BusinessActivityWhereUniqueInput = Prisma.AtLeast<{
|
|||||||
name?: Prisma.StringFilter<"BusinessActivity"> | string
|
name?: Prisma.StringFilter<"BusinessActivity"> | string
|
||||||
fiscal_id?: Prisma.StringFilter<"BusinessActivity"> | string
|
fiscal_id?: Prisma.StringFilter<"BusinessActivity"> | string
|
||||||
partner_token?: Prisma.StringFilter<"BusinessActivity"> | string
|
partner_token?: Prisma.StringFilter<"BusinessActivity"> | string
|
||||||
|
invoice_number_sequence?: Prisma.DecimalFilter<"BusinessActivity"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Prisma.DateTimeFilter<"BusinessActivity"> | Date | string
|
created_at?: Prisma.DateTimeFilter<"BusinessActivity"> | Date | string
|
||||||
updated_at?: Prisma.DateTimeFilter<"BusinessActivity"> | Date | string
|
updated_at?: Prisma.DateTimeFilter<"BusinessActivity"> | Date | string
|
||||||
guild_id?: Prisma.StringFilter<"BusinessActivity"> | string
|
guild_id?: Prisma.StringFilter<"BusinessActivity"> | string
|
||||||
@@ -275,13 +319,16 @@ export type BusinessActivityOrderByWithAggregationInput = {
|
|||||||
name?: Prisma.SortOrder
|
name?: Prisma.SortOrder
|
||||||
fiscal_id?: Prisma.SortOrder
|
fiscal_id?: Prisma.SortOrder
|
||||||
partner_token?: Prisma.SortOrder
|
partner_token?: Prisma.SortOrder
|
||||||
|
invoice_number_sequence?: Prisma.SortOrder
|
||||||
created_at?: Prisma.SortOrder
|
created_at?: Prisma.SortOrder
|
||||||
updated_at?: Prisma.SortOrder
|
updated_at?: Prisma.SortOrder
|
||||||
guild_id?: Prisma.SortOrder
|
guild_id?: Prisma.SortOrder
|
||||||
consumer_id?: Prisma.SortOrder
|
consumer_id?: Prisma.SortOrder
|
||||||
_count?: Prisma.BusinessActivityCountOrderByAggregateInput
|
_count?: Prisma.BusinessActivityCountOrderByAggregateInput
|
||||||
|
_avg?: Prisma.BusinessActivityAvgOrderByAggregateInput
|
||||||
_max?: Prisma.BusinessActivityMaxOrderByAggregateInput
|
_max?: Prisma.BusinessActivityMaxOrderByAggregateInput
|
||||||
_min?: Prisma.BusinessActivityMinOrderByAggregateInput
|
_min?: Prisma.BusinessActivityMinOrderByAggregateInput
|
||||||
|
_sum?: Prisma.BusinessActivitySumOrderByAggregateInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type BusinessActivityScalarWhereWithAggregatesInput = {
|
export type BusinessActivityScalarWhereWithAggregatesInput = {
|
||||||
@@ -293,6 +340,7 @@ export type BusinessActivityScalarWhereWithAggregatesInput = {
|
|||||||
name?: Prisma.StringWithAggregatesFilter<"BusinessActivity"> | string
|
name?: Prisma.StringWithAggregatesFilter<"BusinessActivity"> | string
|
||||||
fiscal_id?: Prisma.StringWithAggregatesFilter<"BusinessActivity"> | string
|
fiscal_id?: Prisma.StringWithAggregatesFilter<"BusinessActivity"> | string
|
||||||
partner_token?: Prisma.StringWithAggregatesFilter<"BusinessActivity"> | string
|
partner_token?: Prisma.StringWithAggregatesFilter<"BusinessActivity"> | string
|
||||||
|
invoice_number_sequence?: Prisma.DecimalWithAggregatesFilter<"BusinessActivity"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Prisma.DateTimeWithAggregatesFilter<"BusinessActivity"> | Date | string
|
created_at?: Prisma.DateTimeWithAggregatesFilter<"BusinessActivity"> | Date | string
|
||||||
updated_at?: Prisma.DateTimeWithAggregatesFilter<"BusinessActivity"> | Date | string
|
updated_at?: Prisma.DateTimeWithAggregatesFilter<"BusinessActivity"> | Date | string
|
||||||
guild_id?: Prisma.StringWithAggregatesFilter<"BusinessActivity"> | string
|
guild_id?: Prisma.StringWithAggregatesFilter<"BusinessActivity"> | string
|
||||||
@@ -305,6 +353,7 @@ export type BusinessActivityCreateInput = {
|
|||||||
name: string
|
name: string
|
||||||
fiscal_id: string
|
fiscal_id: string
|
||||||
partner_token: string
|
partner_token: string
|
||||||
|
invoice_number_sequence?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
guild: Prisma.GuildCreateNestedOneWithoutBusiness_activitiesInput
|
guild: Prisma.GuildCreateNestedOneWithoutBusiness_activitiesInput
|
||||||
@@ -323,6 +372,7 @@ export type BusinessActivityUncheckedCreateInput = {
|
|||||||
name: string
|
name: string
|
||||||
fiscal_id: string
|
fiscal_id: string
|
||||||
partner_token: string
|
partner_token: string
|
||||||
|
invoice_number_sequence?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
guild_id: string
|
guild_id: string
|
||||||
@@ -341,6 +391,7 @@ export type BusinessActivityUpdateInput = {
|
|||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
fiscal_id?: Prisma.StringFieldUpdateOperationsInput | string
|
fiscal_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
partner_token?: Prisma.StringFieldUpdateOperationsInput | string
|
partner_token?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
invoice_number_sequence?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
guild?: Prisma.GuildUpdateOneRequiredWithoutBusiness_activitiesNestedInput
|
guild?: Prisma.GuildUpdateOneRequiredWithoutBusiness_activitiesNestedInput
|
||||||
@@ -359,6 +410,7 @@ export type BusinessActivityUncheckedUpdateInput = {
|
|||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
fiscal_id?: Prisma.StringFieldUpdateOperationsInput | string
|
fiscal_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
partner_token?: Prisma.StringFieldUpdateOperationsInput | string
|
partner_token?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
invoice_number_sequence?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
guild_id?: Prisma.StringFieldUpdateOperationsInput | string
|
guild_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
@@ -377,6 +429,7 @@ export type BusinessActivityCreateManyInput = {
|
|||||||
name: string
|
name: string
|
||||||
fiscal_id: string
|
fiscal_id: string
|
||||||
partner_token: string
|
partner_token: string
|
||||||
|
invoice_number_sequence?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
guild_id: string
|
guild_id: string
|
||||||
@@ -389,6 +442,7 @@ export type BusinessActivityUpdateManyMutationInput = {
|
|||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
fiscal_id?: Prisma.StringFieldUpdateOperationsInput | string
|
fiscal_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
partner_token?: Prisma.StringFieldUpdateOperationsInput | string
|
partner_token?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
invoice_number_sequence?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
}
|
}
|
||||||
@@ -399,6 +453,7 @@ export type BusinessActivityUncheckedUpdateManyInput = {
|
|||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
fiscal_id?: Prisma.StringFieldUpdateOperationsInput | string
|
fiscal_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
partner_token?: Prisma.StringFieldUpdateOperationsInput | string
|
partner_token?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
invoice_number_sequence?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
guild_id?: Prisma.StringFieldUpdateOperationsInput | string
|
guild_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
@@ -437,18 +492,24 @@ export type BusinessActivityCountOrderByAggregateInput = {
|
|||||||
name?: Prisma.SortOrder
|
name?: Prisma.SortOrder
|
||||||
fiscal_id?: Prisma.SortOrder
|
fiscal_id?: Prisma.SortOrder
|
||||||
partner_token?: Prisma.SortOrder
|
partner_token?: Prisma.SortOrder
|
||||||
|
invoice_number_sequence?: Prisma.SortOrder
|
||||||
created_at?: Prisma.SortOrder
|
created_at?: Prisma.SortOrder
|
||||||
updated_at?: Prisma.SortOrder
|
updated_at?: Prisma.SortOrder
|
||||||
guild_id?: Prisma.SortOrder
|
guild_id?: Prisma.SortOrder
|
||||||
consumer_id?: Prisma.SortOrder
|
consumer_id?: Prisma.SortOrder
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type BusinessActivityAvgOrderByAggregateInput = {
|
||||||
|
invoice_number_sequence?: Prisma.SortOrder
|
||||||
|
}
|
||||||
|
|
||||||
export type BusinessActivityMaxOrderByAggregateInput = {
|
export type BusinessActivityMaxOrderByAggregateInput = {
|
||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
economic_code?: Prisma.SortOrder
|
economic_code?: Prisma.SortOrder
|
||||||
name?: Prisma.SortOrder
|
name?: Prisma.SortOrder
|
||||||
fiscal_id?: Prisma.SortOrder
|
fiscal_id?: Prisma.SortOrder
|
||||||
partner_token?: Prisma.SortOrder
|
partner_token?: Prisma.SortOrder
|
||||||
|
invoice_number_sequence?: Prisma.SortOrder
|
||||||
created_at?: Prisma.SortOrder
|
created_at?: Prisma.SortOrder
|
||||||
updated_at?: Prisma.SortOrder
|
updated_at?: Prisma.SortOrder
|
||||||
guild_id?: Prisma.SortOrder
|
guild_id?: Prisma.SortOrder
|
||||||
@@ -461,12 +522,17 @@ export type BusinessActivityMinOrderByAggregateInput = {
|
|||||||
name?: Prisma.SortOrder
|
name?: Prisma.SortOrder
|
||||||
fiscal_id?: Prisma.SortOrder
|
fiscal_id?: Prisma.SortOrder
|
||||||
partner_token?: Prisma.SortOrder
|
partner_token?: Prisma.SortOrder
|
||||||
|
invoice_number_sequence?: Prisma.SortOrder
|
||||||
created_at?: Prisma.SortOrder
|
created_at?: Prisma.SortOrder
|
||||||
updated_at?: Prisma.SortOrder
|
updated_at?: Prisma.SortOrder
|
||||||
guild_id?: Prisma.SortOrder
|
guild_id?: Prisma.SortOrder
|
||||||
consumer_id?: Prisma.SortOrder
|
consumer_id?: Prisma.SortOrder
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type BusinessActivitySumOrderByAggregateInput = {
|
||||||
|
invoice_number_sequence?: Prisma.SortOrder
|
||||||
|
}
|
||||||
|
|
||||||
export type BusinessActivityNullableScalarRelationFilter = {
|
export type BusinessActivityNullableScalarRelationFilter = {
|
||||||
is?: Prisma.BusinessActivityWhereInput | null
|
is?: Prisma.BusinessActivityWhereInput | null
|
||||||
isNot?: Prisma.BusinessActivityWhereInput | null
|
isNot?: Prisma.BusinessActivityWhereInput | null
|
||||||
@@ -542,6 +608,14 @@ export type BusinessActivityUncheckedUpdateManyWithoutConsumerNestedInput = {
|
|||||||
deleteMany?: Prisma.BusinessActivityScalarWhereInput | Prisma.BusinessActivityScalarWhereInput[]
|
deleteMany?: Prisma.BusinessActivityScalarWhereInput | Prisma.BusinessActivityScalarWhereInput[]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type DecimalFieldUpdateOperationsInput = {
|
||||||
|
set?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
increment?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
decrement?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
multiply?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
divide?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
}
|
||||||
|
|
||||||
export type BusinessActivityCreateNestedOneWithoutComplexesInput = {
|
export type BusinessActivityCreateNestedOneWithoutComplexesInput = {
|
||||||
create?: Prisma.XOR<Prisma.BusinessActivityCreateWithoutComplexesInput, Prisma.BusinessActivityUncheckedCreateWithoutComplexesInput>
|
create?: Prisma.XOR<Prisma.BusinessActivityCreateWithoutComplexesInput, Prisma.BusinessActivityUncheckedCreateWithoutComplexesInput>
|
||||||
connectOrCreate?: Prisma.BusinessActivityCreateOrConnectWithoutComplexesInput
|
connectOrCreate?: Prisma.BusinessActivityCreateOrConnectWithoutComplexesInput
|
||||||
@@ -648,6 +722,7 @@ export type BusinessActivityCreateWithoutLicense_activationInput = {
|
|||||||
name: string
|
name: string
|
||||||
fiscal_id: string
|
fiscal_id: string
|
||||||
partner_token: string
|
partner_token: string
|
||||||
|
invoice_number_sequence?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
guild: Prisma.GuildCreateNestedOneWithoutBusiness_activitiesInput
|
guild: Prisma.GuildCreateNestedOneWithoutBusiness_activitiesInput
|
||||||
@@ -665,6 +740,7 @@ export type BusinessActivityUncheckedCreateWithoutLicense_activationInput = {
|
|||||||
name: string
|
name: string
|
||||||
fiscal_id: string
|
fiscal_id: string
|
||||||
partner_token: string
|
partner_token: string
|
||||||
|
invoice_number_sequence?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
guild_id: string
|
guild_id: string
|
||||||
@@ -698,6 +774,7 @@ export type BusinessActivityUpdateWithoutLicense_activationInput = {
|
|||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
fiscal_id?: Prisma.StringFieldUpdateOperationsInput | string
|
fiscal_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
partner_token?: Prisma.StringFieldUpdateOperationsInput | string
|
partner_token?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
invoice_number_sequence?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
guild?: Prisma.GuildUpdateOneRequiredWithoutBusiness_activitiesNestedInput
|
guild?: Prisma.GuildUpdateOneRequiredWithoutBusiness_activitiesNestedInput
|
||||||
@@ -715,6 +792,7 @@ export type BusinessActivityUncheckedUpdateWithoutLicense_activationInput = {
|
|||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
fiscal_id?: Prisma.StringFieldUpdateOperationsInput | string
|
fiscal_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
partner_token?: Prisma.StringFieldUpdateOperationsInput | string
|
partner_token?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
invoice_number_sequence?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
guild_id?: Prisma.StringFieldUpdateOperationsInput | string
|
guild_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
@@ -732,6 +810,7 @@ export type BusinessActivityCreateWithoutPermission_businessesInput = {
|
|||||||
name: string
|
name: string
|
||||||
fiscal_id: string
|
fiscal_id: string
|
||||||
partner_token: string
|
partner_token: string
|
||||||
|
invoice_number_sequence?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
guild: Prisma.GuildCreateNestedOneWithoutBusiness_activitiesInput
|
guild: Prisma.GuildCreateNestedOneWithoutBusiness_activitiesInput
|
||||||
@@ -749,6 +828,7 @@ export type BusinessActivityUncheckedCreateWithoutPermission_businessesInput = {
|
|||||||
name: string
|
name: string
|
||||||
fiscal_id: string
|
fiscal_id: string
|
||||||
partner_token: string
|
partner_token: string
|
||||||
|
invoice_number_sequence?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
guild_id: string
|
guild_id: string
|
||||||
@@ -782,6 +862,7 @@ export type BusinessActivityUpdateWithoutPermission_businessesInput = {
|
|||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
fiscal_id?: Prisma.StringFieldUpdateOperationsInput | string
|
fiscal_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
partner_token?: Prisma.StringFieldUpdateOperationsInput | string
|
partner_token?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
invoice_number_sequence?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
guild?: Prisma.GuildUpdateOneRequiredWithoutBusiness_activitiesNestedInput
|
guild?: Prisma.GuildUpdateOneRequiredWithoutBusiness_activitiesNestedInput
|
||||||
@@ -799,6 +880,7 @@ export type BusinessActivityUncheckedUpdateWithoutPermission_businessesInput = {
|
|||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
fiscal_id?: Prisma.StringFieldUpdateOperationsInput | string
|
fiscal_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
partner_token?: Prisma.StringFieldUpdateOperationsInput | string
|
partner_token?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
invoice_number_sequence?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
guild_id?: Prisma.StringFieldUpdateOperationsInput | string
|
guild_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
@@ -816,6 +898,7 @@ export type BusinessActivityCreateWithoutConsumerInput = {
|
|||||||
name: string
|
name: string
|
||||||
fiscal_id: string
|
fiscal_id: string
|
||||||
partner_token: string
|
partner_token: string
|
||||||
|
invoice_number_sequence?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
guild: Prisma.GuildCreateNestedOneWithoutBusiness_activitiesInput
|
guild: Prisma.GuildCreateNestedOneWithoutBusiness_activitiesInput
|
||||||
@@ -833,6 +916,7 @@ export type BusinessActivityUncheckedCreateWithoutConsumerInput = {
|
|||||||
name: string
|
name: string
|
||||||
fiscal_id: string
|
fiscal_id: string
|
||||||
partner_token: string
|
partner_token: string
|
||||||
|
invoice_number_sequence?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
guild_id: string
|
guild_id: string
|
||||||
@@ -879,6 +963,7 @@ export type BusinessActivityScalarWhereInput = {
|
|||||||
name?: Prisma.StringFilter<"BusinessActivity"> | string
|
name?: Prisma.StringFilter<"BusinessActivity"> | string
|
||||||
fiscal_id?: Prisma.StringFilter<"BusinessActivity"> | string
|
fiscal_id?: Prisma.StringFilter<"BusinessActivity"> | string
|
||||||
partner_token?: Prisma.StringFilter<"BusinessActivity"> | string
|
partner_token?: Prisma.StringFilter<"BusinessActivity"> | string
|
||||||
|
invoice_number_sequence?: Prisma.DecimalFilter<"BusinessActivity"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Prisma.DateTimeFilter<"BusinessActivity"> | Date | string
|
created_at?: Prisma.DateTimeFilter<"BusinessActivity"> | Date | string
|
||||||
updated_at?: Prisma.DateTimeFilter<"BusinessActivity"> | Date | string
|
updated_at?: Prisma.DateTimeFilter<"BusinessActivity"> | Date | string
|
||||||
guild_id?: Prisma.StringFilter<"BusinessActivity"> | string
|
guild_id?: Prisma.StringFilter<"BusinessActivity"> | string
|
||||||
@@ -891,6 +976,7 @@ export type BusinessActivityCreateWithoutComplexesInput = {
|
|||||||
name: string
|
name: string
|
||||||
fiscal_id: string
|
fiscal_id: string
|
||||||
partner_token: string
|
partner_token: string
|
||||||
|
invoice_number_sequence?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
guild: Prisma.GuildCreateNestedOneWithoutBusiness_activitiesInput
|
guild: Prisma.GuildCreateNestedOneWithoutBusiness_activitiesInput
|
||||||
@@ -908,6 +994,7 @@ export type BusinessActivityUncheckedCreateWithoutComplexesInput = {
|
|||||||
name: string
|
name: string
|
||||||
fiscal_id: string
|
fiscal_id: string
|
||||||
partner_token: string
|
partner_token: string
|
||||||
|
invoice_number_sequence?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
guild_id: string
|
guild_id: string
|
||||||
@@ -941,6 +1028,7 @@ export type BusinessActivityUpdateWithoutComplexesInput = {
|
|||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
fiscal_id?: Prisma.StringFieldUpdateOperationsInput | string
|
fiscal_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
partner_token?: Prisma.StringFieldUpdateOperationsInput | string
|
partner_token?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
invoice_number_sequence?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
guild?: Prisma.GuildUpdateOneRequiredWithoutBusiness_activitiesNestedInput
|
guild?: Prisma.GuildUpdateOneRequiredWithoutBusiness_activitiesNestedInput
|
||||||
@@ -958,6 +1046,7 @@ export type BusinessActivityUncheckedUpdateWithoutComplexesInput = {
|
|||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
fiscal_id?: Prisma.StringFieldUpdateOperationsInput | string
|
fiscal_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
partner_token?: Prisma.StringFieldUpdateOperationsInput | string
|
partner_token?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
invoice_number_sequence?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
guild_id?: Prisma.StringFieldUpdateOperationsInput | string
|
guild_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
@@ -975,6 +1064,7 @@ export type BusinessActivityCreateWithoutGoodsInput = {
|
|||||||
name: string
|
name: string
|
||||||
fiscal_id: string
|
fiscal_id: string
|
||||||
partner_token: string
|
partner_token: string
|
||||||
|
invoice_number_sequence?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
guild: Prisma.GuildCreateNestedOneWithoutBusiness_activitiesInput
|
guild: Prisma.GuildCreateNestedOneWithoutBusiness_activitiesInput
|
||||||
@@ -992,6 +1082,7 @@ export type BusinessActivityUncheckedCreateWithoutGoodsInput = {
|
|||||||
name: string
|
name: string
|
||||||
fiscal_id: string
|
fiscal_id: string
|
||||||
partner_token: string
|
partner_token: string
|
||||||
|
invoice_number_sequence?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
guild_id: string
|
guild_id: string
|
||||||
@@ -1025,6 +1116,7 @@ export type BusinessActivityUpdateWithoutGoodsInput = {
|
|||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
fiscal_id?: Prisma.StringFieldUpdateOperationsInput | string
|
fiscal_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
partner_token?: Prisma.StringFieldUpdateOperationsInput | string
|
partner_token?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
invoice_number_sequence?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
guild?: Prisma.GuildUpdateOneRequiredWithoutBusiness_activitiesNestedInput
|
guild?: Prisma.GuildUpdateOneRequiredWithoutBusiness_activitiesNestedInput
|
||||||
@@ -1042,6 +1134,7 @@ export type BusinessActivityUncheckedUpdateWithoutGoodsInput = {
|
|||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
fiscal_id?: Prisma.StringFieldUpdateOperationsInput | string
|
fiscal_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
partner_token?: Prisma.StringFieldUpdateOperationsInput | string
|
partner_token?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
invoice_number_sequence?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
guild_id?: Prisma.StringFieldUpdateOperationsInput | string
|
guild_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
@@ -1059,6 +1152,7 @@ export type BusinessActivityCreateWithoutCustomer_individualsInput = {
|
|||||||
name: string
|
name: string
|
||||||
fiscal_id: string
|
fiscal_id: string
|
||||||
partner_token: string
|
partner_token: string
|
||||||
|
invoice_number_sequence?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
guild: Prisma.GuildCreateNestedOneWithoutBusiness_activitiesInput
|
guild: Prisma.GuildCreateNestedOneWithoutBusiness_activitiesInput
|
||||||
@@ -1076,6 +1170,7 @@ export type BusinessActivityUncheckedCreateWithoutCustomer_individualsInput = {
|
|||||||
name: string
|
name: string
|
||||||
fiscal_id: string
|
fiscal_id: string
|
||||||
partner_token: string
|
partner_token: string
|
||||||
|
invoice_number_sequence?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
guild_id: string
|
guild_id: string
|
||||||
@@ -1109,6 +1204,7 @@ export type BusinessActivityUpdateWithoutCustomer_individualsInput = {
|
|||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
fiscal_id?: Prisma.StringFieldUpdateOperationsInput | string
|
fiscal_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
partner_token?: Prisma.StringFieldUpdateOperationsInput | string
|
partner_token?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
invoice_number_sequence?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
guild?: Prisma.GuildUpdateOneRequiredWithoutBusiness_activitiesNestedInput
|
guild?: Prisma.GuildUpdateOneRequiredWithoutBusiness_activitiesNestedInput
|
||||||
@@ -1126,6 +1222,7 @@ export type BusinessActivityUncheckedUpdateWithoutCustomer_individualsInput = {
|
|||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
fiscal_id?: Prisma.StringFieldUpdateOperationsInput | string
|
fiscal_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
partner_token?: Prisma.StringFieldUpdateOperationsInput | string
|
partner_token?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
invoice_number_sequence?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
guild_id?: Prisma.StringFieldUpdateOperationsInput | string
|
guild_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
@@ -1143,6 +1240,7 @@ export type BusinessActivityCreateWithoutCustomer_legalsInput = {
|
|||||||
name: string
|
name: string
|
||||||
fiscal_id: string
|
fiscal_id: string
|
||||||
partner_token: string
|
partner_token: string
|
||||||
|
invoice_number_sequence?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
guild: Prisma.GuildCreateNestedOneWithoutBusiness_activitiesInput
|
guild: Prisma.GuildCreateNestedOneWithoutBusiness_activitiesInput
|
||||||
@@ -1160,6 +1258,7 @@ export type BusinessActivityUncheckedCreateWithoutCustomer_legalsInput = {
|
|||||||
name: string
|
name: string
|
||||||
fiscal_id: string
|
fiscal_id: string
|
||||||
partner_token: string
|
partner_token: string
|
||||||
|
invoice_number_sequence?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
guild_id: string
|
guild_id: string
|
||||||
@@ -1193,6 +1292,7 @@ export type BusinessActivityUpdateWithoutCustomer_legalsInput = {
|
|||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
fiscal_id?: Prisma.StringFieldUpdateOperationsInput | string
|
fiscal_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
partner_token?: Prisma.StringFieldUpdateOperationsInput | string
|
partner_token?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
invoice_number_sequence?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
guild?: Prisma.GuildUpdateOneRequiredWithoutBusiness_activitiesNestedInput
|
guild?: Prisma.GuildUpdateOneRequiredWithoutBusiness_activitiesNestedInput
|
||||||
@@ -1210,6 +1310,7 @@ export type BusinessActivityUncheckedUpdateWithoutCustomer_legalsInput = {
|
|||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
fiscal_id?: Prisma.StringFieldUpdateOperationsInput | string
|
fiscal_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
partner_token?: Prisma.StringFieldUpdateOperationsInput | string
|
partner_token?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
invoice_number_sequence?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
guild_id?: Prisma.StringFieldUpdateOperationsInput | string
|
guild_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
@@ -1227,6 +1328,7 @@ export type BusinessActivityCreateWithoutGuildInput = {
|
|||||||
name: string
|
name: string
|
||||||
fiscal_id: string
|
fiscal_id: string
|
||||||
partner_token: string
|
partner_token: string
|
||||||
|
invoice_number_sequence?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
consumer: Prisma.ConsumerCreateNestedOneWithoutBusiness_activitiesInput
|
consumer: Prisma.ConsumerCreateNestedOneWithoutBusiness_activitiesInput
|
||||||
@@ -1244,6 +1346,7 @@ export type BusinessActivityUncheckedCreateWithoutGuildInput = {
|
|||||||
name: string
|
name: string
|
||||||
fiscal_id: string
|
fiscal_id: string
|
||||||
partner_token: string
|
partner_token: string
|
||||||
|
invoice_number_sequence?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
consumer_id: string
|
consumer_id: string
|
||||||
@@ -1287,6 +1390,7 @@ export type BusinessActivityCreateManyConsumerInput = {
|
|||||||
name: string
|
name: string
|
||||||
fiscal_id: string
|
fiscal_id: string
|
||||||
partner_token: string
|
partner_token: string
|
||||||
|
invoice_number_sequence?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
guild_id: string
|
guild_id: string
|
||||||
@@ -1298,6 +1402,7 @@ export type BusinessActivityUpdateWithoutConsumerInput = {
|
|||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
fiscal_id?: Prisma.StringFieldUpdateOperationsInput | string
|
fiscal_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
partner_token?: Prisma.StringFieldUpdateOperationsInput | string
|
partner_token?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
invoice_number_sequence?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
guild?: Prisma.GuildUpdateOneRequiredWithoutBusiness_activitiesNestedInput
|
guild?: Prisma.GuildUpdateOneRequiredWithoutBusiness_activitiesNestedInput
|
||||||
@@ -1315,6 +1420,7 @@ export type BusinessActivityUncheckedUpdateWithoutConsumerInput = {
|
|||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
fiscal_id?: Prisma.StringFieldUpdateOperationsInput | string
|
fiscal_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
partner_token?: Prisma.StringFieldUpdateOperationsInput | string
|
partner_token?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
invoice_number_sequence?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
guild_id?: Prisma.StringFieldUpdateOperationsInput | string
|
guild_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
@@ -1332,6 +1438,7 @@ export type BusinessActivityUncheckedUpdateManyWithoutConsumerInput = {
|
|||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
fiscal_id?: Prisma.StringFieldUpdateOperationsInput | string
|
fiscal_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
partner_token?: Prisma.StringFieldUpdateOperationsInput | string
|
partner_token?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
invoice_number_sequence?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
guild_id?: Prisma.StringFieldUpdateOperationsInput | string
|
guild_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
@@ -1343,6 +1450,7 @@ export type BusinessActivityCreateManyGuildInput = {
|
|||||||
name: string
|
name: string
|
||||||
fiscal_id: string
|
fiscal_id: string
|
||||||
partner_token: string
|
partner_token: string
|
||||||
|
invoice_number_sequence?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
consumer_id: string
|
consumer_id: string
|
||||||
@@ -1354,6 +1462,7 @@ export type BusinessActivityUpdateWithoutGuildInput = {
|
|||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
fiscal_id?: Prisma.StringFieldUpdateOperationsInput | string
|
fiscal_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
partner_token?: Prisma.StringFieldUpdateOperationsInput | string
|
partner_token?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
invoice_number_sequence?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
consumer?: Prisma.ConsumerUpdateOneRequiredWithoutBusiness_activitiesNestedInput
|
consumer?: Prisma.ConsumerUpdateOneRequiredWithoutBusiness_activitiesNestedInput
|
||||||
@@ -1371,6 +1480,7 @@ export type BusinessActivityUncheckedUpdateWithoutGuildInput = {
|
|||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
fiscal_id?: Prisma.StringFieldUpdateOperationsInput | string
|
fiscal_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
partner_token?: Prisma.StringFieldUpdateOperationsInput | string
|
partner_token?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
invoice_number_sequence?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
consumer_id?: Prisma.StringFieldUpdateOperationsInput | string
|
consumer_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
@@ -1388,6 +1498,7 @@ export type BusinessActivityUncheckedUpdateManyWithoutGuildInput = {
|
|||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
fiscal_id?: Prisma.StringFieldUpdateOperationsInput | string
|
fiscal_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
partner_token?: Prisma.StringFieldUpdateOperationsInput | string
|
partner_token?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
invoice_number_sequence?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
consumer_id?: Prisma.StringFieldUpdateOperationsInput | string
|
consumer_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
@@ -1466,6 +1577,7 @@ export type BusinessActivitySelect<ExtArgs extends runtime.Types.Extensions.Inte
|
|||||||
name?: boolean
|
name?: boolean
|
||||||
fiscal_id?: boolean
|
fiscal_id?: boolean
|
||||||
partner_token?: boolean
|
partner_token?: boolean
|
||||||
|
invoice_number_sequence?: boolean
|
||||||
created_at?: boolean
|
created_at?: boolean
|
||||||
updated_at?: boolean
|
updated_at?: boolean
|
||||||
guild_id?: boolean
|
guild_id?: boolean
|
||||||
@@ -1489,13 +1601,14 @@ export type BusinessActivitySelectScalar = {
|
|||||||
name?: boolean
|
name?: boolean
|
||||||
fiscal_id?: boolean
|
fiscal_id?: boolean
|
||||||
partner_token?: boolean
|
partner_token?: boolean
|
||||||
|
invoice_number_sequence?: boolean
|
||||||
created_at?: boolean
|
created_at?: boolean
|
||||||
updated_at?: boolean
|
updated_at?: boolean
|
||||||
guild_id?: boolean
|
guild_id?: boolean
|
||||||
consumer_id?: boolean
|
consumer_id?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
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" | "created_at" | "updated_at" | "guild_id" | "consumer_id", ExtArgs["result"]["businessActivity"]>
|
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> = {
|
export type BusinessActivityInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
guild?: boolean | Prisma.GuildDefaultArgs<ExtArgs>
|
guild?: boolean | Prisma.GuildDefaultArgs<ExtArgs>
|
||||||
consumer?: boolean | Prisma.ConsumerDefaultArgs<ExtArgs>
|
consumer?: boolean | Prisma.ConsumerDefaultArgs<ExtArgs>
|
||||||
@@ -1526,6 +1639,7 @@ export type $BusinessActivityPayload<ExtArgs extends runtime.Types.Extensions.In
|
|||||||
name: string
|
name: string
|
||||||
fiscal_id: string
|
fiscal_id: string
|
||||||
partner_token: string
|
partner_token: string
|
||||||
|
invoice_number_sequence: runtime.Decimal
|
||||||
created_at: Date
|
created_at: Date
|
||||||
updated_at: Date
|
updated_at: Date
|
||||||
guild_id: string
|
guild_id: string
|
||||||
@@ -1912,6 +2026,7 @@ export interface BusinessActivityFieldRefs {
|
|||||||
readonly name: Prisma.FieldRef<"BusinessActivity", 'String'>
|
readonly name: Prisma.FieldRef<"BusinessActivity", 'String'>
|
||||||
readonly fiscal_id: Prisma.FieldRef<"BusinessActivity", 'String'>
|
readonly fiscal_id: Prisma.FieldRef<"BusinessActivity", 'String'>
|
||||||
readonly partner_token: Prisma.FieldRef<"BusinessActivity", 'String'>
|
readonly partner_token: Prisma.FieldRef<"BusinessActivity", 'String'>
|
||||||
|
readonly invoice_number_sequence: Prisma.FieldRef<"BusinessActivity", 'Decimal'>
|
||||||
readonly created_at: Prisma.FieldRef<"BusinessActivity", 'DateTime'>
|
readonly created_at: Prisma.FieldRef<"BusinessActivity", 'DateTime'>
|
||||||
readonly updated_at: Prisma.FieldRef<"BusinessActivity", 'DateTime'>
|
readonly updated_at: Prisma.FieldRef<"BusinessActivity", 'DateTime'>
|
||||||
readonly guild_id: Prisma.FieldRef<"BusinessActivity", 'String'>
|
readonly guild_id: Prisma.FieldRef<"BusinessActivity", 'String'>
|
||||||
|
|||||||
@@ -623,9 +623,9 @@ export type GoodSumOrderByAggregateInput = {
|
|||||||
base_sale_price?: Prisma.SortOrder
|
base_sale_price?: Prisma.SortOrder
|
||||||
}
|
}
|
||||||
|
|
||||||
export type GoodNullableScalarRelationFilter = {
|
export type GoodScalarRelationFilter = {
|
||||||
is?: Prisma.GoodWhereInput | null
|
is?: Prisma.GoodWhereInput
|
||||||
isNot?: Prisma.GoodWhereInput | null
|
isNot?: Prisma.GoodWhereInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type GoodCreateNestedManyWithoutBusiness_activityInput = {
|
export type GoodCreateNestedManyWithoutBusiness_activityInput = {
|
||||||
@@ -818,12 +818,10 @@ export type GoodCreateNestedOneWithoutSales_invoice_itemsInput = {
|
|||||||
connect?: Prisma.GoodWhereUniqueInput
|
connect?: Prisma.GoodWhereUniqueInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type GoodUpdateOneWithoutSales_invoice_itemsNestedInput = {
|
export type GoodUpdateOneRequiredWithoutSales_invoice_itemsNestedInput = {
|
||||||
create?: Prisma.XOR<Prisma.GoodCreateWithoutSales_invoice_itemsInput, Prisma.GoodUncheckedCreateWithoutSales_invoice_itemsInput>
|
create?: Prisma.XOR<Prisma.GoodCreateWithoutSales_invoice_itemsInput, Prisma.GoodUncheckedCreateWithoutSales_invoice_itemsInput>
|
||||||
connectOrCreate?: Prisma.GoodCreateOrConnectWithoutSales_invoice_itemsInput
|
connectOrCreate?: Prisma.GoodCreateOrConnectWithoutSales_invoice_itemsInput
|
||||||
upsert?: Prisma.GoodUpsertWithoutSales_invoice_itemsInput
|
upsert?: Prisma.GoodUpsertWithoutSales_invoice_itemsInput
|
||||||
disconnect?: Prisma.GoodWhereInput | boolean
|
|
||||||
delete?: Prisma.GoodWhereInput | boolean
|
|
||||||
connect?: Prisma.GoodWhereUniqueInput
|
connect?: Prisma.GoodWhereUniqueInput
|
||||||
update?: Prisma.XOR<Prisma.XOR<Prisma.GoodUpdateToOneWithWhereWithoutSales_invoice_itemsInput, Prisma.GoodUpdateWithoutSales_invoice_itemsInput>, Prisma.GoodUncheckedUpdateWithoutSales_invoice_itemsInput>
|
update?: Prisma.XOR<Prisma.XOR<Prisma.GoodUpdateToOneWithWhereWithoutSales_invoice_itemsInput, Prisma.GoodUpdateWithoutSales_invoice_itemsInput>, Prisma.GoodUncheckedUpdateWithoutSales_invoice_itemsInput>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ export type AggregateGuild = {
|
|||||||
export type GuildMinAggregateOutputType = {
|
export type GuildMinAggregateOutputType = {
|
||||||
id: string | null
|
id: string | null
|
||||||
name: string | null
|
name: string | null
|
||||||
|
invoice_template: $Enums.InvoiceTemplateType | null
|
||||||
code: string | null
|
code: string | null
|
||||||
created_at: Date | null
|
created_at: Date | null
|
||||||
updated_at: Date | null
|
updated_at: Date | null
|
||||||
@@ -35,6 +36,7 @@ export type GuildMinAggregateOutputType = {
|
|||||||
export type GuildMaxAggregateOutputType = {
|
export type GuildMaxAggregateOutputType = {
|
||||||
id: string | null
|
id: string | null
|
||||||
name: string | null
|
name: string | null
|
||||||
|
invoice_template: $Enums.InvoiceTemplateType | null
|
||||||
code: string | null
|
code: string | null
|
||||||
created_at: Date | null
|
created_at: Date | null
|
||||||
updated_at: Date | null
|
updated_at: Date | null
|
||||||
@@ -43,6 +45,7 @@ export type GuildMaxAggregateOutputType = {
|
|||||||
export type GuildCountAggregateOutputType = {
|
export type GuildCountAggregateOutputType = {
|
||||||
id: number
|
id: number
|
||||||
name: number
|
name: number
|
||||||
|
invoice_template: number
|
||||||
code: number
|
code: number
|
||||||
created_at: number
|
created_at: number
|
||||||
updated_at: number
|
updated_at: number
|
||||||
@@ -53,6 +56,7 @@ export type GuildCountAggregateOutputType = {
|
|||||||
export type GuildMinAggregateInputType = {
|
export type GuildMinAggregateInputType = {
|
||||||
id?: true
|
id?: true
|
||||||
name?: true
|
name?: true
|
||||||
|
invoice_template?: true
|
||||||
code?: true
|
code?: true
|
||||||
created_at?: true
|
created_at?: true
|
||||||
updated_at?: true
|
updated_at?: true
|
||||||
@@ -61,6 +65,7 @@ export type GuildMinAggregateInputType = {
|
|||||||
export type GuildMaxAggregateInputType = {
|
export type GuildMaxAggregateInputType = {
|
||||||
id?: true
|
id?: true
|
||||||
name?: true
|
name?: true
|
||||||
|
invoice_template?: true
|
||||||
code?: true
|
code?: true
|
||||||
created_at?: true
|
created_at?: true
|
||||||
updated_at?: true
|
updated_at?: true
|
||||||
@@ -69,6 +74,7 @@ export type GuildMaxAggregateInputType = {
|
|||||||
export type GuildCountAggregateInputType = {
|
export type GuildCountAggregateInputType = {
|
||||||
id?: true
|
id?: true
|
||||||
name?: true
|
name?: true
|
||||||
|
invoice_template?: true
|
||||||
code?: true
|
code?: true
|
||||||
created_at?: true
|
created_at?: true
|
||||||
updated_at?: true
|
updated_at?: true
|
||||||
@@ -150,6 +156,7 @@ export type GuildGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalAr
|
|||||||
export type GuildGroupByOutputType = {
|
export type GuildGroupByOutputType = {
|
||||||
id: string
|
id: string
|
||||||
name: string
|
name: string
|
||||||
|
invoice_template: $Enums.InvoiceTemplateType
|
||||||
code: string | null
|
code: string | null
|
||||||
created_at: Date
|
created_at: Date
|
||||||
updated_at: Date
|
updated_at: Date
|
||||||
@@ -179,6 +186,7 @@ export type GuildWhereInput = {
|
|||||||
NOT?: Prisma.GuildWhereInput | Prisma.GuildWhereInput[]
|
NOT?: Prisma.GuildWhereInput | Prisma.GuildWhereInput[]
|
||||||
id?: Prisma.StringFilter<"Guild"> | string
|
id?: Prisma.StringFilter<"Guild"> | string
|
||||||
name?: Prisma.StringFilter<"Guild"> | string
|
name?: Prisma.StringFilter<"Guild"> | string
|
||||||
|
invoice_template?: Prisma.EnumInvoiceTemplateTypeFilter<"Guild"> | $Enums.InvoiceTemplateType
|
||||||
code?: Prisma.StringNullableFilter<"Guild"> | string | null
|
code?: Prisma.StringNullableFilter<"Guild"> | string | null
|
||||||
created_at?: Prisma.DateTimeFilter<"Guild"> | Date | string
|
created_at?: Prisma.DateTimeFilter<"Guild"> | Date | string
|
||||||
updated_at?: Prisma.DateTimeFilter<"Guild"> | Date | string
|
updated_at?: Prisma.DateTimeFilter<"Guild"> | Date | string
|
||||||
@@ -189,6 +197,7 @@ export type GuildWhereInput = {
|
|||||||
export type GuildOrderByWithRelationInput = {
|
export type GuildOrderByWithRelationInput = {
|
||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
name?: Prisma.SortOrder
|
name?: Prisma.SortOrder
|
||||||
|
invoice_template?: Prisma.SortOrder
|
||||||
code?: Prisma.SortOrderInput | Prisma.SortOrder
|
code?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||||
created_at?: Prisma.SortOrder
|
created_at?: Prisma.SortOrder
|
||||||
updated_at?: Prisma.SortOrder
|
updated_at?: Prisma.SortOrder
|
||||||
@@ -203,6 +212,7 @@ export type GuildWhereUniqueInput = Prisma.AtLeast<{
|
|||||||
OR?: Prisma.GuildWhereInput[]
|
OR?: Prisma.GuildWhereInput[]
|
||||||
NOT?: Prisma.GuildWhereInput | Prisma.GuildWhereInput[]
|
NOT?: Prisma.GuildWhereInput | Prisma.GuildWhereInput[]
|
||||||
name?: Prisma.StringFilter<"Guild"> | string
|
name?: Prisma.StringFilter<"Guild"> | string
|
||||||
|
invoice_template?: Prisma.EnumInvoiceTemplateTypeFilter<"Guild"> | $Enums.InvoiceTemplateType
|
||||||
code?: Prisma.StringNullableFilter<"Guild"> | string | null
|
code?: Prisma.StringNullableFilter<"Guild"> | string | null
|
||||||
created_at?: Prisma.DateTimeFilter<"Guild"> | Date | string
|
created_at?: Prisma.DateTimeFilter<"Guild"> | Date | string
|
||||||
updated_at?: Prisma.DateTimeFilter<"Guild"> | Date | string
|
updated_at?: Prisma.DateTimeFilter<"Guild"> | Date | string
|
||||||
@@ -213,6 +223,7 @@ export type GuildWhereUniqueInput = Prisma.AtLeast<{
|
|||||||
export type GuildOrderByWithAggregationInput = {
|
export type GuildOrderByWithAggregationInput = {
|
||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
name?: Prisma.SortOrder
|
name?: Prisma.SortOrder
|
||||||
|
invoice_template?: Prisma.SortOrder
|
||||||
code?: Prisma.SortOrderInput | Prisma.SortOrder
|
code?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||||
created_at?: Prisma.SortOrder
|
created_at?: Prisma.SortOrder
|
||||||
updated_at?: Prisma.SortOrder
|
updated_at?: Prisma.SortOrder
|
||||||
@@ -227,6 +238,7 @@ export type GuildScalarWhereWithAggregatesInput = {
|
|||||||
NOT?: Prisma.GuildScalarWhereWithAggregatesInput | Prisma.GuildScalarWhereWithAggregatesInput[]
|
NOT?: Prisma.GuildScalarWhereWithAggregatesInput | Prisma.GuildScalarWhereWithAggregatesInput[]
|
||||||
id?: Prisma.StringWithAggregatesFilter<"Guild"> | string
|
id?: Prisma.StringWithAggregatesFilter<"Guild"> | string
|
||||||
name?: Prisma.StringWithAggregatesFilter<"Guild"> | string
|
name?: Prisma.StringWithAggregatesFilter<"Guild"> | string
|
||||||
|
invoice_template?: Prisma.EnumInvoiceTemplateTypeWithAggregatesFilter<"Guild"> | $Enums.InvoiceTemplateType
|
||||||
code?: Prisma.StringNullableWithAggregatesFilter<"Guild"> | string | null
|
code?: Prisma.StringNullableWithAggregatesFilter<"Guild"> | string | null
|
||||||
created_at?: Prisma.DateTimeWithAggregatesFilter<"Guild"> | Date | string
|
created_at?: Prisma.DateTimeWithAggregatesFilter<"Guild"> | Date | string
|
||||||
updated_at?: Prisma.DateTimeWithAggregatesFilter<"Guild"> | Date | string
|
updated_at?: Prisma.DateTimeWithAggregatesFilter<"Guild"> | Date | string
|
||||||
@@ -235,6 +247,7 @@ export type GuildScalarWhereWithAggregatesInput = {
|
|||||||
export type GuildCreateInput = {
|
export type GuildCreateInput = {
|
||||||
id?: string
|
id?: string
|
||||||
name: string
|
name: string
|
||||||
|
invoice_template: $Enums.InvoiceTemplateType
|
||||||
code?: string | null
|
code?: string | null
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
@@ -245,6 +258,7 @@ export type GuildCreateInput = {
|
|||||||
export type GuildUncheckedCreateInput = {
|
export type GuildUncheckedCreateInput = {
|
||||||
id?: string
|
id?: string
|
||||||
name: string
|
name: string
|
||||||
|
invoice_template: $Enums.InvoiceTemplateType
|
||||||
code?: string | null
|
code?: string | null
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
@@ -255,6 +269,7 @@ export type GuildUncheckedCreateInput = {
|
|||||||
export type GuildUpdateInput = {
|
export type GuildUpdateInput = {
|
||||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
invoice_template?: Prisma.EnumInvoiceTemplateTypeFieldUpdateOperationsInput | $Enums.InvoiceTemplateType
|
||||||
code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
@@ -265,6 +280,7 @@ export type GuildUpdateInput = {
|
|||||||
export type GuildUncheckedUpdateInput = {
|
export type GuildUncheckedUpdateInput = {
|
||||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
invoice_template?: Prisma.EnumInvoiceTemplateTypeFieldUpdateOperationsInput | $Enums.InvoiceTemplateType
|
||||||
code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
@@ -275,6 +291,7 @@ export type GuildUncheckedUpdateInput = {
|
|||||||
export type GuildCreateManyInput = {
|
export type GuildCreateManyInput = {
|
||||||
id?: string
|
id?: string
|
||||||
name: string
|
name: string
|
||||||
|
invoice_template: $Enums.InvoiceTemplateType
|
||||||
code?: string | null
|
code?: string | null
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
@@ -283,6 +300,7 @@ export type GuildCreateManyInput = {
|
|||||||
export type GuildUpdateManyMutationInput = {
|
export type GuildUpdateManyMutationInput = {
|
||||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
invoice_template?: Prisma.EnumInvoiceTemplateTypeFieldUpdateOperationsInput | $Enums.InvoiceTemplateType
|
||||||
code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
@@ -291,6 +309,7 @@ export type GuildUpdateManyMutationInput = {
|
|||||||
export type GuildUncheckedUpdateManyInput = {
|
export type GuildUncheckedUpdateManyInput = {
|
||||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
invoice_template?: Prisma.EnumInvoiceTemplateTypeFieldUpdateOperationsInput | $Enums.InvoiceTemplateType
|
||||||
code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
@@ -315,6 +334,7 @@ export type GuildOrderByRelevanceInput = {
|
|||||||
export type GuildCountOrderByAggregateInput = {
|
export type GuildCountOrderByAggregateInput = {
|
||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
name?: Prisma.SortOrder
|
name?: Prisma.SortOrder
|
||||||
|
invoice_template?: Prisma.SortOrder
|
||||||
code?: Prisma.SortOrder
|
code?: Prisma.SortOrder
|
||||||
created_at?: Prisma.SortOrder
|
created_at?: Prisma.SortOrder
|
||||||
updated_at?: Prisma.SortOrder
|
updated_at?: Prisma.SortOrder
|
||||||
@@ -323,6 +343,7 @@ export type GuildCountOrderByAggregateInput = {
|
|||||||
export type GuildMaxOrderByAggregateInput = {
|
export type GuildMaxOrderByAggregateInput = {
|
||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
name?: Prisma.SortOrder
|
name?: Prisma.SortOrder
|
||||||
|
invoice_template?: Prisma.SortOrder
|
||||||
code?: Prisma.SortOrder
|
code?: Prisma.SortOrder
|
||||||
created_at?: Prisma.SortOrder
|
created_at?: Prisma.SortOrder
|
||||||
updated_at?: Prisma.SortOrder
|
updated_at?: Prisma.SortOrder
|
||||||
@@ -331,6 +352,7 @@ export type GuildMaxOrderByAggregateInput = {
|
|||||||
export type GuildMinOrderByAggregateInput = {
|
export type GuildMinOrderByAggregateInput = {
|
||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
name?: Prisma.SortOrder
|
name?: Prisma.SortOrder
|
||||||
|
invoice_template?: Prisma.SortOrder
|
||||||
code?: Prisma.SortOrder
|
code?: Prisma.SortOrder
|
||||||
created_at?: Prisma.SortOrder
|
created_at?: Prisma.SortOrder
|
||||||
updated_at?: Prisma.SortOrder
|
updated_at?: Prisma.SortOrder
|
||||||
@@ -366,9 +388,14 @@ export type GuildUpdateOneWithoutGood_categoriesNestedInput = {
|
|||||||
update?: Prisma.XOR<Prisma.XOR<Prisma.GuildUpdateToOneWithWhereWithoutGood_categoriesInput, Prisma.GuildUpdateWithoutGood_categoriesInput>, Prisma.GuildUncheckedUpdateWithoutGood_categoriesInput>
|
update?: Prisma.XOR<Prisma.XOR<Prisma.GuildUpdateToOneWithWhereWithoutGood_categoriesInput, Prisma.GuildUpdateWithoutGood_categoriesInput>, Prisma.GuildUncheckedUpdateWithoutGood_categoriesInput>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type EnumInvoiceTemplateTypeFieldUpdateOperationsInput = {
|
||||||
|
set?: $Enums.InvoiceTemplateType
|
||||||
|
}
|
||||||
|
|
||||||
export type GuildCreateWithoutBusiness_activitiesInput = {
|
export type GuildCreateWithoutBusiness_activitiesInput = {
|
||||||
id?: string
|
id?: string
|
||||||
name: string
|
name: string
|
||||||
|
invoice_template: $Enums.InvoiceTemplateType
|
||||||
code?: string | null
|
code?: string | null
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
@@ -378,6 +405,7 @@ export type GuildCreateWithoutBusiness_activitiesInput = {
|
|||||||
export type GuildUncheckedCreateWithoutBusiness_activitiesInput = {
|
export type GuildUncheckedCreateWithoutBusiness_activitiesInput = {
|
||||||
id?: string
|
id?: string
|
||||||
name: string
|
name: string
|
||||||
|
invoice_template: $Enums.InvoiceTemplateType
|
||||||
code?: string | null
|
code?: string | null
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
@@ -403,6 +431,7 @@ export type GuildUpdateToOneWithWhereWithoutBusiness_activitiesInput = {
|
|||||||
export type GuildUpdateWithoutBusiness_activitiesInput = {
|
export type GuildUpdateWithoutBusiness_activitiesInput = {
|
||||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
invoice_template?: Prisma.EnumInvoiceTemplateTypeFieldUpdateOperationsInput | $Enums.InvoiceTemplateType
|
||||||
code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
@@ -412,6 +441,7 @@ export type GuildUpdateWithoutBusiness_activitiesInput = {
|
|||||||
export type GuildUncheckedUpdateWithoutBusiness_activitiesInput = {
|
export type GuildUncheckedUpdateWithoutBusiness_activitiesInput = {
|
||||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
invoice_template?: Prisma.EnumInvoiceTemplateTypeFieldUpdateOperationsInput | $Enums.InvoiceTemplateType
|
||||||
code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
@@ -421,6 +451,7 @@ export type GuildUncheckedUpdateWithoutBusiness_activitiesInput = {
|
|||||||
export type GuildCreateWithoutGood_categoriesInput = {
|
export type GuildCreateWithoutGood_categoriesInput = {
|
||||||
id?: string
|
id?: string
|
||||||
name: string
|
name: string
|
||||||
|
invoice_template: $Enums.InvoiceTemplateType
|
||||||
code?: string | null
|
code?: string | null
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
@@ -430,6 +461,7 @@ export type GuildCreateWithoutGood_categoriesInput = {
|
|||||||
export type GuildUncheckedCreateWithoutGood_categoriesInput = {
|
export type GuildUncheckedCreateWithoutGood_categoriesInput = {
|
||||||
id?: string
|
id?: string
|
||||||
name: string
|
name: string
|
||||||
|
invoice_template: $Enums.InvoiceTemplateType
|
||||||
code?: string | null
|
code?: string | null
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
@@ -455,6 +487,7 @@ export type GuildUpdateToOneWithWhereWithoutGood_categoriesInput = {
|
|||||||
export type GuildUpdateWithoutGood_categoriesInput = {
|
export type GuildUpdateWithoutGood_categoriesInput = {
|
||||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
invoice_template?: Prisma.EnumInvoiceTemplateTypeFieldUpdateOperationsInput | $Enums.InvoiceTemplateType
|
||||||
code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
@@ -464,6 +497,7 @@ export type GuildUpdateWithoutGood_categoriesInput = {
|
|||||||
export type GuildUncheckedUpdateWithoutGood_categoriesInput = {
|
export type GuildUncheckedUpdateWithoutGood_categoriesInput = {
|
||||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
invoice_template?: Prisma.EnumInvoiceTemplateTypeFieldUpdateOperationsInput | $Enums.InvoiceTemplateType
|
||||||
code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
@@ -513,6 +547,7 @@ export type GuildCountOutputTypeCountGood_categoriesArgs<ExtArgs extends runtime
|
|||||||
export type GuildSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
export type GuildSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||||
id?: boolean
|
id?: boolean
|
||||||
name?: boolean
|
name?: boolean
|
||||||
|
invoice_template?: boolean
|
||||||
code?: boolean
|
code?: boolean
|
||||||
created_at?: boolean
|
created_at?: boolean
|
||||||
updated_at?: boolean
|
updated_at?: boolean
|
||||||
@@ -526,12 +561,13 @@ export type GuildSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs =
|
|||||||
export type GuildSelectScalar = {
|
export type GuildSelectScalar = {
|
||||||
id?: boolean
|
id?: boolean
|
||||||
name?: boolean
|
name?: boolean
|
||||||
|
invoice_template?: boolean
|
||||||
code?: boolean
|
code?: boolean
|
||||||
created_at?: boolean
|
created_at?: boolean
|
||||||
updated_at?: boolean
|
updated_at?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export type GuildOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "name" | "code" | "created_at" | "updated_at", ExtArgs["result"]["guild"]>
|
export type GuildOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "name" | "invoice_template" | "code" | "created_at" | "updated_at", ExtArgs["result"]["guild"]>
|
||||||
export type GuildInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
export type GuildInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
business_activities?: boolean | Prisma.Guild$business_activitiesArgs<ExtArgs>
|
business_activities?: boolean | Prisma.Guild$business_activitiesArgs<ExtArgs>
|
||||||
good_categories?: boolean | Prisma.Guild$good_categoriesArgs<ExtArgs>
|
good_categories?: boolean | Prisma.Guild$good_categoriesArgs<ExtArgs>
|
||||||
@@ -547,6 +583,7 @@ export type $GuildPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs
|
|||||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||||
id: string
|
id: string
|
||||||
name: string
|
name: string
|
||||||
|
invoice_template: $Enums.InvoiceTemplateType
|
||||||
code: string | null
|
code: string | null
|
||||||
created_at: Date
|
created_at: Date
|
||||||
updated_at: Date
|
updated_at: Date
|
||||||
@@ -923,6 +960,7 @@ export interface Prisma__GuildClient<T, Null = never, ExtArgs extends runtime.Ty
|
|||||||
export interface GuildFieldRefs {
|
export interface GuildFieldRefs {
|
||||||
readonly id: Prisma.FieldRef<"Guild", 'String'>
|
readonly id: Prisma.FieldRef<"Guild", 'String'>
|
||||||
readonly name: Prisma.FieldRef<"Guild", 'String'>
|
readonly name: Prisma.FieldRef<"Guild", 'String'>
|
||||||
|
readonly invoice_template: Prisma.FieldRef<"Guild", 'InvoiceTemplateType'>
|
||||||
readonly code: Prisma.FieldRef<"Guild", 'String'>
|
readonly code: Prisma.FieldRef<"Guild", 'String'>
|
||||||
readonly created_at: Prisma.FieldRef<"Guild", 'DateTime'>
|
readonly created_at: Prisma.FieldRef<"Guild", 'DateTime'>
|
||||||
readonly updated_at: Prisma.FieldRef<"Guild", 'DateTime'>
|
readonly updated_at: Prisma.FieldRef<"Guild", 'DateTime'>
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ export type PartnerMinAggregateOutputType = {
|
|||||||
name: string | null
|
name: string | null
|
||||||
code: string | null
|
code: string | null
|
||||||
status: $Enums.PartnerStatus | null
|
status: $Enums.PartnerStatus | null
|
||||||
fiscal_switch_type: $Enums.PartnerFiscalSwitchType | null
|
tsp_provider: $Enums.TspProviderType | null
|
||||||
logo_url: string | null
|
logo_url: string | null
|
||||||
created_at: Date | null
|
created_at: Date | null
|
||||||
updated_at: Date | null
|
updated_at: Date | null
|
||||||
@@ -40,7 +40,7 @@ export type PartnerMaxAggregateOutputType = {
|
|||||||
name: string | null
|
name: string | null
|
||||||
code: string | null
|
code: string | null
|
||||||
status: $Enums.PartnerStatus | null
|
status: $Enums.PartnerStatus | null
|
||||||
fiscal_switch_type: $Enums.PartnerFiscalSwitchType | null
|
tsp_provider: $Enums.TspProviderType | null
|
||||||
logo_url: string | null
|
logo_url: string | null
|
||||||
created_at: Date | null
|
created_at: Date | null
|
||||||
updated_at: Date | null
|
updated_at: Date | null
|
||||||
@@ -51,7 +51,7 @@ export type PartnerCountAggregateOutputType = {
|
|||||||
name: number
|
name: number
|
||||||
code: number
|
code: number
|
||||||
status: number
|
status: number
|
||||||
fiscal_switch_type: number
|
tsp_provider: number
|
||||||
logo_url: number
|
logo_url: number
|
||||||
created_at: number
|
created_at: number
|
||||||
updated_at: number
|
updated_at: number
|
||||||
@@ -64,7 +64,7 @@ export type PartnerMinAggregateInputType = {
|
|||||||
name?: true
|
name?: true
|
||||||
code?: true
|
code?: true
|
||||||
status?: true
|
status?: true
|
||||||
fiscal_switch_type?: true
|
tsp_provider?: true
|
||||||
logo_url?: true
|
logo_url?: true
|
||||||
created_at?: true
|
created_at?: true
|
||||||
updated_at?: true
|
updated_at?: true
|
||||||
@@ -75,7 +75,7 @@ export type PartnerMaxAggregateInputType = {
|
|||||||
name?: true
|
name?: true
|
||||||
code?: true
|
code?: true
|
||||||
status?: true
|
status?: true
|
||||||
fiscal_switch_type?: true
|
tsp_provider?: true
|
||||||
logo_url?: true
|
logo_url?: true
|
||||||
created_at?: true
|
created_at?: true
|
||||||
updated_at?: true
|
updated_at?: true
|
||||||
@@ -86,7 +86,7 @@ export type PartnerCountAggregateInputType = {
|
|||||||
name?: true
|
name?: true
|
||||||
code?: true
|
code?: true
|
||||||
status?: true
|
status?: true
|
||||||
fiscal_switch_type?: true
|
tsp_provider?: true
|
||||||
logo_url?: true
|
logo_url?: true
|
||||||
created_at?: true
|
created_at?: true
|
||||||
updated_at?: true
|
updated_at?: true
|
||||||
@@ -170,7 +170,7 @@ export type PartnerGroupByOutputType = {
|
|||||||
name: string
|
name: string
|
||||||
code: string
|
code: string
|
||||||
status: $Enums.PartnerStatus
|
status: $Enums.PartnerStatus
|
||||||
fiscal_switch_type: $Enums.PartnerFiscalSwitchType
|
tsp_provider: $Enums.TspProviderType
|
||||||
logo_url: string | null
|
logo_url: string | null
|
||||||
created_at: Date
|
created_at: Date
|
||||||
updated_at: Date
|
updated_at: Date
|
||||||
@@ -202,7 +202,7 @@ export type PartnerWhereInput = {
|
|||||||
name?: Prisma.StringFilter<"Partner"> | string
|
name?: Prisma.StringFilter<"Partner"> | string
|
||||||
code?: Prisma.StringFilter<"Partner"> | string
|
code?: Prisma.StringFilter<"Partner"> | string
|
||||||
status?: Prisma.EnumPartnerStatusFilter<"Partner"> | $Enums.PartnerStatus
|
status?: Prisma.EnumPartnerStatusFilter<"Partner"> | $Enums.PartnerStatus
|
||||||
fiscal_switch_type?: Prisma.EnumPartnerFiscalSwitchTypeFilter<"Partner"> | $Enums.PartnerFiscalSwitchType
|
tsp_provider?: Prisma.EnumTspProviderTypeFilter<"Partner"> | $Enums.TspProviderType
|
||||||
logo_url?: Prisma.StringNullableFilter<"Partner"> | string | null
|
logo_url?: Prisma.StringNullableFilter<"Partner"> | string | null
|
||||||
created_at?: Prisma.DateTimeFilter<"Partner"> | Date | string
|
created_at?: Prisma.DateTimeFilter<"Partner"> | Date | string
|
||||||
updated_at?: Prisma.DateTimeFilter<"Partner"> | Date | string
|
updated_at?: Prisma.DateTimeFilter<"Partner"> | Date | string
|
||||||
@@ -219,7 +219,7 @@ export type PartnerOrderByWithRelationInput = {
|
|||||||
name?: Prisma.SortOrder
|
name?: Prisma.SortOrder
|
||||||
code?: Prisma.SortOrder
|
code?: Prisma.SortOrder
|
||||||
status?: Prisma.SortOrder
|
status?: Prisma.SortOrder
|
||||||
fiscal_switch_type?: Prisma.SortOrder
|
tsp_provider?: Prisma.SortOrder
|
||||||
logo_url?: Prisma.SortOrderInput | Prisma.SortOrder
|
logo_url?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||||
created_at?: Prisma.SortOrder
|
created_at?: Prisma.SortOrder
|
||||||
updated_at?: Prisma.SortOrder
|
updated_at?: Prisma.SortOrder
|
||||||
@@ -240,7 +240,7 @@ export type PartnerWhereUniqueInput = Prisma.AtLeast<{
|
|||||||
NOT?: Prisma.PartnerWhereInput | Prisma.PartnerWhereInput[]
|
NOT?: Prisma.PartnerWhereInput | Prisma.PartnerWhereInput[]
|
||||||
name?: Prisma.StringFilter<"Partner"> | string
|
name?: Prisma.StringFilter<"Partner"> | string
|
||||||
status?: Prisma.EnumPartnerStatusFilter<"Partner"> | $Enums.PartnerStatus
|
status?: Prisma.EnumPartnerStatusFilter<"Partner"> | $Enums.PartnerStatus
|
||||||
fiscal_switch_type?: Prisma.EnumPartnerFiscalSwitchTypeFilter<"Partner"> | $Enums.PartnerFiscalSwitchType
|
tsp_provider?: Prisma.EnumTspProviderTypeFilter<"Partner"> | $Enums.TspProviderType
|
||||||
logo_url?: Prisma.StringNullableFilter<"Partner"> | string | null
|
logo_url?: Prisma.StringNullableFilter<"Partner"> | string | null
|
||||||
created_at?: Prisma.DateTimeFilter<"Partner"> | Date | string
|
created_at?: Prisma.DateTimeFilter<"Partner"> | Date | string
|
||||||
updated_at?: Prisma.DateTimeFilter<"Partner"> | Date | string
|
updated_at?: Prisma.DateTimeFilter<"Partner"> | Date | string
|
||||||
@@ -257,7 +257,7 @@ export type PartnerOrderByWithAggregationInput = {
|
|||||||
name?: Prisma.SortOrder
|
name?: Prisma.SortOrder
|
||||||
code?: Prisma.SortOrder
|
code?: Prisma.SortOrder
|
||||||
status?: Prisma.SortOrder
|
status?: Prisma.SortOrder
|
||||||
fiscal_switch_type?: Prisma.SortOrder
|
tsp_provider?: Prisma.SortOrder
|
||||||
logo_url?: Prisma.SortOrderInput | Prisma.SortOrder
|
logo_url?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||||
created_at?: Prisma.SortOrder
|
created_at?: Prisma.SortOrder
|
||||||
updated_at?: Prisma.SortOrder
|
updated_at?: Prisma.SortOrder
|
||||||
@@ -274,7 +274,7 @@ export type PartnerScalarWhereWithAggregatesInput = {
|
|||||||
name?: Prisma.StringWithAggregatesFilter<"Partner"> | string
|
name?: Prisma.StringWithAggregatesFilter<"Partner"> | string
|
||||||
code?: Prisma.StringWithAggregatesFilter<"Partner"> | string
|
code?: Prisma.StringWithAggregatesFilter<"Partner"> | string
|
||||||
status?: Prisma.EnumPartnerStatusWithAggregatesFilter<"Partner"> | $Enums.PartnerStatus
|
status?: Prisma.EnumPartnerStatusWithAggregatesFilter<"Partner"> | $Enums.PartnerStatus
|
||||||
fiscal_switch_type?: Prisma.EnumPartnerFiscalSwitchTypeWithAggregatesFilter<"Partner"> | $Enums.PartnerFiscalSwitchType
|
tsp_provider?: Prisma.EnumTspProviderTypeWithAggregatesFilter<"Partner"> | $Enums.TspProviderType
|
||||||
logo_url?: Prisma.StringNullableWithAggregatesFilter<"Partner"> | string | null
|
logo_url?: Prisma.StringNullableWithAggregatesFilter<"Partner"> | string | null
|
||||||
created_at?: Prisma.DateTimeWithAggregatesFilter<"Partner"> | Date | string
|
created_at?: Prisma.DateTimeWithAggregatesFilter<"Partner"> | Date | string
|
||||||
updated_at?: Prisma.DateTimeWithAggregatesFilter<"Partner"> | Date | string
|
updated_at?: Prisma.DateTimeWithAggregatesFilter<"Partner"> | Date | string
|
||||||
@@ -285,7 +285,7 @@ export type PartnerCreateInput = {
|
|||||||
name: string
|
name: string
|
||||||
code: string
|
code: string
|
||||||
status?: $Enums.PartnerStatus
|
status?: $Enums.PartnerStatus
|
||||||
fiscal_switch_type: $Enums.PartnerFiscalSwitchType
|
tsp_provider?: $Enums.TspProviderType
|
||||||
logo_url?: string | null
|
logo_url?: string | null
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
@@ -302,7 +302,7 @@ export type PartnerUncheckedCreateInput = {
|
|||||||
name: string
|
name: string
|
||||||
code: string
|
code: string
|
||||||
status?: $Enums.PartnerStatus
|
status?: $Enums.PartnerStatus
|
||||||
fiscal_switch_type: $Enums.PartnerFiscalSwitchType
|
tsp_provider?: $Enums.TspProviderType
|
||||||
logo_url?: string | null
|
logo_url?: string | null
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
@@ -319,7 +319,7 @@ export type PartnerUpdateInput = {
|
|||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
code?: Prisma.StringFieldUpdateOperationsInput | string
|
code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
status?: Prisma.EnumPartnerStatusFieldUpdateOperationsInput | $Enums.PartnerStatus
|
status?: Prisma.EnumPartnerStatusFieldUpdateOperationsInput | $Enums.PartnerStatus
|
||||||
fiscal_switch_type?: Prisma.EnumPartnerFiscalSwitchTypeFieldUpdateOperationsInput | $Enums.PartnerFiscalSwitchType
|
tsp_provider?: Prisma.EnumTspProviderTypeFieldUpdateOperationsInput | $Enums.TspProviderType
|
||||||
logo_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
logo_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
@@ -336,7 +336,7 @@ export type PartnerUncheckedUpdateInput = {
|
|||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
code?: Prisma.StringFieldUpdateOperationsInput | string
|
code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
status?: Prisma.EnumPartnerStatusFieldUpdateOperationsInput | $Enums.PartnerStatus
|
status?: Prisma.EnumPartnerStatusFieldUpdateOperationsInput | $Enums.PartnerStatus
|
||||||
fiscal_switch_type?: Prisma.EnumPartnerFiscalSwitchTypeFieldUpdateOperationsInput | $Enums.PartnerFiscalSwitchType
|
tsp_provider?: Prisma.EnumTspProviderTypeFieldUpdateOperationsInput | $Enums.TspProviderType
|
||||||
logo_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
logo_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
@@ -353,7 +353,7 @@ export type PartnerCreateManyInput = {
|
|||||||
name: string
|
name: string
|
||||||
code: string
|
code: string
|
||||||
status?: $Enums.PartnerStatus
|
status?: $Enums.PartnerStatus
|
||||||
fiscal_switch_type: $Enums.PartnerFiscalSwitchType
|
tsp_provider?: $Enums.TspProviderType
|
||||||
logo_url?: string | null
|
logo_url?: string | null
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
@@ -364,7 +364,7 @@ export type PartnerUpdateManyMutationInput = {
|
|||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
code?: Prisma.StringFieldUpdateOperationsInput | string
|
code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
status?: Prisma.EnumPartnerStatusFieldUpdateOperationsInput | $Enums.PartnerStatus
|
status?: Prisma.EnumPartnerStatusFieldUpdateOperationsInput | $Enums.PartnerStatus
|
||||||
fiscal_switch_type?: Prisma.EnumPartnerFiscalSwitchTypeFieldUpdateOperationsInput | $Enums.PartnerFiscalSwitchType
|
tsp_provider?: Prisma.EnumTspProviderTypeFieldUpdateOperationsInput | $Enums.TspProviderType
|
||||||
logo_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
logo_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
@@ -375,7 +375,7 @@ export type PartnerUncheckedUpdateManyInput = {
|
|||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
code?: Prisma.StringFieldUpdateOperationsInput | string
|
code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
status?: Prisma.EnumPartnerStatusFieldUpdateOperationsInput | $Enums.PartnerStatus
|
status?: Prisma.EnumPartnerStatusFieldUpdateOperationsInput | $Enums.PartnerStatus
|
||||||
fiscal_switch_type?: Prisma.EnumPartnerFiscalSwitchTypeFieldUpdateOperationsInput | $Enums.PartnerFiscalSwitchType
|
tsp_provider?: Prisma.EnumTspProviderTypeFieldUpdateOperationsInput | $Enums.TspProviderType
|
||||||
logo_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
logo_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
@@ -397,7 +397,7 @@ export type PartnerCountOrderByAggregateInput = {
|
|||||||
name?: Prisma.SortOrder
|
name?: Prisma.SortOrder
|
||||||
code?: Prisma.SortOrder
|
code?: Prisma.SortOrder
|
||||||
status?: Prisma.SortOrder
|
status?: Prisma.SortOrder
|
||||||
fiscal_switch_type?: Prisma.SortOrder
|
tsp_provider?: Prisma.SortOrder
|
||||||
logo_url?: Prisma.SortOrder
|
logo_url?: Prisma.SortOrder
|
||||||
created_at?: Prisma.SortOrder
|
created_at?: Prisma.SortOrder
|
||||||
updated_at?: Prisma.SortOrder
|
updated_at?: Prisma.SortOrder
|
||||||
@@ -408,7 +408,7 @@ export type PartnerMaxOrderByAggregateInput = {
|
|||||||
name?: Prisma.SortOrder
|
name?: Prisma.SortOrder
|
||||||
code?: Prisma.SortOrder
|
code?: Prisma.SortOrder
|
||||||
status?: Prisma.SortOrder
|
status?: Prisma.SortOrder
|
||||||
fiscal_switch_type?: Prisma.SortOrder
|
tsp_provider?: Prisma.SortOrder
|
||||||
logo_url?: Prisma.SortOrder
|
logo_url?: Prisma.SortOrder
|
||||||
created_at?: Prisma.SortOrder
|
created_at?: Prisma.SortOrder
|
||||||
updated_at?: Prisma.SortOrder
|
updated_at?: Prisma.SortOrder
|
||||||
@@ -419,7 +419,7 @@ export type PartnerMinOrderByAggregateInput = {
|
|||||||
name?: Prisma.SortOrder
|
name?: Prisma.SortOrder
|
||||||
code?: Prisma.SortOrder
|
code?: Prisma.SortOrder
|
||||||
status?: Prisma.SortOrder
|
status?: Prisma.SortOrder
|
||||||
fiscal_switch_type?: Prisma.SortOrder
|
tsp_provider?: Prisma.SortOrder
|
||||||
logo_url?: Prisma.SortOrder
|
logo_url?: Prisma.SortOrder
|
||||||
created_at?: Prisma.SortOrder
|
created_at?: Prisma.SortOrder
|
||||||
updated_at?: Prisma.SortOrder
|
updated_at?: Prisma.SortOrder
|
||||||
@@ -485,8 +485,8 @@ export type EnumPartnerStatusFieldUpdateOperationsInput = {
|
|||||||
set?: $Enums.PartnerStatus
|
set?: $Enums.PartnerStatus
|
||||||
}
|
}
|
||||||
|
|
||||||
export type EnumPartnerFiscalSwitchTypeFieldUpdateOperationsInput = {
|
export type EnumTspProviderTypeFieldUpdateOperationsInput = {
|
||||||
set?: $Enums.PartnerFiscalSwitchType
|
set?: $Enums.TspProviderType
|
||||||
}
|
}
|
||||||
|
|
||||||
export type PartnerCreateNestedOneWithoutConsumers_individualInput = {
|
export type PartnerCreateNestedOneWithoutConsumers_individualInput = {
|
||||||
@@ -522,7 +522,7 @@ export type PartnerCreateWithoutLicense_charge_transactionsInput = {
|
|||||||
name: string
|
name: string
|
||||||
code: string
|
code: string
|
||||||
status?: $Enums.PartnerStatus
|
status?: $Enums.PartnerStatus
|
||||||
fiscal_switch_type: $Enums.PartnerFiscalSwitchType
|
tsp_provider?: $Enums.TspProviderType
|
||||||
logo_url?: string | null
|
logo_url?: string | null
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
@@ -538,7 +538,7 @@ export type PartnerUncheckedCreateWithoutLicense_charge_transactionsInput = {
|
|||||||
name: string
|
name: string
|
||||||
code: string
|
code: string
|
||||||
status?: $Enums.PartnerStatus
|
status?: $Enums.PartnerStatus
|
||||||
fiscal_switch_type: $Enums.PartnerFiscalSwitchType
|
tsp_provider?: $Enums.TspProviderType
|
||||||
logo_url?: string | null
|
logo_url?: string | null
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
@@ -570,7 +570,7 @@ export type PartnerUpdateWithoutLicense_charge_transactionsInput = {
|
|||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
code?: Prisma.StringFieldUpdateOperationsInput | string
|
code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
status?: Prisma.EnumPartnerStatusFieldUpdateOperationsInput | $Enums.PartnerStatus
|
status?: Prisma.EnumPartnerStatusFieldUpdateOperationsInput | $Enums.PartnerStatus
|
||||||
fiscal_switch_type?: Prisma.EnumPartnerFiscalSwitchTypeFieldUpdateOperationsInput | $Enums.PartnerFiscalSwitchType
|
tsp_provider?: Prisma.EnumTspProviderTypeFieldUpdateOperationsInput | $Enums.TspProviderType
|
||||||
logo_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
logo_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
@@ -586,7 +586,7 @@ export type PartnerUncheckedUpdateWithoutLicense_charge_transactionsInput = {
|
|||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
code?: Prisma.StringFieldUpdateOperationsInput | string
|
code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
status?: Prisma.EnumPartnerStatusFieldUpdateOperationsInput | $Enums.PartnerStatus
|
status?: Prisma.EnumPartnerStatusFieldUpdateOperationsInput | $Enums.PartnerStatus
|
||||||
fiscal_switch_type?: Prisma.EnumPartnerFiscalSwitchTypeFieldUpdateOperationsInput | $Enums.PartnerFiscalSwitchType
|
tsp_provider?: Prisma.EnumTspProviderTypeFieldUpdateOperationsInput | $Enums.TspProviderType
|
||||||
logo_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
logo_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
@@ -602,7 +602,7 @@ export type PartnerCreateWithoutLicense_renew_charge_transactionsInput = {
|
|||||||
name: string
|
name: string
|
||||||
code: string
|
code: string
|
||||||
status?: $Enums.PartnerStatus
|
status?: $Enums.PartnerStatus
|
||||||
fiscal_switch_type: $Enums.PartnerFiscalSwitchType
|
tsp_provider?: $Enums.TspProviderType
|
||||||
logo_url?: string | null
|
logo_url?: string | null
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
@@ -618,7 +618,7 @@ export type PartnerUncheckedCreateWithoutLicense_renew_charge_transactionsInput
|
|||||||
name: string
|
name: string
|
||||||
code: string
|
code: string
|
||||||
status?: $Enums.PartnerStatus
|
status?: $Enums.PartnerStatus
|
||||||
fiscal_switch_type: $Enums.PartnerFiscalSwitchType
|
tsp_provider?: $Enums.TspProviderType
|
||||||
logo_url?: string | null
|
logo_url?: string | null
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
@@ -650,7 +650,7 @@ export type PartnerUpdateWithoutLicense_renew_charge_transactionsInput = {
|
|||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
code?: Prisma.StringFieldUpdateOperationsInput | string
|
code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
status?: Prisma.EnumPartnerStatusFieldUpdateOperationsInput | $Enums.PartnerStatus
|
status?: Prisma.EnumPartnerStatusFieldUpdateOperationsInput | $Enums.PartnerStatus
|
||||||
fiscal_switch_type?: Prisma.EnumPartnerFiscalSwitchTypeFieldUpdateOperationsInput | $Enums.PartnerFiscalSwitchType
|
tsp_provider?: Prisma.EnumTspProviderTypeFieldUpdateOperationsInput | $Enums.TspProviderType
|
||||||
logo_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
logo_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
@@ -666,7 +666,7 @@ export type PartnerUncheckedUpdateWithoutLicense_renew_charge_transactionsInput
|
|||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
code?: Prisma.StringFieldUpdateOperationsInput | string
|
code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
status?: Prisma.EnumPartnerStatusFieldUpdateOperationsInput | $Enums.PartnerStatus
|
status?: Prisma.EnumPartnerStatusFieldUpdateOperationsInput | $Enums.PartnerStatus
|
||||||
fiscal_switch_type?: Prisma.EnumPartnerFiscalSwitchTypeFieldUpdateOperationsInput | $Enums.PartnerFiscalSwitchType
|
tsp_provider?: Prisma.EnumTspProviderTypeFieldUpdateOperationsInput | $Enums.TspProviderType
|
||||||
logo_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
logo_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
@@ -682,7 +682,7 @@ export type PartnerCreateWithoutAccount_quota_charge_transactionsInput = {
|
|||||||
name: string
|
name: string
|
||||||
code: string
|
code: string
|
||||||
status?: $Enums.PartnerStatus
|
status?: $Enums.PartnerStatus
|
||||||
fiscal_switch_type: $Enums.PartnerFiscalSwitchType
|
tsp_provider?: $Enums.TspProviderType
|
||||||
logo_url?: string | null
|
logo_url?: string | null
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
@@ -698,7 +698,7 @@ export type PartnerUncheckedCreateWithoutAccount_quota_charge_transactionsInput
|
|||||||
name: string
|
name: string
|
||||||
code: string
|
code: string
|
||||||
status?: $Enums.PartnerStatus
|
status?: $Enums.PartnerStatus
|
||||||
fiscal_switch_type: $Enums.PartnerFiscalSwitchType
|
tsp_provider?: $Enums.TspProviderType
|
||||||
logo_url?: string | null
|
logo_url?: string | null
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
@@ -730,7 +730,7 @@ export type PartnerUpdateWithoutAccount_quota_charge_transactionsInput = {
|
|||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
code?: Prisma.StringFieldUpdateOperationsInput | string
|
code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
status?: Prisma.EnumPartnerStatusFieldUpdateOperationsInput | $Enums.PartnerStatus
|
status?: Prisma.EnumPartnerStatusFieldUpdateOperationsInput | $Enums.PartnerStatus
|
||||||
fiscal_switch_type?: Prisma.EnumPartnerFiscalSwitchTypeFieldUpdateOperationsInput | $Enums.PartnerFiscalSwitchType
|
tsp_provider?: Prisma.EnumTspProviderTypeFieldUpdateOperationsInput | $Enums.TspProviderType
|
||||||
logo_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
logo_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
@@ -746,7 +746,7 @@ export type PartnerUncheckedUpdateWithoutAccount_quota_charge_transactionsInput
|
|||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
code?: Prisma.StringFieldUpdateOperationsInput | string
|
code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
status?: Prisma.EnumPartnerStatusFieldUpdateOperationsInput | $Enums.PartnerStatus
|
status?: Prisma.EnumPartnerStatusFieldUpdateOperationsInput | $Enums.PartnerStatus
|
||||||
fiscal_switch_type?: Prisma.EnumPartnerFiscalSwitchTypeFieldUpdateOperationsInput | $Enums.PartnerFiscalSwitchType
|
tsp_provider?: Prisma.EnumTspProviderTypeFieldUpdateOperationsInput | $Enums.TspProviderType
|
||||||
logo_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
logo_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
@@ -762,7 +762,7 @@ export type PartnerCreateWithoutAccountsInput = {
|
|||||||
name: string
|
name: string
|
||||||
code: string
|
code: string
|
||||||
status?: $Enums.PartnerStatus
|
status?: $Enums.PartnerStatus
|
||||||
fiscal_switch_type: $Enums.PartnerFiscalSwitchType
|
tsp_provider?: $Enums.TspProviderType
|
||||||
logo_url?: string | null
|
logo_url?: string | null
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
@@ -778,7 +778,7 @@ export type PartnerUncheckedCreateWithoutAccountsInput = {
|
|||||||
name: string
|
name: string
|
||||||
code: string
|
code: string
|
||||||
status?: $Enums.PartnerStatus
|
status?: $Enums.PartnerStatus
|
||||||
fiscal_switch_type: $Enums.PartnerFiscalSwitchType
|
tsp_provider?: $Enums.TspProviderType
|
||||||
logo_url?: string | null
|
logo_url?: string | null
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
@@ -810,7 +810,7 @@ export type PartnerUpdateWithoutAccountsInput = {
|
|||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
code?: Prisma.StringFieldUpdateOperationsInput | string
|
code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
status?: Prisma.EnumPartnerStatusFieldUpdateOperationsInput | $Enums.PartnerStatus
|
status?: Prisma.EnumPartnerStatusFieldUpdateOperationsInput | $Enums.PartnerStatus
|
||||||
fiscal_switch_type?: Prisma.EnumPartnerFiscalSwitchTypeFieldUpdateOperationsInput | $Enums.PartnerFiscalSwitchType
|
tsp_provider?: Prisma.EnumTspProviderTypeFieldUpdateOperationsInput | $Enums.TspProviderType
|
||||||
logo_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
logo_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
@@ -826,7 +826,7 @@ export type PartnerUncheckedUpdateWithoutAccountsInput = {
|
|||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
code?: Prisma.StringFieldUpdateOperationsInput | string
|
code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
status?: Prisma.EnumPartnerStatusFieldUpdateOperationsInput | $Enums.PartnerStatus
|
status?: Prisma.EnumPartnerStatusFieldUpdateOperationsInput | $Enums.PartnerStatus
|
||||||
fiscal_switch_type?: Prisma.EnumPartnerFiscalSwitchTypeFieldUpdateOperationsInput | $Enums.PartnerFiscalSwitchType
|
tsp_provider?: Prisma.EnumTspProviderTypeFieldUpdateOperationsInput | $Enums.TspProviderType
|
||||||
logo_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
logo_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
@@ -842,7 +842,7 @@ export type PartnerCreateWithoutConsumers_individualInput = {
|
|||||||
name: string
|
name: string
|
||||||
code: string
|
code: string
|
||||||
status?: $Enums.PartnerStatus
|
status?: $Enums.PartnerStatus
|
||||||
fiscal_switch_type: $Enums.PartnerFiscalSwitchType
|
tsp_provider?: $Enums.TspProviderType
|
||||||
logo_url?: string | null
|
logo_url?: string | null
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
@@ -858,7 +858,7 @@ export type PartnerUncheckedCreateWithoutConsumers_individualInput = {
|
|||||||
name: string
|
name: string
|
||||||
code: string
|
code: string
|
||||||
status?: $Enums.PartnerStatus
|
status?: $Enums.PartnerStatus
|
||||||
fiscal_switch_type: $Enums.PartnerFiscalSwitchType
|
tsp_provider?: $Enums.TspProviderType
|
||||||
logo_url?: string | null
|
logo_url?: string | null
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
@@ -890,7 +890,7 @@ export type PartnerUpdateWithoutConsumers_individualInput = {
|
|||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
code?: Prisma.StringFieldUpdateOperationsInput | string
|
code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
status?: Prisma.EnumPartnerStatusFieldUpdateOperationsInput | $Enums.PartnerStatus
|
status?: Prisma.EnumPartnerStatusFieldUpdateOperationsInput | $Enums.PartnerStatus
|
||||||
fiscal_switch_type?: Prisma.EnumPartnerFiscalSwitchTypeFieldUpdateOperationsInput | $Enums.PartnerFiscalSwitchType
|
tsp_provider?: Prisma.EnumTspProviderTypeFieldUpdateOperationsInput | $Enums.TspProviderType
|
||||||
logo_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
logo_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
@@ -906,7 +906,7 @@ export type PartnerUncheckedUpdateWithoutConsumers_individualInput = {
|
|||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
code?: Prisma.StringFieldUpdateOperationsInput | string
|
code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
status?: Prisma.EnumPartnerStatusFieldUpdateOperationsInput | $Enums.PartnerStatus
|
status?: Prisma.EnumPartnerStatusFieldUpdateOperationsInput | $Enums.PartnerStatus
|
||||||
fiscal_switch_type?: Prisma.EnumPartnerFiscalSwitchTypeFieldUpdateOperationsInput | $Enums.PartnerFiscalSwitchType
|
tsp_provider?: Prisma.EnumTspProviderTypeFieldUpdateOperationsInput | $Enums.TspProviderType
|
||||||
logo_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
logo_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
@@ -922,7 +922,7 @@ export type PartnerCreateWithoutConsumers_legalInput = {
|
|||||||
name: string
|
name: string
|
||||||
code: string
|
code: string
|
||||||
status?: $Enums.PartnerStatus
|
status?: $Enums.PartnerStatus
|
||||||
fiscal_switch_type: $Enums.PartnerFiscalSwitchType
|
tsp_provider?: $Enums.TspProviderType
|
||||||
logo_url?: string | null
|
logo_url?: string | null
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
@@ -938,7 +938,7 @@ export type PartnerUncheckedCreateWithoutConsumers_legalInput = {
|
|||||||
name: string
|
name: string
|
||||||
code: string
|
code: string
|
||||||
status?: $Enums.PartnerStatus
|
status?: $Enums.PartnerStatus
|
||||||
fiscal_switch_type: $Enums.PartnerFiscalSwitchType
|
tsp_provider?: $Enums.TspProviderType
|
||||||
logo_url?: string | null
|
logo_url?: string | null
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
@@ -970,7 +970,7 @@ export type PartnerUpdateWithoutConsumers_legalInput = {
|
|||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
code?: Prisma.StringFieldUpdateOperationsInput | string
|
code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
status?: Prisma.EnumPartnerStatusFieldUpdateOperationsInput | $Enums.PartnerStatus
|
status?: Prisma.EnumPartnerStatusFieldUpdateOperationsInput | $Enums.PartnerStatus
|
||||||
fiscal_switch_type?: Prisma.EnumPartnerFiscalSwitchTypeFieldUpdateOperationsInput | $Enums.PartnerFiscalSwitchType
|
tsp_provider?: Prisma.EnumTspProviderTypeFieldUpdateOperationsInput | $Enums.TspProviderType
|
||||||
logo_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
logo_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
@@ -986,7 +986,7 @@ export type PartnerUncheckedUpdateWithoutConsumers_legalInput = {
|
|||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
code?: Prisma.StringFieldUpdateOperationsInput | string
|
code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
status?: Prisma.EnumPartnerStatusFieldUpdateOperationsInput | $Enums.PartnerStatus
|
status?: Prisma.EnumPartnerStatusFieldUpdateOperationsInput | $Enums.PartnerStatus
|
||||||
fiscal_switch_type?: Prisma.EnumPartnerFiscalSwitchTypeFieldUpdateOperationsInput | $Enums.PartnerFiscalSwitchType
|
tsp_provider?: Prisma.EnumTspProviderTypeFieldUpdateOperationsInput | $Enums.TspProviderType
|
||||||
logo_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
logo_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
@@ -1078,7 +1078,7 @@ export type PartnerSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs
|
|||||||
name?: boolean
|
name?: boolean
|
||||||
code?: boolean
|
code?: boolean
|
||||||
status?: boolean
|
status?: boolean
|
||||||
fiscal_switch_type?: boolean
|
tsp_provider?: boolean
|
||||||
logo_url?: boolean
|
logo_url?: boolean
|
||||||
created_at?: boolean
|
created_at?: boolean
|
||||||
updated_at?: boolean
|
updated_at?: boolean
|
||||||
@@ -1098,13 +1098,13 @@ export type PartnerSelectScalar = {
|
|||||||
name?: boolean
|
name?: boolean
|
||||||
code?: boolean
|
code?: boolean
|
||||||
status?: boolean
|
status?: boolean
|
||||||
fiscal_switch_type?: boolean
|
tsp_provider?: boolean
|
||||||
logo_url?: boolean
|
logo_url?: boolean
|
||||||
created_at?: boolean
|
created_at?: boolean
|
||||||
updated_at?: boolean
|
updated_at?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export type PartnerOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "name" | "code" | "status" | "fiscal_switch_type" | "logo_url" | "created_at" | "updated_at", ExtArgs["result"]["partner"]>
|
export type PartnerOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "name" | "code" | "status" | "tsp_provider" | "logo_url" | "created_at" | "updated_at", ExtArgs["result"]["partner"]>
|
||||||
export type PartnerInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
export type PartnerInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
accounts?: boolean | Prisma.Partner$accountsArgs<ExtArgs>
|
accounts?: boolean | Prisma.Partner$accountsArgs<ExtArgs>
|
||||||
consumers_individual?: boolean | Prisma.Partner$consumers_individualArgs<ExtArgs>
|
consumers_individual?: boolean | Prisma.Partner$consumers_individualArgs<ExtArgs>
|
||||||
@@ -1130,7 +1130,7 @@ export type $PartnerPayload<ExtArgs extends runtime.Types.Extensions.InternalArg
|
|||||||
name: string
|
name: string
|
||||||
code: string
|
code: string
|
||||||
status: $Enums.PartnerStatus
|
status: $Enums.PartnerStatus
|
||||||
fiscal_switch_type: $Enums.PartnerFiscalSwitchType
|
tsp_provider: $Enums.TspProviderType
|
||||||
logo_url: string | null
|
logo_url: string | null
|
||||||
created_at: Date
|
created_at: Date
|
||||||
updated_at: Date
|
updated_at: Date
|
||||||
@@ -1513,7 +1513,7 @@ export interface PartnerFieldRefs {
|
|||||||
readonly name: Prisma.FieldRef<"Partner", 'String'>
|
readonly name: Prisma.FieldRef<"Partner", 'String'>
|
||||||
readonly code: Prisma.FieldRef<"Partner", 'String'>
|
readonly code: Prisma.FieldRef<"Partner", 'String'>
|
||||||
readonly status: Prisma.FieldRef<"Partner", 'PartnerStatus'>
|
readonly status: Prisma.FieldRef<"Partner", 'PartnerStatus'>
|
||||||
readonly fiscal_switch_type: Prisma.FieldRef<"Partner", 'PartnerFiscalSwitchType'>
|
readonly tsp_provider: Prisma.FieldRef<"Partner", 'TspProviderType'>
|
||||||
readonly logo_url: Prisma.FieldRef<"Partner", 'String'>
|
readonly logo_url: Prisma.FieldRef<"Partner", 'String'>
|
||||||
readonly created_at: Prisma.FieldRef<"Partner", 'DateTime'>
|
readonly created_at: Prisma.FieldRef<"Partner", 'DateTime'>
|
||||||
readonly updated_at: Prisma.FieldRef<"Partner", 'DateTime'>
|
readonly updated_at: Prisma.FieldRef<"Partner", 'DateTime'>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -275,9 +275,9 @@ export type SalesInvoiceWhereInput = {
|
|||||||
customer?: Prisma.XOR<Prisma.CustomerNullableScalarRelationFilter, Prisma.CustomerWhereInput> | null
|
customer?: Prisma.XOR<Prisma.CustomerNullableScalarRelationFilter, Prisma.CustomerWhereInput> | null
|
||||||
consumer_account?: Prisma.XOR<Prisma.ConsumerAccountScalarRelationFilter, Prisma.ConsumerAccountWhereInput>
|
consumer_account?: Prisma.XOR<Prisma.ConsumerAccountScalarRelationFilter, Prisma.ConsumerAccountWhereInput>
|
||||||
pos?: Prisma.XOR<Prisma.PosScalarRelationFilter, Prisma.PosWhereInput>
|
pos?: Prisma.XOR<Prisma.PosScalarRelationFilter, Prisma.PosWhereInput>
|
||||||
fiscal?: Prisma.XOR<Prisma.SaleInvoiceFiscalsNullableScalarRelationFilter, Prisma.SaleInvoiceFiscalsWhereInput> | null
|
|
||||||
items?: Prisma.SalesInvoiceItemListRelationFilter
|
items?: Prisma.SalesInvoiceItemListRelationFilter
|
||||||
payments?: Prisma.SalesInvoicePaymentListRelationFilter
|
payments?: Prisma.SalesInvoicePaymentListRelationFilter
|
||||||
|
tsp_attempts?: Prisma.SaleInvoiceTspAttemptsListRelationFilter
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceOrderByWithRelationInput = {
|
export type SalesInvoiceOrderByWithRelationInput = {
|
||||||
@@ -296,9 +296,9 @@ export type SalesInvoiceOrderByWithRelationInput = {
|
|||||||
customer?: Prisma.CustomerOrderByWithRelationInput
|
customer?: Prisma.CustomerOrderByWithRelationInput
|
||||||
consumer_account?: Prisma.ConsumerAccountOrderByWithRelationInput
|
consumer_account?: Prisma.ConsumerAccountOrderByWithRelationInput
|
||||||
pos?: Prisma.PosOrderByWithRelationInput
|
pos?: Prisma.PosOrderByWithRelationInput
|
||||||
fiscal?: Prisma.SaleInvoiceFiscalsOrderByWithRelationInput
|
|
||||||
items?: Prisma.SalesInvoiceItemOrderByRelationAggregateInput
|
items?: Prisma.SalesInvoiceItemOrderByRelationAggregateInput
|
||||||
payments?: Prisma.SalesInvoicePaymentOrderByRelationAggregateInput
|
payments?: Prisma.SalesInvoicePaymentOrderByRelationAggregateInput
|
||||||
|
tsp_attempts?: Prisma.SaleInvoiceTspAttemptsOrderByRelationAggregateInput
|
||||||
_relevance?: Prisma.SalesInvoiceOrderByRelevanceInput
|
_relevance?: Prisma.SalesInvoiceOrderByRelevanceInput
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -322,9 +322,9 @@ export type SalesInvoiceWhereUniqueInput = Prisma.AtLeast<{
|
|||||||
customer?: Prisma.XOR<Prisma.CustomerNullableScalarRelationFilter, Prisma.CustomerWhereInput> | null
|
customer?: Prisma.XOR<Prisma.CustomerNullableScalarRelationFilter, Prisma.CustomerWhereInput> | null
|
||||||
consumer_account?: Prisma.XOR<Prisma.ConsumerAccountScalarRelationFilter, Prisma.ConsumerAccountWhereInput>
|
consumer_account?: Prisma.XOR<Prisma.ConsumerAccountScalarRelationFilter, Prisma.ConsumerAccountWhereInput>
|
||||||
pos?: Prisma.XOR<Prisma.PosScalarRelationFilter, Prisma.PosWhereInput>
|
pos?: Prisma.XOR<Prisma.PosScalarRelationFilter, Prisma.PosWhereInput>
|
||||||
fiscal?: Prisma.XOR<Prisma.SaleInvoiceFiscalsNullableScalarRelationFilter, Prisma.SaleInvoiceFiscalsWhereInput> | null
|
|
||||||
items?: Prisma.SalesInvoiceItemListRelationFilter
|
items?: Prisma.SalesInvoiceItemListRelationFilter
|
||||||
payments?: Prisma.SalesInvoicePaymentListRelationFilter
|
payments?: Prisma.SalesInvoicePaymentListRelationFilter
|
||||||
|
tsp_attempts?: Prisma.SaleInvoiceTspAttemptsListRelationFilter
|
||||||
}, "id" | "code" | "invoice_number_pos_id">
|
}, "id" | "code" | "invoice_number_pos_id">
|
||||||
|
|
||||||
export type SalesInvoiceOrderByWithAggregationInput = {
|
export type SalesInvoiceOrderByWithAggregationInput = {
|
||||||
@@ -378,9 +378,9 @@ export type SalesInvoiceCreateInput = {
|
|||||||
customer?: Prisma.CustomerCreateNestedOneWithoutSales_invoicesInput
|
customer?: Prisma.CustomerCreateNestedOneWithoutSales_invoicesInput
|
||||||
consumer_account: Prisma.ConsumerAccountCreateNestedOneWithoutSales_invoicesInput
|
consumer_account: Prisma.ConsumerAccountCreateNestedOneWithoutSales_invoicesInput
|
||||||
pos: Prisma.PosCreateNestedOneWithoutSales_invoicesInput
|
pos: Prisma.PosCreateNestedOneWithoutSales_invoicesInput
|
||||||
fiscal?: Prisma.SaleInvoiceFiscalsCreateNestedOneWithoutInvoiceInput
|
|
||||||
items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput
|
items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput
|
||||||
payments?: Prisma.SalesInvoicePaymentCreateNestedManyWithoutInvoiceInput
|
payments?: Prisma.SalesInvoicePaymentCreateNestedManyWithoutInvoiceInput
|
||||||
|
tsp_attempts?: Prisma.SaleInvoiceTspAttemptsCreateNestedManyWithoutInvoiceInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceUncheckedCreateInput = {
|
export type SalesInvoiceUncheckedCreateInput = {
|
||||||
@@ -396,9 +396,9 @@ export type SalesInvoiceUncheckedCreateInput = {
|
|||||||
customer_id?: string | null
|
customer_id?: string | null
|
||||||
consumer_account_id: string
|
consumer_account_id: string
|
||||||
pos_id: string
|
pos_id: string
|
||||||
fiscal?: Prisma.SaleInvoiceFiscalsUncheckedCreateNestedOneWithoutInvoiceInput
|
|
||||||
items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput
|
items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput
|
||||||
payments?: Prisma.SalesInvoicePaymentUncheckedCreateNestedManyWithoutInvoiceInput
|
payments?: Prisma.SalesInvoicePaymentUncheckedCreateNestedManyWithoutInvoiceInput
|
||||||
|
tsp_attempts?: Prisma.SaleInvoiceTspAttemptsUncheckedCreateNestedManyWithoutInvoiceInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceUpdateInput = {
|
export type SalesInvoiceUpdateInput = {
|
||||||
@@ -414,9 +414,9 @@ export type SalesInvoiceUpdateInput = {
|
|||||||
customer?: Prisma.CustomerUpdateOneWithoutSales_invoicesNestedInput
|
customer?: Prisma.CustomerUpdateOneWithoutSales_invoicesNestedInput
|
||||||
consumer_account?: Prisma.ConsumerAccountUpdateOneRequiredWithoutSales_invoicesNestedInput
|
consumer_account?: Prisma.ConsumerAccountUpdateOneRequiredWithoutSales_invoicesNestedInput
|
||||||
pos?: Prisma.PosUpdateOneRequiredWithoutSales_invoicesNestedInput
|
pos?: Prisma.PosUpdateOneRequiredWithoutSales_invoicesNestedInput
|
||||||
fiscal?: Prisma.SaleInvoiceFiscalsUpdateOneWithoutInvoiceNestedInput
|
|
||||||
items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput
|
items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput
|
||||||
payments?: Prisma.SalesInvoicePaymentUpdateManyWithoutInvoiceNestedInput
|
payments?: Prisma.SalesInvoicePaymentUpdateManyWithoutInvoiceNestedInput
|
||||||
|
tsp_attempts?: Prisma.SaleInvoiceTspAttemptsUpdateManyWithoutInvoiceNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceUncheckedUpdateInput = {
|
export type SalesInvoiceUncheckedUpdateInput = {
|
||||||
@@ -432,9 +432,9 @@ export type SalesInvoiceUncheckedUpdateInput = {
|
|||||||
customer_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
customer_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
consumer_account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
consumer_account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
pos_id?: Prisma.StringFieldUpdateOperationsInput | string
|
pos_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
fiscal?: Prisma.SaleInvoiceFiscalsUncheckedUpdateOneWithoutInvoiceNestedInput
|
|
||||||
items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput
|
items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput
|
||||||
payments?: Prisma.SalesInvoicePaymentUncheckedUpdateManyWithoutInvoiceNestedInput
|
payments?: Prisma.SalesInvoicePaymentUncheckedUpdateManyWithoutInvoiceNestedInput
|
||||||
|
tsp_attempts?: Prisma.SaleInvoiceTspAttemptsUncheckedUpdateManyWithoutInvoiceNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceCreateManyInput = {
|
export type SalesInvoiceCreateManyInput = {
|
||||||
@@ -698,18 +698,18 @@ export type SalesInvoiceUpdateOneRequiredWithoutItemsNestedInput = {
|
|||||||
update?: Prisma.XOR<Prisma.XOR<Prisma.SalesInvoiceUpdateToOneWithWhereWithoutItemsInput, Prisma.SalesInvoiceUpdateWithoutItemsInput>, Prisma.SalesInvoiceUncheckedUpdateWithoutItemsInput>
|
update?: Prisma.XOR<Prisma.XOR<Prisma.SalesInvoiceUpdateToOneWithWhereWithoutItemsInput, Prisma.SalesInvoiceUpdateWithoutItemsInput>, Prisma.SalesInvoiceUncheckedUpdateWithoutItemsInput>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceCreateNestedOneWithoutFiscalInput = {
|
export type SalesInvoiceCreateNestedOneWithoutTsp_attemptsInput = {
|
||||||
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutFiscalInput, Prisma.SalesInvoiceUncheckedCreateWithoutFiscalInput>
|
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutTsp_attemptsInput, Prisma.SalesInvoiceUncheckedCreateWithoutTsp_attemptsInput>
|
||||||
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutFiscalInput
|
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutTsp_attemptsInput
|
||||||
connect?: Prisma.SalesInvoiceWhereUniqueInput
|
connect?: Prisma.SalesInvoiceWhereUniqueInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceUpdateOneRequiredWithoutFiscalNestedInput = {
|
export type SalesInvoiceUpdateOneRequiredWithoutTsp_attemptsNestedInput = {
|
||||||
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutFiscalInput, Prisma.SalesInvoiceUncheckedCreateWithoutFiscalInput>
|
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutTsp_attemptsInput, Prisma.SalesInvoiceUncheckedCreateWithoutTsp_attemptsInput>
|
||||||
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutFiscalInput
|
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutTsp_attemptsInput
|
||||||
upsert?: Prisma.SalesInvoiceUpsertWithoutFiscalInput
|
upsert?: Prisma.SalesInvoiceUpsertWithoutTsp_attemptsInput
|
||||||
connect?: Prisma.SalesInvoiceWhereUniqueInput
|
connect?: Prisma.SalesInvoiceWhereUniqueInput
|
||||||
update?: Prisma.XOR<Prisma.XOR<Prisma.SalesInvoiceUpdateToOneWithWhereWithoutFiscalInput, Prisma.SalesInvoiceUpdateWithoutFiscalInput>, Prisma.SalesInvoiceUncheckedUpdateWithoutFiscalInput>
|
update?: Prisma.XOR<Prisma.XOR<Prisma.SalesInvoiceUpdateToOneWithWhereWithoutTsp_attemptsInput, Prisma.SalesInvoiceUpdateWithoutTsp_attemptsInput>, Prisma.SalesInvoiceUncheckedUpdateWithoutTsp_attemptsInput>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceCreateNestedOneWithoutPaymentsInput = {
|
export type SalesInvoiceCreateNestedOneWithoutPaymentsInput = {
|
||||||
@@ -738,9 +738,9 @@ export type SalesInvoiceCreateWithoutConsumer_accountInput = {
|
|||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
customer?: Prisma.CustomerCreateNestedOneWithoutSales_invoicesInput
|
customer?: Prisma.CustomerCreateNestedOneWithoutSales_invoicesInput
|
||||||
pos: Prisma.PosCreateNestedOneWithoutSales_invoicesInput
|
pos: Prisma.PosCreateNestedOneWithoutSales_invoicesInput
|
||||||
fiscal?: Prisma.SaleInvoiceFiscalsCreateNestedOneWithoutInvoiceInput
|
|
||||||
items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput
|
items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput
|
||||||
payments?: Prisma.SalesInvoicePaymentCreateNestedManyWithoutInvoiceInput
|
payments?: Prisma.SalesInvoicePaymentCreateNestedManyWithoutInvoiceInput
|
||||||
|
tsp_attempts?: Prisma.SaleInvoiceTspAttemptsCreateNestedManyWithoutInvoiceInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceUncheckedCreateWithoutConsumer_accountInput = {
|
export type SalesInvoiceUncheckedCreateWithoutConsumer_accountInput = {
|
||||||
@@ -755,9 +755,9 @@ export type SalesInvoiceUncheckedCreateWithoutConsumer_accountInput = {
|
|||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
customer_id?: string | null
|
customer_id?: string | null
|
||||||
pos_id: string
|
pos_id: string
|
||||||
fiscal?: Prisma.SaleInvoiceFiscalsUncheckedCreateNestedOneWithoutInvoiceInput
|
|
||||||
items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput
|
items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput
|
||||||
payments?: Prisma.SalesInvoicePaymentUncheckedCreateNestedManyWithoutInvoiceInput
|
payments?: Prisma.SalesInvoicePaymentUncheckedCreateNestedManyWithoutInvoiceInput
|
||||||
|
tsp_attempts?: Prisma.SaleInvoiceTspAttemptsUncheckedCreateNestedManyWithoutInvoiceInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceCreateOrConnectWithoutConsumer_accountInput = {
|
export type SalesInvoiceCreateOrConnectWithoutConsumer_accountInput = {
|
||||||
@@ -816,9 +816,9 @@ export type SalesInvoiceCreateWithoutPosInput = {
|
|||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
customer?: Prisma.CustomerCreateNestedOneWithoutSales_invoicesInput
|
customer?: Prisma.CustomerCreateNestedOneWithoutSales_invoicesInput
|
||||||
consumer_account: Prisma.ConsumerAccountCreateNestedOneWithoutSales_invoicesInput
|
consumer_account: Prisma.ConsumerAccountCreateNestedOneWithoutSales_invoicesInput
|
||||||
fiscal?: Prisma.SaleInvoiceFiscalsCreateNestedOneWithoutInvoiceInput
|
|
||||||
items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput
|
items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput
|
||||||
payments?: Prisma.SalesInvoicePaymentCreateNestedManyWithoutInvoiceInput
|
payments?: Prisma.SalesInvoicePaymentCreateNestedManyWithoutInvoiceInput
|
||||||
|
tsp_attempts?: Prisma.SaleInvoiceTspAttemptsCreateNestedManyWithoutInvoiceInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceUncheckedCreateWithoutPosInput = {
|
export type SalesInvoiceUncheckedCreateWithoutPosInput = {
|
||||||
@@ -833,9 +833,9 @@ export type SalesInvoiceUncheckedCreateWithoutPosInput = {
|
|||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
customer_id?: string | null
|
customer_id?: string | null
|
||||||
consumer_account_id: string
|
consumer_account_id: string
|
||||||
fiscal?: Prisma.SaleInvoiceFiscalsUncheckedCreateNestedOneWithoutInvoiceInput
|
|
||||||
items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput
|
items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput
|
||||||
payments?: Prisma.SalesInvoicePaymentUncheckedCreateNestedManyWithoutInvoiceInput
|
payments?: Prisma.SalesInvoicePaymentUncheckedCreateNestedManyWithoutInvoiceInput
|
||||||
|
tsp_attempts?: Prisma.SaleInvoiceTspAttemptsUncheckedCreateNestedManyWithoutInvoiceInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceCreateOrConnectWithoutPosInput = {
|
export type SalesInvoiceCreateOrConnectWithoutPosInput = {
|
||||||
@@ -876,9 +876,9 @@ export type SalesInvoiceCreateWithoutCustomerInput = {
|
|||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
consumer_account: Prisma.ConsumerAccountCreateNestedOneWithoutSales_invoicesInput
|
consumer_account: Prisma.ConsumerAccountCreateNestedOneWithoutSales_invoicesInput
|
||||||
pos: Prisma.PosCreateNestedOneWithoutSales_invoicesInput
|
pos: Prisma.PosCreateNestedOneWithoutSales_invoicesInput
|
||||||
fiscal?: Prisma.SaleInvoiceFiscalsCreateNestedOneWithoutInvoiceInput
|
|
||||||
items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput
|
items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput
|
||||||
payments?: Prisma.SalesInvoicePaymentCreateNestedManyWithoutInvoiceInput
|
payments?: Prisma.SalesInvoicePaymentCreateNestedManyWithoutInvoiceInput
|
||||||
|
tsp_attempts?: Prisma.SaleInvoiceTspAttemptsCreateNestedManyWithoutInvoiceInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceUncheckedCreateWithoutCustomerInput = {
|
export type SalesInvoiceUncheckedCreateWithoutCustomerInput = {
|
||||||
@@ -893,9 +893,9 @@ export type SalesInvoiceUncheckedCreateWithoutCustomerInput = {
|
|||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
consumer_account_id: string
|
consumer_account_id: string
|
||||||
pos_id: string
|
pos_id: string
|
||||||
fiscal?: Prisma.SaleInvoiceFiscalsUncheckedCreateNestedOneWithoutInvoiceInput
|
|
||||||
items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput
|
items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput
|
||||||
payments?: Prisma.SalesInvoicePaymentUncheckedCreateNestedManyWithoutInvoiceInput
|
payments?: Prisma.SalesInvoicePaymentUncheckedCreateNestedManyWithoutInvoiceInput
|
||||||
|
tsp_attempts?: Prisma.SaleInvoiceTspAttemptsUncheckedCreateNestedManyWithoutInvoiceInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceCreateOrConnectWithoutCustomerInput = {
|
export type SalesInvoiceCreateOrConnectWithoutCustomerInput = {
|
||||||
@@ -937,8 +937,8 @@ export type SalesInvoiceCreateWithoutItemsInput = {
|
|||||||
customer?: Prisma.CustomerCreateNestedOneWithoutSales_invoicesInput
|
customer?: Prisma.CustomerCreateNestedOneWithoutSales_invoicesInput
|
||||||
consumer_account: Prisma.ConsumerAccountCreateNestedOneWithoutSales_invoicesInput
|
consumer_account: Prisma.ConsumerAccountCreateNestedOneWithoutSales_invoicesInput
|
||||||
pos: Prisma.PosCreateNestedOneWithoutSales_invoicesInput
|
pos: Prisma.PosCreateNestedOneWithoutSales_invoicesInput
|
||||||
fiscal?: Prisma.SaleInvoiceFiscalsCreateNestedOneWithoutInvoiceInput
|
|
||||||
payments?: Prisma.SalesInvoicePaymentCreateNestedManyWithoutInvoiceInput
|
payments?: Prisma.SalesInvoicePaymentCreateNestedManyWithoutInvoiceInput
|
||||||
|
tsp_attempts?: Prisma.SaleInvoiceTspAttemptsCreateNestedManyWithoutInvoiceInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceUncheckedCreateWithoutItemsInput = {
|
export type SalesInvoiceUncheckedCreateWithoutItemsInput = {
|
||||||
@@ -954,8 +954,8 @@ export type SalesInvoiceUncheckedCreateWithoutItemsInput = {
|
|||||||
customer_id?: string | null
|
customer_id?: string | null
|
||||||
consumer_account_id: string
|
consumer_account_id: string
|
||||||
pos_id: string
|
pos_id: string
|
||||||
fiscal?: Prisma.SaleInvoiceFiscalsUncheckedCreateNestedOneWithoutInvoiceInput
|
|
||||||
payments?: Prisma.SalesInvoicePaymentUncheckedCreateNestedManyWithoutInvoiceInput
|
payments?: Prisma.SalesInvoicePaymentUncheckedCreateNestedManyWithoutInvoiceInput
|
||||||
|
tsp_attempts?: Prisma.SaleInvoiceTspAttemptsUncheckedCreateNestedManyWithoutInvoiceInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceCreateOrConnectWithoutItemsInput = {
|
export type SalesInvoiceCreateOrConnectWithoutItemsInput = {
|
||||||
@@ -987,8 +987,8 @@ export type SalesInvoiceUpdateWithoutItemsInput = {
|
|||||||
customer?: Prisma.CustomerUpdateOneWithoutSales_invoicesNestedInput
|
customer?: Prisma.CustomerUpdateOneWithoutSales_invoicesNestedInput
|
||||||
consumer_account?: Prisma.ConsumerAccountUpdateOneRequiredWithoutSales_invoicesNestedInput
|
consumer_account?: Prisma.ConsumerAccountUpdateOneRequiredWithoutSales_invoicesNestedInput
|
||||||
pos?: Prisma.PosUpdateOneRequiredWithoutSales_invoicesNestedInput
|
pos?: Prisma.PosUpdateOneRequiredWithoutSales_invoicesNestedInput
|
||||||
fiscal?: Prisma.SaleInvoiceFiscalsUpdateOneWithoutInvoiceNestedInput
|
|
||||||
payments?: Prisma.SalesInvoicePaymentUpdateManyWithoutInvoiceNestedInput
|
payments?: Prisma.SalesInvoicePaymentUpdateManyWithoutInvoiceNestedInput
|
||||||
|
tsp_attempts?: Prisma.SaleInvoiceTspAttemptsUpdateManyWithoutInvoiceNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceUncheckedUpdateWithoutItemsInput = {
|
export type SalesInvoiceUncheckedUpdateWithoutItemsInput = {
|
||||||
@@ -1004,11 +1004,11 @@ export type SalesInvoiceUncheckedUpdateWithoutItemsInput = {
|
|||||||
customer_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
customer_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
consumer_account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
consumer_account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
pos_id?: Prisma.StringFieldUpdateOperationsInput | string
|
pos_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
fiscal?: Prisma.SaleInvoiceFiscalsUncheckedUpdateOneWithoutInvoiceNestedInput
|
|
||||||
payments?: Prisma.SalesInvoicePaymentUncheckedUpdateManyWithoutInvoiceNestedInput
|
payments?: Prisma.SalesInvoicePaymentUncheckedUpdateManyWithoutInvoiceNestedInput
|
||||||
|
tsp_attempts?: Prisma.SaleInvoiceTspAttemptsUncheckedUpdateManyWithoutInvoiceNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceCreateWithoutFiscalInput = {
|
export type SalesInvoiceCreateWithoutTsp_attemptsInput = {
|
||||||
id?: string
|
id?: string
|
||||||
code: string
|
code: string
|
||||||
total_amount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
total_amount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
@@ -1025,7 +1025,7 @@ export type SalesInvoiceCreateWithoutFiscalInput = {
|
|||||||
payments?: Prisma.SalesInvoicePaymentCreateNestedManyWithoutInvoiceInput
|
payments?: Prisma.SalesInvoicePaymentCreateNestedManyWithoutInvoiceInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceUncheckedCreateWithoutFiscalInput = {
|
export type SalesInvoiceUncheckedCreateWithoutTsp_attemptsInput = {
|
||||||
id?: string
|
id?: string
|
||||||
code: string
|
code: string
|
||||||
total_amount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
total_amount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
@@ -1042,23 +1042,23 @@ export type SalesInvoiceUncheckedCreateWithoutFiscalInput = {
|
|||||||
payments?: Prisma.SalesInvoicePaymentUncheckedCreateNestedManyWithoutInvoiceInput
|
payments?: Prisma.SalesInvoicePaymentUncheckedCreateNestedManyWithoutInvoiceInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceCreateOrConnectWithoutFiscalInput = {
|
export type SalesInvoiceCreateOrConnectWithoutTsp_attemptsInput = {
|
||||||
where: Prisma.SalesInvoiceWhereUniqueInput
|
where: Prisma.SalesInvoiceWhereUniqueInput
|
||||||
create: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutFiscalInput, Prisma.SalesInvoiceUncheckedCreateWithoutFiscalInput>
|
create: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutTsp_attemptsInput, Prisma.SalesInvoiceUncheckedCreateWithoutTsp_attemptsInput>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceUpsertWithoutFiscalInput = {
|
export type SalesInvoiceUpsertWithoutTsp_attemptsInput = {
|
||||||
update: Prisma.XOR<Prisma.SalesInvoiceUpdateWithoutFiscalInput, Prisma.SalesInvoiceUncheckedUpdateWithoutFiscalInput>
|
update: Prisma.XOR<Prisma.SalesInvoiceUpdateWithoutTsp_attemptsInput, Prisma.SalesInvoiceUncheckedUpdateWithoutTsp_attemptsInput>
|
||||||
create: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutFiscalInput, Prisma.SalesInvoiceUncheckedCreateWithoutFiscalInput>
|
create: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutTsp_attemptsInput, Prisma.SalesInvoiceUncheckedCreateWithoutTsp_attemptsInput>
|
||||||
where?: Prisma.SalesInvoiceWhereInput
|
where?: Prisma.SalesInvoiceWhereInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceUpdateToOneWithWhereWithoutFiscalInput = {
|
export type SalesInvoiceUpdateToOneWithWhereWithoutTsp_attemptsInput = {
|
||||||
where?: Prisma.SalesInvoiceWhereInput
|
where?: Prisma.SalesInvoiceWhereInput
|
||||||
data: Prisma.XOR<Prisma.SalesInvoiceUpdateWithoutFiscalInput, Prisma.SalesInvoiceUncheckedUpdateWithoutFiscalInput>
|
data: Prisma.XOR<Prisma.SalesInvoiceUpdateWithoutTsp_attemptsInput, Prisma.SalesInvoiceUncheckedUpdateWithoutTsp_attemptsInput>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceUpdateWithoutFiscalInput = {
|
export type SalesInvoiceUpdateWithoutTsp_attemptsInput = {
|
||||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
code?: Prisma.StringFieldUpdateOperationsInput | string
|
code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
total_amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
total_amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
@@ -1075,7 +1075,7 @@ export type SalesInvoiceUpdateWithoutFiscalInput = {
|
|||||||
payments?: Prisma.SalesInvoicePaymentUpdateManyWithoutInvoiceNestedInput
|
payments?: Prisma.SalesInvoicePaymentUpdateManyWithoutInvoiceNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceUncheckedUpdateWithoutFiscalInput = {
|
export type SalesInvoiceUncheckedUpdateWithoutTsp_attemptsInput = {
|
||||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
code?: Prisma.StringFieldUpdateOperationsInput | string
|
code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
total_amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
total_amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
@@ -1105,8 +1105,8 @@ export type SalesInvoiceCreateWithoutPaymentsInput = {
|
|||||||
customer?: Prisma.CustomerCreateNestedOneWithoutSales_invoicesInput
|
customer?: Prisma.CustomerCreateNestedOneWithoutSales_invoicesInput
|
||||||
consumer_account: Prisma.ConsumerAccountCreateNestedOneWithoutSales_invoicesInput
|
consumer_account: Prisma.ConsumerAccountCreateNestedOneWithoutSales_invoicesInput
|
||||||
pos: Prisma.PosCreateNestedOneWithoutSales_invoicesInput
|
pos: Prisma.PosCreateNestedOneWithoutSales_invoicesInput
|
||||||
fiscal?: Prisma.SaleInvoiceFiscalsCreateNestedOneWithoutInvoiceInput
|
|
||||||
items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput
|
items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput
|
||||||
|
tsp_attempts?: Prisma.SaleInvoiceTspAttemptsCreateNestedManyWithoutInvoiceInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceUncheckedCreateWithoutPaymentsInput = {
|
export type SalesInvoiceUncheckedCreateWithoutPaymentsInput = {
|
||||||
@@ -1122,8 +1122,8 @@ export type SalesInvoiceUncheckedCreateWithoutPaymentsInput = {
|
|||||||
customer_id?: string | null
|
customer_id?: string | null
|
||||||
consumer_account_id: string
|
consumer_account_id: string
|
||||||
pos_id: string
|
pos_id: string
|
||||||
fiscal?: Prisma.SaleInvoiceFiscalsUncheckedCreateNestedOneWithoutInvoiceInput
|
|
||||||
items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput
|
items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput
|
||||||
|
tsp_attempts?: Prisma.SaleInvoiceTspAttemptsUncheckedCreateNestedManyWithoutInvoiceInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceCreateOrConnectWithoutPaymentsInput = {
|
export type SalesInvoiceCreateOrConnectWithoutPaymentsInput = {
|
||||||
@@ -1155,8 +1155,8 @@ export type SalesInvoiceUpdateWithoutPaymentsInput = {
|
|||||||
customer?: Prisma.CustomerUpdateOneWithoutSales_invoicesNestedInput
|
customer?: Prisma.CustomerUpdateOneWithoutSales_invoicesNestedInput
|
||||||
consumer_account?: Prisma.ConsumerAccountUpdateOneRequiredWithoutSales_invoicesNestedInput
|
consumer_account?: Prisma.ConsumerAccountUpdateOneRequiredWithoutSales_invoicesNestedInput
|
||||||
pos?: Prisma.PosUpdateOneRequiredWithoutSales_invoicesNestedInput
|
pos?: Prisma.PosUpdateOneRequiredWithoutSales_invoicesNestedInput
|
||||||
fiscal?: Prisma.SaleInvoiceFiscalsUpdateOneWithoutInvoiceNestedInput
|
|
||||||
items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput
|
items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput
|
||||||
|
tsp_attempts?: Prisma.SaleInvoiceTspAttemptsUpdateManyWithoutInvoiceNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceUncheckedUpdateWithoutPaymentsInput = {
|
export type SalesInvoiceUncheckedUpdateWithoutPaymentsInput = {
|
||||||
@@ -1172,8 +1172,8 @@ export type SalesInvoiceUncheckedUpdateWithoutPaymentsInput = {
|
|||||||
customer_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
customer_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
consumer_account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
consumer_account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
pos_id?: Prisma.StringFieldUpdateOperationsInput | string
|
pos_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
fiscal?: Prisma.SaleInvoiceFiscalsUncheckedUpdateOneWithoutInvoiceNestedInput
|
|
||||||
items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput
|
items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput
|
||||||
|
tsp_attempts?: Prisma.SaleInvoiceTspAttemptsUncheckedUpdateManyWithoutInvoiceNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceCreateManyConsumer_accountInput = {
|
export type SalesInvoiceCreateManyConsumer_accountInput = {
|
||||||
@@ -1202,9 +1202,9 @@ export type SalesInvoiceUpdateWithoutConsumer_accountInput = {
|
|||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
customer?: Prisma.CustomerUpdateOneWithoutSales_invoicesNestedInput
|
customer?: Prisma.CustomerUpdateOneWithoutSales_invoicesNestedInput
|
||||||
pos?: Prisma.PosUpdateOneRequiredWithoutSales_invoicesNestedInput
|
pos?: Prisma.PosUpdateOneRequiredWithoutSales_invoicesNestedInput
|
||||||
fiscal?: Prisma.SaleInvoiceFiscalsUpdateOneWithoutInvoiceNestedInput
|
|
||||||
items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput
|
items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput
|
||||||
payments?: Prisma.SalesInvoicePaymentUpdateManyWithoutInvoiceNestedInput
|
payments?: Prisma.SalesInvoicePaymentUpdateManyWithoutInvoiceNestedInput
|
||||||
|
tsp_attempts?: Prisma.SaleInvoiceTspAttemptsUpdateManyWithoutInvoiceNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceUncheckedUpdateWithoutConsumer_accountInput = {
|
export type SalesInvoiceUncheckedUpdateWithoutConsumer_accountInput = {
|
||||||
@@ -1219,9 +1219,9 @@ export type SalesInvoiceUncheckedUpdateWithoutConsumer_accountInput = {
|
|||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
customer_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
customer_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
pos_id?: Prisma.StringFieldUpdateOperationsInput | string
|
pos_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
fiscal?: Prisma.SaleInvoiceFiscalsUncheckedUpdateOneWithoutInvoiceNestedInput
|
|
||||||
items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput
|
items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput
|
||||||
payments?: Prisma.SalesInvoicePaymentUncheckedUpdateManyWithoutInvoiceNestedInput
|
payments?: Prisma.SalesInvoicePaymentUncheckedUpdateManyWithoutInvoiceNestedInput
|
||||||
|
tsp_attempts?: Prisma.SaleInvoiceTspAttemptsUncheckedUpdateManyWithoutInvoiceNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceUncheckedUpdateManyWithoutConsumer_accountInput = {
|
export type SalesInvoiceUncheckedUpdateManyWithoutConsumer_accountInput = {
|
||||||
@@ -1264,9 +1264,9 @@ export type SalesInvoiceUpdateWithoutPosInput = {
|
|||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
customer?: Prisma.CustomerUpdateOneWithoutSales_invoicesNestedInput
|
customer?: Prisma.CustomerUpdateOneWithoutSales_invoicesNestedInput
|
||||||
consumer_account?: Prisma.ConsumerAccountUpdateOneRequiredWithoutSales_invoicesNestedInput
|
consumer_account?: Prisma.ConsumerAccountUpdateOneRequiredWithoutSales_invoicesNestedInput
|
||||||
fiscal?: Prisma.SaleInvoiceFiscalsUpdateOneWithoutInvoiceNestedInput
|
|
||||||
items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput
|
items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput
|
||||||
payments?: Prisma.SalesInvoicePaymentUpdateManyWithoutInvoiceNestedInput
|
payments?: Prisma.SalesInvoicePaymentUpdateManyWithoutInvoiceNestedInput
|
||||||
|
tsp_attempts?: Prisma.SaleInvoiceTspAttemptsUpdateManyWithoutInvoiceNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceUncheckedUpdateWithoutPosInput = {
|
export type SalesInvoiceUncheckedUpdateWithoutPosInput = {
|
||||||
@@ -1281,9 +1281,9 @@ export type SalesInvoiceUncheckedUpdateWithoutPosInput = {
|
|||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
customer_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
customer_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
consumer_account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
consumer_account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
fiscal?: Prisma.SaleInvoiceFiscalsUncheckedUpdateOneWithoutInvoiceNestedInput
|
|
||||||
items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput
|
items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput
|
||||||
payments?: Prisma.SalesInvoicePaymentUncheckedUpdateManyWithoutInvoiceNestedInput
|
payments?: Prisma.SalesInvoicePaymentUncheckedUpdateManyWithoutInvoiceNestedInput
|
||||||
|
tsp_attempts?: Prisma.SaleInvoiceTspAttemptsUncheckedUpdateManyWithoutInvoiceNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceUncheckedUpdateManyWithoutPosInput = {
|
export type SalesInvoiceUncheckedUpdateManyWithoutPosInput = {
|
||||||
@@ -1326,9 +1326,9 @@ export type SalesInvoiceUpdateWithoutCustomerInput = {
|
|||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
consumer_account?: Prisma.ConsumerAccountUpdateOneRequiredWithoutSales_invoicesNestedInput
|
consumer_account?: Prisma.ConsumerAccountUpdateOneRequiredWithoutSales_invoicesNestedInput
|
||||||
pos?: Prisma.PosUpdateOneRequiredWithoutSales_invoicesNestedInput
|
pos?: Prisma.PosUpdateOneRequiredWithoutSales_invoicesNestedInput
|
||||||
fiscal?: Prisma.SaleInvoiceFiscalsUpdateOneWithoutInvoiceNestedInput
|
|
||||||
items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput
|
items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput
|
||||||
payments?: Prisma.SalesInvoicePaymentUpdateManyWithoutInvoiceNestedInput
|
payments?: Prisma.SalesInvoicePaymentUpdateManyWithoutInvoiceNestedInput
|
||||||
|
tsp_attempts?: Prisma.SaleInvoiceTspAttemptsUpdateManyWithoutInvoiceNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceUncheckedUpdateWithoutCustomerInput = {
|
export type SalesInvoiceUncheckedUpdateWithoutCustomerInput = {
|
||||||
@@ -1343,9 +1343,9 @@ export type SalesInvoiceUncheckedUpdateWithoutCustomerInput = {
|
|||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
consumer_account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
consumer_account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
pos_id?: Prisma.StringFieldUpdateOperationsInput | string
|
pos_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
fiscal?: Prisma.SaleInvoiceFiscalsUncheckedUpdateOneWithoutInvoiceNestedInput
|
|
||||||
items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput
|
items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput
|
||||||
payments?: Prisma.SalesInvoicePaymentUncheckedUpdateManyWithoutInvoiceNestedInput
|
payments?: Prisma.SalesInvoicePaymentUncheckedUpdateManyWithoutInvoiceNestedInput
|
||||||
|
tsp_attempts?: Prisma.SaleInvoiceTspAttemptsUncheckedUpdateManyWithoutInvoiceNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceUncheckedUpdateManyWithoutCustomerInput = {
|
export type SalesInvoiceUncheckedUpdateManyWithoutCustomerInput = {
|
||||||
@@ -1370,11 +1370,13 @@ export type SalesInvoiceUncheckedUpdateManyWithoutCustomerInput = {
|
|||||||
export type SalesInvoiceCountOutputType = {
|
export type SalesInvoiceCountOutputType = {
|
||||||
items: number
|
items: number
|
||||||
payments: number
|
payments: number
|
||||||
|
tsp_attempts: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
export type SalesInvoiceCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
items?: boolean | SalesInvoiceCountOutputTypeCountItemsArgs
|
items?: boolean | SalesInvoiceCountOutputTypeCountItemsArgs
|
||||||
payments?: boolean | SalesInvoiceCountOutputTypeCountPaymentsArgs
|
payments?: boolean | SalesInvoiceCountOutputTypeCountPaymentsArgs
|
||||||
|
tsp_attempts?: boolean | SalesInvoiceCountOutputTypeCountTsp_attemptsArgs
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1401,6 +1403,13 @@ export type SalesInvoiceCountOutputTypeCountPaymentsArgs<ExtArgs extends runtime
|
|||||||
where?: Prisma.SalesInvoicePaymentWhereInput
|
where?: Prisma.SalesInvoicePaymentWhereInput
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SalesInvoiceCountOutputType without action
|
||||||
|
*/
|
||||||
|
export type SalesInvoiceCountOutputTypeCountTsp_attemptsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
|
where?: Prisma.SaleInvoiceTspAttemptsWhereInput
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
export type SalesInvoiceSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
export type SalesInvoiceSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||||
id?: boolean
|
id?: boolean
|
||||||
@@ -1418,9 +1427,9 @@ export type SalesInvoiceSelect<ExtArgs extends runtime.Types.Extensions.Internal
|
|||||||
customer?: boolean | Prisma.SalesInvoice$customerArgs<ExtArgs>
|
customer?: boolean | Prisma.SalesInvoice$customerArgs<ExtArgs>
|
||||||
consumer_account?: boolean | Prisma.ConsumerAccountDefaultArgs<ExtArgs>
|
consumer_account?: boolean | Prisma.ConsumerAccountDefaultArgs<ExtArgs>
|
||||||
pos?: boolean | Prisma.PosDefaultArgs<ExtArgs>
|
pos?: boolean | Prisma.PosDefaultArgs<ExtArgs>
|
||||||
fiscal?: boolean | Prisma.SalesInvoice$fiscalArgs<ExtArgs>
|
|
||||||
items?: boolean | Prisma.SalesInvoice$itemsArgs<ExtArgs>
|
items?: boolean | Prisma.SalesInvoice$itemsArgs<ExtArgs>
|
||||||
payments?: boolean | Prisma.SalesInvoice$paymentsArgs<ExtArgs>
|
payments?: boolean | Prisma.SalesInvoice$paymentsArgs<ExtArgs>
|
||||||
|
tsp_attempts?: boolean | Prisma.SalesInvoice$tsp_attemptsArgs<ExtArgs>
|
||||||
_count?: boolean | Prisma.SalesInvoiceCountOutputTypeDefaultArgs<ExtArgs>
|
_count?: boolean | Prisma.SalesInvoiceCountOutputTypeDefaultArgs<ExtArgs>
|
||||||
}, ExtArgs["result"]["salesInvoice"]>
|
}, ExtArgs["result"]["salesInvoice"]>
|
||||||
|
|
||||||
@@ -1446,9 +1455,9 @@ export type SalesInvoiceInclude<ExtArgs extends runtime.Types.Extensions.Interna
|
|||||||
customer?: boolean | Prisma.SalesInvoice$customerArgs<ExtArgs>
|
customer?: boolean | Prisma.SalesInvoice$customerArgs<ExtArgs>
|
||||||
consumer_account?: boolean | Prisma.ConsumerAccountDefaultArgs<ExtArgs>
|
consumer_account?: boolean | Prisma.ConsumerAccountDefaultArgs<ExtArgs>
|
||||||
pos?: boolean | Prisma.PosDefaultArgs<ExtArgs>
|
pos?: boolean | Prisma.PosDefaultArgs<ExtArgs>
|
||||||
fiscal?: boolean | Prisma.SalesInvoice$fiscalArgs<ExtArgs>
|
|
||||||
items?: boolean | Prisma.SalesInvoice$itemsArgs<ExtArgs>
|
items?: boolean | Prisma.SalesInvoice$itemsArgs<ExtArgs>
|
||||||
payments?: boolean | Prisma.SalesInvoice$paymentsArgs<ExtArgs>
|
payments?: boolean | Prisma.SalesInvoice$paymentsArgs<ExtArgs>
|
||||||
|
tsp_attempts?: boolean | Prisma.SalesInvoice$tsp_attemptsArgs<ExtArgs>
|
||||||
_count?: boolean | Prisma.SalesInvoiceCountOutputTypeDefaultArgs<ExtArgs>
|
_count?: boolean | Prisma.SalesInvoiceCountOutputTypeDefaultArgs<ExtArgs>
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1458,9 +1467,9 @@ export type $SalesInvoicePayload<ExtArgs extends runtime.Types.Extensions.Intern
|
|||||||
customer: Prisma.$CustomerPayload<ExtArgs> | null
|
customer: Prisma.$CustomerPayload<ExtArgs> | null
|
||||||
consumer_account: Prisma.$ConsumerAccountPayload<ExtArgs>
|
consumer_account: Prisma.$ConsumerAccountPayload<ExtArgs>
|
||||||
pos: Prisma.$PosPayload<ExtArgs>
|
pos: Prisma.$PosPayload<ExtArgs>
|
||||||
fiscal: Prisma.$SaleInvoiceFiscalsPayload<ExtArgs> | null
|
|
||||||
items: Prisma.$SalesInvoiceItemPayload<ExtArgs>[]
|
items: Prisma.$SalesInvoiceItemPayload<ExtArgs>[]
|
||||||
payments: Prisma.$SalesInvoicePaymentPayload<ExtArgs>[]
|
payments: Prisma.$SalesInvoicePaymentPayload<ExtArgs>[]
|
||||||
|
tsp_attempts: Prisma.$SaleInvoiceTspAttemptsPayload<ExtArgs>[]
|
||||||
}
|
}
|
||||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||||
id: string
|
id: string
|
||||||
@@ -1818,9 +1827,9 @@ export interface Prisma__SalesInvoiceClient<T, Null = never, ExtArgs extends run
|
|||||||
customer<T extends Prisma.SalesInvoice$customerArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SalesInvoice$customerArgs<ExtArgs>>): Prisma.Prisma__CustomerClient<runtime.Types.Result.GetResult<Prisma.$CustomerPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
customer<T extends Prisma.SalesInvoice$customerArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SalesInvoice$customerArgs<ExtArgs>>): Prisma.Prisma__CustomerClient<runtime.Types.Result.GetResult<Prisma.$CustomerPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||||
consumer_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>
|
consumer_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>
|
||||||
pos<T extends Prisma.PosDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.PosDefaultArgs<ExtArgs>>): Prisma.Prisma__PosClient<runtime.Types.Result.GetResult<Prisma.$PosPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
pos<T extends Prisma.PosDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.PosDefaultArgs<ExtArgs>>): Prisma.Prisma__PosClient<runtime.Types.Result.GetResult<Prisma.$PosPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||||
fiscal<T extends Prisma.SalesInvoice$fiscalArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SalesInvoice$fiscalArgs<ExtArgs>>): Prisma.Prisma__SaleInvoiceFiscalsClient<runtime.Types.Result.GetResult<Prisma.$SaleInvoiceFiscalsPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
|
||||||
items<T extends Prisma.SalesInvoice$itemsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SalesInvoice$itemsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SalesInvoiceItemPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
items<T extends Prisma.SalesInvoice$itemsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SalesInvoice$itemsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SalesInvoiceItemPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||||
payments<T extends Prisma.SalesInvoice$paymentsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SalesInvoice$paymentsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SalesInvoicePaymentPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
payments<T extends Prisma.SalesInvoice$paymentsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SalesInvoice$paymentsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SalesInvoicePaymentPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||||
|
tsp_attempts<T extends Prisma.SalesInvoice$tsp_attemptsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SalesInvoice$tsp_attemptsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SaleInvoiceTspAttemptsPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||||
/**
|
/**
|
||||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||||
@@ -2228,25 +2237,6 @@ export type SalesInvoice$customerArgs<ExtArgs extends runtime.Types.Extensions.I
|
|||||||
where?: Prisma.CustomerWhereInput
|
where?: Prisma.CustomerWhereInput
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* SalesInvoice.fiscal
|
|
||||||
*/
|
|
||||||
export type SalesInvoice$fiscalArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
||||||
/**
|
|
||||||
* Select specific fields to fetch from the SaleInvoiceFiscals
|
|
||||||
*/
|
|
||||||
select?: Prisma.SaleInvoiceFiscalsSelect<ExtArgs> | null
|
|
||||||
/**
|
|
||||||
* Omit specific fields from the SaleInvoiceFiscals
|
|
||||||
*/
|
|
||||||
omit?: Prisma.SaleInvoiceFiscalsOmit<ExtArgs> | null
|
|
||||||
/**
|
|
||||||
* Choose, which related nodes to fetch as well
|
|
||||||
*/
|
|
||||||
include?: Prisma.SaleInvoiceFiscalsInclude<ExtArgs> | null
|
|
||||||
where?: Prisma.SaleInvoiceFiscalsWhereInput
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SalesInvoice.items
|
* SalesInvoice.items
|
||||||
*/
|
*/
|
||||||
@@ -2295,6 +2285,30 @@ export type SalesInvoice$paymentsArgs<ExtArgs extends runtime.Types.Extensions.I
|
|||||||
distinct?: Prisma.SalesInvoicePaymentScalarFieldEnum | Prisma.SalesInvoicePaymentScalarFieldEnum[]
|
distinct?: Prisma.SalesInvoicePaymentScalarFieldEnum | Prisma.SalesInvoicePaymentScalarFieldEnum[]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SalesInvoice.tsp_attempts
|
||||||
|
*/
|
||||||
|
export type SalesInvoice$tsp_attemptsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
|
/**
|
||||||
|
* Select specific fields to fetch from the SaleInvoiceTspAttempts
|
||||||
|
*/
|
||||||
|
select?: Prisma.SaleInvoiceTspAttemptsSelect<ExtArgs> | null
|
||||||
|
/**
|
||||||
|
* Omit specific fields from the SaleInvoiceTspAttempts
|
||||||
|
*/
|
||||||
|
omit?: Prisma.SaleInvoiceTspAttemptsOmit<ExtArgs> | null
|
||||||
|
/**
|
||||||
|
* Choose, which related nodes to fetch as well
|
||||||
|
*/
|
||||||
|
include?: Prisma.SaleInvoiceTspAttemptsInclude<ExtArgs> | null
|
||||||
|
where?: Prisma.SaleInvoiceTspAttemptsWhereInput
|
||||||
|
orderBy?: Prisma.SaleInvoiceTspAttemptsOrderByWithRelationInput | Prisma.SaleInvoiceTspAttemptsOrderByWithRelationInput[]
|
||||||
|
cursor?: Prisma.SaleInvoiceTspAttemptsWhereUniqueInput
|
||||||
|
take?: number
|
||||||
|
skip?: number
|
||||||
|
distinct?: Prisma.SaleInvoiceTspAttemptsScalarFieldEnum | Prisma.SaleInvoiceTspAttemptsScalarFieldEnum[]
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SalesInvoice without action
|
* SalesInvoice without action
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -266,9 +266,9 @@ export type SalesInvoiceItemGroupByOutputType = {
|
|||||||
discount: runtime.Decimal
|
discount: runtime.Decimal
|
||||||
notes: string | null
|
notes: string | null
|
||||||
payload: runtime.JsonValue | null
|
payload: runtime.JsonValue | null
|
||||||
good_snapshot: runtime.JsonValue | null
|
good_snapshot: runtime.JsonValue
|
||||||
invoice_id: string
|
invoice_id: string
|
||||||
good_id: string | null
|
good_id: string
|
||||||
service_id: string | null
|
service_id: string | null
|
||||||
_count: SalesInvoiceItemCountAggregateOutputType | null
|
_count: SalesInvoiceItemCountAggregateOutputType | null
|
||||||
_avg: SalesInvoiceItemAvgAggregateOutputType | null
|
_avg: SalesInvoiceItemAvgAggregateOutputType | null
|
||||||
@@ -308,12 +308,12 @@ export type SalesInvoiceItemWhereInput = {
|
|||||||
discount?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: Prisma.StringNullableFilter<"SalesInvoiceItem"> | string | null
|
notes?: Prisma.StringNullableFilter<"SalesInvoiceItem"> | string | null
|
||||||
payload?: Prisma.JsonNullableFilter<"SalesInvoiceItem">
|
payload?: Prisma.JsonNullableFilter<"SalesInvoiceItem">
|
||||||
good_snapshot?: Prisma.JsonNullableFilter<"SalesInvoiceItem">
|
good_snapshot?: Prisma.JsonFilter<"SalesInvoiceItem">
|
||||||
invoice_id?: Prisma.StringFilter<"SalesInvoiceItem"> | string
|
invoice_id?: Prisma.StringFilter<"SalesInvoiceItem"> | string
|
||||||
good_id?: Prisma.StringNullableFilter<"SalesInvoiceItem"> | string | null
|
good_id?: Prisma.StringFilter<"SalesInvoiceItem"> | string
|
||||||
service_id?: Prisma.StringNullableFilter<"SalesInvoiceItem"> | string | null
|
service_id?: Prisma.StringNullableFilter<"SalesInvoiceItem"> | string | null
|
||||||
invoice?: Prisma.XOR<Prisma.SalesInvoiceScalarRelationFilter, Prisma.SalesInvoiceWhereInput>
|
invoice?: Prisma.XOR<Prisma.SalesInvoiceScalarRelationFilter, Prisma.SalesInvoiceWhereInput>
|
||||||
good?: Prisma.XOR<Prisma.GoodNullableScalarRelationFilter, Prisma.GoodWhereInput> | null
|
good?: Prisma.XOR<Prisma.GoodScalarRelationFilter, Prisma.GoodWhereInput>
|
||||||
service?: Prisma.XOR<Prisma.ServiceNullableScalarRelationFilter, Prisma.ServiceWhereInput> | null
|
service?: Prisma.XOR<Prisma.ServiceNullableScalarRelationFilter, Prisma.ServiceWhereInput> | null
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -330,9 +330,9 @@ export type SalesInvoiceItemOrderByWithRelationInput = {
|
|||||||
discount?: Prisma.SortOrder
|
discount?: Prisma.SortOrder
|
||||||
notes?: Prisma.SortOrderInput | Prisma.SortOrder
|
notes?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||||
payload?: Prisma.SortOrderInput | Prisma.SortOrder
|
payload?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||||
good_snapshot?: Prisma.SortOrderInput | Prisma.SortOrder
|
good_snapshot?: Prisma.SortOrder
|
||||||
invoice_id?: Prisma.SortOrder
|
invoice_id?: Prisma.SortOrder
|
||||||
good_id?: Prisma.SortOrderInput | Prisma.SortOrder
|
good_id?: Prisma.SortOrder
|
||||||
service_id?: Prisma.SortOrderInput | Prisma.SortOrder
|
service_id?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||||
invoice?: Prisma.SalesInvoiceOrderByWithRelationInput
|
invoice?: Prisma.SalesInvoiceOrderByWithRelationInput
|
||||||
good?: Prisma.GoodOrderByWithRelationInput
|
good?: Prisma.GoodOrderByWithRelationInput
|
||||||
@@ -356,12 +356,12 @@ export type SalesInvoiceItemWhereUniqueInput = Prisma.AtLeast<{
|
|||||||
discount?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: Prisma.StringNullableFilter<"SalesInvoiceItem"> | string | null
|
notes?: Prisma.StringNullableFilter<"SalesInvoiceItem"> | string | null
|
||||||
payload?: Prisma.JsonNullableFilter<"SalesInvoiceItem">
|
payload?: Prisma.JsonNullableFilter<"SalesInvoiceItem">
|
||||||
good_snapshot?: Prisma.JsonNullableFilter<"SalesInvoiceItem">
|
good_snapshot?: Prisma.JsonFilter<"SalesInvoiceItem">
|
||||||
invoice_id?: Prisma.StringFilter<"SalesInvoiceItem"> | string
|
invoice_id?: Prisma.StringFilter<"SalesInvoiceItem"> | string
|
||||||
good_id?: Prisma.StringNullableFilter<"SalesInvoiceItem"> | string | null
|
good_id?: Prisma.StringFilter<"SalesInvoiceItem"> | string
|
||||||
service_id?: Prisma.StringNullableFilter<"SalesInvoiceItem"> | string | null
|
service_id?: Prisma.StringNullableFilter<"SalesInvoiceItem"> | string | null
|
||||||
invoice?: Prisma.XOR<Prisma.SalesInvoiceScalarRelationFilter, Prisma.SalesInvoiceWhereInput>
|
invoice?: Prisma.XOR<Prisma.SalesInvoiceScalarRelationFilter, Prisma.SalesInvoiceWhereInput>
|
||||||
good?: Prisma.XOR<Prisma.GoodNullableScalarRelationFilter, Prisma.GoodWhereInput> | null
|
good?: Prisma.XOR<Prisma.GoodScalarRelationFilter, Prisma.GoodWhereInput>
|
||||||
service?: Prisma.XOR<Prisma.ServiceNullableScalarRelationFilter, Prisma.ServiceWhereInput> | null
|
service?: Prisma.XOR<Prisma.ServiceNullableScalarRelationFilter, Prisma.ServiceWhereInput> | null
|
||||||
}, "id">
|
}, "id">
|
||||||
|
|
||||||
@@ -378,9 +378,9 @@ export type SalesInvoiceItemOrderByWithAggregationInput = {
|
|||||||
discount?: Prisma.SortOrder
|
discount?: Prisma.SortOrder
|
||||||
notes?: Prisma.SortOrderInput | Prisma.SortOrder
|
notes?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||||
payload?: Prisma.SortOrderInput | Prisma.SortOrder
|
payload?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||||
good_snapshot?: Prisma.SortOrderInput | Prisma.SortOrder
|
good_snapshot?: Prisma.SortOrder
|
||||||
invoice_id?: Prisma.SortOrder
|
invoice_id?: Prisma.SortOrder
|
||||||
good_id?: Prisma.SortOrderInput | Prisma.SortOrder
|
good_id?: Prisma.SortOrder
|
||||||
service_id?: Prisma.SortOrderInput | Prisma.SortOrder
|
service_id?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||||
_count?: Prisma.SalesInvoiceItemCountOrderByAggregateInput
|
_count?: Prisma.SalesInvoiceItemCountOrderByAggregateInput
|
||||||
_avg?: Prisma.SalesInvoiceItemAvgOrderByAggregateInput
|
_avg?: Prisma.SalesInvoiceItemAvgOrderByAggregateInput
|
||||||
@@ -405,9 +405,9 @@ export type SalesInvoiceItemScalarWhereWithAggregatesInput = {
|
|||||||
discount?: Prisma.DecimalWithAggregatesFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: Prisma.DecimalWithAggregatesFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: Prisma.StringNullableWithAggregatesFilter<"SalesInvoiceItem"> | string | null
|
notes?: Prisma.StringNullableWithAggregatesFilter<"SalesInvoiceItem"> | string | null
|
||||||
payload?: Prisma.JsonNullableWithAggregatesFilter<"SalesInvoiceItem">
|
payload?: Prisma.JsonNullableWithAggregatesFilter<"SalesInvoiceItem">
|
||||||
good_snapshot?: Prisma.JsonNullableWithAggregatesFilter<"SalesInvoiceItem">
|
good_snapshot?: Prisma.JsonWithAggregatesFilter<"SalesInvoiceItem">
|
||||||
invoice_id?: Prisma.StringWithAggregatesFilter<"SalesInvoiceItem"> | string
|
invoice_id?: Prisma.StringWithAggregatesFilter<"SalesInvoiceItem"> | string
|
||||||
good_id?: Prisma.StringNullableWithAggregatesFilter<"SalesInvoiceItem"> | string | null
|
good_id?: Prisma.StringWithAggregatesFilter<"SalesInvoiceItem"> | string
|
||||||
service_id?: Prisma.StringNullableWithAggregatesFilter<"SalesInvoiceItem"> | string | null
|
service_id?: Prisma.StringNullableWithAggregatesFilter<"SalesInvoiceItem"> | string | null
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -424,9 +424,9 @@ export type SalesInvoiceItemCreateInput = {
|
|||||||
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: string | null
|
notes?: string | null
|
||||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||||
good_snapshot?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
good_snapshot: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||||
invoice: Prisma.SalesInvoiceCreateNestedOneWithoutItemsInput
|
invoice: Prisma.SalesInvoiceCreateNestedOneWithoutItemsInput
|
||||||
good?: Prisma.GoodCreateNestedOneWithoutSales_invoice_itemsInput
|
good: Prisma.GoodCreateNestedOneWithoutSales_invoice_itemsInput
|
||||||
service?: Prisma.ServiceCreateNestedOneWithoutSales_invoice_itemsInput
|
service?: Prisma.ServiceCreateNestedOneWithoutSales_invoice_itemsInput
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -443,9 +443,9 @@ export type SalesInvoiceItemUncheckedCreateInput = {
|
|||||||
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: string | null
|
notes?: string | null
|
||||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||||
good_snapshot?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
good_snapshot: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||||
invoice_id: string
|
invoice_id: string
|
||||||
good_id?: string | null
|
good_id: string
|
||||||
service_id?: string | null
|
service_id?: string | null
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -462,9 +462,9 @@ export type SalesInvoiceItemUpdateInput = {
|
|||||||
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||||
good_snapshot?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
good_snapshot?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||||
invoice?: Prisma.SalesInvoiceUpdateOneRequiredWithoutItemsNestedInput
|
invoice?: Prisma.SalesInvoiceUpdateOneRequiredWithoutItemsNestedInput
|
||||||
good?: Prisma.GoodUpdateOneWithoutSales_invoice_itemsNestedInput
|
good?: Prisma.GoodUpdateOneRequiredWithoutSales_invoice_itemsNestedInput
|
||||||
service?: Prisma.ServiceUpdateOneWithoutSales_invoice_itemsNestedInput
|
service?: Prisma.ServiceUpdateOneWithoutSales_invoice_itemsNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -481,9 +481,9 @@ export type SalesInvoiceItemUncheckedUpdateInput = {
|
|||||||
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||||
good_snapshot?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
good_snapshot?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||||
invoice_id?: Prisma.StringFieldUpdateOperationsInput | string
|
invoice_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
good_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
good_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
service_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
service_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -500,9 +500,9 @@ export type SalesInvoiceItemCreateManyInput = {
|
|||||||
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: string | null
|
notes?: string | null
|
||||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||||
good_snapshot?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
good_snapshot: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||||
invoice_id: string
|
invoice_id: string
|
||||||
good_id?: string | null
|
good_id: string
|
||||||
service_id?: string | null
|
service_id?: string | null
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -519,7 +519,7 @@ export type SalesInvoiceItemUpdateManyMutationInput = {
|
|||||||
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||||
good_snapshot?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
good_snapshot?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemUncheckedUpdateManyInput = {
|
export type SalesInvoiceItemUncheckedUpdateManyInput = {
|
||||||
@@ -535,9 +535,9 @@ export type SalesInvoiceItemUncheckedUpdateManyInput = {
|
|||||||
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||||
good_snapshot?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
good_snapshot?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||||
invoice_id?: Prisma.StringFieldUpdateOperationsInput | string
|
invoice_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
good_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
good_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
service_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
service_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -765,7 +765,7 @@ export type SalesInvoiceItemCreateWithoutGoodInput = {
|
|||||||
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: string | null
|
notes?: string | null
|
||||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||||
good_snapshot?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
good_snapshot: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||||
invoice: Prisma.SalesInvoiceCreateNestedOneWithoutItemsInput
|
invoice: Prisma.SalesInvoiceCreateNestedOneWithoutItemsInput
|
||||||
service?: Prisma.ServiceCreateNestedOneWithoutSales_invoice_itemsInput
|
service?: Prisma.ServiceCreateNestedOneWithoutSales_invoice_itemsInput
|
||||||
}
|
}
|
||||||
@@ -783,7 +783,7 @@ export type SalesInvoiceItemUncheckedCreateWithoutGoodInput = {
|
|||||||
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: string | null
|
notes?: string | null
|
||||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||||
good_snapshot?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
good_snapshot: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||||
invoice_id: string
|
invoice_id: string
|
||||||
service_id?: string | null
|
service_id?: string | null
|
||||||
}
|
}
|
||||||
@@ -830,9 +830,9 @@ export type SalesInvoiceItemScalarWhereInput = {
|
|||||||
discount?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: Prisma.StringNullableFilter<"SalesInvoiceItem"> | string | null
|
notes?: Prisma.StringNullableFilter<"SalesInvoiceItem"> | string | null
|
||||||
payload?: Prisma.JsonNullableFilter<"SalesInvoiceItem">
|
payload?: Prisma.JsonNullableFilter<"SalesInvoiceItem">
|
||||||
good_snapshot?: Prisma.JsonNullableFilter<"SalesInvoiceItem">
|
good_snapshot?: Prisma.JsonFilter<"SalesInvoiceItem">
|
||||||
invoice_id?: Prisma.StringFilter<"SalesInvoiceItem"> | string
|
invoice_id?: Prisma.StringFilter<"SalesInvoiceItem"> | string
|
||||||
good_id?: Prisma.StringNullableFilter<"SalesInvoiceItem"> | string | null
|
good_id?: Prisma.StringFilter<"SalesInvoiceItem"> | string
|
||||||
service_id?: Prisma.StringNullableFilter<"SalesInvoiceItem"> | string | null
|
service_id?: Prisma.StringNullableFilter<"SalesInvoiceItem"> | string | null
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -849,8 +849,8 @@ export type SalesInvoiceItemCreateWithoutInvoiceInput = {
|
|||||||
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: string | null
|
notes?: string | null
|
||||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||||
good_snapshot?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
good_snapshot: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||||
good?: Prisma.GoodCreateNestedOneWithoutSales_invoice_itemsInput
|
good: Prisma.GoodCreateNestedOneWithoutSales_invoice_itemsInput
|
||||||
service?: Prisma.ServiceCreateNestedOneWithoutSales_invoice_itemsInput
|
service?: Prisma.ServiceCreateNestedOneWithoutSales_invoice_itemsInput
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -867,8 +867,8 @@ export type SalesInvoiceItemUncheckedCreateWithoutInvoiceInput = {
|
|||||||
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: string | null
|
notes?: string | null
|
||||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||||
good_snapshot?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
good_snapshot: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||||
good_id?: string | null
|
good_id: string
|
||||||
service_id?: string | null
|
service_id?: string | null
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -911,9 +911,9 @@ export type SalesInvoiceItemCreateWithoutServiceInput = {
|
|||||||
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: string | null
|
notes?: string | null
|
||||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||||
good_snapshot?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
good_snapshot: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||||
invoice: Prisma.SalesInvoiceCreateNestedOneWithoutItemsInput
|
invoice: Prisma.SalesInvoiceCreateNestedOneWithoutItemsInput
|
||||||
good?: Prisma.GoodCreateNestedOneWithoutSales_invoice_itemsInput
|
good: Prisma.GoodCreateNestedOneWithoutSales_invoice_itemsInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemUncheckedCreateWithoutServiceInput = {
|
export type SalesInvoiceItemUncheckedCreateWithoutServiceInput = {
|
||||||
@@ -929,9 +929,9 @@ export type SalesInvoiceItemUncheckedCreateWithoutServiceInput = {
|
|||||||
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: string | null
|
notes?: string | null
|
||||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||||
good_snapshot?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
good_snapshot: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||||
invoice_id: string
|
invoice_id: string
|
||||||
good_id?: string | null
|
good_id: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemCreateOrConnectWithoutServiceInput = {
|
export type SalesInvoiceItemCreateOrConnectWithoutServiceInput = {
|
||||||
@@ -973,7 +973,7 @@ export type SalesInvoiceItemCreateManyGoodInput = {
|
|||||||
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: string | null
|
notes?: string | null
|
||||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||||
good_snapshot?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
good_snapshot: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||||
invoice_id: string
|
invoice_id: string
|
||||||
service_id?: string | null
|
service_id?: string | null
|
||||||
}
|
}
|
||||||
@@ -991,7 +991,7 @@ export type SalesInvoiceItemUpdateWithoutGoodInput = {
|
|||||||
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||||
good_snapshot?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
good_snapshot?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||||
invoice?: Prisma.SalesInvoiceUpdateOneRequiredWithoutItemsNestedInput
|
invoice?: Prisma.SalesInvoiceUpdateOneRequiredWithoutItemsNestedInput
|
||||||
service?: Prisma.ServiceUpdateOneWithoutSales_invoice_itemsNestedInput
|
service?: Prisma.ServiceUpdateOneWithoutSales_invoice_itemsNestedInput
|
||||||
}
|
}
|
||||||
@@ -1009,7 +1009,7 @@ export type SalesInvoiceItemUncheckedUpdateWithoutGoodInput = {
|
|||||||
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||||
good_snapshot?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
good_snapshot?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||||
invoice_id?: Prisma.StringFieldUpdateOperationsInput | string
|
invoice_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
service_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
service_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
}
|
}
|
||||||
@@ -1027,7 +1027,7 @@ export type SalesInvoiceItemUncheckedUpdateManyWithoutGoodInput = {
|
|||||||
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||||
good_snapshot?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
good_snapshot?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||||
invoice_id?: Prisma.StringFieldUpdateOperationsInput | string
|
invoice_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
service_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
service_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
}
|
}
|
||||||
@@ -1045,8 +1045,8 @@ export type SalesInvoiceItemCreateManyInvoiceInput = {
|
|||||||
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: string | null
|
notes?: string | null
|
||||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||||
good_snapshot?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
good_snapshot: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||||
good_id?: string | null
|
good_id: string
|
||||||
service_id?: string | null
|
service_id?: string | null
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1063,8 +1063,8 @@ export type SalesInvoiceItemUpdateWithoutInvoiceInput = {
|
|||||||
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||||
good_snapshot?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
good_snapshot?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||||
good?: Prisma.GoodUpdateOneWithoutSales_invoice_itemsNestedInput
|
good?: Prisma.GoodUpdateOneRequiredWithoutSales_invoice_itemsNestedInput
|
||||||
service?: Prisma.ServiceUpdateOneWithoutSales_invoice_itemsNestedInput
|
service?: Prisma.ServiceUpdateOneWithoutSales_invoice_itemsNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1081,8 +1081,8 @@ export type SalesInvoiceItemUncheckedUpdateWithoutInvoiceInput = {
|
|||||||
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||||
good_snapshot?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
good_snapshot?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||||
good_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
good_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
service_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
service_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1099,8 +1099,8 @@ export type SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceInput = {
|
|||||||
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||||
good_snapshot?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
good_snapshot?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||||
good_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
good_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
service_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
service_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1117,9 +1117,9 @@ export type SalesInvoiceItemCreateManyServiceInput = {
|
|||||||
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: string | null
|
notes?: string | null
|
||||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||||
good_snapshot?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
good_snapshot: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||||
invoice_id: string
|
invoice_id: string
|
||||||
good_id?: string | null
|
good_id: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemUpdateWithoutServiceInput = {
|
export type SalesInvoiceItemUpdateWithoutServiceInput = {
|
||||||
@@ -1135,9 +1135,9 @@ export type SalesInvoiceItemUpdateWithoutServiceInput = {
|
|||||||
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||||
good_snapshot?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
good_snapshot?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||||
invoice?: Prisma.SalesInvoiceUpdateOneRequiredWithoutItemsNestedInput
|
invoice?: Prisma.SalesInvoiceUpdateOneRequiredWithoutItemsNestedInput
|
||||||
good?: Prisma.GoodUpdateOneWithoutSales_invoice_itemsNestedInput
|
good?: Prisma.GoodUpdateOneRequiredWithoutSales_invoice_itemsNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemUncheckedUpdateWithoutServiceInput = {
|
export type SalesInvoiceItemUncheckedUpdateWithoutServiceInput = {
|
||||||
@@ -1153,9 +1153,9 @@ export type SalesInvoiceItemUncheckedUpdateWithoutServiceInput = {
|
|||||||
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||||
good_snapshot?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
good_snapshot?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||||
invoice_id?: Prisma.StringFieldUpdateOperationsInput | string
|
invoice_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
good_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
good_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemUncheckedUpdateManyWithoutServiceInput = {
|
export type SalesInvoiceItemUncheckedUpdateManyWithoutServiceInput = {
|
||||||
@@ -1171,9 +1171,9 @@ export type SalesInvoiceItemUncheckedUpdateManyWithoutServiceInput = {
|
|||||||
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||||
good_snapshot?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
good_snapshot?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||||
invoice_id?: Prisma.StringFieldUpdateOperationsInput | string
|
invoice_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
good_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
good_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1196,7 +1196,7 @@ export type SalesInvoiceItemSelect<ExtArgs extends runtime.Types.Extensions.Inte
|
|||||||
good_id?: boolean
|
good_id?: boolean
|
||||||
service_id?: boolean
|
service_id?: boolean
|
||||||
invoice?: boolean | Prisma.SalesInvoiceDefaultArgs<ExtArgs>
|
invoice?: boolean | Prisma.SalesInvoiceDefaultArgs<ExtArgs>
|
||||||
good?: boolean | Prisma.SalesInvoiceItem$goodArgs<ExtArgs>
|
good?: boolean | Prisma.GoodDefaultArgs<ExtArgs>
|
||||||
service?: boolean | Prisma.SalesInvoiceItem$serviceArgs<ExtArgs>
|
service?: boolean | Prisma.SalesInvoiceItem$serviceArgs<ExtArgs>
|
||||||
}, ExtArgs["result"]["salesInvoiceItem"]>
|
}, ExtArgs["result"]["salesInvoiceItem"]>
|
||||||
|
|
||||||
@@ -1224,7 +1224,7 @@ export type SalesInvoiceItemSelectScalar = {
|
|||||||
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", ExtArgs["result"]["salesInvoiceItem"]>
|
||||||
export type SalesInvoiceItemInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
export type SalesInvoiceItemInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
invoice?: boolean | Prisma.SalesInvoiceDefaultArgs<ExtArgs>
|
invoice?: boolean | Prisma.SalesInvoiceDefaultArgs<ExtArgs>
|
||||||
good?: boolean | Prisma.SalesInvoiceItem$goodArgs<ExtArgs>
|
good?: boolean | Prisma.GoodDefaultArgs<ExtArgs>
|
||||||
service?: boolean | Prisma.SalesInvoiceItem$serviceArgs<ExtArgs>
|
service?: boolean | Prisma.SalesInvoiceItem$serviceArgs<ExtArgs>
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1232,7 +1232,7 @@ export type $SalesInvoiceItemPayload<ExtArgs extends runtime.Types.Extensions.In
|
|||||||
name: "SalesInvoiceItem"
|
name: "SalesInvoiceItem"
|
||||||
objects: {
|
objects: {
|
||||||
invoice: Prisma.$SalesInvoicePayload<ExtArgs>
|
invoice: Prisma.$SalesInvoicePayload<ExtArgs>
|
||||||
good: Prisma.$GoodPayload<ExtArgs> | null
|
good: Prisma.$GoodPayload<ExtArgs>
|
||||||
service: Prisma.$ServicePayload<ExtArgs> | null
|
service: Prisma.$ServicePayload<ExtArgs> | null
|
||||||
}
|
}
|
||||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||||
@@ -1248,9 +1248,9 @@ export type $SalesInvoiceItemPayload<ExtArgs extends runtime.Types.Extensions.In
|
|||||||
discount: runtime.Decimal
|
discount: runtime.Decimal
|
||||||
notes: string | null
|
notes: string | null
|
||||||
payload: runtime.JsonValue | null
|
payload: runtime.JsonValue | null
|
||||||
good_snapshot: runtime.JsonValue | null
|
good_snapshot: runtime.JsonValue
|
||||||
invoice_id: string
|
invoice_id: string
|
||||||
good_id: string | null
|
good_id: string
|
||||||
service_id: string | null
|
service_id: string | null
|
||||||
}, ExtArgs["result"]["salesInvoiceItem"]>
|
}, ExtArgs["result"]["salesInvoiceItem"]>
|
||||||
composites: {}
|
composites: {}
|
||||||
@@ -1593,7 +1593,7 @@ 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> {
|
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"
|
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>
|
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.SalesInvoiceItem$goodArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SalesInvoiceItem$goodArgs<ExtArgs>>): Prisma.Prisma__GoodClient<runtime.Types.Result.GetResult<Prisma.$GoodPayload<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>
|
||||||
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>
|
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.
|
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||||
@@ -1987,25 +1987,6 @@ export type SalesInvoiceItemDeleteManyArgs<ExtArgs extends runtime.Types.Extensi
|
|||||||
limit?: number
|
limit?: number
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* SalesInvoiceItem.good
|
|
||||||
*/
|
|
||||||
export type SalesInvoiceItem$goodArgs<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
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SalesInvoiceItem.service
|
* SalesInvoiceItem.service
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -318,7 +318,7 @@ export type StockKeepingUnitsCreateInput = {
|
|||||||
code: string
|
code: string
|
||||||
name: string
|
name: string
|
||||||
VAT: runtime.Decimal | runtime.DecimalJsLike | number | string
|
VAT: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
type?: $Enums.SKUGuildType
|
type: $Enums.SKUGuildType
|
||||||
is_public?: boolean
|
is_public?: boolean
|
||||||
is_domestic?: boolean
|
is_domestic?: boolean
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
@@ -331,7 +331,7 @@ export type StockKeepingUnitsUncheckedCreateInput = {
|
|||||||
code: string
|
code: string
|
||||||
name: string
|
name: string
|
||||||
VAT: runtime.Decimal | runtime.DecimalJsLike | number | string
|
VAT: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
type?: $Enums.SKUGuildType
|
type: $Enums.SKUGuildType
|
||||||
is_public?: boolean
|
is_public?: boolean
|
||||||
is_domestic?: boolean
|
is_domestic?: boolean
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
@@ -370,7 +370,7 @@ export type StockKeepingUnitsCreateManyInput = {
|
|||||||
code: string
|
code: string
|
||||||
name: string
|
name: string
|
||||||
VAT: runtime.Decimal | runtime.DecimalJsLike | number | string
|
VAT: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
type?: $Enums.SKUGuildType
|
type: $Enums.SKUGuildType
|
||||||
is_public?: boolean
|
is_public?: boolean
|
||||||
is_domestic?: boolean
|
is_domestic?: boolean
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
@@ -470,14 +470,6 @@ export type StockKeepingUnitsUpdateOneRequiredWithoutGoodsNestedInput = {
|
|||||||
update?: Prisma.XOR<Prisma.XOR<Prisma.StockKeepingUnitsUpdateToOneWithWhereWithoutGoodsInput, Prisma.StockKeepingUnitsUpdateWithoutGoodsInput>, Prisma.StockKeepingUnitsUncheckedUpdateWithoutGoodsInput>
|
update?: Prisma.XOR<Prisma.XOR<Prisma.StockKeepingUnitsUpdateToOneWithWhereWithoutGoodsInput, Prisma.StockKeepingUnitsUpdateWithoutGoodsInput>, Prisma.StockKeepingUnitsUncheckedUpdateWithoutGoodsInput>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type DecimalFieldUpdateOperationsInput = {
|
|
||||||
set?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
increment?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
decrement?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
multiply?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
divide?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
}
|
|
||||||
|
|
||||||
export type EnumSKUGuildTypeFieldUpdateOperationsInput = {
|
export type EnumSKUGuildTypeFieldUpdateOperationsInput = {
|
||||||
set?: $Enums.SKUGuildType
|
set?: $Enums.SKUGuildType
|
||||||
}
|
}
|
||||||
@@ -487,7 +479,7 @@ export type StockKeepingUnitsCreateWithoutGoodsInput = {
|
|||||||
code: string
|
code: string
|
||||||
name: string
|
name: string
|
||||||
VAT: runtime.Decimal | runtime.DecimalJsLike | number | string
|
VAT: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
type?: $Enums.SKUGuildType
|
type: $Enums.SKUGuildType
|
||||||
is_public?: boolean
|
is_public?: boolean
|
||||||
is_domestic?: boolean
|
is_domestic?: boolean
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
@@ -499,7 +491,7 @@ export type StockKeepingUnitsUncheckedCreateWithoutGoodsInput = {
|
|||||||
code: string
|
code: string
|
||||||
name: string
|
name: string
|
||||||
VAT: runtime.Decimal | runtime.DecimalJsLike | number | string
|
VAT: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
type?: $Enums.SKUGuildType
|
type: $Enums.SKUGuildType
|
||||||
is_public?: boolean
|
is_public?: boolean
|
||||||
is_domestic?: boolean
|
is_domestic?: boolean
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
|
|||||||
@@ -1,10 +1,17 @@
|
|||||||
import { IsOptional, IsString } from 'class-validator'
|
import { InvoiceTemplateType } from '@/generated/prisma/enums'
|
||||||
|
import { ApiProperty } from '@nestjs/swagger'
|
||||||
|
import { IsEnum, IsString } from 'class-validator'
|
||||||
|
|
||||||
export class CreateGuildDto {
|
export class CreateGuildDto {
|
||||||
|
@ApiProperty({ required: true })
|
||||||
@IsString()
|
@IsString()
|
||||||
name: string
|
name: string
|
||||||
|
|
||||||
@IsOptional()
|
@ApiProperty({ required: true })
|
||||||
@IsString()
|
@IsString()
|
||||||
code?: string
|
code: string
|
||||||
|
|
||||||
|
@ApiProperty({ required: true, enum: InvoiceTemplateType })
|
||||||
|
@IsEnum(InvoiceTemplateType)
|
||||||
|
invoice_template: InvoiceTemplateType
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { PartnerFiscalSwitchType, PartnerStatus } from '@/generated/prisma/enums'
|
import { PartnerStatus, TspProviderType } from '@/generated/prisma/enums'
|
||||||
import { ApiProperty, PartialType } from '@nestjs/swagger'
|
import { ApiProperty, PartialType } from '@nestjs/swagger'
|
||||||
import { IsEnum, IsNumber, IsOptional, IsString } from 'class-validator'
|
import { IsEnum, IsNumber, IsOptional, IsString } from 'class-validator'
|
||||||
|
|
||||||
@@ -11,9 +11,9 @@ export class CreatePartnerDto {
|
|||||||
@ApiProperty({ required: true })
|
@ApiProperty({ required: true })
|
||||||
code: string
|
code: string
|
||||||
|
|
||||||
@IsEnum(PartnerFiscalSwitchType)
|
@IsEnum(TspProviderType)
|
||||||
@ApiProperty({ required: true })
|
@ApiProperty({ required: true, enum: TspProviderType })
|
||||||
fiscal_switch_type: PartnerFiscalSwitchType
|
tsp_provider: TspProviderType
|
||||||
|
|
||||||
// @IsOptional()
|
// @IsOptional()
|
||||||
// @IsNumber()
|
// @IsNumber()
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ export class PartnersService {
|
|||||||
code: true,
|
code: true,
|
||||||
status: true,
|
status: true,
|
||||||
logo_url: true,
|
logo_url: true,
|
||||||
fiscal_switch_type: true,
|
tsp_provider: true,
|
||||||
created_at: true,
|
created_at: true,
|
||||||
license_charge_transactions: {
|
license_charge_transactions: {
|
||||||
select: {
|
select: {
|
||||||
|
|||||||
@@ -12,6 +12,9 @@ export class BusinessActivitiesService {
|
|||||||
name: true,
|
name: true,
|
||||||
economic_code: true,
|
economic_code: true,
|
||||||
created_at: true,
|
created_at: true,
|
||||||
|
partner_token: true,
|
||||||
|
fiscal_id: true,
|
||||||
|
invoice_number_sequence: true,
|
||||||
guild: {
|
guild: {
|
||||||
select: {
|
select: {
|
||||||
id: true,
|
id: true,
|
||||||
|
|||||||
@@ -1,10 +1,16 @@
|
|||||||
import { ApiProperty, PartialType } from '@nestjs/swagger'
|
import { ApiProperty, PartialType } from '@nestjs/swagger'
|
||||||
import { IsString } from 'class-validator'
|
import { IsNumber, IsString, Max, Min } from 'class-validator'
|
||||||
|
|
||||||
export class CreateBusinessActivityDto {
|
export class CreateBusinessActivityDto {
|
||||||
@IsString()
|
@IsString()
|
||||||
@ApiProperty({ required: true })
|
@ApiProperty({ required: true })
|
||||||
name: string
|
name: string
|
||||||
|
|
||||||
|
@ApiProperty({ required: false, default: '1' })
|
||||||
|
@IsNumber()
|
||||||
|
@Min(0)
|
||||||
|
@Max(1_000_000_000)
|
||||||
|
invoice_number_sequence: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export class UpdateBusinessActivityDto extends PartialType(CreateBusinessActivityDto) {}
|
export class UpdateBusinessActivityDto extends PartialType(CreateBusinessActivityDto) {}
|
||||||
|
|||||||
@@ -1,60 +0,0 @@
|
|||||||
import { Injectable } from '@nestjs/common'
|
|
||||||
import {
|
|
||||||
TaxSwitchBulkSendResultDto as FiscalSwitchBulkSendResultDto,
|
|
||||||
TaxSwitchSendItemResultDto as FiscalSwitchSendItemResultDto,
|
|
||||||
TaxSwitchSendPayloadDto as FiscalSwitchSendPayloadDto,
|
|
||||||
TaxSwitchGetResultDto,
|
|
||||||
} from './dto/tax-switch.dto'
|
|
||||||
import { NamaTaxSwitchAdapter } from './switch/nama/nama-fiscal-switch.adapter'
|
|
||||||
|
|
||||||
@Injectable()
|
|
||||||
export class SalesInvoiceFiscalSwitchService {
|
|
||||||
constructor(private readonly namaAdapter: NamaTaxSwitchAdapter) {}
|
|
||||||
|
|
||||||
private resolveSwitch(providerCode?: string | null) {
|
|
||||||
const normalizedCode = providerCode?.trim().toUpperCase() || ''
|
|
||||||
|
|
||||||
switch (normalizedCode) {
|
|
||||||
case 'NAMA':
|
|
||||||
default:
|
|
||||||
return this.namaAdapter
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async send(
|
|
||||||
payload: FiscalSwitchSendPayloadDto,
|
|
||||||
): Promise<FiscalSwitchSendItemResultDto[]> {
|
|
||||||
const adapter = this.resolveSwitch(payload.provider_code)
|
|
||||||
return adapter.send(payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
async sendBulk(
|
|
||||||
payloads: FiscalSwitchSendPayloadDto[],
|
|
||||||
): Promise<FiscalSwitchBulkSendResultDto[]> {
|
|
||||||
const groupedByProvider = new Map<string, FiscalSwitchSendPayloadDto[]>()
|
|
||||||
|
|
||||||
for (const payload of payloads) {
|
|
||||||
const key = payload.provider_code?.trim().toUpperCase() || 'NAMA'
|
|
||||||
const currentGroup = groupedByProvider.get(key) || []
|
|
||||||
currentGroup.push(payload)
|
|
||||||
groupedByProvider.set(key, currentGroup)
|
|
||||||
}
|
|
||||||
|
|
||||||
const result: FiscalSwitchBulkSendResultDto[] = []
|
|
||||||
for (const [providerCode, groupedPayloads] of groupedByProvider.entries()) {
|
|
||||||
const adapter = this.resolveSwitch(providerCode)
|
|
||||||
const providerResult = await adapter.sendBulk(groupedPayloads)
|
|
||||||
result.push(...providerResult)
|
|
||||||
}
|
|
||||||
|
|
||||||
return result
|
|
||||||
}
|
|
||||||
|
|
||||||
async get(
|
|
||||||
providerCode: string | null | undefined,
|
|
||||||
taxId: string,
|
|
||||||
): Promise<TaxSwitchGetResultDto> {
|
|
||||||
const adapter = this.resolveSwitch(providerCode)
|
|
||||||
return adapter.get(taxId)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,372 +0,0 @@
|
|||||||
import { PrismaService } from '@/prisma/prisma.service'
|
|
||||||
import { Injectable, NotFoundException } from '@nestjs/common'
|
|
||||||
import {
|
|
||||||
FiscalInvoiceCustomerType,
|
|
||||||
FiscalRequestType,
|
|
||||||
Prisma,
|
|
||||||
} from 'generated/prisma/client'
|
|
||||||
import {
|
|
||||||
TaxSendStatus,
|
|
||||||
TaxSwitchGetResultDto,
|
|
||||||
TaxSwitchSendItemResultDto,
|
|
||||||
TaxSwitchSendPayloadDto,
|
|
||||||
} from './dto/tax-switch.dto'
|
|
||||||
import { SalesInvoiceFiscalSwitchService } from './sales-invoice-fiscal-switch.service'
|
|
||||||
|
|
||||||
type TaxRow = {
|
|
||||||
id: string
|
|
||||||
retry_count: number
|
|
||||||
}
|
|
||||||
|
|
||||||
type ItemTaxProviderRow = {
|
|
||||||
provider_code: string | null
|
|
||||||
tax_id: string | null
|
|
||||||
}
|
|
||||||
|
|
||||||
@Injectable()
|
|
||||||
export class SalesInvoiceFiscalService {
|
|
||||||
constructor(
|
|
||||||
private readonly prisma: PrismaService,
|
|
||||||
private readonly taxSwitchService: SalesInvoiceFiscalSwitchService,
|
|
||||||
) {}
|
|
||||||
|
|
||||||
async send(consumer_id: string, invoice_id: string): Promise<void> {
|
|
||||||
const posId = await this.getPosId(consumer_id, invoice_id)
|
|
||||||
const payload = await this.buildPayload(invoice_id, posId)
|
|
||||||
|
|
||||||
const itemResults = await this.trySend(payload)
|
|
||||||
await this.persistAttemptResults(itemResults)
|
|
||||||
}
|
|
||||||
|
|
||||||
async sendBulk(consumer_id: string, invoice_ids: string[]): Promise<void> {
|
|
||||||
if (!invoice_ids.length) return
|
|
||||||
|
|
||||||
const payloads: TaxSwitchSendPayloadDto[] = []
|
|
||||||
for (const invoiceId of invoice_ids) {
|
|
||||||
const posId = await this.getPosId(consumer_id, invoiceId)
|
|
||||||
payloads.push(await this.buildPayload(invoiceId, posId))
|
|
||||||
}
|
|
||||||
|
|
||||||
const bulkResult = await this.taxSwitchService.sendBulk(payloads)
|
|
||||||
const allItemResults = bulkResult.flatMap(result => result.items)
|
|
||||||
await this.persistAttemptResults(allItemResults)
|
|
||||||
}
|
|
||||||
|
|
||||||
async get(invoiceItemId: string, posId: string): Promise<TaxSwitchGetResultDto> {
|
|
||||||
const rows = await this.prisma.$queryRaw<ItemTaxProviderRow[]>(Prisma.sql`
|
|
||||||
SELECT p.code AS provider_code, t.tax_id AS tax_id
|
|
||||||
FROM sales_invoice_item_taxes t
|
|
||||||
INNER JOIN sales_invoice_items si ON si.id = t.invoice_item_id
|
|
||||||
INNER JOIN sales_invoices s ON s.id = si.invoice_id
|
|
||||||
INNER JOIN poses pz ON pz.id = s.pos_id
|
|
||||||
LEFT JOIN providers p ON p.id = pz.provider_id
|
|
||||||
WHERE t.invoice_item_id = ${invoiceItemId} AND s.pos_id = ${posId}
|
|
||||||
LIMIT 1
|
|
||||||
`)
|
|
||||||
|
|
||||||
if (!rows.length || !rows[0].tax_id) {
|
|
||||||
throw new NotFoundException('Tax id for this invoice item was not found.')
|
|
||||||
}
|
|
||||||
|
|
||||||
return this.taxSwitchService.get(rows[0].provider_code, rows[0].tax_id)
|
|
||||||
}
|
|
||||||
|
|
||||||
private async getPosId(consumer_id: string, invoice_id: string): Promise<string> {
|
|
||||||
const now = new Date()
|
|
||||||
const saleInvoice = await this.prisma.salesInvoice.findUnique({
|
|
||||||
where: {
|
|
||||||
id: invoice_id,
|
|
||||||
pos: {
|
|
||||||
complex: {
|
|
||||||
business_activity: {
|
|
||||||
consumer_id,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
select: {
|
|
||||||
pos: {
|
|
||||||
select: {
|
|
||||||
id: true,
|
|
||||||
complex: {
|
|
||||||
select: {
|
|
||||||
business_activity: {
|
|
||||||
select: {
|
|
||||||
name: true,
|
|
||||||
license_activation: {
|
|
||||||
select: {
|
|
||||||
expires_at: true,
|
|
||||||
license_renews: {
|
|
||||||
select: {
|
|
||||||
expires_at: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
if (!saleInvoice) {
|
|
||||||
throw new NotFoundException('متاسفانه فاکتور مورد نظر یافت نشد.')
|
|
||||||
}
|
|
||||||
|
|
||||||
const { license_activation, name: businessName } =
|
|
||||||
saleInvoice.pos.complex.business_activity
|
|
||||||
let expired = !license_activation || false
|
|
||||||
if (license_activation) {
|
|
||||||
const { expires_at, license_renews } = license_activation
|
|
||||||
if (expires_at < now) {
|
|
||||||
for (const renew of license_renews) {
|
|
||||||
if (renew.expires_at > now) {
|
|
||||||
expired = false
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (expired) {
|
|
||||||
throw new NotFoundException(`متاسفانه مجوز ${businessName} منقضی شده است.`)
|
|
||||||
}
|
|
||||||
|
|
||||||
return saleInvoice.pos.id
|
|
||||||
}
|
|
||||||
|
|
||||||
private async buildPayload(
|
|
||||||
invoiceId: string,
|
|
||||||
posId: string,
|
|
||||||
): Promise<TaxSwitchSendPayloadDto> {
|
|
||||||
const invoice = await this.prisma.salesInvoice.findUnique({
|
|
||||||
where: {
|
|
||||||
id: invoiceId,
|
|
||||||
pos_id: posId,
|
|
||||||
},
|
|
||||||
select: {
|
|
||||||
id: true,
|
|
||||||
code: true,
|
|
||||||
total_amount: true,
|
|
||||||
invoice_date: true,
|
|
||||||
items: {
|
|
||||||
select: {
|
|
||||||
id: true,
|
|
||||||
quantity: true,
|
|
||||||
unit_price: true,
|
|
||||||
total_amount: true,
|
|
||||||
measure_unit_code: true,
|
|
||||||
measure_unit_text: true,
|
|
||||||
sku_code: true,
|
|
||||||
sku_vat: true,
|
|
||||||
good_id: true,
|
|
||||||
service_id: true,
|
|
||||||
payload: true,
|
|
||||||
good_snapshot: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
pos: {
|
|
||||||
select: {
|
|
||||||
complex: {
|
|
||||||
select: {
|
|
||||||
business_activity: {
|
|
||||||
select: {
|
|
||||||
fiscal_id: true,
|
|
||||||
economic_code: true,
|
|
||||||
consumer: {
|
|
||||||
select: {
|
|
||||||
legal: {
|
|
||||||
select: {
|
|
||||||
partner: {
|
|
||||||
select: {
|
|
||||||
fiscal_switch_type: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
individual: {
|
|
||||||
select: {
|
|
||||||
partner: {
|
|
||||||
select: {
|
|
||||||
fiscal_switch_type: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
customer: {
|
|
||||||
select: {
|
|
||||||
type: true,
|
|
||||||
individual: {
|
|
||||||
select: {
|
|
||||||
first_name: true,
|
|
||||||
last_name: true,
|
|
||||||
national_id: true,
|
|
||||||
mobile_number: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
legal: {
|
|
||||||
select: {
|
|
||||||
name: true,
|
|
||||||
economic_code: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
if (!invoice) {
|
|
||||||
throw new NotFoundException('فاکتور مورد نظر یافت نشد.')
|
|
||||||
}
|
|
||||||
|
|
||||||
const { partner } = (invoice.pos.complex.business_activity.consumer.legal ||
|
|
||||||
invoice.pos.complex.business_activity.consumer.individual)!
|
|
||||||
|
|
||||||
return {
|
|
||||||
invoice_id: invoice.id,
|
|
||||||
invoice_code: invoice.code,
|
|
||||||
invoice_date: invoice.invoice_date,
|
|
||||||
total_amount: Number(invoice.total_amount),
|
|
||||||
// provider_code: invoice.pos.provider?.code || null,
|
|
||||||
type: FiscalRequestType.MAIN,
|
|
||||||
provider_code: partner.fiscal_switch_type!,
|
|
||||||
customer_type: invoice.customer?.type
|
|
||||||
? FiscalInvoiceCustomerType.Known
|
|
||||||
: FiscalInvoiceCustomerType.Unknown,
|
|
||||||
customer: invoice.customer?.type
|
|
||||||
? {
|
|
||||||
type: invoice.customer.type,
|
|
||||||
legal_info: invoice.customer.legal ?? undefined,
|
|
||||||
individual_info: invoice.customer.individual ?? undefined,
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
items: invoice.items.map(item => ({
|
|
||||||
invoice_item_id: item.id,
|
|
||||||
quantity: Number(item.quantity),
|
|
||||||
unit_price: Number(item.unit_price),
|
|
||||||
total_amount: Number(item.total_amount),
|
|
||||||
measure_unit: item.measure_unit_code,
|
|
||||||
sku: item.sku_code,
|
|
||||||
sku_vat: String(item.sku_vat),
|
|
||||||
discount: String((item.payload as Record<string, any>)?.discount || '0'),
|
|
||||||
good_id: item.good_id,
|
|
||||||
service_id: item.service_id,
|
|
||||||
payload: item.payload,
|
|
||||||
good_snapshot: item.good_snapshot,
|
|
||||||
})),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private async trySend(
|
|
||||||
payload: TaxSwitchSendPayloadDto,
|
|
||||||
): Promise<TaxSwitchSendItemResultDto[]> {
|
|
||||||
try {
|
|
||||||
return await this.taxSwitchService.send(payload)
|
|
||||||
} catch (error: any) {
|
|
||||||
const message = error?.message || 'Unexpected tax switch error.'
|
|
||||||
const now = new Date()
|
|
||||||
return payload.items.map(item => ({
|
|
||||||
invoice_item_id: item.invoice_item_id,
|
|
||||||
status: TaxSendStatus.FAILED,
|
|
||||||
error_message: message,
|
|
||||||
sent_at: now.toISOString(),
|
|
||||||
received_at: now.toISOString(),
|
|
||||||
}))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private async persistAttemptResults(
|
|
||||||
itemResults: TaxSwitchSendItemResultDto[],
|
|
||||||
): Promise<void> {
|
|
||||||
if (!itemResults.length) return
|
|
||||||
|
|
||||||
await this.prisma.$transaction(async $tx => {
|
|
||||||
for (const itemResult of itemResults) {
|
|
||||||
await $tx.$executeRaw(Prisma.sql`
|
|
||||||
INSERT INTO sales_invoice_item_taxes (
|
|
||||||
id,
|
|
||||||
tax_id,
|
|
||||||
status,
|
|
||||||
retry_count,
|
|
||||||
last_attempt_at,
|
|
||||||
created_at,
|
|
||||||
updated_at,
|
|
||||||
invoice_item_id
|
|
||||||
) VALUES (
|
|
||||||
UUID(),
|
|
||||||
${itemResult.tax_id || null},
|
|
||||||
${itemResult.status},
|
|
||||||
0,
|
|
||||||
${itemResult.sent_at || new Date()},
|
|
||||||
NOW(),
|
|
||||||
NOW(),
|
|
||||||
${itemResult.invoice_item_id}
|
|
||||||
)
|
|
||||||
ON DUPLICATE KEY UPDATE
|
|
||||||
updated_at = NOW()
|
|
||||||
`)
|
|
||||||
|
|
||||||
const rows = await $tx.$queryRaw<TaxRow[]>(Prisma.sql`
|
|
||||||
SELECT id, retry_count
|
|
||||||
FROM sales_invoice_item_taxes
|
|
||||||
WHERE invoice_item_id = ${itemResult.invoice_item_id}
|
|
||||||
LIMIT 1
|
|
||||||
`)
|
|
||||||
|
|
||||||
if (!rows.length) continue
|
|
||||||
|
|
||||||
const itemTaxRow = rows[0]
|
|
||||||
const attemptNo = Number(itemTaxRow.retry_count || 0) + 1
|
|
||||||
|
|
||||||
await $tx.$executeRaw(Prisma.sql`
|
|
||||||
INSERT INTO sales_invoice_item_tax_attempts (
|
|
||||||
id,
|
|
||||||
attempt_no,
|
|
||||||
status,
|
|
||||||
tax_id,
|
|
||||||
request_payload,
|
|
||||||
response_payload,
|
|
||||||
error_message,
|
|
||||||
sent_at,
|
|
||||||
received_at,
|
|
||||||
created_at,
|
|
||||||
item_tax_id
|
|
||||||
) VALUES (
|
|
||||||
UUID(),
|
|
||||||
${attemptNo},
|
|
||||||
${itemResult.status},
|
|
||||||
${itemResult.tax_id || null},
|
|
||||||
${JSON.stringify(itemResult.request_payload ?? null)},
|
|
||||||
${JSON.stringify(itemResult.response_payload ?? null)},
|
|
||||||
${itemResult.error_message || null},
|
|
||||||
${itemResult.sent_at ? new Date(itemResult.sent_at) : new Date()},
|
|
||||||
${itemResult.received_at ? new Date(itemResult.received_at) : new Date()},
|
|
||||||
NOW(),
|
|
||||||
${itemTaxRow.id}
|
|
||||||
)
|
|
||||||
`)
|
|
||||||
|
|
||||||
await $tx.$executeRaw(Prisma.sql`
|
|
||||||
UPDATE sales_invoice_item_taxes
|
|
||||||
SET
|
|
||||||
tax_id = COALESCE(${itemResult.tax_id || null}, tax_id),
|
|
||||||
status = ${itemResult.status},
|
|
||||||
retry_count = ${attemptNo},
|
|
||||||
last_attempt_at = ${itemResult.sent_at ? new Date(itemResult.sent_at) : new Date()},
|
|
||||||
updated_at = NOW()
|
|
||||||
WHERE id = ${itemTaxRow.id}
|
|
||||||
`)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,198 +0,0 @@
|
|||||||
import {
|
|
||||||
CustomerType,
|
|
||||||
FiscalInvoiceCustomerType,
|
|
||||||
FiscalRequestType,
|
|
||||||
} from '@/generated/prisma/enums'
|
|
||||||
import { Injectable } from '@nestjs/common'
|
|
||||||
import {
|
|
||||||
ITaxSwitchAdapter,
|
|
||||||
TaxSendStatus,
|
|
||||||
TaxSwitchBulkSendResultDto,
|
|
||||||
TaxSwitchGetResultDto,
|
|
||||||
TaxSwitchSendItemResultDto,
|
|
||||||
TaxSwitchSendPayloadDto,
|
|
||||||
} from '../../dto/tax-switch.dto'
|
|
||||||
import {
|
|
||||||
NamaTaxGetResponseDto,
|
|
||||||
NamaTaxRequestDto,
|
|
||||||
NamaTaxSendItemResponseDto,
|
|
||||||
} from './nama-fiscal-switch.dto'
|
|
||||||
|
|
||||||
@Injectable()
|
|
||||||
export class NamaTaxSwitchAdapter implements ITaxSwitchAdapter {
|
|
||||||
readonly code = 'NAMA'
|
|
||||||
private readonly sandboxBaseUrl =
|
|
||||||
process.env.NAMA_FISCAL_SANDBOX_URL || 'https://sandbox-api.nama.ir'
|
|
||||||
private readonly productionBaseUrl =
|
|
||||||
process.env.NAMA_FISCAL_PRODUCTION_URL || 'https://api.nama.ir'
|
|
||||||
|
|
||||||
private readonly sendPath = '/api/v1/fiscal/invoices/single-send'
|
|
||||||
private readonly sendBulkPath = '/api/v1/invoices'
|
|
||||||
private readonly checkStatus = '/api/v1/invoices/check-by-uuids'
|
|
||||||
private readonly checkBulkStatus = '/api/v1/invoices/check-by-uuids'
|
|
||||||
private readonly getPath = '/api/v1/fiscal/invoices/'
|
|
||||||
|
|
||||||
private get baseUrl() {
|
|
||||||
return process.env.NODE_ENV === 'production'
|
|
||||||
? this.productionBaseUrl
|
|
||||||
: this.sandboxBaseUrl
|
|
||||||
}
|
|
||||||
|
|
||||||
private buildSendUrl() {
|
|
||||||
return `${this.baseUrl}${this.sendPath}`
|
|
||||||
}
|
|
||||||
|
|
||||||
private buildGetUrl(taxId: string) {
|
|
||||||
return `${this.baseUrl}${this.getPath}/${taxId}`
|
|
||||||
}
|
|
||||||
|
|
||||||
async send(payload: TaxSwitchSendPayloadDto): Promise<TaxSwitchSendItemResultDto[]> {
|
|
||||||
const mappedRequest = this.mapToNamaRequestDto(payload)
|
|
||||||
|
|
||||||
return payload.items.map((item, index) => {
|
|
||||||
const sentAt = new Date()
|
|
||||||
const receivedAt = new Date(sentAt.getTime() + 50)
|
|
||||||
|
|
||||||
const providerResponse: NamaTaxSendItemResponseDto = {
|
|
||||||
invoice_item_id: item.invoice_item_id,
|
|
||||||
status: TaxSendStatus.SENT,
|
|
||||||
tax_id: `TAX-${payload.invoice_code}-${index + 1}`,
|
|
||||||
request_payload: {
|
|
||||||
url: this.buildSendUrl(),
|
|
||||||
body: mappedRequest,
|
|
||||||
},
|
|
||||||
response_payload: {
|
|
||||||
provider: this.code,
|
|
||||||
env: process.env.NODE_ENV || 'development',
|
|
||||||
endpoint: this.buildSendUrl(),
|
|
||||||
status: 'ACCEPTED',
|
|
||||||
},
|
|
||||||
sent_at: sentAt.toISOString(),
|
|
||||||
received_at: receivedAt.toISOString(),
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
invoice_item_id: providerResponse.invoice_item_id,
|
|
||||||
status: providerResponse.status,
|
|
||||||
tax_id: providerResponse.tax_id,
|
|
||||||
request_payload: providerResponse.request_payload,
|
|
||||||
response_payload: providerResponse.response_payload,
|
|
||||||
error_message: providerResponse.error_message,
|
|
||||||
sent_at: providerResponse.sent_at,
|
|
||||||
received_at: providerResponse.received_at,
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
async sendBulk(
|
|
||||||
payloads: TaxSwitchSendPayloadDto[],
|
|
||||||
): Promise<TaxSwitchBulkSendResultDto[]> {
|
|
||||||
const result: TaxSwitchBulkSendResultDto[] = []
|
|
||||||
for (const payload of payloads) {
|
|
||||||
const itemResults = await this.send(payload)
|
|
||||||
result.push({
|
|
||||||
invoice_id: payload.invoice_id,
|
|
||||||
items: itemResults,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
return result
|
|
||||||
}
|
|
||||||
|
|
||||||
async get(taxId: string): Promise<TaxSwitchGetResultDto> {
|
|
||||||
const providerResponse: NamaTaxGetResponseDto = {
|
|
||||||
tax_id: taxId,
|
|
||||||
status: TaxSendStatus.SENT,
|
|
||||||
response_payload: {
|
|
||||||
provider: this.code,
|
|
||||||
env: process.env.NODE_ENV || 'development',
|
|
||||||
endpoint: this.buildGetUrl(taxId),
|
|
||||||
status: 'CONFIRMED',
|
|
||||||
tracking_code: taxId,
|
|
||||||
},
|
|
||||||
received_at: new Date().toISOString(),
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
tax_id: providerResponse.tax_id,
|
|
||||||
status: providerResponse.status,
|
|
||||||
response_payload: providerResponse.response_payload,
|
|
||||||
received_at: providerResponse.received_at,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private mapToNamaRequestDto(payload: TaxSwitchSendPayloadDto): NamaTaxRequestDto {
|
|
||||||
return {
|
|
||||||
uuid: payload.invoice_id,
|
|
||||||
economic_code: '',
|
|
||||||
fiscal_id: '',
|
|
||||||
payment: [],
|
|
||||||
header: {
|
|
||||||
ins: this.mapFiscalRequestType(payload.type),
|
|
||||||
inp: '2',
|
|
||||||
inty: this.mapFiscalInvoiceCustomerType(payload.customer_type),
|
|
||||||
// unique_tax_code: payload.invoice_code,
|
|
||||||
inno: payload.invoice_code,
|
|
||||||
tins: '',
|
|
||||||
indatim: payload.invoice_date.getTime() + '',
|
|
||||||
name:
|
|
||||||
`${payload.customer?.individual_info?.first_name} ${payload.customer?.individual_info?.last_name}` ||
|
|
||||||
payload.customer?.legal_info?.name ||
|
|
||||||
'',
|
|
||||||
tob: this.mapCustomerType(payload.customer?.type),
|
|
||||||
address: '',
|
|
||||||
mobile: payload.customer?.individual_info?.mobile_number || '',
|
|
||||||
bid:
|
|
||||||
payload.customer?.individual_info?.national_id ||
|
|
||||||
payload.customer?.legal_info?.economic_code ||
|
|
||||||
'',
|
|
||||||
},
|
|
||||||
body: payload.items.map(item => ({
|
|
||||||
sstid: item.sku,
|
|
||||||
vra: item.sku_vat,
|
|
||||||
// sstt: item.unit_type,
|
|
||||||
fee: String(item.unit_price),
|
|
||||||
dis: String(item.discount),
|
|
||||||
mu: item.measure_unit,
|
|
||||||
am: String(item.quantity),
|
|
||||||
consfee: '0',
|
|
||||||
bros: '0',
|
|
||||||
spro: '0',
|
|
||||||
})),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private mapFiscalRequestType(type: FiscalRequestType) {
|
|
||||||
switch (type) {
|
|
||||||
case FiscalRequestType.MAIN:
|
|
||||||
return '1'
|
|
||||||
case FiscalRequestType.UPDATE:
|
|
||||||
return '2'
|
|
||||||
case FiscalRequestType.REVOKE:
|
|
||||||
return '3'
|
|
||||||
case FiscalRequestType.REMOVE:
|
|
||||||
return '4'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private mapFiscalInvoiceCustomerType(type?: FiscalInvoiceCustomerType) {
|
|
||||||
switch (type) {
|
|
||||||
case FiscalInvoiceCustomerType.Unknown:
|
|
||||||
return '1'
|
|
||||||
case FiscalInvoiceCustomerType.Known:
|
|
||||||
return '2'
|
|
||||||
default:
|
|
||||||
return '3'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private mapCustomerType(type?: CustomerType) {
|
|
||||||
switch (type) {
|
|
||||||
case CustomerType.INDIVIDUAL:
|
|
||||||
return '1'
|
|
||||||
case CustomerType.LEGAL:
|
|
||||||
return '2'
|
|
||||||
default:
|
|
||||||
return ''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,194 +0,0 @@
|
|||||||
import { ApiProperty } from '@nestjs/swagger'
|
|
||||||
import { Type } from 'class-transformer'
|
|
||||||
import {
|
|
||||||
IsArray,
|
|
||||||
IsEnum,
|
|
||||||
IsObject,
|
|
||||||
IsOptional,
|
|
||||||
IsString,
|
|
||||||
ValidateNested,
|
|
||||||
} from 'class-validator'
|
|
||||||
import { TaxSendStatus } from '../../dto/tax-switch.dto'
|
|
||||||
|
|
||||||
export class NamaTaxBodyItemDto {
|
|
||||||
@ApiProperty()
|
|
||||||
@IsString()
|
|
||||||
sstid: string
|
|
||||||
|
|
||||||
@ApiProperty()
|
|
||||||
@IsString()
|
|
||||||
vra: string
|
|
||||||
|
|
||||||
// @ApiProperty()
|
|
||||||
// @IsString()
|
|
||||||
// sstt: string
|
|
||||||
|
|
||||||
@ApiProperty()
|
|
||||||
@IsString()
|
|
||||||
fee: string
|
|
||||||
|
|
||||||
@ApiProperty()
|
|
||||||
@IsString()
|
|
||||||
dis: string
|
|
||||||
|
|
||||||
@ApiProperty()
|
|
||||||
@IsString()
|
|
||||||
mu: string
|
|
||||||
|
|
||||||
@ApiProperty()
|
|
||||||
@IsString()
|
|
||||||
am: string
|
|
||||||
|
|
||||||
@ApiProperty()
|
|
||||||
@IsString()
|
|
||||||
consfee: string
|
|
||||||
|
|
||||||
@ApiProperty()
|
|
||||||
@IsString()
|
|
||||||
bros: string
|
|
||||||
|
|
||||||
@ApiProperty()
|
|
||||||
@IsString()
|
|
||||||
spro: string
|
|
||||||
}
|
|
||||||
|
|
||||||
export class NamaTaxHeaderDto {
|
|
||||||
@ApiProperty({ required: true })
|
|
||||||
@IsString()
|
|
||||||
ins: string
|
|
||||||
|
|
||||||
@ApiProperty()
|
|
||||||
@IsString()
|
|
||||||
inp: string
|
|
||||||
|
|
||||||
@ApiProperty({ required: true })
|
|
||||||
@IsString()
|
|
||||||
inty: string
|
|
||||||
|
|
||||||
// @ApiProperty({required: true})
|
|
||||||
// @IsString()
|
|
||||||
// unique_tax_code: string
|
|
||||||
|
|
||||||
@ApiProperty({ required: true })
|
|
||||||
@IsString()
|
|
||||||
inno: string
|
|
||||||
|
|
||||||
@ApiProperty({ required: true })
|
|
||||||
@IsString()
|
|
||||||
tins: string
|
|
||||||
|
|
||||||
@ApiProperty({ required: true })
|
|
||||||
@IsString()
|
|
||||||
indatim: string
|
|
||||||
|
|
||||||
@ApiProperty({ required: true })
|
|
||||||
@IsString()
|
|
||||||
name: string
|
|
||||||
|
|
||||||
@ApiProperty({ required: true })
|
|
||||||
@IsString()
|
|
||||||
tob: string
|
|
||||||
|
|
||||||
@ApiProperty()
|
|
||||||
@IsOptional()
|
|
||||||
@IsString()
|
|
||||||
address?: string
|
|
||||||
|
|
||||||
@ApiProperty()
|
|
||||||
@IsOptional()
|
|
||||||
@IsString()
|
|
||||||
mobile?: string
|
|
||||||
|
|
||||||
@ApiProperty()
|
|
||||||
@IsString()
|
|
||||||
bid: string
|
|
||||||
}
|
|
||||||
|
|
||||||
export class NamaTaxRequestDto {
|
|
||||||
@ApiProperty({ type: [NamaTaxBodyItemDto] })
|
|
||||||
@IsArray()
|
|
||||||
@ValidateNested({ each: true })
|
|
||||||
@Type(() => NamaTaxBodyItemDto)
|
|
||||||
body: NamaTaxBodyItemDto[]
|
|
||||||
|
|
||||||
@ApiProperty({ type: [Object] })
|
|
||||||
@IsArray()
|
|
||||||
payment: unknown[]
|
|
||||||
|
|
||||||
@ApiProperty({ type: NamaTaxHeaderDto })
|
|
||||||
@ValidateNested()
|
|
||||||
@Type(() => NamaTaxHeaderDto)
|
|
||||||
header: NamaTaxHeaderDto
|
|
||||||
|
|
||||||
@ApiProperty()
|
|
||||||
@IsString()
|
|
||||||
uuid: string
|
|
||||||
|
|
||||||
@ApiProperty()
|
|
||||||
@IsString()
|
|
||||||
economic_code: string
|
|
||||||
|
|
||||||
@ApiProperty()
|
|
||||||
@IsString()
|
|
||||||
fiscal_id: string
|
|
||||||
}
|
|
||||||
|
|
||||||
export class NamaTaxSendItemResponseDto {
|
|
||||||
@ApiProperty()
|
|
||||||
@IsString()
|
|
||||||
invoice_item_id: string
|
|
||||||
|
|
||||||
@ApiProperty({ enum: TaxSendStatus })
|
|
||||||
@IsEnum(TaxSendStatus)
|
|
||||||
status: TaxSendStatus
|
|
||||||
|
|
||||||
@ApiProperty({ required: false, nullable: true })
|
|
||||||
@IsOptional()
|
|
||||||
@IsString()
|
|
||||||
tax_id?: string | null
|
|
||||||
|
|
||||||
@ApiProperty({ required: false, nullable: true, type: Object })
|
|
||||||
@IsOptional()
|
|
||||||
@IsObject()
|
|
||||||
request_payload?: unknown
|
|
||||||
|
|
||||||
@ApiProperty({ required: false, nullable: true, type: Object })
|
|
||||||
@IsOptional()
|
|
||||||
@IsObject()
|
|
||||||
response_payload?: unknown
|
|
||||||
|
|
||||||
@ApiProperty({ required: false, nullable: true })
|
|
||||||
@IsOptional()
|
|
||||||
@IsString()
|
|
||||||
error_message?: string | null
|
|
||||||
|
|
||||||
@ApiProperty({ required: false, nullable: true })
|
|
||||||
@IsOptional()
|
|
||||||
@IsString()
|
|
||||||
sent_at?: string | null
|
|
||||||
|
|
||||||
@ApiProperty({ required: false, nullable: true })
|
|
||||||
@IsOptional()
|
|
||||||
@IsString()
|
|
||||||
received_at?: string | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export class NamaTaxGetResponseDto {
|
|
||||||
@ApiProperty()
|
|
||||||
@IsString()
|
|
||||||
tax_id: string
|
|
||||||
|
|
||||||
@ApiProperty({ enum: TaxSendStatus })
|
|
||||||
@IsEnum(TaxSendStatus)
|
|
||||||
status: TaxSendStatus
|
|
||||||
|
|
||||||
@ApiProperty({ required: false, nullable: true, type: Object })
|
|
||||||
@IsOptional()
|
|
||||||
@IsObject()
|
|
||||||
response_payload?: unknown
|
|
||||||
|
|
||||||
@ApiProperty({ required: false, nullable: true })
|
|
||||||
@IsOptional()
|
|
||||||
@IsString()
|
|
||||||
received_at?: string | null
|
|
||||||
}
|
|
||||||
@@ -1,8 +1,9 @@
|
|||||||
import { PrismaModule } from '@/prisma/prisma.module'
|
import { PrismaModule } from '@/prisma/prisma.module'
|
||||||
import { Module } from '@nestjs/common'
|
import { Module } from '@nestjs/common'
|
||||||
import { SalesInvoiceFiscalSwitchService } from './fiscal/sales-invoice-fiscal-switch.service'
|
import { HttpClientUtil } from '../../../common/utils/http-client.util'
|
||||||
import { SalesInvoiceFiscalService } from './fiscal/sales-invoice-fiscal.service'
|
import { SalesInvoiceTspSwitchService } from '../../tspProviders/sales-invoice-tsp-switch.service'
|
||||||
import { NamaTaxSwitchAdapter } from './fiscal/switch/nama/nama-fiscal-switch.adapter'
|
import { SalesInvoiceTspService } from '../../tspProviders/sales-invoice-tsp.service'
|
||||||
|
import { NamaProviderSwitchAdapter } from '../../tspProviders/switch/nama/nama-provider.adapter'
|
||||||
import { StatisticsController } from './saleInvoices.controller'
|
import { StatisticsController } from './saleInvoices.controller'
|
||||||
import { SaleInvoicesService } from './saleInvoices.service'
|
import { SaleInvoicesService } from './saleInvoices.service'
|
||||||
|
|
||||||
@@ -11,9 +12,10 @@ import { SaleInvoicesService } from './saleInvoices.service'
|
|||||||
controllers: [StatisticsController],
|
controllers: [StatisticsController],
|
||||||
providers: [
|
providers: [
|
||||||
SaleInvoicesService,
|
SaleInvoicesService,
|
||||||
SalesInvoiceFiscalService,
|
HttpClientUtil,
|
||||||
SalesInvoiceFiscalSwitchService,
|
SalesInvoiceTspService,
|
||||||
NamaTaxSwitchAdapter,
|
SalesInvoiceTspSwitchService,
|
||||||
|
NamaProviderSwitchAdapter,
|
||||||
],
|
],
|
||||||
exports: [SaleInvoicesService],
|
exports: [SaleInvoicesService],
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,18 +1,20 @@
|
|||||||
|
import { translateEnumValue } from '@/common/utils'
|
||||||
|
import { TspProviderResponseStatus } from '@/generated/prisma/enums'
|
||||||
import {
|
import {
|
||||||
SalesInvoiceSelect,
|
SalesInvoiceSelect,
|
||||||
SalesInvoiceWhereInput,
|
SalesInvoiceWhereInput,
|
||||||
SalesInvoiceWhereUniqueInput,
|
SalesInvoiceWhereUniqueInput,
|
||||||
} from '@/generated/prisma/models'
|
} from '@/generated/prisma/models'
|
||||||
import { PrismaService } from '@/prisma/prisma.service'
|
import { PrismaService } from '@/prisma/prisma.service'
|
||||||
import { BadRequestException, Injectable } from '@nestjs/common'
|
import { BadRequestException, Injectable, NotFoundException } from '@nestjs/common'
|
||||||
import { ResponseMapper } from 'common/response/response-mapper'
|
import { ResponseMapper } from 'common/response/response-mapper'
|
||||||
import { SalesInvoiceFiscalService } from './fiscal/sales-invoice-fiscal.service'
|
import { SalesInvoiceTspService } from '../../tspProviders/sales-invoice-tsp.service'
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class SaleInvoicesService {
|
export class SaleInvoicesService {
|
||||||
constructor(
|
constructor(
|
||||||
private readonly prisma: PrismaService,
|
private readonly prisma: PrismaService,
|
||||||
private salesInvoiceTaxService: SalesInvoiceFiscalService,
|
private salesInvoiceTaxService: SalesInvoiceTspService,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
private readonly defaultSelect: SalesInvoiceSelect = {
|
private readonly defaultSelect: SalesInvoiceSelect = {
|
||||||
@@ -49,10 +51,8 @@ export class SaleInvoicesService {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
fiscal: {
|
|
||||||
select: {
|
tsp_attempts: {
|
||||||
id: true,
|
|
||||||
attempts: {
|
|
||||||
orderBy: {
|
orderBy: {
|
||||||
created_at: 'asc',
|
created_at: 'asc',
|
||||||
},
|
},
|
||||||
@@ -62,8 +62,18 @@ export class SaleInvoicesService {
|
|||||||
status: true,
|
status: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
}
|
||||||
},
|
|
||||||
|
private readonly invoiceMapper = (invoice: any) => {
|
||||||
|
const { tsp_attempts, ...rest } = invoice || {}
|
||||||
|
|
||||||
|
return {
|
||||||
|
...rest,
|
||||||
|
status: translateEnumValue(
|
||||||
|
'TspProviderResponseStatus',
|
||||||
|
invoice.tsp_attempts?.[0]?.status || TspProviderResponseStatus.NOT_SEND,
|
||||||
|
),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async findAll(consumer_id: string, page = 1, perPage = 10) {
|
async findAll(consumer_id: string, page = 1, perPage = 10) {
|
||||||
@@ -81,7 +91,9 @@ export class SaleInvoicesService {
|
|||||||
}),
|
}),
|
||||||
await tx.salesInvoice.count({ where: invoicesWhere }),
|
await tx.salesInvoice.count({ where: invoicesWhere }),
|
||||||
])
|
])
|
||||||
return ResponseMapper.paginate(invoices, { page, perPage, total })
|
|
||||||
|
const mappedInvoices = invoices.map(this.invoiceMapper)
|
||||||
|
return ResponseMapper.paginate(mappedInvoices, { page, perPage, total })
|
||||||
}
|
}
|
||||||
|
|
||||||
async findOne(consumer_id: string, id: string) {
|
async findOne(consumer_id: string, id: string) {
|
||||||
@@ -161,15 +173,21 @@ export class SaleInvoicesService {
|
|||||||
unknown_customer: true,
|
unknown_customer: true,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
return ResponseMapper.single(invoice)
|
|
||||||
|
if (invoice) {
|
||||||
|
return ResponseMapper.single(this.invoiceMapper(invoice))
|
||||||
|
}
|
||||||
|
throw new NotFoundException('فاکتور مورد نظر شما یافت نشد.')
|
||||||
}
|
}
|
||||||
|
|
||||||
async send(consumer_id: string, invoice_id: string) {
|
async send(consumer_id: string, invoice_id: string) {
|
||||||
await this.salesInvoiceTaxService.send(consumer_id, invoice_id)
|
const tspProviderResult = await this.salesInvoiceTaxService.send(
|
||||||
|
consumer_id,
|
||||||
|
invoice_id,
|
||||||
|
)
|
||||||
|
|
||||||
return ResponseMapper.single({
|
return ResponseMapper.single({
|
||||||
invoice_id,
|
...tspProviderResult,
|
||||||
sent_to_tax: true,
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -109,9 +109,9 @@ export class EnumsController {
|
|||||||
return this.enumsService.getEnumValues('ConsumerRole')
|
return this.enumsService.getEnumValues('ConsumerRole')
|
||||||
}
|
}
|
||||||
|
|
||||||
@Get('fiscal_response_status')
|
@Get('tsp_provider_response_status')
|
||||||
@PublicWithToken()
|
@PublicWithToken()
|
||||||
async getFiscalResponseStatus(): Promise<EnumsServiceGetEnumValuesResponseDto> {
|
async getTspProviderResponseStatus(): Promise<EnumsServiceGetEnumValuesResponseDto> {
|
||||||
return this.enumsService.getEnumValues('FiscalResponseStatus')
|
return this.enumsService.getEnumValues('TspProviderResponseStatus')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,13 +13,9 @@ import {
|
|||||||
ConsumerStatus,
|
ConsumerStatus,
|
||||||
ConsumerType,
|
ConsumerType,
|
||||||
CustomerType,
|
CustomerType,
|
||||||
FiscalInvoiceCustomerType,
|
|
||||||
FiscalRequestType,
|
|
||||||
FiscalResponseStatus,
|
|
||||||
GoodPricingModel,
|
GoodPricingModel,
|
||||||
LicenseStatus,
|
LicenseStatus,
|
||||||
LicenseType,
|
LicenseType,
|
||||||
PartnerFiscalSwitchType,
|
|
||||||
PartnerRole,
|
PartnerRole,
|
||||||
PartnerStatus,
|
PartnerStatus,
|
||||||
PaymentMethodType,
|
PaymentMethodType,
|
||||||
@@ -30,6 +26,10 @@ import {
|
|||||||
ProviderStatus,
|
ProviderStatus,
|
||||||
SKUGuildType,
|
SKUGuildType,
|
||||||
TokenType,
|
TokenType,
|
||||||
|
TspProviderCustomerType,
|
||||||
|
TspProviderRequestType,
|
||||||
|
TspProviderResponseStatus,
|
||||||
|
TspProviderType,
|
||||||
UnitType,
|
UnitType,
|
||||||
UserStatus,
|
UserStatus,
|
||||||
UserType,
|
UserType,
|
||||||
@@ -79,10 +79,7 @@ export class EnumsService {
|
|||||||
ConsumerStatus: this.prepareData(ConsumerStatus, 'ConsumerStatus'),
|
ConsumerStatus: this.prepareData(ConsumerStatus, 'ConsumerStatus'),
|
||||||
ConsumerType: this.prepareData(ConsumerType, 'ConsumerType'),
|
ConsumerType: this.prepareData(ConsumerType, 'ConsumerType'),
|
||||||
PartnerStatus: this.prepareData(PartnerStatus, 'PartnerStatus'),
|
PartnerStatus: this.prepareData(PartnerStatus, 'PartnerStatus'),
|
||||||
PartnerFiscalSwitchType: this.prepareData(
|
TspProviderType: this.prepareData(TspProviderType, 'TspProviderType'),
|
||||||
PartnerFiscalSwitchType,
|
|
||||||
'PartnerFiscalSwitchType',
|
|
||||||
),
|
|
||||||
ApplicationPlatform: this.prepareData(ApplicationPlatform, 'ApplicationPlatform'),
|
ApplicationPlatform: this.prepareData(ApplicationPlatform, 'ApplicationPlatform'),
|
||||||
ApplicationReleaseType: this.prepareData(
|
ApplicationReleaseType: this.prepareData(
|
||||||
ApplicationReleaseType,
|
ApplicationReleaseType,
|
||||||
@@ -93,14 +90,17 @@ export class EnumsService {
|
|||||||
'ApplicationPublisher',
|
'ApplicationPublisher',
|
||||||
),
|
),
|
||||||
CustomerType: this.prepareData(CustomerType, 'CustomerType'),
|
CustomerType: this.prepareData(CustomerType, 'CustomerType'),
|
||||||
FiscalResponseStatus: this.prepareData(
|
TspProviderResponseStatus: this.prepareData(
|
||||||
FiscalResponseStatus,
|
TspProviderResponseStatus,
|
||||||
'FiscalResponseStatus',
|
'TspProviderResponseStatus',
|
||||||
),
|
),
|
||||||
FiscalRequestType: this.prepareData(FiscalRequestType, 'FiscalRequestType'),
|
TspProviderRequestType: this.prepareData(
|
||||||
FiscalInvoiceCustomerType: this.prepareData(
|
TspProviderRequestType,
|
||||||
FiscalInvoiceCustomerType,
|
'TspProviderRequestType',
|
||||||
'FiscalInvoiceCustomerType',
|
),
|
||||||
|
TspProviderCustomerType: this.prepareData(
|
||||||
|
TspProviderCustomerType,
|
||||||
|
'TspProviderCustomerType',
|
||||||
),
|
),
|
||||||
SKUGuildType: this.prepareData(SKUGuildType, 'SKUGuildType'),
|
SKUGuildType: this.prepareData(SKUGuildType, 'SKUGuildType'),
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ export class CreateSalesInvoiceDto {
|
|||||||
@ApiProperty({ required: false, default: false })
|
@ApiProperty({ required: false, default: false })
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
@IsBoolean()
|
@IsBoolean()
|
||||||
send_to_tax?: boolean
|
send_to_tsp?: boolean
|
||||||
|
|
||||||
@ApiProperty({ required: true, default: CustomerType.UNKNOWN })
|
@ApiProperty({ required: true, default: CustomerType.UNKNOWN })
|
||||||
@IsEnum(CustomerType)
|
@IsEnum(CustomerType)
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import {
|
|||||||
IsString,
|
IsString,
|
||||||
Min,
|
Min,
|
||||||
} from 'class-validator'
|
} from 'class-validator'
|
||||||
import { FiscalResponseStatus } from 'generated/prisma/enums'
|
import { TspProviderResponseStatus } from 'generated/prisma/enums'
|
||||||
|
|
||||||
export class SalesInvoicesFilterDto {
|
export class SalesInvoicesFilterDto {
|
||||||
@ApiPropertyOptional({ default: 1 })
|
@ApiPropertyOptional({ default: 1 })
|
||||||
@@ -70,10 +70,10 @@ export class SalesInvoicesFilterDto {
|
|||||||
@IsString()
|
@IsString()
|
||||||
customer_economic_code?: string
|
customer_economic_code?: string
|
||||||
|
|
||||||
@ApiPropertyOptional({ enum: FiscalResponseStatus })
|
@ApiPropertyOptional({ enum: TspProviderResponseStatus })
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
@IsEnum(FiscalResponseStatus)
|
@IsEnum(TspProviderResponseStatus)
|
||||||
status?: FiscalResponseStatus
|
status?: TspProviderResponseStatus
|
||||||
|
|
||||||
@ApiPropertyOptional()
|
@ApiPropertyOptional()
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
|
|||||||
@@ -1,43 +0,0 @@
|
|||||||
import { PosInfo } from '@/common/decorators/posInfo.decorator'
|
|
||||||
import type { IPosPayload } from '@/common/models/posPayload.model'
|
|
||||||
import { Controller, Get, Param, Post } from '@nestjs/common'
|
|
||||||
import { PosSalesInvoiceFiscalService } from './sales-invoice-fiscal.service'
|
|
||||||
|
|
||||||
@Controller('pos/sales_invoices/:invoiceId/fiscal')
|
|
||||||
export class PosSalesInvoiceFiscalController {
|
|
||||||
constructor(private readonly service: PosSalesInvoiceFiscalService) {}
|
|
||||||
|
|
||||||
@Post('send')
|
|
||||||
async send(@PosInfo() posInfo: IPosPayload, @Param('invoiceId') invoiceId: string) {
|
|
||||||
return this.service.send(invoiceId, posInfo)
|
|
||||||
}
|
|
||||||
|
|
||||||
@Post('retry')
|
|
||||||
async retry(@PosInfo() posInfo: IPosPayload, @Param('invoiceId') invoiceId: string) {
|
|
||||||
return this.service.retry(invoiceId, posInfo)
|
|
||||||
}
|
|
||||||
|
|
||||||
@Get('status')
|
|
||||||
async getStatus(
|
|
||||||
@PosInfo() posInfo: IPosPayload,
|
|
||||||
@Param('invoiceId') invoiceId: string,
|
|
||||||
) {
|
|
||||||
return this.service.getStatus(invoiceId, posInfo)
|
|
||||||
}
|
|
||||||
|
|
||||||
@Post('status/refresh')
|
|
||||||
async refreshStatus(
|
|
||||||
@PosInfo() posInfo: IPosPayload,
|
|
||||||
@Param('invoiceId') invoiceId: string,
|
|
||||||
) {
|
|
||||||
return this.service.refreshStatus(invoiceId, posInfo)
|
|
||||||
}
|
|
||||||
|
|
||||||
@Get('attempts')
|
|
||||||
async getAttempts(
|
|
||||||
@PosInfo() posInfo: IPosPayload,
|
|
||||||
@Param('invoiceId') invoiceId: string,
|
|
||||||
) {
|
|
||||||
return this.service.getAttempts(invoiceId, posInfo)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
import { Module } from '@nestjs/common'
|
|
||||||
import { SalesInvoiceFiscalSwitchService } from '../../../consumer/saleInvoices/fiscal/sales-invoice-fiscal-switch.service'
|
|
||||||
import { NamaTaxSwitchAdapter } from '../../../consumer/saleInvoices/fiscal/switch/nama/nama-fiscal-switch.adapter'
|
|
||||||
import { PosSalesInvoiceFiscalController } from './sales-invoice-fiscal.controller'
|
|
||||||
import { PosSalesInvoiceFiscalService } from './sales-invoice-fiscal.service'
|
|
||||||
|
|
||||||
@Module({
|
|
||||||
controllers: [PosSalesInvoiceFiscalController],
|
|
||||||
providers: [PosSalesInvoiceFiscalService, SalesInvoiceFiscalSwitchService, NamaTaxSwitchAdapter],
|
|
||||||
exports: [PosSalesInvoiceFiscalService],
|
|
||||||
})
|
|
||||||
export class PosSalesInvoiceFiscalModule {}
|
|
||||||
@@ -1,411 +0,0 @@
|
|||||||
import { IPosPayload } from '@/common/models/posPayload.model'
|
|
||||||
import { PrismaService } from '@/prisma/prisma.service'
|
|
||||||
import { Injectable, NotFoundException } from '@nestjs/common'
|
|
||||||
import {
|
|
||||||
FiscalInvoiceCustomerType,
|
|
||||||
FiscalRequestType,
|
|
||||||
FiscalResponseStatus,
|
|
||||||
} from 'generated/prisma/enums'
|
|
||||||
import {
|
|
||||||
TaxSendStatus,
|
|
||||||
TaxSwitchGetResultDto,
|
|
||||||
TaxSwitchSendItemResultDto,
|
|
||||||
TaxSwitchSendPayloadDto,
|
|
||||||
} from '../../../consumer/saleInvoices/fiscal/dto/tax-switch.dto'
|
|
||||||
import { SalesInvoiceFiscalSwitchService } from '../../../consumer/saleInvoices/fiscal/sales-invoice-fiscal-switch.service'
|
|
||||||
|
|
||||||
@Injectable()
|
|
||||||
export class PosSalesInvoiceFiscalService {
|
|
||||||
constructor(
|
|
||||||
private readonly prisma: PrismaService,
|
|
||||||
private readonly fiscalSwitchService: SalesInvoiceFiscalSwitchService,
|
|
||||||
) {}
|
|
||||||
|
|
||||||
async send(invoiceId: string, posInfo: IPosPayload) {
|
|
||||||
const payload = await this.buildPayload(invoiceId, posInfo)
|
|
||||||
const itemResults = await this.safeSend(payload)
|
|
||||||
const attempt = await this.persistAttempt(invoiceId, itemResults)
|
|
||||||
|
|
||||||
return {
|
|
||||||
invoice_id: invoiceId,
|
|
||||||
fiscal_id: attempt.fiscal_id,
|
|
||||||
status: attempt.status,
|
|
||||||
attempt_no: attempt.attempt_no,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async retry(invoiceId: string, posInfo: IPosPayload) {
|
|
||||||
return this.send(invoiceId, posInfo)
|
|
||||||
}
|
|
||||||
|
|
||||||
async getStatus(invoiceId: string, posInfo: IPosPayload) {
|
|
||||||
const invoice = await this.getInvoiceForBusiness(invoiceId, posInfo.business_id)
|
|
||||||
if (!invoice.fiscal) {
|
|
||||||
return {
|
|
||||||
invoice_id: invoiceId,
|
|
||||||
status: FiscalResponseStatus.NOT_SEND,
|
|
||||||
fiscal: null,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const latestAttempt = invoice.fiscal.attempts[0] || null
|
|
||||||
return {
|
|
||||||
invoice_id: invoiceId,
|
|
||||||
status: latestAttempt?.status || FiscalResponseStatus.NOT_SEND,
|
|
||||||
fiscal: {
|
|
||||||
id: invoice.fiscal.id,
|
|
||||||
retry_count: invoice.fiscal.retry_count,
|
|
||||||
last_attempt_at: invoice.fiscal.last_attempt_at,
|
|
||||||
},
|
|
||||||
latest_attempt: latestAttempt,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async refreshStatus(invoiceId: string, posInfo: IPosPayload) {
|
|
||||||
const invoice = await this.getInvoiceForBusiness(invoiceId, posInfo.business_id)
|
|
||||||
const latestAttempt = invoice.fiscal?.attempts?.[0]
|
|
||||||
|
|
||||||
if (!invoice.fiscal || !latestAttempt?.tax_id) {
|
|
||||||
return this.getStatus(invoiceId, posInfo)
|
|
||||||
}
|
|
||||||
|
|
||||||
const providerCode = invoice.pos.provider?.code
|
|
||||||
const switchResult = await this.fiscalSwitchService.get(
|
|
||||||
providerCode,
|
|
||||||
latestAttempt.tax_id,
|
|
||||||
)
|
|
||||||
const mappedStatus = this.mapSwitchGetStatus(switchResult.status)
|
|
||||||
|
|
||||||
const refreshedAttempt = await this.prisma.$transaction(async tx => {
|
|
||||||
const nextNo = (latestAttempt.attempt_no || 0) + 1
|
|
||||||
const createdAttempt = await tx.saleInvoiceFiscalAttempts.create({
|
|
||||||
data: {
|
|
||||||
fiscal_id: invoice.fiscal!.id,
|
|
||||||
attempt_no: nextNo,
|
|
||||||
status: mappedStatus,
|
|
||||||
tax_id: switchResult.tax_id,
|
|
||||||
response_payload: switchResult.response_payload
|
|
||||||
? JSON.parse(JSON.stringify(switchResult.response_payload))
|
|
||||||
: undefined,
|
|
||||||
received_at: switchResult.received_at
|
|
||||||
? new Date(switchResult.received_at)
|
|
||||||
: null,
|
|
||||||
type: FiscalRequestType.MAIN,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
await tx.saleInvoiceFiscals.update({
|
|
||||||
where: { id: invoice.fiscal!.id },
|
|
||||||
data: {
|
|
||||||
retry_count: nextNo,
|
|
||||||
last_attempt_at: createdAttempt.created_at,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
return createdAttempt
|
|
||||||
})
|
|
||||||
|
|
||||||
return {
|
|
||||||
invoice_id: invoiceId,
|
|
||||||
status: refreshedAttempt.status,
|
|
||||||
latest_attempt: refreshedAttempt,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async getAttempts(invoiceId: string, posInfo: IPosPayload) {
|
|
||||||
const invoice = await this.getInvoiceForBusiness(invoiceId, posInfo.business_id)
|
|
||||||
if (!invoice.fiscal) {
|
|
||||||
return {
|
|
||||||
invoice_id: invoiceId,
|
|
||||||
fiscal_id: null,
|
|
||||||
attempts: [],
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const attempts = await this.prisma.saleInvoiceFiscalAttempts.findMany({
|
|
||||||
where: {
|
|
||||||
fiscal_id: invoice.fiscal.id,
|
|
||||||
},
|
|
||||||
orderBy: {
|
|
||||||
attempt_no: 'desc',
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
return {
|
|
||||||
invoice_id: invoiceId,
|
|
||||||
fiscal_id: invoice.fiscal.id,
|
|
||||||
attempts,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private async buildPayload(invoiceId: string, posInfo: IPosPayload) {
|
|
||||||
const invoice = await this.prisma.salesInvoice.findUnique({
|
|
||||||
where: {
|
|
||||||
id: invoiceId,
|
|
||||||
pos: {
|
|
||||||
id: posInfo.pos_id,
|
|
||||||
complex: {
|
|
||||||
business_activity_id: posInfo.business_id,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
select: {
|
|
||||||
id: true,
|
|
||||||
code: true,
|
|
||||||
invoice_date: true,
|
|
||||||
total_amount: true,
|
|
||||||
items: {
|
|
||||||
select: {
|
|
||||||
id: true,
|
|
||||||
quantity: true,
|
|
||||||
unit_price: true,
|
|
||||||
total_amount: true,
|
|
||||||
measure_unit_text: true,
|
|
||||||
sku_code: true,
|
|
||||||
sku_vat: true,
|
|
||||||
measure_unit_code: true,
|
|
||||||
good_id: true,
|
|
||||||
service_id: true,
|
|
||||||
payload: true,
|
|
||||||
good_snapshot: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
customer: {
|
|
||||||
select: {
|
|
||||||
type: true,
|
|
||||||
individual: true,
|
|
||||||
legal: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
pos: {
|
|
||||||
select: {
|
|
||||||
complex: {
|
|
||||||
select: {
|
|
||||||
business_activity: {
|
|
||||||
select: {
|
|
||||||
fiscal_id: true,
|
|
||||||
economic_code: true,
|
|
||||||
consumer: {
|
|
||||||
select: {
|
|
||||||
legal: {
|
|
||||||
select: {
|
|
||||||
partner: {
|
|
||||||
select: {
|
|
||||||
fiscal_switch_type: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
individual: {
|
|
||||||
select: {
|
|
||||||
partner: {
|
|
||||||
select: {
|
|
||||||
fiscal_switch_type: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
if (!invoice) {
|
|
||||||
throw new NotFoundException('فاکتور مورد نظر یافت نشد.')
|
|
||||||
}
|
|
||||||
|
|
||||||
const { partner } = (invoice.pos.complex.business_activity.consumer.legal ||
|
|
||||||
invoice.pos.complex.business_activity.consumer.individual)!
|
|
||||||
|
|
||||||
return {
|
|
||||||
invoice_id: invoice.id,
|
|
||||||
invoice_code: invoice.code,
|
|
||||||
invoice_date: invoice.invoice_date,
|
|
||||||
total_amount: Number(invoice.total_amount),
|
|
||||||
customer_type: invoice.customer
|
|
||||||
? FiscalInvoiceCustomerType.Known
|
|
||||||
: FiscalInvoiceCustomerType.Unknown,
|
|
||||||
type: FiscalRequestType.MAIN,
|
|
||||||
provider_code: partner.fiscal_switch_type,
|
|
||||||
items: invoice.items.map(item => ({
|
|
||||||
invoice_item_id: item.id,
|
|
||||||
quantity: Number(item.quantity),
|
|
||||||
unit_price: Number(item.unit_price),
|
|
||||||
total_amount: Number(item.total_amount),
|
|
||||||
good_id: item.good_id,
|
|
||||||
service_id: item.service_id,
|
|
||||||
payload: item.payload,
|
|
||||||
good_snapshot: item.good_snapshot,
|
|
||||||
discount: String((item.payload as Record<string, any>)?.discount || '0'),
|
|
||||||
sku: item.sku_code,
|
|
||||||
sku_vat: String(item.sku_vat),
|
|
||||||
measure_unit: item.measure_unit_code,
|
|
||||||
// sku: item.
|
|
||||||
})),
|
|
||||||
} satisfies TaxSwitchSendPayloadDto
|
|
||||||
}
|
|
||||||
|
|
||||||
private async safeSend(payload: TaxSwitchSendPayloadDto) {
|
|
||||||
try {
|
|
||||||
return await this.fiscalSwitchService.send(payload)
|
|
||||||
} catch (error: any) {
|
|
||||||
const now = new Date().toISOString()
|
|
||||||
return payload.items.map(item => ({
|
|
||||||
invoice_item_id: item.invoice_item_id,
|
|
||||||
status: TaxSendStatus.FAILED,
|
|
||||||
error_message: error?.message || 'Unexpected fiscal switch error.',
|
|
||||||
sent_at: now,
|
|
||||||
received_at: now,
|
|
||||||
}))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private async persistAttempt(
|
|
||||||
invoiceId: string,
|
|
||||||
itemResults: TaxSwitchSendItemResultDto[],
|
|
||||||
) {
|
|
||||||
return this.prisma.$transaction(async tx => {
|
|
||||||
const fiscal = await tx.saleInvoiceFiscals.upsert({
|
|
||||||
where: { invoice_id: invoiceId },
|
|
||||||
update: {},
|
|
||||||
create: {
|
|
||||||
invoice_id: invoiceId,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
const latest = await tx.saleInvoiceFiscalAttempts.findFirst({
|
|
||||||
where: { fiscal_id: fiscal.id },
|
|
||||||
orderBy: { attempt_no: 'desc' },
|
|
||||||
select: { attempt_no: true },
|
|
||||||
})
|
|
||||||
const nextAttemptNo = (latest?.attempt_no || 0) + 1
|
|
||||||
|
|
||||||
const finalStatus = this.mapItemResultsStatus(itemResults)
|
|
||||||
const firstTaxId = itemResults.find(item => item.tax_id)?.tax_id || null
|
|
||||||
const sentAt = itemResults.map(item => item.sent_at).find(Boolean)
|
|
||||||
const receivedAt = itemResults.map(item => item.received_at).find(Boolean)
|
|
||||||
const errors = itemResults.map(item => item.error_message).filter(Boolean)
|
|
||||||
const errorMessage = errors.length ? Array.from(new Set(errors)).join(' | ') : null
|
|
||||||
|
|
||||||
const attempt = await tx.saleInvoiceFiscalAttempts.create({
|
|
||||||
data: {
|
|
||||||
fiscal_id: fiscal.id,
|
|
||||||
attempt_no: nextAttemptNo,
|
|
||||||
status: finalStatus,
|
|
||||||
tax_id: firstTaxId,
|
|
||||||
type: FiscalRequestType.MAIN,
|
|
||||||
request_payload: JSON.parse(
|
|
||||||
JSON.stringify(itemResults.map(item => item.request_payload)),
|
|
||||||
),
|
|
||||||
response_payload: JSON.parse(
|
|
||||||
JSON.stringify(itemResults.map(item => item.response_payload)),
|
|
||||||
),
|
|
||||||
error_message: errorMessage,
|
|
||||||
sent_at: sentAt ? new Date(sentAt) : null,
|
|
||||||
received_at: receivedAt ? new Date(receivedAt) : null,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
await tx.saleInvoiceFiscals.update({
|
|
||||||
where: { id: fiscal.id },
|
|
||||||
data: {
|
|
||||||
retry_count: nextAttemptNo,
|
|
||||||
last_attempt_at: attempt.sent_at || attempt.created_at,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
return {
|
|
||||||
fiscal_id: fiscal.id,
|
|
||||||
status: attempt.status,
|
|
||||||
attempt_no: attempt.attempt_no,
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
private mapItemResultsStatus(itemResults: TaxSwitchSendItemResultDto[]) {
|
|
||||||
if (!itemResults.length) {
|
|
||||||
return FiscalResponseStatus.NOT_SEND
|
|
||||||
}
|
|
||||||
const hasFailure = itemResults.some(item => item.status === TaxSendStatus.FAILED)
|
|
||||||
if (hasFailure) {
|
|
||||||
return FiscalResponseStatus.FAILURE
|
|
||||||
}
|
|
||||||
const hasSent = itemResults.some(item => item.status === TaxSendStatus.SENT)
|
|
||||||
if (hasSent) {
|
|
||||||
return FiscalResponseStatus.SUCCESS
|
|
||||||
}
|
|
||||||
return FiscalResponseStatus.NOT_SEND
|
|
||||||
}
|
|
||||||
|
|
||||||
private mapSwitchGetStatus(status: TaxSwitchGetResultDto['status']) {
|
|
||||||
switch (status) {
|
|
||||||
case TaxSendStatus.SENT:
|
|
||||||
return FiscalResponseStatus.SUCCESS
|
|
||||||
case TaxSendStatus.FAILED:
|
|
||||||
return FiscalResponseStatus.FAILURE
|
|
||||||
default:
|
|
||||||
return FiscalResponseStatus.NOT_SEND
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private async getInvoiceForBusiness(invoiceId: string, businessId: string) {
|
|
||||||
const invoice = await this.prisma.salesInvoice.findFirst({
|
|
||||||
where: {
|
|
||||||
id: invoiceId,
|
|
||||||
pos: {
|
|
||||||
complex: {
|
|
||||||
business_activity_id: businessId,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
select: {
|
|
||||||
id: true,
|
|
||||||
pos: {
|
|
||||||
select: {
|
|
||||||
provider: {
|
|
||||||
select: {
|
|
||||||
code: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
fiscal: {
|
|
||||||
select: {
|
|
||||||
id: true,
|
|
||||||
retry_count: true,
|
|
||||||
last_attempt_at: true,
|
|
||||||
attempts: {
|
|
||||||
orderBy: {
|
|
||||||
attempt_no: 'desc',
|
|
||||||
},
|
|
||||||
take: 1,
|
|
||||||
select: {
|
|
||||||
id: true,
|
|
||||||
attempt_no: true,
|
|
||||||
status: true,
|
|
||||||
tax_id: true,
|
|
||||||
sent_at: true,
|
|
||||||
received_at: true,
|
|
||||||
error_message: true,
|
|
||||||
created_at: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
if (!invoice) {
|
|
||||||
throw new NotFoundException('فاکتور مورد نظر یافت نشد.')
|
|
||||||
}
|
|
||||||
|
|
||||||
return invoice
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+1
-6
@@ -1,7 +1,6 @@
|
|||||||
import { ApiProperty, PartialType } from '@nestjs/swagger'
|
import { ApiProperty, PartialType } from '@nestjs/swagger'
|
||||||
import { IsEnum, IsNumber, IsObject, IsOptional, IsString } from 'class-validator'
|
import { IsNumber, IsObject, IsOptional, IsString } from 'class-validator'
|
||||||
import type { SaleInvoiceType } from 'common/interfaces/sale-invoice-payload'
|
import type { SaleInvoiceType } from 'common/interfaces/sale-invoice-payload'
|
||||||
import { UnitType } from 'generated/prisma/enums'
|
|
||||||
|
|
||||||
export class CreateSalesInvoiceItemDto {
|
export class CreateSalesInvoiceItemDto {
|
||||||
@IsNumber()
|
@IsNumber()
|
||||||
@@ -24,10 +23,6 @@ export class CreateSalesInvoiceItemDto {
|
|||||||
@ApiProperty({ required: true })
|
@ApiProperty({ required: true })
|
||||||
invoice_id: string
|
invoice_id: string
|
||||||
|
|
||||||
@IsEnum(UnitType)
|
|
||||||
@ApiProperty({ enum: Object.values(UnitType) })
|
|
||||||
unit_type: UnitType
|
|
||||||
|
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
@IsString()
|
@IsString()
|
||||||
@ApiProperty({ required: false })
|
@ApiProperty({ required: false })
|
||||||
|
|||||||
@@ -20,15 +20,24 @@ export class SalesInvoicesController {
|
|||||||
return this.salesInvoicesService.findOne(posInfo, id)
|
return this.salesInvoicesService.findOne(posInfo, id)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Get(':id/inquiry')
|
||||||
|
inquiry(@PosInfo() posInfo: IPosPayload, @Param('id') id: string) {
|
||||||
|
return this.salesInvoicesService.inquiry(
|
||||||
|
posInfo.consumer_account_id,
|
||||||
|
posInfo.pos_id,
|
||||||
|
id,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
@Post()
|
@Post()
|
||||||
create(@Body() data: CreateSalesInvoiceDto, @PosInfo() posInfo: IPosPayload) {
|
create(@Body() data: CreateSalesInvoiceDto, @PosInfo() posInfo: IPosPayload) {
|
||||||
return this.salesInvoicesService.create(data, posInfo)
|
return this.salesInvoicesService.create(data, posInfo)
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Post(':id/send')
|
@Post(':id/send')
|
||||||
// send(@Param('id') id: string, @PosInfo() posInfo: IPosPayload) {
|
send(@Param('id') id: string, @PosInfo() posInfo: IPosPayload) {
|
||||||
// return this.salesInvoicesService.send(id, posInfo)
|
return this.salesInvoicesService.send(id, posInfo)
|
||||||
// }
|
}
|
||||||
|
|
||||||
// @Post('send/bulk')
|
// @Post('send/bulk')
|
||||||
// sendBulk(@Body() data: SendBulkSalesInvoicesDto, @PosInfo() posInfo: IPosPayload) {
|
// sendBulk(@Body() data: SendBulkSalesInvoicesDto, @PosInfo() posInfo: IPosPayload) {
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
import { Module } from '@nestjs/common'
|
import { Module } from '@nestjs/common'
|
||||||
import { SalesInvoiceFiscalSwitchService } from '../../consumer/saleInvoices/fiscal/sales-invoice-fiscal-switch.service'
|
import { HttpClientUtil } from '../../../common/utils/http-client.util'
|
||||||
import { SalesInvoiceFiscalService } from '../../consumer/saleInvoices/fiscal/sales-invoice-fiscal.service'
|
import { SalesInvoiceTspSwitchService } from '../../tspProviders/sales-invoice-tsp-switch.service'
|
||||||
import { NamaTaxSwitchAdapter } from '../../consumer/saleInvoices/fiscal/switch/nama/nama-fiscal-switch.adapter'
|
import { SalesInvoiceTspService } from '../../tspProviders/sales-invoice-tsp.service'
|
||||||
import { PosSalesInvoiceFiscalModule } from './fiscal/sales-invoice-fiscal.module'
|
import { NamaProviderSwitchAdapter } from '../../tspProviders/switch/nama/nama-provider.adapter'
|
||||||
import { SalesInvoicesController } from './sales-invoices.controller'
|
import { SalesInvoicesController } from './sales-invoices.controller'
|
||||||
import { SalesInvoicesService } from './sales-invoices.service'
|
import { SalesInvoicesService } from './sales-invoices.service'
|
||||||
|
|
||||||
@Module({
|
@Module({
|
||||||
imports: [PosSalesInvoiceFiscalModule],
|
|
||||||
controllers: [SalesInvoicesController],
|
controllers: [SalesInvoicesController],
|
||||||
providers: [
|
providers: [
|
||||||
SalesInvoicesService,
|
SalesInvoicesService,
|
||||||
SalesInvoiceFiscalService,
|
HttpClientUtil,
|
||||||
SalesInvoiceFiscalSwitchService,
|
SalesInvoiceTspService,
|
||||||
NamaTaxSwitchAdapter,
|
SalesInvoiceTspSwitchService,
|
||||||
|
NamaProviderSwitchAdapter,
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
export class PosSalesInvoicesModule {}
|
export class PosSalesInvoicesModule {}
|
||||||
|
|||||||
@@ -1,16 +1,19 @@
|
|||||||
import { IPosPayload } from '@/common/models/posPayload.model'
|
import { IPosPayload } from '@/common/models/posPayload.model'
|
||||||
import { translateEnumValue } from '@/common/utils'
|
import { translateEnumValue } from '@/common/utils'
|
||||||
|
import { SalesInvoiceCreateInput } from '@/generated/prisma/models'
|
||||||
import { PrismaService } from '@/prisma/prisma.service'
|
import { PrismaService } from '@/prisma/prisma.service'
|
||||||
import { BadRequestException, Injectable } from '@nestjs/common'
|
import { BadRequestException, Injectable, NotFoundException } from '@nestjs/common'
|
||||||
import { ResponseMapper } from 'common/response/response-mapper'
|
import { ResponseMapper } from 'common/response/response-mapper'
|
||||||
import type { CustomerIndividual, CustomerLegal } from 'generated/prisma/client'
|
import type { CustomerIndividual, CustomerLegal } from 'generated/prisma/client'
|
||||||
import { Prisma } from 'generated/prisma/client'
|
import { Prisma } from 'generated/prisma/client'
|
||||||
import {
|
import {
|
||||||
|
ConsumerRole,
|
||||||
CustomerType,
|
CustomerType,
|
||||||
FiscalResponseStatus,
|
|
||||||
PaymentMethodType,
|
PaymentMethodType,
|
||||||
|
TspProviderRequestType,
|
||||||
|
TspProviderResponseStatus,
|
||||||
} from 'generated/prisma/enums'
|
} from 'generated/prisma/enums'
|
||||||
import { SalesInvoiceFiscalService } from '../../consumer/saleInvoices/fiscal/sales-invoice-fiscal.service'
|
import { SalesInvoiceTspService } from '../../tspProviders/sales-invoice-tsp.service'
|
||||||
import { CreateSalesInvoiceDto } from './dto/create-sales-invoice.dto'
|
import { CreateSalesInvoiceDto } from './dto/create-sales-invoice.dto'
|
||||||
import { SalesInvoicesFilterDto } from './dto/sales-invoices-filter.dto'
|
import { SalesInvoicesFilterDto } from './dto/sales-invoices-filter.dto'
|
||||||
|
|
||||||
@@ -53,7 +56,7 @@ export class SalesInvoicesService {
|
|||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private prisma: PrismaService,
|
private prisma: PrismaService,
|
||||||
private salesInvoiceTaxService: SalesInvoiceFiscalService,
|
private salesInvoiceTaxService: SalesInvoiceTspService,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
async findAll(posInfo: IPosPayload, query: SalesInvoicesFilterDto = {}) {
|
async findAll(posInfo: IPosPayload, query: SalesInvoicesFilterDto = {}) {
|
||||||
@@ -96,9 +99,7 @@ export class SalesInvoicesService {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
fiscal: {
|
tsp_attempts: {
|
||||||
select: {
|
|
||||||
attempts: {
|
|
||||||
orderBy: {
|
orderBy: {
|
||||||
created_at: 'desc',
|
created_at: 'desc',
|
||||||
},
|
},
|
||||||
@@ -108,8 +109,6 @@ export class SalesInvoicesService {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
|
||||||
},
|
|
||||||
}),
|
}),
|
||||||
await tx.salesInvoice.count({ where }),
|
await tx.salesInvoice.count({ where }),
|
||||||
])
|
])
|
||||||
@@ -117,8 +116,8 @@ export class SalesInvoicesService {
|
|||||||
const summaryItems = items.map(invoice => ({
|
const summaryItems = items.map(invoice => ({
|
||||||
...invoice,
|
...invoice,
|
||||||
status: translateEnumValue(
|
status: translateEnumValue(
|
||||||
'FiscalResponseStatus',
|
'TspProviderResponseStatus',
|
||||||
invoice.fiscal?.attempts?.[0]?.status || FiscalResponseStatus.NOT_SEND,
|
invoice.tsp_attempts?.[0]?.status || TspProviderResponseStatus.NOT_SEND,
|
||||||
),
|
),
|
||||||
}))
|
}))
|
||||||
|
|
||||||
@@ -126,10 +125,11 @@ export class SalesInvoicesService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async findOne(posInfo: IPosPayload, id: string) {
|
async findOne(posInfo: IPosPayload, id: string) {
|
||||||
const invoice = await this.prisma.salesInvoice.findFirstOrThrow({
|
const invoice = await this.prisma.salesInvoice.findUnique({
|
||||||
where: {
|
where: {
|
||||||
id,
|
id,
|
||||||
pos: {
|
pos: {
|
||||||
|
id: posInfo.pos_id,
|
||||||
complex: {
|
complex: {
|
||||||
business_activity_id: posInfo.business_id,
|
business_activity_id: posInfo.business_id,
|
||||||
},
|
},
|
||||||
@@ -234,12 +234,7 @@ export class SalesInvoicesService {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
fiscal: {
|
tsp_attempts: {
|
||||||
select: {
|
|
||||||
id: true,
|
|
||||||
retry_count: true,
|
|
||||||
last_attempt_at: true,
|
|
||||||
attempts: {
|
|
||||||
orderBy: {
|
orderBy: {
|
||||||
created_at: 'desc',
|
created_at: 'desc',
|
||||||
},
|
},
|
||||||
@@ -253,26 +248,36 @@ export class SalesInvoicesService {
|
|||||||
received_at: true,
|
received_at: true,
|
||||||
created_at: true,
|
created_at: true,
|
||||||
},
|
},
|
||||||
},
|
take: 1,
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if (invoice) {
|
||||||
|
const { tsp_attempts, ...rest } = invoice || {}
|
||||||
|
|
||||||
return ResponseMapper.single({
|
return ResponseMapper.single({
|
||||||
...invoice,
|
...rest,
|
||||||
status: invoice.fiscal?.attempts?.[0]?.status || FiscalResponseStatus.NOT_SEND,
|
status: tsp_attempts?.[0]?.status || TspProviderResponseStatus.NOT_SEND,
|
||||||
})
|
})
|
||||||
|
} else throw new NotFoundException('فاکتور مورد نظر شما یافت نشد.')
|
||||||
}
|
}
|
||||||
|
|
||||||
// async send(invoiceId: string, posInfo: IPosPayload) {
|
async send(invoiceId: string, posInfo: IPosPayload) {
|
||||||
// await this.salesInvoiceTaxService.send(invoiceId, posInfo.pos_id)
|
const consumer_id = await this.checkAccessToInvoice(
|
||||||
|
posInfo.consumer_account_id,
|
||||||
|
posInfo.pos_id,
|
||||||
|
)
|
||||||
|
const invoice = await this.salesInvoiceTaxService.send(consumer_id, invoiceId)
|
||||||
|
|
||||||
// return ResponseMapper.single({
|
return ResponseMapper.single(invoice)
|
||||||
// invoice_id: invoiceId,
|
}
|
||||||
// sent_to_tax: true,
|
|
||||||
// })
|
async inquiry(consumer_account_id: string, pos_id: string, invoiceId: string) {
|
||||||
// }
|
const consumer_id = await this.checkAccessToInvoice(consumer_account_id, pos_id)
|
||||||
|
const invoice = await this.salesInvoiceTaxService.get(invoiceId, pos_id, consumer_id)
|
||||||
|
return ResponseMapper.single(invoice)
|
||||||
|
}
|
||||||
|
|
||||||
// async sendBulk(invoiceIds: string[], posInfo: IPosPayload) {
|
// async sendBulk(invoiceIds: string[], posInfo: IPosPayload) {
|
||||||
// if (!invoiceIds.length) {
|
// if (!invoiceIds.length) {
|
||||||
@@ -325,13 +330,13 @@ export class SalesInvoicesService {
|
|||||||
normalizedInvoiceDate,
|
normalizedInvoiceDate,
|
||||||
)
|
)
|
||||||
|
|
||||||
return salesInvoice
|
if (data.send_to_tsp) {
|
||||||
})
|
|
||||||
|
|
||||||
if (data.send_to_tax) {
|
|
||||||
await this.salesInvoiceTaxService.send(salesInvoice.id, pos_id)
|
await this.salesInvoiceTaxService.send(salesInvoice.id, pos_id)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return salesInvoice
|
||||||
|
})
|
||||||
|
|
||||||
return ResponseMapper.create(salesInvoice)
|
return ResponseMapper.create(salesInvoice)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (
|
if (
|
||||||
@@ -500,17 +505,13 @@ export class SalesInvoicesService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (query.status) {
|
if (query.status) {
|
||||||
if (query.status === FiscalResponseStatus.NOT_SEND) {
|
if (query.status === TspProviderResponseStatus.NOT_SEND) {
|
||||||
where.fiscal = null
|
where.tsp_attempts = undefined
|
||||||
} else {
|
} else {
|
||||||
where.fiscal = {
|
where.tsp_attempts = {
|
||||||
is: {
|
|
||||||
attempts: {
|
|
||||||
some: {
|
some: {
|
||||||
status: query.status,
|
status: query.status,
|
||||||
},
|
},
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -530,8 +531,9 @@ export class SalesInvoicesService {
|
|||||||
cash: PaymentMethodType.CASH,
|
cash: PaymentMethodType.CASH,
|
||||||
set_off: PaymentMethodType.SET_OFF,
|
set_off: PaymentMethodType.SET_OFF,
|
||||||
card: PaymentMethodType.CARD,
|
card: PaymentMethodType.CARD,
|
||||||
|
payment_gateway: PaymentMethodType.PAYMENT_GATEWAY,
|
||||||
bank: PaymentMethodType.BANK,
|
bank: PaymentMethodType.BANK,
|
||||||
check: PaymentMethodType.CHECK,
|
check: PaymentMethodType.CHEQUE,
|
||||||
other: PaymentMethodType.OTHER,
|
other: PaymentMethodType.OTHER,
|
||||||
terminal: PaymentMethodType.TERMINAL,
|
terminal: PaymentMethodType.TERMINAL,
|
||||||
}
|
}
|
||||||
@@ -705,6 +707,8 @@ export class SalesInvoicesService {
|
|||||||
select: {
|
select: {
|
||||||
id: true,
|
id: true,
|
||||||
name: true,
|
name: true,
|
||||||
|
code: true,
|
||||||
|
VAT: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
local_sku: true,
|
local_sku: true,
|
||||||
@@ -714,6 +718,7 @@ export class SalesInvoicesService {
|
|||||||
select: {
|
select: {
|
||||||
id: true,
|
id: true,
|
||||||
name: true,
|
name: true,
|
||||||
|
code: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
base_sale_price: true,
|
base_sale_price: true,
|
||||||
@@ -755,7 +760,7 @@ export class SalesInvoicesService {
|
|||||||
} = params
|
} = params
|
||||||
const { customer_id, customer_type, customer, payments, ...invoiceData } = data
|
const { customer_id, customer_type, customer, payments, ...invoiceData } = data
|
||||||
|
|
||||||
const salesInvoiceData: any = {
|
const salesInvoiceData: SalesInvoiceCreateInput = {
|
||||||
...invoiceData,
|
...invoiceData,
|
||||||
invoice_date: normalizedInvoiceDate,
|
invoice_date: normalizedInvoiceDate,
|
||||||
invoice_number: invoiceNumber,
|
invoice_number: invoiceNumber,
|
||||||
@@ -764,11 +769,14 @@ export class SalesInvoicesService {
|
|||||||
items: {
|
items: {
|
||||||
createMany: {
|
createMany: {
|
||||||
data: data.items.map(item => ({
|
data: data.items.map(item => ({
|
||||||
good_id: item.good_id,
|
good_id: item.good_id!,
|
||||||
quantity: item.quantity,
|
quantity: item.quantity,
|
||||||
unit_price: item.unit_price,
|
unit_price: item.unit_price,
|
||||||
total_amount: item.total_amount,
|
total_amount: item.total_amount,
|
||||||
measure_unit_text: item.unit_type,
|
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,
|
payload: item.payload ? JSON.parse(JSON.stringify(item.payload)) : undefined,
|
||||||
good_snapshot: item.good_id
|
good_snapshot: item.good_id
|
||||||
? JSON.parse(
|
? JSON.parse(
|
||||||
@@ -777,7 +785,6 @@ export class SalesInvoicesService {
|
|||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
: undefined,
|
: undefined,
|
||||||
unit_type: item.unit_type,
|
|
||||||
})),
|
})),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -794,6 +801,16 @@ export class SalesInvoicesService {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (data.send_to_tsp) {
|
||||||
|
salesInvoiceData.tsp_attempts = {
|
||||||
|
create: {
|
||||||
|
attempt_no: 1,
|
||||||
|
status: TspProviderResponseStatus.QUEUED,
|
||||||
|
type: TspProviderRequestType.MAIN,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (customerId) {
|
if (customerId) {
|
||||||
salesInvoiceData.customer = {
|
salesInvoiceData.customer = {
|
||||||
connect: {
|
connect: {
|
||||||
@@ -819,10 +836,29 @@ export class SalesInvoicesService {
|
|||||||
},
|
},
|
||||||
select: {
|
select: {
|
||||||
invoice_number: true,
|
invoice_number: true,
|
||||||
|
pos: {
|
||||||
|
select: {
|
||||||
|
complex: {
|
||||||
|
select: {
|
||||||
|
business_activity: {
|
||||||
|
select: {
|
||||||
|
invoice_number_sequence: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
return (latestInvoice?.invoice_number || 0) + 1
|
const latestSequence =
|
||||||
|
latestInvoice?.pos?.complex?.business_activity?.invoice_number_sequence.toNumber() ||
|
||||||
|
0
|
||||||
|
|
||||||
|
console.log(latestSequence)
|
||||||
|
|
||||||
|
return Math.max(latestInvoice?.invoice_number || 0, latestSequence) + 1
|
||||||
}
|
}
|
||||||
|
|
||||||
private async createPayments(
|
private async createPayments(
|
||||||
@@ -852,7 +888,7 @@ export class SalesInvoicesService {
|
|||||||
terminal_id: terminalInfo.terminalId,
|
terminal_id: terminalInfo.terminalId,
|
||||||
stan: terminalInfo.stan,
|
stan: terminalInfo.stan,
|
||||||
rrn: terminalInfo.rrn,
|
rrn: terminalInfo.rrn,
|
||||||
transaction_date_time: new Date(terminalInfo.transactionDateTime),
|
transaction_date_time: new Date(terminalInfo.transactionDateTime || ''),
|
||||||
customer_card_no: terminalInfo.customerCardNO || null,
|
customer_card_no: terminalInfo.customerCardNO || null,
|
||||||
description: terminalInfo.description || null,
|
description: terminalInfo.description || null,
|
||||||
},
|
},
|
||||||
@@ -867,6 +903,35 @@ export class SalesInvoicesService {
|
|||||||
pos_id: string,
|
pos_id: string,
|
||||||
invoice_number: number,
|
invoice_number: number,
|
||||||
) {
|
) {
|
||||||
return `${business_id.substring(0, 2)}-${complex_id.substring(0, 2)}-${pos_id.substring(0, 2)}-${invoice_number.toString()}`
|
return `${business_id.substring(business_id.length - 2, business_id.length)}-${complex_id.substring(complex_id.length - 2, complex_id.length)}-${pos_id.substring(pos_id.length - 2, pos_id.length)}-${invoice_number.toString()}`
|
||||||
|
}
|
||||||
|
|
||||||
|
private async checkAccessToInvoice(
|
||||||
|
consumer_account_id: string,
|
||||||
|
pos_id: string,
|
||||||
|
): Promise<string> {
|
||||||
|
const consumer = await this.prisma.consumerAccount.findUnique({
|
||||||
|
where: {
|
||||||
|
id: consumer_account_id,
|
||||||
|
OR: [
|
||||||
|
{
|
||||||
|
pos: {
|
||||||
|
id: pos_id,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
role: ConsumerRole.OWNER,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
select: {
|
||||||
|
consumer_id: true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if (!consumer) {
|
||||||
|
throw new BadRequestException('شما دسترسی لازم برای ارسال فاکتور را ندارید.')
|
||||||
|
}
|
||||||
|
|
||||||
|
return consumer.consumer_id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+117
-55
@@ -1,28 +1,27 @@
|
|||||||
import {
|
import {
|
||||||
CustomerType,
|
CustomerType,
|
||||||
FiscalInvoiceCustomerType,
|
InvoiceTemplateType,
|
||||||
FiscalRequestType,
|
PaymentMethodType,
|
||||||
PartnerFiscalSwitchType,
|
TspProviderCustomerType,
|
||||||
|
TspProviderRequestType,
|
||||||
|
TspProviderResponseStatus,
|
||||||
|
TspProviderType,
|
||||||
} from '@/generated/prisma/enums'
|
} from '@/generated/prisma/enums'
|
||||||
import { ApiProperty } from '@nestjs/swagger'
|
import { ApiProperty } from '@nestjs/swagger'
|
||||||
import { Type } from 'class-transformer'
|
import { Type } from 'class-transformer'
|
||||||
import {
|
import {
|
||||||
IsArray,
|
IsArray,
|
||||||
|
IsBoolean,
|
||||||
IsDateString,
|
IsDateString,
|
||||||
IsEnum,
|
IsEnum,
|
||||||
IsNumber,
|
IsNumber,
|
||||||
IsObject,
|
IsObject,
|
||||||
IsOptional,
|
IsOptional,
|
||||||
IsString,
|
IsString,
|
||||||
|
Min,
|
||||||
ValidateNested,
|
ValidateNested,
|
||||||
} from 'class-validator'
|
} from 'class-validator'
|
||||||
|
|
||||||
export enum TaxSendStatus {
|
|
||||||
SENT = 'SENT',
|
|
||||||
FAILED = 'FAILED',
|
|
||||||
PENDING = 'PENDING',
|
|
||||||
}
|
|
||||||
|
|
||||||
export class CustomerLegalInfoDto {
|
export class CustomerLegalInfoDto {
|
||||||
@ApiProperty({ required: true })
|
@ApiProperty({ required: true })
|
||||||
@IsString()
|
@IsString()
|
||||||
@@ -66,7 +65,34 @@ export class CustomerInfoDto {
|
|||||||
@ValidateNested({ each: true })
|
@ValidateNested({ each: true })
|
||||||
individual_info?: CustomerIndividualInfoDto
|
individual_info?: CustomerIndividualInfoDto
|
||||||
}
|
}
|
||||||
export class TaxSwitchSendItemPayloadDto {
|
|
||||||
|
export class PaymentInfoDto {
|
||||||
|
@ApiProperty({ required: true, enum: PaymentMethodType })
|
||||||
|
@IsEnum(PaymentMethodType)
|
||||||
|
payment_method: PaymentMethodType
|
||||||
|
|
||||||
|
@ApiProperty({ required: true })
|
||||||
|
@IsNumber({ allowInfinity: false, allowNaN: false })
|
||||||
|
@Min(10_000)
|
||||||
|
amount: number
|
||||||
|
|
||||||
|
@ApiProperty({ required: false })
|
||||||
|
@IsOptional()
|
||||||
|
@IsString()
|
||||||
|
tracking_code?: string
|
||||||
|
|
||||||
|
@ApiProperty({ required: false })
|
||||||
|
@IsOptional()
|
||||||
|
@IsString()
|
||||||
|
card_number?: string
|
||||||
|
|
||||||
|
@ApiProperty({ required: false })
|
||||||
|
@IsOptional()
|
||||||
|
@IsDateString()
|
||||||
|
paid_at?: Date
|
||||||
|
}
|
||||||
|
|
||||||
|
export class TspProviderSendItemPayloadDto {
|
||||||
@ApiProperty({ required: true })
|
@ApiProperty({ required: true })
|
||||||
@IsString()
|
@IsString()
|
||||||
sku: string
|
sku: string
|
||||||
@@ -116,20 +142,20 @@ export class TaxSwitchSendItemPayloadDto {
|
|||||||
payload?: unknown
|
payload?: unknown
|
||||||
}
|
}
|
||||||
|
|
||||||
export class TaxSwitchSendPayloadDto {
|
export class TspProviderSendPayloadDto {
|
||||||
@ApiProperty({ required: true, enum: FiscalRequestType })
|
@ApiProperty({ required: true, enum: TspProviderRequestType })
|
||||||
@IsEnum(FiscalRequestType)
|
@IsEnum(TspProviderRequestType)
|
||||||
type: FiscalRequestType
|
type: TspProviderRequestType
|
||||||
|
|
||||||
@ApiProperty({ required: true, enum: FiscalInvoiceCustomerType })
|
@ApiProperty({ required: true, enum: TspProviderCustomerType })
|
||||||
@IsEnum(FiscalInvoiceCustomerType)
|
@IsEnum(TspProviderCustomerType)
|
||||||
customer_type: FiscalInvoiceCustomerType
|
customer_type: TspProviderCustomerType
|
||||||
|
|
||||||
@ApiProperty({ type: [TaxSwitchSendItemPayloadDto] })
|
@ApiProperty({ type: [TspProviderSendItemPayloadDto] })
|
||||||
@IsArray()
|
@IsArray()
|
||||||
@ValidateNested({ each: true })
|
@ValidateNested({ each: true })
|
||||||
@Type(() => TaxSwitchSendItemPayloadDto)
|
@Type(() => TspProviderSendItemPayloadDto)
|
||||||
items: TaxSwitchSendItemPayloadDto[]
|
items: TspProviderSendItemPayloadDto[]
|
||||||
|
|
||||||
@ApiProperty({ required: false })
|
@ApiProperty({ required: false })
|
||||||
@Type(() => CustomerInfoDto)
|
@Type(() => CustomerInfoDto)
|
||||||
@@ -137,11 +163,10 @@ export class TaxSwitchSendPayloadDto {
|
|||||||
customer?: CustomerInfoDto
|
customer?: CustomerInfoDto
|
||||||
|
|
||||||
@ApiProperty({ required: true, nullable: true })
|
@ApiProperty({ required: true, nullable: true })
|
||||||
@IsString()
|
@IsNumber()
|
||||||
invoice_code: string
|
invoice_number: number
|
||||||
|
|
||||||
@ApiProperty({ required: true, nullable: true })
|
@ApiProperty({ required: true, nullable: true })
|
||||||
@IsOptional()
|
|
||||||
@IsDateString()
|
@IsDateString()
|
||||||
invoice_date: Date
|
invoice_date: Date
|
||||||
|
|
||||||
@@ -153,86 +178,123 @@ export class TaxSwitchSendPayloadDto {
|
|||||||
@IsNumber()
|
@IsNumber()
|
||||||
total_amount: number
|
total_amount: number
|
||||||
|
|
||||||
@ApiProperty({ required: true, enum: PartnerFiscalSwitchType })
|
@ApiProperty({ required: true, enum: TspProviderType })
|
||||||
@IsEnum(PartnerFiscalSwitchType)
|
@IsEnum(TspProviderType)
|
||||||
provider_code: PartnerFiscalSwitchType
|
tsp_provider: TspProviderType
|
||||||
|
|
||||||
|
@ApiProperty({ required: true, nullable: true })
|
||||||
|
@IsString()
|
||||||
|
economic_code: string
|
||||||
|
|
||||||
|
@ApiProperty({ required: true, nullable: true })
|
||||||
|
@IsString()
|
||||||
|
fiscal_id: string
|
||||||
|
|
||||||
|
@ApiProperty({ required: true, type: [PaymentInfoDto] })
|
||||||
|
@IsArray()
|
||||||
|
@ValidateNested({ each: true })
|
||||||
|
@Type(() => PaymentInfoDto)
|
||||||
|
payments: PaymentInfoDto[]
|
||||||
|
|
||||||
|
@ApiProperty({ required: true, enum: InvoiceTemplateType })
|
||||||
|
@IsEnum(InvoiceTemplateType)
|
||||||
|
invoice_template: InvoiceTemplateType
|
||||||
|
|
||||||
|
@ApiProperty({ required: true })
|
||||||
|
@IsString()
|
||||||
|
tsp_token: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export class TaxSwitchSendItemResultDto {
|
export class TspProviderSendItemResultDto {
|
||||||
@ApiProperty()
|
@ApiProperty()
|
||||||
@IsString()
|
@IsString()
|
||||||
invoice_item_id: string
|
invoice_id: string
|
||||||
|
|
||||||
@ApiProperty({ enum: TaxSendStatus })
|
@ApiProperty({ enum: TspProviderResponseStatus })
|
||||||
@IsEnum(TaxSendStatus)
|
@IsEnum(TspProviderResponseStatus)
|
||||||
status: TaxSendStatus
|
status: TspProviderResponseStatus
|
||||||
|
|
||||||
@ApiProperty({ required: false, nullable: true })
|
@ApiProperty({ required: false, nullable: true })
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
@IsString()
|
@IsString()
|
||||||
tax_id?: string | null
|
tax_id?: string | null
|
||||||
|
|
||||||
@ApiProperty({ required: false, nullable: true, type: Object })
|
@ApiProperty({ required: true, nullable: true, type: TspProviderSendPayloadDto })
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
@IsObject()
|
@IsObject()
|
||||||
request_payload?: unknown
|
@Type(() => TspProviderSendPayloadDto)
|
||||||
|
request_payload: TspProviderSendPayloadDto
|
||||||
|
|
||||||
@ApiProperty({ required: false, nullable: true, type: Object })
|
@ApiProperty({ required: false, nullable: true, type: Object })
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
@IsObject()
|
@IsObject()
|
||||||
response_payload?: unknown
|
response_payload?: unknown
|
||||||
|
|
||||||
|
@ApiProperty({ required: true })
|
||||||
|
@IsBoolean()
|
||||||
|
hasError: boolean
|
||||||
|
|
||||||
@ApiProperty({ required: false, nullable: true })
|
@ApiProperty({ required: false, nullable: true })
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
@IsString()
|
@IsString()
|
||||||
error_message?: string | null
|
message?: string | null
|
||||||
|
|
||||||
@ApiProperty({ required: false, nullable: true })
|
@ApiProperty({ required: true })
|
||||||
@IsOptional()
|
|
||||||
@IsDateString()
|
@IsDateString()
|
||||||
sent_at?: string | null
|
sent_at: string
|
||||||
|
|
||||||
@ApiProperty({ required: false, nullable: true })
|
@ApiProperty({ required: true })
|
||||||
@IsOptional()
|
|
||||||
@IsDateString()
|
@IsDateString()
|
||||||
received_at?: string | null
|
received_at: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export class TaxSwitchBulkSendResultDto {
|
export class TspProviderBulkSendResultDto {
|
||||||
@ApiProperty()
|
@ApiProperty()
|
||||||
@IsString()
|
@IsString()
|
||||||
invoice_id: string
|
invoice_id: string
|
||||||
|
|
||||||
@ApiProperty({ type: [TaxSwitchSendItemResultDto] })
|
@ApiProperty({ type: [TspProviderSendItemResultDto] })
|
||||||
@IsArray()
|
@IsArray()
|
||||||
@ValidateNested({ each: true })
|
@ValidateNested({ each: true })
|
||||||
@Type(() => TaxSwitchSendItemResultDto)
|
@Type(() => TspProviderSendItemResultDto)
|
||||||
items: TaxSwitchSendItemResultDto[]
|
items: TspProviderSendItemResultDto[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export class TaxSwitchGetResultDto {
|
export class TspProviderGetResultDto {
|
||||||
@ApiProperty()
|
@ApiProperty()
|
||||||
@IsString()
|
@IsString()
|
||||||
tax_id: string
|
tax_id: string
|
||||||
|
|
||||||
@ApiProperty({ enum: TaxSendStatus })
|
@ApiProperty({ enum: TspProviderResponseStatus })
|
||||||
@IsEnum(TaxSendStatus)
|
@IsEnum(TspProviderResponseStatus)
|
||||||
status: TaxSendStatus
|
status: TspProviderResponseStatus
|
||||||
|
|
||||||
|
@ApiProperty({ required: true })
|
||||||
|
@IsBoolean()
|
||||||
|
hasError: boolean
|
||||||
|
|
||||||
|
@ApiProperty({ required: false, nullable: true })
|
||||||
|
@IsOptional()
|
||||||
|
@IsString()
|
||||||
|
message?: string | null
|
||||||
|
|
||||||
@ApiProperty({ required: false, nullable: true, type: Object })
|
@ApiProperty({ required: false, nullable: true, type: Object })
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
@IsObject()
|
@IsObject()
|
||||||
response_payload?: unknown
|
response_payload?: unknown
|
||||||
|
|
||||||
@ApiProperty({ required: false, nullable: true })
|
@ApiProperty({ required: true })
|
||||||
@IsOptional()
|
|
||||||
@IsDateString()
|
@IsDateString()
|
||||||
received_at?: string | null
|
sent_at: string
|
||||||
|
|
||||||
|
@ApiProperty({ required: true })
|
||||||
|
@IsDateString()
|
||||||
|
received_at: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ITaxSwitchAdapter {
|
export interface IProviderSwitchAdapter {
|
||||||
readonly code: string
|
readonly code: string
|
||||||
send(payload: TaxSwitchSendPayloadDto): Promise<TaxSwitchSendItemResultDto[]>
|
send(payload: TspProviderSendPayloadDto): Promise<TspProviderSendItemResultDto>
|
||||||
sendBulk(payloads: TaxSwitchSendPayloadDto[]): Promise<TaxSwitchBulkSendResultDto[]>
|
sendBulk(payloads: TspProviderSendPayloadDto[]): Promise<TspProviderBulkSendResultDto[]>
|
||||||
get(taxId: string): Promise<TaxSwitchGetResultDto>
|
get(invoiceId: string, tsp_token: string): Promise<TspProviderGetResultDto>
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
import { Injectable } from '@nestjs/common'
|
||||||
|
import {
|
||||||
|
TspProviderBulkSendResultDto,
|
||||||
|
TspProviderGetResultDto,
|
||||||
|
TspProviderSendItemResultDto,
|
||||||
|
TspProviderSendPayloadDto,
|
||||||
|
} from './dto/provider-switch.dto'
|
||||||
|
import { NamaProviderSwitchAdapter } from './switch/nama/nama-provider.adapter'
|
||||||
|
|
||||||
|
@Injectable()
|
||||||
|
export class SalesInvoiceTspSwitchService {
|
||||||
|
constructor(private readonly namaAdapter: NamaProviderSwitchAdapter) {}
|
||||||
|
|
||||||
|
private resolveSwitch(providerCode: string) {
|
||||||
|
const normalizedCode = providerCode.trim().toUpperCase() || ''
|
||||||
|
|
||||||
|
switch (normalizedCode) {
|
||||||
|
case 'NAMA':
|
||||||
|
default:
|
||||||
|
return this.namaAdapter
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async send(payload: TspProviderSendPayloadDto): Promise<TspProviderSendItemResultDto> {
|
||||||
|
const adapter = this.resolveSwitch(payload.tsp_provider)
|
||||||
|
return adapter.send(payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
async sendBulk(
|
||||||
|
payloads: TspProviderSendPayloadDto[],
|
||||||
|
): Promise<TspProviderBulkSendResultDto[]> {
|
||||||
|
const groupedByProvider = new Map<string, TspProviderSendPayloadDto[]>()
|
||||||
|
|
||||||
|
for (const payload of payloads) {
|
||||||
|
const key = payload.tsp_provider?.trim().toUpperCase() || 'NAMA'
|
||||||
|
const currentGroup = groupedByProvider.get(key) || []
|
||||||
|
currentGroup.push(payload)
|
||||||
|
groupedByProvider.set(key, currentGroup)
|
||||||
|
}
|
||||||
|
|
||||||
|
const result: TspProviderBulkSendResultDto[] = []
|
||||||
|
for (const [providerCode, groupedPayloads] of groupedByProvider.entries()) {
|
||||||
|
const adapter = this.resolveSwitch(providerCode)
|
||||||
|
const providerResult = await adapter.sendBulk(groupedPayloads)
|
||||||
|
result.push(...providerResult)
|
||||||
|
}
|
||||||
|
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
|
||||||
|
async get(
|
||||||
|
providerCode: string,
|
||||||
|
invoiceId: string,
|
||||||
|
tspToken: string,
|
||||||
|
): Promise<TspProviderGetResultDto> {
|
||||||
|
const adapter = this.resolveSwitch(providerCode)
|
||||||
|
return await adapter.get(invoiceId, tspToken)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,595 @@
|
|||||||
|
import { PrismaService } from '@/prisma/prisma.service'
|
||||||
|
import { BadRequestException, Injectable, NotFoundException } from '@nestjs/common'
|
||||||
|
import {
|
||||||
|
TspProviderCustomerType,
|
||||||
|
TspProviderRequestType,
|
||||||
|
TspProviderResponseStatus,
|
||||||
|
} from 'generated/prisma/client'
|
||||||
|
import { CreateSalesInvoiceDto } from '../pos/sales-invoices/dto/create-sales-invoice.dto'
|
||||||
|
import {
|
||||||
|
TspProviderSendItemResultDto,
|
||||||
|
TspProviderSendPayloadDto,
|
||||||
|
} from './dto/provider-switch.dto'
|
||||||
|
import { SalesInvoiceTspSwitchService } from './sales-invoice-tsp-switch.service'
|
||||||
|
|
||||||
|
type ItemTspRow = {
|
||||||
|
tsp_provider: string | null
|
||||||
|
tax_id: string | null
|
||||||
|
}
|
||||||
|
|
||||||
|
type IAttempt = any
|
||||||
|
|
||||||
|
@Injectable()
|
||||||
|
export class SalesInvoiceTspService {
|
||||||
|
constructor(
|
||||||
|
private readonly prisma: PrismaService,
|
||||||
|
private readonly tspSwitchService: SalesInvoiceTspSwitchService,
|
||||||
|
) {}
|
||||||
|
|
||||||
|
async send(consumer_id: string, invoice_id: string): Promise<IAttempt> {
|
||||||
|
const posId = await this.getPosId(consumer_id, invoice_id)
|
||||||
|
const payload = await this.buildPayload(invoice_id, posId)
|
||||||
|
const attempt = await this.prisma.saleInvoiceTspAttempts.create({
|
||||||
|
data: {
|
||||||
|
attempt_no: 1,
|
||||||
|
invoice_id,
|
||||||
|
status: TspProviderResponseStatus.QUEUED,
|
||||||
|
type: TspProviderRequestType.MAIN,
|
||||||
|
request_payload: JSON.parse(JSON.stringify(payload)),
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
const sendResult = await this.trySend(payload)
|
||||||
|
|
||||||
|
console.log('sendResult')
|
||||||
|
console.log(sendResult)
|
||||||
|
|
||||||
|
if (sendResult) {
|
||||||
|
if (sendResult.hasError) {
|
||||||
|
throw new Error(sendResult.message || '')
|
||||||
|
}
|
||||||
|
|
||||||
|
const updatedAttempt = await this.prisma.saleInvoiceTspAttempts.update({
|
||||||
|
where: {
|
||||||
|
id: attempt.id,
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
response_payload: JSON.parse(JSON.stringify(sendResult)),
|
||||||
|
status: sendResult.status,
|
||||||
|
tax_id: sendResult.tax_id,
|
||||||
|
sent_at: sendResult.sent_at,
|
||||||
|
received_at: sendResult.received_at,
|
||||||
|
},
|
||||||
|
select: {
|
||||||
|
status: true,
|
||||||
|
invoice: true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
return {
|
||||||
|
...updatedAttempt.invoice,
|
||||||
|
status: updatedAttempt.status,
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
throw new NotFoundException(
|
||||||
|
'متاسفانه امکان ارسال فاکتور به سیستم مالیاتی در حال حاضر وجود ندارد. لطفا بعدا تلاش کنید.',
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async sendBulk(consumer_id: string, invoice_ids: string[]): Promise<void> {
|
||||||
|
if (!invoice_ids.length) return
|
||||||
|
|
||||||
|
const payloads: TspProviderSendPayloadDto[] = []
|
||||||
|
for (const invoiceId of invoice_ids) {
|
||||||
|
const posId = await this.getPosId(consumer_id, invoiceId)
|
||||||
|
payloads.push(await this.buildPayload(invoiceId, posId))
|
||||||
|
}
|
||||||
|
|
||||||
|
const bulkResult = await this.tspSwitchService.sendBulk(payloads)
|
||||||
|
const allItemResults = bulkResult.flatMap(result => result.items)
|
||||||
|
await this.persistAttemptResults(allItemResults)
|
||||||
|
}
|
||||||
|
|
||||||
|
async get(invoice_id: string, pos_id: string, consumer_id: string): Promise<IAttempt> {
|
||||||
|
const [attempt, pos] = await this.prisma.$transaction(async tx => [
|
||||||
|
await tx.saleInvoiceTspAttempts.findFirst({
|
||||||
|
where: {
|
||||||
|
invoice_id,
|
||||||
|
invoice: {
|
||||||
|
pos: {
|
||||||
|
id: pos_id,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
orderBy: {
|
||||||
|
attempt_no: 'desc',
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
|
||||||
|
await tx.pos.findUnique({
|
||||||
|
where: {
|
||||||
|
id: pos_id,
|
||||||
|
complex: {
|
||||||
|
business_activity: {
|
||||||
|
consumer_id,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
select: {
|
||||||
|
complex: {
|
||||||
|
select: {
|
||||||
|
business_activity: {
|
||||||
|
select: {
|
||||||
|
partner_token: true,
|
||||||
|
consumer: {
|
||||||
|
select: {
|
||||||
|
legal: {
|
||||||
|
select: {
|
||||||
|
partner: {
|
||||||
|
select: {
|
||||||
|
tsp_provider: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
individual: {
|
||||||
|
select: {
|
||||||
|
partner: {
|
||||||
|
select: {
|
||||||
|
tsp_provider: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
])
|
||||||
|
|
||||||
|
if (!attempt) {
|
||||||
|
throw new NotFoundException('صورتحساب ارسالی فاکتور شما به سامانه یافت نشد.')
|
||||||
|
}
|
||||||
|
if (!pos) {
|
||||||
|
throw new NotFoundException('مشکلی در ساختار اطلاعات ورودی شما وجود دارد.')
|
||||||
|
}
|
||||||
|
|
||||||
|
const { business_activity } = pos.complex
|
||||||
|
|
||||||
|
const { partner } = (business_activity.consumer.individual ||
|
||||||
|
business_activity.consumer.legal)!
|
||||||
|
|
||||||
|
const result = await this.tspSwitchService.get(
|
||||||
|
partner.tsp_provider,
|
||||||
|
invoice_id,
|
||||||
|
business_activity.partner_token,
|
||||||
|
)
|
||||||
|
|
||||||
|
console.log('getResult', result)
|
||||||
|
|
||||||
|
if (!result) {
|
||||||
|
throw new NotFoundException('نتیجه ارسال فاکتور یافت نشد.')
|
||||||
|
}
|
||||||
|
|
||||||
|
const updatedAttempt = await this.prisma.saleInvoiceTspAttempts.update({
|
||||||
|
where: {
|
||||||
|
id: attempt.id,
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
response_payload: JSON.parse(JSON.stringify(result)),
|
||||||
|
status: result.status,
|
||||||
|
received_at: result.received_at,
|
||||||
|
},
|
||||||
|
select: {
|
||||||
|
status: true,
|
||||||
|
invoice: true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
return {
|
||||||
|
...updatedAttempt.invoice,
|
||||||
|
status: updatedAttempt.status,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async update(
|
||||||
|
consumer_id: string,
|
||||||
|
invoice_id: string,
|
||||||
|
dataToUpdate: CreateSalesInvoiceDto,
|
||||||
|
): Promise<IAttempt> {
|
||||||
|
const posId = await this.getPosId(consumer_id, invoice_id)
|
||||||
|
const payload = await this.buildPayload(invoice_id, posId)
|
||||||
|
|
||||||
|
const lastAttempt = await this.prisma.saleInvoiceTspAttempts.findFirst({
|
||||||
|
where: {
|
||||||
|
invoice_id,
|
||||||
|
invoice: {
|
||||||
|
pos: {
|
||||||
|
complex: {
|
||||||
|
business_activity: {
|
||||||
|
consumer_id,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
orderBy: {
|
||||||
|
attempt_no: 'desc',
|
||||||
|
},
|
||||||
|
include: {
|
||||||
|
invoice: {
|
||||||
|
include: {
|
||||||
|
items: {
|
||||||
|
include: {
|
||||||
|
good: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
payments: {
|
||||||
|
include: {
|
||||||
|
terminal_info: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
if (!lastAttempt || lastAttempt?.status === TspProviderResponseStatus.QUEUED) {
|
||||||
|
throw new BadRequestException(
|
||||||
|
'فاکتور هنوز به سامانه مالیاتی ارسال نشده است یا در صف ارسال قرار دارد. لطفا بعدا تلاش کنید.',
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
let isUpdated = false
|
||||||
|
let isBackFromSale = false
|
||||||
|
for (let item of dataToUpdate.items) {
|
||||||
|
const lastAttemptInvoiceItem = lastAttempt.invoice.items.find(
|
||||||
|
prevItem => prevItem.good_id === item.good_id,
|
||||||
|
)
|
||||||
|
if (!lastAttemptInvoiceItem) {
|
||||||
|
isBackFromSale = true
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (dataToUpdate.total_amount !== lastAttempt.invoice.total_amount.toNumber()) {
|
||||||
|
isUpdated = true
|
||||||
|
}
|
||||||
|
|
||||||
|
const attempt = await this.prisma.saleInvoiceTspAttempts.create({
|
||||||
|
data: {
|
||||||
|
attempt_no: 1,
|
||||||
|
invoice_id,
|
||||||
|
status: TspProviderResponseStatus.QUEUED,
|
||||||
|
type: TspProviderRequestType.MAIN,
|
||||||
|
request_payload: JSON.parse(JSON.stringify(payload)),
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
const sendResult = await this.trySend(payload)
|
||||||
|
|
||||||
|
console.log('sendResult')
|
||||||
|
console.log(sendResult)
|
||||||
|
|
||||||
|
if (sendResult) {
|
||||||
|
if (sendResult.hasError) {
|
||||||
|
throw new Error(sendResult.message || '')
|
||||||
|
}
|
||||||
|
|
||||||
|
const updatedAttempt = await this.prisma.saleInvoiceTspAttempts.update({
|
||||||
|
where: {
|
||||||
|
id: attempt.id,
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
response_payload: JSON.parse(JSON.stringify(sendResult)),
|
||||||
|
status: sendResult.status,
|
||||||
|
tax_id: sendResult.tax_id,
|
||||||
|
sent_at: sendResult.sent_at,
|
||||||
|
received_at: sendResult.received_at,
|
||||||
|
},
|
||||||
|
select: {
|
||||||
|
status: true,
|
||||||
|
invoice: true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
return {
|
||||||
|
...updatedAttempt.invoice,
|
||||||
|
status: updatedAttempt.status,
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
throw new NotFoundException(
|
||||||
|
'متاسفانه امکان ارسال فاکتور به سیستم مالیاتی در حال حاضر وجود ندارد. لطفا بعدا تلاش کنید.',
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private async getPosId(consumer_id: string, invoice_id: string): Promise<string> {
|
||||||
|
const now = new Date()
|
||||||
|
const saleInvoice = await this.prisma.salesInvoice.findUnique({
|
||||||
|
where: {
|
||||||
|
id: invoice_id,
|
||||||
|
pos: {
|
||||||
|
complex: {
|
||||||
|
business_activity: {
|
||||||
|
consumer_id,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
select: {
|
||||||
|
pos: {
|
||||||
|
select: {
|
||||||
|
id: true,
|
||||||
|
complex: {
|
||||||
|
select: {
|
||||||
|
business_activity: {
|
||||||
|
select: {
|
||||||
|
name: true,
|
||||||
|
license_activation: {
|
||||||
|
select: {
|
||||||
|
expires_at: true,
|
||||||
|
license_renews: {
|
||||||
|
select: {
|
||||||
|
expires_at: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
if (!saleInvoice) {
|
||||||
|
throw new NotFoundException('متاسفانه فاکتور مورد نظر یافت نشد.')
|
||||||
|
}
|
||||||
|
|
||||||
|
const { license_activation, name: businessName } =
|
||||||
|
saleInvoice.pos.complex.business_activity
|
||||||
|
let expired = !license_activation || false
|
||||||
|
if (license_activation) {
|
||||||
|
const { expires_at, license_renews } = license_activation
|
||||||
|
if (expires_at < now) {
|
||||||
|
for (const renew of license_renews) {
|
||||||
|
if (renew.expires_at > now) {
|
||||||
|
expired = false
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (expired) {
|
||||||
|
throw new NotFoundException(`متاسفانه مجوز ${businessName} منقضی شده است.`)
|
||||||
|
}
|
||||||
|
|
||||||
|
return saleInvoice.pos.id
|
||||||
|
}
|
||||||
|
|
||||||
|
private async buildPayload(
|
||||||
|
invoiceId: string,
|
||||||
|
posId: string,
|
||||||
|
): Promise<TspProviderSendPayloadDto> {
|
||||||
|
const invoice = await this.prisma.salesInvoice.findUnique({
|
||||||
|
where: {
|
||||||
|
id: invoiceId,
|
||||||
|
pos_id: posId,
|
||||||
|
},
|
||||||
|
select: {
|
||||||
|
id: true,
|
||||||
|
code: true,
|
||||||
|
total_amount: true,
|
||||||
|
invoice_date: true,
|
||||||
|
invoice_number: true,
|
||||||
|
items: {
|
||||||
|
select: {
|
||||||
|
id: true,
|
||||||
|
quantity: true,
|
||||||
|
unit_price: true,
|
||||||
|
total_amount: true,
|
||||||
|
measure_unit_code: true,
|
||||||
|
measure_unit_text: true,
|
||||||
|
sku_code: true,
|
||||||
|
sku_vat: true,
|
||||||
|
good_id: true,
|
||||||
|
service_id: true,
|
||||||
|
payload: true,
|
||||||
|
good_snapshot: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
pos: {
|
||||||
|
select: {
|
||||||
|
complex: {
|
||||||
|
select: {
|
||||||
|
business_activity: {
|
||||||
|
select: {
|
||||||
|
fiscal_id: true,
|
||||||
|
economic_code: true,
|
||||||
|
partner_token: true,
|
||||||
|
guild: {
|
||||||
|
select: {
|
||||||
|
invoice_template: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
consumer: {
|
||||||
|
select: {
|
||||||
|
legal: {
|
||||||
|
select: {
|
||||||
|
partner: {
|
||||||
|
select: {
|
||||||
|
tsp_provider: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
individual: {
|
||||||
|
select: {
|
||||||
|
partner: {
|
||||||
|
select: {
|
||||||
|
tsp_provider: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
customer: {
|
||||||
|
select: {
|
||||||
|
type: true,
|
||||||
|
individual: {
|
||||||
|
select: {
|
||||||
|
first_name: true,
|
||||||
|
last_name: true,
|
||||||
|
national_id: true,
|
||||||
|
mobile_number: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
legal: {
|
||||||
|
select: {
|
||||||
|
name: true,
|
||||||
|
economic_code: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
payments: {
|
||||||
|
select: {
|
||||||
|
amount: true,
|
||||||
|
payment_method: true,
|
||||||
|
paid_at: true,
|
||||||
|
terminal_info: {
|
||||||
|
select: {
|
||||||
|
stan: true,
|
||||||
|
rrn: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
if (!invoice) {
|
||||||
|
throw new NotFoundException('فاکتور مورد نظر یافت نشد.')
|
||||||
|
}
|
||||||
|
|
||||||
|
const { partner } = (invoice.pos.complex.business_activity.consumer.legal ||
|
||||||
|
invoice.pos.complex.business_activity.consumer.individual)!
|
||||||
|
|
||||||
|
return {
|
||||||
|
invoice_id: invoice.id,
|
||||||
|
invoice_number: invoice.invoice_number,
|
||||||
|
invoice_date: invoice.invoice_date,
|
||||||
|
total_amount: Number(invoice.total_amount),
|
||||||
|
economic_code: invoice.pos.complex.business_activity.economic_code,
|
||||||
|
fiscal_id: invoice.pos.complex.business_activity.fiscal_id,
|
||||||
|
invoice_template: invoice.pos.complex.business_activity.guild.invoice_template,
|
||||||
|
tsp_token: invoice.pos.complex.business_activity.partner_token,
|
||||||
|
payments: invoice.payments.map(payment => ({
|
||||||
|
amount: Number(payment.amount),
|
||||||
|
payment_method: payment.payment_method,
|
||||||
|
paid_at: payment.paid_at,
|
||||||
|
card_number: payment.terminal_info ? payment.terminal_info.stan : undefined,
|
||||||
|
tracking_code: payment.terminal_info ? payment.terminal_info.rrn : undefined,
|
||||||
|
})),
|
||||||
|
type: TspProviderRequestType.MAIN,
|
||||||
|
tsp_provider: partner.tsp_provider!,
|
||||||
|
customer_type: invoice.customer?.type
|
||||||
|
? TspProviderCustomerType.Known
|
||||||
|
: TspProviderCustomerType.Unknown,
|
||||||
|
customer: invoice.customer?.type
|
||||||
|
? {
|
||||||
|
type: invoice.customer.type,
|
||||||
|
legal_info: invoice.customer.legal ?? undefined,
|
||||||
|
individual_info: invoice.customer.individual ?? undefined,
|
||||||
|
}
|
||||||
|
: undefined,
|
||||||
|
items: invoice.items.map(item => ({
|
||||||
|
invoice_item_id: item.id,
|
||||||
|
quantity: Number(item.quantity),
|
||||||
|
unit_price: Number(item.unit_price),
|
||||||
|
total_amount: Number(item.total_amount),
|
||||||
|
measure_unit: item.measure_unit_code,
|
||||||
|
sku: item.sku_code,
|
||||||
|
sku_vat: String(item.sku_vat),
|
||||||
|
discount: String((item.payload as Record<string, any>)?.discount || '0'),
|
||||||
|
good_id: item.good_id,
|
||||||
|
service_id: item.service_id,
|
||||||
|
payload: item.payload,
|
||||||
|
good_snapshot: item.good_snapshot,
|
||||||
|
})),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private async trySend(
|
||||||
|
payload: TspProviderSendPayloadDto,
|
||||||
|
): Promise<TspProviderSendItemResultDto | null> {
|
||||||
|
const taxResult = await this.tspSwitchService.send(payload)
|
||||||
|
|
||||||
|
return taxResult || null
|
||||||
|
}
|
||||||
|
|
||||||
|
private async persistAttemptResults(
|
||||||
|
itemResults: TspProviderSendItemResultDto[],
|
||||||
|
): Promise<any> {
|
||||||
|
if (!itemResults.length) return
|
||||||
|
|
||||||
|
const attemptsResult = [] as any[]
|
||||||
|
console.log('persistAttemptResults')
|
||||||
|
|
||||||
|
for (const itemResult of itemResults) {
|
||||||
|
const attempt = await this.prisma.$transaction(async tx => {
|
||||||
|
const lastAttempt = await tx.saleInvoiceTspAttempts.findFirst({
|
||||||
|
where: {
|
||||||
|
invoice_id: itemResult.invoice_id,
|
||||||
|
},
|
||||||
|
orderBy: {
|
||||||
|
attempt_no: 'desc',
|
||||||
|
},
|
||||||
|
select: {
|
||||||
|
id: true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
const attempt = await tx.saleInvoiceTspAttempts.update({
|
||||||
|
where: {
|
||||||
|
id: lastAttempt!.id,
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
status: itemResult.status,
|
||||||
|
tax_id: itemResult.tax_id,
|
||||||
|
request_payload: JSON.parse(JSON.stringify(itemResult.request_payload)),
|
||||||
|
response_payload: JSON.parse(JSON.stringify(itemResult.response_payload)),
|
||||||
|
error_message: itemResult.message,
|
||||||
|
sent_at: itemResult.sent_at ? new Date(itemResult.sent_at) : new Date(),
|
||||||
|
received_at: itemResult.received_at
|
||||||
|
? new Date(itemResult.received_at)
|
||||||
|
: new Date(),
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
return attempt
|
||||||
|
})
|
||||||
|
attemptsResult.push(attempt)
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(attemptsResult)
|
||||||
|
|
||||||
|
return attemptsResult
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// {"type": "MAIN", "items": [{"sku": "2720000044726", "good_id": "01KQHY48M299C9BG2D06DMWK4E", "payload": {"karat": "18", "wages": 40000000, "profit": 48000000, "commission": 40000000}, "sku_vat": "0", "discount": "0", "quantity": 2, "service_id": null, "unit_price": 200000000, "measure_unit": "63", "total_amount": 540800000, "good_snapshot": {"good": {"id": "01KQHY48M299C9BG2D06DMWK4E", "sku": {"id": "01KQHXE2D4XEFSDK4DSV2J6GT2", "VAT": "0", "code": "2720000044726", "name": "گوشواره طلا زیورالات ساخته شده از طلا"}, "name": "گوشواره", "barcode": null, "category": {"id": "01KQHY48CF6X2TK2AG09MKDVKQ", "name": "زیورآلات"}, "image_url": null, "local_sku": null, "measure_unit": {"id": "01KQHY489HE02787SE8TWDE18S", "code": "63", "name": "گرم"}, "pricing_model": "GOLD", "base_sale_price": "0"}}, "invoice_item_id": "01KQMZTMDC4M4T7VE9GFZJEW4E"}], "payments": [{"amount": 540800000, "paid_at": "2026-05-02T18:39:46.000Z", "payment_method": "CASH"}], "fiscal_id": "A296T3", "tsp_token": "pfFE6QxOJxUIhzkpUCPWYMR5", "invoice_id": "98c3377d-4e42-4703-97f0-38c3b3c8e87f", "invoice_date": "2026-05-02T18:39:46.000Z", "total_amount": 540800000, "tsp_provider": "NAMA", "customer_type": "Unknown", "economic_code": "14003579468", "invoice_number": 13, "invoice_template": "GOLD_JEWELRY"}
|
||||||
@@ -0,0 +1,340 @@
|
|||||||
|
import {
|
||||||
|
createEnsureSuccessResponseInterceptor,
|
||||||
|
createHeaderRequestInterceptor,
|
||||||
|
FetchRequestInterceptor,
|
||||||
|
} from '@/common/interceptors/fetch-request.interceptor'
|
||||||
|
import { HttpClientUtil } from '@/common/utils/http-client.util'
|
||||||
|
import {
|
||||||
|
CustomerType,
|
||||||
|
InvoiceTemplateType,
|
||||||
|
PaymentMethodType,
|
||||||
|
TspProviderCustomerType,
|
||||||
|
TspProviderRequestType,
|
||||||
|
TspProviderResponseStatus,
|
||||||
|
} from '@/generated/prisma/enums'
|
||||||
|
import { Injectable, Logger } from '@nestjs/common'
|
||||||
|
import {
|
||||||
|
CustomerInfoDto,
|
||||||
|
IProviderSwitchAdapter,
|
||||||
|
PaymentInfoDto,
|
||||||
|
TspProviderBulkSendResultDto,
|
||||||
|
TspProviderGetResultDto,
|
||||||
|
TspProviderSendItemResultDto,
|
||||||
|
TspProviderSendPayloadDto,
|
||||||
|
} from '../../dto/provider-switch.dto'
|
||||||
|
import {
|
||||||
|
NamaProviderGetResponseDto,
|
||||||
|
NamaProviderPaymentInfoDto,
|
||||||
|
NamaProviderRequestDto,
|
||||||
|
NamaProviderResponseStatus,
|
||||||
|
NamaProviderSendItemResponseDto,
|
||||||
|
} from './nama-provider.dto'
|
||||||
|
|
||||||
|
@Injectable()
|
||||||
|
export class NamaProviderSwitchAdapter implements IProviderSwitchAdapter {
|
||||||
|
readonly code = 'NAMA'
|
||||||
|
private readonly logger = new Logger(NamaProviderSwitchAdapter.name)
|
||||||
|
private readonly sandboxBaseUrl =
|
||||||
|
process.env.NAMA_PROVIDER_SANDBOX_URL || 'https://external-api-dev.namatsp.ir'
|
||||||
|
private readonly productionBaseUrl =
|
||||||
|
process.env.NAMA_PROVIDER_PRODUCTION_URL || 'https://api.nama.ir'
|
||||||
|
|
||||||
|
private readonly sendPath = '/api/v1/invoices/single-send'
|
||||||
|
private readonly sendBulkPath = '/api/v1/invoices'
|
||||||
|
private readonly checkBulkStatus = '/api/v1/invoices/check-by-uuids'
|
||||||
|
private readonly getPath = '/api/v1/invoices'
|
||||||
|
constructor(private readonly httpClient: HttpClientUtil) {}
|
||||||
|
|
||||||
|
private get baseUrl() {
|
||||||
|
return this.sandboxBaseUrl
|
||||||
|
// return process.env.NODE_ENV === 'production'
|
||||||
|
// ? this.productionBaseUrl
|
||||||
|
// : this.sandboxBaseUrl
|
||||||
|
}
|
||||||
|
|
||||||
|
private buildSendUrl() {
|
||||||
|
return `${this.baseUrl}${this.sendPath}`
|
||||||
|
}
|
||||||
|
|
||||||
|
private buildGetUrl(invoiceId: string) {
|
||||||
|
return `${this.baseUrl}${this.getPath}/${invoiceId}`
|
||||||
|
}
|
||||||
|
|
||||||
|
private createRequestInterceptors(token: string): FetchRequestInterceptor[] {
|
||||||
|
return [
|
||||||
|
createHeaderRequestInterceptor({
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
Authorization: token,
|
||||||
|
}),
|
||||||
|
createEnsureSuccessResponseInterceptor(),
|
||||||
|
{
|
||||||
|
onError: (context, error) => {
|
||||||
|
this.logger.error(`NAMA request failed: ${context.url}`, error)
|
||||||
|
return Promise.reject(error)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
async send(payload: TspProviderSendPayloadDto): Promise<TspProviderSendItemResultDto> {
|
||||||
|
const mappedRequest = this.mapToNamaRequestDto(payload)
|
||||||
|
try {
|
||||||
|
console.log(mappedRequest)
|
||||||
|
|
||||||
|
const response = await this.httpClient.request(
|
||||||
|
this.buildSendUrl(),
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
body: JSON.stringify(mappedRequest),
|
||||||
|
},
|
||||||
|
this.createRequestInterceptors(payload.tsp_token),
|
||||||
|
)
|
||||||
|
const providerResponse: NamaProviderSendItemResponseDto = await response.json()
|
||||||
|
this.logger.debug('NAMA provider response', providerResponse)
|
||||||
|
|
||||||
|
const result: TspProviderSendItemResultDto = {
|
||||||
|
invoice_id: payload.invoice_id,
|
||||||
|
request_payload: payload,
|
||||||
|
hasError: !response.ok,
|
||||||
|
message: providerResponse.message,
|
||||||
|
sent_at: new Date().toISOString(),
|
||||||
|
response_payload: providerResponse,
|
||||||
|
received_at: providerResponse.tsp_update_time,
|
||||||
|
tax_id: providerResponse.tax_id,
|
||||||
|
status: this.mapResponseStatus(
|
||||||
|
providerResponse.status as NamaProviderResponseStatus,
|
||||||
|
),
|
||||||
|
}
|
||||||
|
|
||||||
|
return result
|
||||||
|
} catch (err) {
|
||||||
|
this.logger.error('NAMA send failed', err)
|
||||||
|
const failure: TspProviderSendItemResultDto = {
|
||||||
|
invoice_id: payload.invoice_id,
|
||||||
|
request_payload: payload,
|
||||||
|
hasError: true,
|
||||||
|
message: (err as Error).message,
|
||||||
|
sent_at: new Date().toISOString(),
|
||||||
|
received_at: new Date().toISOString(),
|
||||||
|
tax_id: null,
|
||||||
|
status: TspProviderResponseStatus.NOT_SEND,
|
||||||
|
}
|
||||||
|
return failure
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async sendBulk(
|
||||||
|
payloads: TspProviderSendPayloadDto[],
|
||||||
|
): Promise<TspProviderBulkSendResultDto[]> {
|
||||||
|
const result: TspProviderBulkSendResultDto[] = []
|
||||||
|
for (const payload of payloads) {
|
||||||
|
const itemResults = await this.send(payload)
|
||||||
|
result.push({
|
||||||
|
invoice_id: payload.invoice_id,
|
||||||
|
items: [itemResults],
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
|
||||||
|
async get(invoiceId: string, tsp_token: string): Promise<TspProviderGetResultDto> {
|
||||||
|
try {
|
||||||
|
const response = await this.httpClient.request(
|
||||||
|
this.buildGetUrl(invoiceId),
|
||||||
|
{
|
||||||
|
method: 'GET',
|
||||||
|
},
|
||||||
|
this.createRequestInterceptors(tsp_token),
|
||||||
|
)
|
||||||
|
const providerResponse: NamaProviderGetResponseDto = await response.json()
|
||||||
|
this.logger.debug('NAMA provider response', providerResponse)
|
||||||
|
|
||||||
|
const result: TspProviderGetResultDto = {
|
||||||
|
hasError: !response.ok,
|
||||||
|
message: providerResponse.message,
|
||||||
|
response_payload: providerResponse,
|
||||||
|
sent_at: new Date().toISOString(),
|
||||||
|
received_at: providerResponse.tsp_update_time || new Date().toISOString(),
|
||||||
|
tax_id: providerResponse.tax_id,
|
||||||
|
status: this.mapResponseStatus(
|
||||||
|
providerResponse.status as NamaProviderResponseStatus,
|
||||||
|
),
|
||||||
|
}
|
||||||
|
|
||||||
|
return result
|
||||||
|
} catch (err) {
|
||||||
|
this.logger.error('NAMA send failed', err)
|
||||||
|
// const failure: TspProviderGetResultDto = {
|
||||||
|
// invoice_id: invoiceId,
|
||||||
|
// hasError: true,
|
||||||
|
// message: (err as Error).message,
|
||||||
|
// received_at: new Date().toISOString(),
|
||||||
|
// tax_id: null,
|
||||||
|
// status: TspProviderResponseStatus.NOT_SEND,
|
||||||
|
// }
|
||||||
|
// return failure
|
||||||
|
throw err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private mapResponseStatus(
|
||||||
|
status: NamaProviderResponseStatus,
|
||||||
|
): TspProviderResponseStatus {
|
||||||
|
switch (status.toUpperCase()) {
|
||||||
|
case NamaProviderResponseStatus.SUCCESS:
|
||||||
|
case NamaProviderResponseStatus.POSTED:
|
||||||
|
return TspProviderResponseStatus.SUCCESS
|
||||||
|
case NamaProviderResponseStatus.PENDING:
|
||||||
|
case NamaProviderResponseStatus.IN_PROGRESS:
|
||||||
|
return TspProviderResponseStatus.QUEUED
|
||||||
|
case NamaProviderResponseStatus.FAILED:
|
||||||
|
return TspProviderResponseStatus.FAILURE
|
||||||
|
default:
|
||||||
|
return TspProviderResponseStatus.QUEUED
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private mapToNamaRequestDto(
|
||||||
|
payload: TspProviderSendPayloadDto,
|
||||||
|
): NamaProviderRequestDto {
|
||||||
|
return {
|
||||||
|
uuid: payload.invoice_id,
|
||||||
|
economic_code: payload.economic_code,
|
||||||
|
fiscal_id: payload.fiscal_id,
|
||||||
|
payment: this.mapPayments(payload.payments),
|
||||||
|
header: {
|
||||||
|
ins: this.mapTspProviderRequestType(payload.type),
|
||||||
|
inp: this.mapInvoiceTemplate(payload.invoice_template),
|
||||||
|
inty: this.mapTspProviderCustomerType(payload.customer_type),
|
||||||
|
inno: payload.invoice_number.toString(),
|
||||||
|
tins: '',
|
||||||
|
indatim: payload.invoice_date.getTime() + '',
|
||||||
|
setm: '1',
|
||||||
|
...this.mapCustomerInfo(payload.customer),
|
||||||
|
},
|
||||||
|
body: payload.items.map(item => ({
|
||||||
|
sstid: item.sku,
|
||||||
|
vra: item.sku_vat,
|
||||||
|
// sstt: item.unit_type,
|
||||||
|
fee: String(item.unit_price),
|
||||||
|
dis: String(item.discount),
|
||||||
|
mu: item.measure_unit,
|
||||||
|
am: String(item.quantity),
|
||||||
|
consfee: '0',
|
||||||
|
bros: '0',
|
||||||
|
spro: '0',
|
||||||
|
})),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private mapTspProviderRequestType(type: TspProviderRequestType) {
|
||||||
|
switch (type) {
|
||||||
|
case TspProviderRequestType.MAIN:
|
||||||
|
return '1'
|
||||||
|
case TspProviderRequestType.UPDATE:
|
||||||
|
return '2'
|
||||||
|
case TspProviderRequestType.REVOKE:
|
||||||
|
return '3'
|
||||||
|
case TspProviderRequestType.REMOVE:
|
||||||
|
return '4'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private mapInvoiceTemplate(template: InvoiceTemplateType) {
|
||||||
|
switch (template) {
|
||||||
|
case InvoiceTemplateType.SALE:
|
||||||
|
return '1'
|
||||||
|
case InvoiceTemplateType.FX_SALE:
|
||||||
|
return '2'
|
||||||
|
case InvoiceTemplateType.GOLD_JEWELRY:
|
||||||
|
return '3'
|
||||||
|
case InvoiceTemplateType.CONTRACT:
|
||||||
|
return '4'
|
||||||
|
case InvoiceTemplateType.UTILITY:
|
||||||
|
return '5'
|
||||||
|
case InvoiceTemplateType.AIR_TICKET:
|
||||||
|
return '6'
|
||||||
|
case InvoiceTemplateType.EXPORT:
|
||||||
|
return '7'
|
||||||
|
case InvoiceTemplateType.BILL_OF_LADING:
|
||||||
|
return '8'
|
||||||
|
case InvoiceTemplateType.PETROCHEMICAL:
|
||||||
|
return '9'
|
||||||
|
case InvoiceTemplateType.COMMODITY_EXCHANGE:
|
||||||
|
return '11'
|
||||||
|
case InvoiceTemplateType.INSURANCE:
|
||||||
|
return '13'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private mapTspProviderCustomerType(type?: TspProviderCustomerType) {
|
||||||
|
switch (type) {
|
||||||
|
case TspProviderCustomerType.Unknown:
|
||||||
|
return '1'
|
||||||
|
case TspProviderCustomerType.Known:
|
||||||
|
return '2'
|
||||||
|
default:
|
||||||
|
return '3'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private mapCustomerType(type?: CustomerType) {
|
||||||
|
switch (type) {
|
||||||
|
case CustomerType.INDIVIDUAL:
|
||||||
|
return '1'
|
||||||
|
case CustomerType.LEGAL:
|
||||||
|
return '2'
|
||||||
|
default:
|
||||||
|
return '5'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private mapCustomerInfo(customer?: CustomerInfoDto) {
|
||||||
|
const info = {} as any
|
||||||
|
info.tob = this.mapCustomerType(customer?.type)
|
||||||
|
if (customer?.type === CustomerType.LEGAL && customer.legal_info) {
|
||||||
|
info.name = customer.legal_info.name
|
||||||
|
info.bid = customer.legal_info.economic_code
|
||||||
|
info.address = ''
|
||||||
|
} else if (customer?.type === CustomerType.INDIVIDUAL && customer.individual_info) {
|
||||||
|
info.name = `${customer.individual_info?.first_name || ''} ${
|
||||||
|
customer.individual_info?.last_name || ''
|
||||||
|
}`.trim()
|
||||||
|
info.bid = customer.individual_info.national_id
|
||||||
|
info.mobile = customer.individual_info.mobile_number
|
||||||
|
info.address = ''
|
||||||
|
}
|
||||||
|
return info
|
||||||
|
}
|
||||||
|
|
||||||
|
private mapPaymentMethod(method: PaymentMethodType): number {
|
||||||
|
switch (method) {
|
||||||
|
case PaymentMethodType.CHEQUE:
|
||||||
|
return 1
|
||||||
|
case PaymentMethodType.SET_OFF:
|
||||||
|
return 2
|
||||||
|
case PaymentMethodType.CASH:
|
||||||
|
return 3
|
||||||
|
case PaymentMethodType.TERMINAL:
|
||||||
|
return 4
|
||||||
|
case PaymentMethodType.PAYMENT_GATEWAY:
|
||||||
|
return 5
|
||||||
|
case PaymentMethodType.CARD:
|
||||||
|
return 6
|
||||||
|
case PaymentMethodType.BANK:
|
||||||
|
return 7
|
||||||
|
case PaymentMethodType.OTHER:
|
||||||
|
return 8
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private mapPayments(payments: PaymentInfoDto[]): NamaProviderPaymentInfoDto[] {
|
||||||
|
return payments.map(payment => ({
|
||||||
|
pmt: this.mapPaymentMethod(payment.payment_method),
|
||||||
|
pv: payment.amount,
|
||||||
|
trn: payment.tracking_code,
|
||||||
|
pcn: payment.card_number,
|
||||||
|
pdt: payment.paid_at ? String(payment.paid_at.getTime()) : undefined,
|
||||||
|
}))
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,261 @@
|
|||||||
|
import { TspProviderResponseStatus } from '@/generated/prisma/enums'
|
||||||
|
import { ApiProperty } from '@nestjs/swagger'
|
||||||
|
import { Type } from 'class-transformer'
|
||||||
|
import {
|
||||||
|
IsArray,
|
||||||
|
IsEnum,
|
||||||
|
IsNumber,
|
||||||
|
IsOptional,
|
||||||
|
IsString,
|
||||||
|
Min,
|
||||||
|
ValidateNested,
|
||||||
|
} from 'class-validator'
|
||||||
|
|
||||||
|
export enum NamaProviderResponseStatus {
|
||||||
|
POSTED = 'SUCCESS',
|
||||||
|
PENDING = 'PENDING',
|
||||||
|
IN_PROGRESS = 'IN_PROGRESS',
|
||||||
|
SUCCESS = 'SUCCESS',
|
||||||
|
FAILED = 'FAILED',
|
||||||
|
}
|
||||||
|
|
||||||
|
export class NamaProviderPaymentInfoDto {
|
||||||
|
@ApiProperty({ required: true, description: 'روش پرداخت' })
|
||||||
|
@IsNumber()
|
||||||
|
pmt: number
|
||||||
|
|
||||||
|
@ApiProperty({ required: true, description: 'مبلغ پرداختی' })
|
||||||
|
@IsNumber()
|
||||||
|
@Min(10_000)
|
||||||
|
pv: number
|
||||||
|
|
||||||
|
@ApiProperty({ required: false, description: 'شمارهی پیگیری' })
|
||||||
|
@IsOptional()
|
||||||
|
@IsString()
|
||||||
|
trn?: string
|
||||||
|
|
||||||
|
@ApiProperty({ required: false, description: 'شمارهی کارت پرداخت کنندهی صورتحساب' })
|
||||||
|
@IsOptional()
|
||||||
|
@IsString()
|
||||||
|
pcn?: string
|
||||||
|
|
||||||
|
@ApiProperty({ required: false, description: 'تاریخ و زمان پرداخت صورتحساب unix' })
|
||||||
|
@IsOptional()
|
||||||
|
@IsNumber()
|
||||||
|
pdt?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export class NamaProviderBodyItemDto {
|
||||||
|
@ApiProperty()
|
||||||
|
@IsString()
|
||||||
|
sstid: string
|
||||||
|
|
||||||
|
@ApiProperty()
|
||||||
|
@IsString()
|
||||||
|
vra: string
|
||||||
|
|
||||||
|
// @ApiProperty()
|
||||||
|
// @IsString()
|
||||||
|
// sstt: string
|
||||||
|
|
||||||
|
@ApiProperty()
|
||||||
|
@IsString()
|
||||||
|
fee: string
|
||||||
|
|
||||||
|
@ApiProperty()
|
||||||
|
@IsString()
|
||||||
|
dis: string
|
||||||
|
|
||||||
|
@ApiProperty()
|
||||||
|
@IsString()
|
||||||
|
mu: string
|
||||||
|
|
||||||
|
@ApiProperty()
|
||||||
|
@IsString()
|
||||||
|
am: string
|
||||||
|
|
||||||
|
@ApiProperty()
|
||||||
|
@IsString()
|
||||||
|
consfee: string
|
||||||
|
|
||||||
|
@ApiProperty()
|
||||||
|
@IsString()
|
||||||
|
bros: string
|
||||||
|
|
||||||
|
@ApiProperty()
|
||||||
|
@IsString()
|
||||||
|
spro: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export class NamaProviderHeaderDto {
|
||||||
|
@ApiProperty({ required: true })
|
||||||
|
@IsString()
|
||||||
|
ins: string
|
||||||
|
|
||||||
|
@ApiProperty()
|
||||||
|
@IsString()
|
||||||
|
inp: string
|
||||||
|
|
||||||
|
@ApiProperty({ required: true })
|
||||||
|
@IsString()
|
||||||
|
inty: string
|
||||||
|
|
||||||
|
// @ApiProperty({required: true})
|
||||||
|
// @IsString()
|
||||||
|
// unique_tax_code: string
|
||||||
|
|
||||||
|
@ApiProperty({ required: true })
|
||||||
|
@IsString()
|
||||||
|
inno: string
|
||||||
|
|
||||||
|
@ApiProperty({ required: true })
|
||||||
|
@IsString()
|
||||||
|
tins: string
|
||||||
|
|
||||||
|
@ApiProperty({ required: true })
|
||||||
|
@IsString()
|
||||||
|
indatim: string
|
||||||
|
|
||||||
|
@ApiProperty({ required: true })
|
||||||
|
@IsString()
|
||||||
|
name: string
|
||||||
|
|
||||||
|
@ApiProperty({ required: true })
|
||||||
|
@IsString()
|
||||||
|
tob: string
|
||||||
|
|
||||||
|
@ApiProperty()
|
||||||
|
@IsOptional()
|
||||||
|
@IsString()
|
||||||
|
address?: string
|
||||||
|
|
||||||
|
@ApiProperty()
|
||||||
|
@IsOptional()
|
||||||
|
@IsString()
|
||||||
|
mobile?: string
|
||||||
|
|
||||||
|
@ApiProperty()
|
||||||
|
@IsString()
|
||||||
|
bid: string
|
||||||
|
|
||||||
|
@ApiProperty({ required: true })
|
||||||
|
@IsString()
|
||||||
|
setm: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export class NamaProviderRequestDto {
|
||||||
|
@ApiProperty({ type: [NamaProviderBodyItemDto] })
|
||||||
|
@IsArray()
|
||||||
|
@ValidateNested({ each: true })
|
||||||
|
@Type(() => NamaProviderBodyItemDto)
|
||||||
|
body: NamaProviderBodyItemDto[]
|
||||||
|
|
||||||
|
@ApiProperty({ type: [NamaProviderPaymentInfoDto] })
|
||||||
|
@IsArray()
|
||||||
|
@ValidateNested({ each: true })
|
||||||
|
@Type(() => NamaProviderPaymentInfoDto)
|
||||||
|
payment: NamaProviderPaymentInfoDto[]
|
||||||
|
|
||||||
|
@ApiProperty({ type: NamaProviderHeaderDto })
|
||||||
|
@ValidateNested()
|
||||||
|
@Type(() => NamaProviderHeaderDto)
|
||||||
|
header: NamaProviderHeaderDto
|
||||||
|
|
||||||
|
@ApiProperty()
|
||||||
|
@IsString()
|
||||||
|
uuid: string
|
||||||
|
|
||||||
|
@ApiProperty()
|
||||||
|
@IsString()
|
||||||
|
economic_code: string
|
||||||
|
|
||||||
|
@ApiProperty()
|
||||||
|
@IsString()
|
||||||
|
fiscal_id: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export class NamaProviderApiErrorItemDto {
|
||||||
|
@ApiProperty()
|
||||||
|
@IsString()
|
||||||
|
code: string
|
||||||
|
|
||||||
|
@ApiProperty()
|
||||||
|
@IsString()
|
||||||
|
message: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export class NamaProviderApiErrorResponseDto {
|
||||||
|
@ApiProperty({ type: [NamaProviderApiErrorItemDto], required: false })
|
||||||
|
@IsOptional()
|
||||||
|
@IsArray()
|
||||||
|
@ValidateNested({ each: true })
|
||||||
|
@Type(() => NamaProviderApiErrorItemDto)
|
||||||
|
error?: NamaProviderApiErrorItemDto
|
||||||
|
}
|
||||||
|
|
||||||
|
export class NamaProviderSendItemResponseDto {
|
||||||
|
@ApiProperty()
|
||||||
|
@IsString()
|
||||||
|
uuid: string
|
||||||
|
|
||||||
|
@ApiProperty()
|
||||||
|
@IsString()
|
||||||
|
message: string
|
||||||
|
|
||||||
|
@ApiProperty()
|
||||||
|
@IsString()
|
||||||
|
status: NamaProviderResponseStatus
|
||||||
|
|
||||||
|
@ApiProperty()
|
||||||
|
@IsString()
|
||||||
|
tax_id: string
|
||||||
|
|
||||||
|
@ApiProperty()
|
||||||
|
@IsString()
|
||||||
|
inno: string
|
||||||
|
|
||||||
|
@ApiProperty({ required: true })
|
||||||
|
@IsString()
|
||||||
|
reference_number: string
|
||||||
|
|
||||||
|
@ApiProperty({ type: () => NamaProviderApiErrorResponseDto, required: false })
|
||||||
|
@IsOptional()
|
||||||
|
@ValidateNested()
|
||||||
|
@Type(() => NamaProviderApiErrorResponseDto)
|
||||||
|
tax_api_response?: NamaProviderApiErrorResponseDto
|
||||||
|
|
||||||
|
@ApiProperty({ required: false })
|
||||||
|
@IsOptional()
|
||||||
|
@IsString()
|
||||||
|
tsp_update_time: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export class NamaProviderGetResponseDto {
|
||||||
|
@ApiProperty()
|
||||||
|
@IsString()
|
||||||
|
uuid: string
|
||||||
|
|
||||||
|
@ApiProperty()
|
||||||
|
@IsString()
|
||||||
|
message: string
|
||||||
|
|
||||||
|
@ApiProperty({ enum: TspProviderResponseStatus })
|
||||||
|
@IsEnum(TspProviderResponseStatus)
|
||||||
|
status: TspProviderResponseStatus
|
||||||
|
|
||||||
|
@ApiProperty()
|
||||||
|
@IsString()
|
||||||
|
tax_id: string
|
||||||
|
|
||||||
|
@ApiProperty()
|
||||||
|
@IsString()
|
||||||
|
inno: string
|
||||||
|
|
||||||
|
@ApiProperty()
|
||||||
|
@IsString()
|
||||||
|
reference_number: string
|
||||||
|
|
||||||
|
@ApiProperty()
|
||||||
|
@IsString()
|
||||||
|
tsp_update_time: string
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user