feat(partners): add utility functions for partner business activity allocation limits and remaining licenses

- Implemented `getPartnerBusinessActivityAllocationLimits` to retrieve allocation limits for a partner's business activity.
- Added `ensurePartnerBusinessActivityHasRemainingAllocation` to validate remaining allocation credits.
- Created `getPartnerRemainingLicenses` to count remaining licenses for a partner.
- Developed `getPartnerFirstRemainingLicense` to fetch the first unused license for a partner.
- Introduced `ensurePartnerHasRemainingLicense` to ensure a partner has at least one unused license.
This commit is contained in:
2026-04-24 23:02:05 +03:30
parent 9b652a3603
commit 12506de863
43 changed files with 4645 additions and 2196 deletions
@@ -194,6 +194,7 @@ export type ConsumerAccountWhereInput = {
account?: Prisma.XOR<Prisma.AccountScalarRelationFilter, Prisma.AccountWhereInput>
pos?: Prisma.XOR<Prisma.PosNullableScalarRelationFilter, Prisma.PosWhereInput> | null
permission?: Prisma.XOR<Prisma.PermissionConsumerNullableScalarRelationFilter, Prisma.PermissionConsumerWhereInput> | null
account_allocation?: Prisma.XOR<Prisma.LicenseAccountAllocationNullableScalarRelationFilter, Prisma.LicenseAccountAllocationWhereInput> | null
sales_invoices?: Prisma.SalesInvoiceListRelationFilter
}
@@ -208,6 +209,7 @@ export type ConsumerAccountOrderByWithRelationInput = {
account?: Prisma.AccountOrderByWithRelationInput
pos?: Prisma.PosOrderByWithRelationInput
permission?: Prisma.PermissionConsumerOrderByWithRelationInput
account_allocation?: Prisma.LicenseAccountAllocationOrderByWithRelationInput
sales_invoices?: Prisma.SalesInvoiceOrderByRelationAggregateInput
_relevance?: Prisma.ConsumerAccountOrderByRelevanceInput
}
@@ -226,6 +228,7 @@ export type ConsumerAccountWhereUniqueInput = Prisma.AtLeast<{
account?: Prisma.XOR<Prisma.AccountScalarRelationFilter, Prisma.AccountWhereInput>
pos?: Prisma.XOR<Prisma.PosNullableScalarRelationFilter, Prisma.PosWhereInput> | null
permission?: Prisma.XOR<Prisma.PermissionConsumerNullableScalarRelationFilter, Prisma.PermissionConsumerWhereInput> | null
account_allocation?: Prisma.XOR<Prisma.LicenseAccountAllocationNullableScalarRelationFilter, Prisma.LicenseAccountAllocationWhereInput> | null
sales_invoices?: Prisma.SalesInvoiceListRelationFilter
}, "id" | "account_id">
@@ -262,6 +265,7 @@ export type ConsumerAccountCreateInput = {
account: Prisma.AccountCreateNestedOneWithoutConsumer_accountInput
pos?: Prisma.PosCreateNestedOneWithoutAccountInput
permission?: Prisma.PermissionConsumerCreateNestedOneWithoutConsumer_accountInput
account_allocation?: Prisma.LicenseAccountAllocationCreateNestedOneWithoutAccountInput
sales_invoices?: Prisma.SalesInvoiceCreateNestedManyWithoutConsumer_accountInput
}
@@ -274,6 +278,7 @@ export type ConsumerAccountUncheckedCreateInput = {
account_id: string
pos?: Prisma.PosUncheckedCreateNestedOneWithoutAccountInput
permission?: Prisma.PermissionConsumerUncheckedCreateNestedOneWithoutConsumer_accountInput
account_allocation?: Prisma.LicenseAccountAllocationUncheckedCreateNestedOneWithoutAccountInput
sales_invoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutConsumer_accountInput
}
@@ -286,6 +291,7 @@ export type ConsumerAccountUpdateInput = {
account?: Prisma.AccountUpdateOneRequiredWithoutConsumer_accountNestedInput
pos?: Prisma.PosUpdateOneWithoutAccountNestedInput
permission?: Prisma.PermissionConsumerUpdateOneWithoutConsumer_accountNestedInput
account_allocation?: Prisma.LicenseAccountAllocationUpdateOneWithoutAccountNestedInput
sales_invoices?: Prisma.SalesInvoiceUpdateManyWithoutConsumer_accountNestedInput
}
@@ -298,6 +304,7 @@ export type ConsumerAccountUncheckedUpdateInput = {
account_id?: Prisma.StringFieldUpdateOperationsInput | string
pos?: Prisma.PosUncheckedUpdateOneWithoutAccountNestedInput
permission?: Prisma.PermissionConsumerUncheckedUpdateOneWithoutConsumer_accountNestedInput
account_allocation?: Prisma.LicenseAccountAllocationUncheckedUpdateOneWithoutAccountNestedInput
sales_invoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutConsumer_accountNestedInput
}
@@ -473,6 +480,22 @@ export type ConsumerAccountUpdateOneWithoutPosNestedInput = {
update?: Prisma.XOR<Prisma.XOR<Prisma.ConsumerAccountUpdateToOneWithWhereWithoutPosInput, Prisma.ConsumerAccountUpdateWithoutPosInput>, Prisma.ConsumerAccountUncheckedUpdateWithoutPosInput>
}
export type ConsumerAccountCreateNestedOneWithoutAccount_allocationInput = {
create?: Prisma.XOR<Prisma.ConsumerAccountCreateWithoutAccount_allocationInput, Prisma.ConsumerAccountUncheckedCreateWithoutAccount_allocationInput>
connectOrCreate?: Prisma.ConsumerAccountCreateOrConnectWithoutAccount_allocationInput
connect?: Prisma.ConsumerAccountWhereUniqueInput
}
export type ConsumerAccountUpdateOneWithoutAccount_allocationNestedInput = {
create?: Prisma.XOR<Prisma.ConsumerAccountCreateWithoutAccount_allocationInput, Prisma.ConsumerAccountUncheckedCreateWithoutAccount_allocationInput>
connectOrCreate?: Prisma.ConsumerAccountCreateOrConnectWithoutAccount_allocationInput
upsert?: Prisma.ConsumerAccountUpsertWithoutAccount_allocationInput
disconnect?: Prisma.ConsumerAccountWhereInput | boolean
delete?: Prisma.ConsumerAccountWhereInput | boolean
connect?: Prisma.ConsumerAccountWhereUniqueInput
update?: Prisma.XOR<Prisma.XOR<Prisma.ConsumerAccountUpdateToOneWithWhereWithoutAccount_allocationInput, Prisma.ConsumerAccountUpdateWithoutAccount_allocationInput>, Prisma.ConsumerAccountUncheckedUpdateWithoutAccount_allocationInput>
}
export type ConsumerAccountCreateNestedOneWithoutPermissionInput = {
create?: Prisma.XOR<Prisma.ConsumerAccountCreateWithoutPermissionInput, Prisma.ConsumerAccountUncheckedCreateWithoutPermissionInput>
connectOrCreate?: Prisma.ConsumerAccountCreateOrConnectWithoutPermissionInput
@@ -509,6 +532,7 @@ export type ConsumerAccountCreateWithoutAccountInput = {
consumer: Prisma.ConsumerCreateNestedOneWithoutConsumer_accountsInput
pos?: Prisma.PosCreateNestedOneWithoutAccountInput
permission?: Prisma.PermissionConsumerCreateNestedOneWithoutConsumer_accountInput
account_allocation?: Prisma.LicenseAccountAllocationCreateNestedOneWithoutAccountInput
sales_invoices?: Prisma.SalesInvoiceCreateNestedManyWithoutConsumer_accountInput
}
@@ -520,6 +544,7 @@ export type ConsumerAccountUncheckedCreateWithoutAccountInput = {
consumer_id: string
pos?: Prisma.PosUncheckedCreateNestedOneWithoutAccountInput
permission?: Prisma.PermissionConsumerUncheckedCreateNestedOneWithoutConsumer_accountInput
account_allocation?: Prisma.LicenseAccountAllocationUncheckedCreateNestedOneWithoutAccountInput
sales_invoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutConsumer_accountInput
}
@@ -547,6 +572,7 @@ export type ConsumerAccountUpdateWithoutAccountInput = {
consumer?: Prisma.ConsumerUpdateOneRequiredWithoutConsumer_accountsNestedInput
pos?: Prisma.PosUpdateOneWithoutAccountNestedInput
permission?: Prisma.PermissionConsumerUpdateOneWithoutConsumer_accountNestedInput
account_allocation?: Prisma.LicenseAccountAllocationUpdateOneWithoutAccountNestedInput
sales_invoices?: Prisma.SalesInvoiceUpdateManyWithoutConsumer_accountNestedInput
}
@@ -558,6 +584,7 @@ export type ConsumerAccountUncheckedUpdateWithoutAccountInput = {
consumer_id?: Prisma.StringFieldUpdateOperationsInput | string
pos?: Prisma.PosUncheckedUpdateOneWithoutAccountNestedInput
permission?: Prisma.PermissionConsumerUncheckedUpdateOneWithoutConsumer_accountNestedInput
account_allocation?: Prisma.LicenseAccountAllocationUncheckedUpdateOneWithoutAccountNestedInput
sales_invoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutConsumer_accountNestedInput
}
@@ -569,6 +596,7 @@ export type ConsumerAccountCreateWithoutConsumerInput = {
account: Prisma.AccountCreateNestedOneWithoutConsumer_accountInput
pos?: Prisma.PosCreateNestedOneWithoutAccountInput
permission?: Prisma.PermissionConsumerCreateNestedOneWithoutConsumer_accountInput
account_allocation?: Prisma.LicenseAccountAllocationCreateNestedOneWithoutAccountInput
sales_invoices?: Prisma.SalesInvoiceCreateNestedManyWithoutConsumer_accountInput
}
@@ -580,6 +608,7 @@ export type ConsumerAccountUncheckedCreateWithoutConsumerInput = {
account_id: string
pos?: Prisma.PosUncheckedCreateNestedOneWithoutAccountInput
permission?: Prisma.PermissionConsumerUncheckedCreateNestedOneWithoutConsumer_accountInput
account_allocation?: Prisma.LicenseAccountAllocationUncheckedCreateNestedOneWithoutAccountInput
sales_invoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutConsumer_accountInput
}
@@ -629,6 +658,7 @@ export type ConsumerAccountCreateWithoutPosInput = {
consumer: Prisma.ConsumerCreateNestedOneWithoutConsumer_accountsInput
account: Prisma.AccountCreateNestedOneWithoutConsumer_accountInput
permission?: Prisma.PermissionConsumerCreateNestedOneWithoutConsumer_accountInput
account_allocation?: Prisma.LicenseAccountAllocationCreateNestedOneWithoutAccountInput
sales_invoices?: Prisma.SalesInvoiceCreateNestedManyWithoutConsumer_accountInput
}
@@ -640,6 +670,7 @@ export type ConsumerAccountUncheckedCreateWithoutPosInput = {
consumer_id: string
account_id: string
permission?: Prisma.PermissionConsumerUncheckedCreateNestedOneWithoutConsumer_accountInput
account_allocation?: Prisma.LicenseAccountAllocationUncheckedCreateNestedOneWithoutAccountInput
sales_invoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutConsumer_accountInput
}
@@ -667,6 +698,7 @@ export type ConsumerAccountUpdateWithoutPosInput = {
consumer?: Prisma.ConsumerUpdateOneRequiredWithoutConsumer_accountsNestedInput
account?: Prisma.AccountUpdateOneRequiredWithoutConsumer_accountNestedInput
permission?: Prisma.PermissionConsumerUpdateOneWithoutConsumer_accountNestedInput
account_allocation?: Prisma.LicenseAccountAllocationUpdateOneWithoutAccountNestedInput
sales_invoices?: Prisma.SalesInvoiceUpdateManyWithoutConsumer_accountNestedInput
}
@@ -678,6 +710,71 @@ export type ConsumerAccountUncheckedUpdateWithoutPosInput = {
consumer_id?: Prisma.StringFieldUpdateOperationsInput | string
account_id?: Prisma.StringFieldUpdateOperationsInput | string
permission?: Prisma.PermissionConsumerUncheckedUpdateOneWithoutConsumer_accountNestedInput
account_allocation?: Prisma.LicenseAccountAllocationUncheckedUpdateOneWithoutAccountNestedInput
sales_invoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutConsumer_accountNestedInput
}
export type ConsumerAccountCreateWithoutAccount_allocationInput = {
id?: string
role: $Enums.ConsumerRole
created_at?: Date | string
updated_at?: Date | string
consumer: Prisma.ConsumerCreateNestedOneWithoutConsumer_accountsInput
account: Prisma.AccountCreateNestedOneWithoutConsumer_accountInput
pos?: Prisma.PosCreateNestedOneWithoutAccountInput
permission?: Prisma.PermissionConsumerCreateNestedOneWithoutConsumer_accountInput
sales_invoices?: Prisma.SalesInvoiceCreateNestedManyWithoutConsumer_accountInput
}
export type ConsumerAccountUncheckedCreateWithoutAccount_allocationInput = {
id?: string
role: $Enums.ConsumerRole
created_at?: Date | string
updated_at?: Date | string
consumer_id: string
account_id: string
pos?: Prisma.PosUncheckedCreateNestedOneWithoutAccountInput
permission?: Prisma.PermissionConsumerUncheckedCreateNestedOneWithoutConsumer_accountInput
sales_invoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutConsumer_accountInput
}
export type ConsumerAccountCreateOrConnectWithoutAccount_allocationInput = {
where: Prisma.ConsumerAccountWhereUniqueInput
create: Prisma.XOR<Prisma.ConsumerAccountCreateWithoutAccount_allocationInput, Prisma.ConsumerAccountUncheckedCreateWithoutAccount_allocationInput>
}
export type ConsumerAccountUpsertWithoutAccount_allocationInput = {
update: Prisma.XOR<Prisma.ConsumerAccountUpdateWithoutAccount_allocationInput, Prisma.ConsumerAccountUncheckedUpdateWithoutAccount_allocationInput>
create: Prisma.XOR<Prisma.ConsumerAccountCreateWithoutAccount_allocationInput, Prisma.ConsumerAccountUncheckedCreateWithoutAccount_allocationInput>
where?: Prisma.ConsumerAccountWhereInput
}
export type ConsumerAccountUpdateToOneWithWhereWithoutAccount_allocationInput = {
where?: Prisma.ConsumerAccountWhereInput
data: Prisma.XOR<Prisma.ConsumerAccountUpdateWithoutAccount_allocationInput, Prisma.ConsumerAccountUncheckedUpdateWithoutAccount_allocationInput>
}
export type ConsumerAccountUpdateWithoutAccount_allocationInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
role?: Prisma.EnumConsumerRoleFieldUpdateOperationsInput | $Enums.ConsumerRole
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
consumer?: Prisma.ConsumerUpdateOneRequiredWithoutConsumer_accountsNestedInput
account?: Prisma.AccountUpdateOneRequiredWithoutConsumer_accountNestedInput
pos?: Prisma.PosUpdateOneWithoutAccountNestedInput
permission?: Prisma.PermissionConsumerUpdateOneWithoutConsumer_accountNestedInput
sales_invoices?: Prisma.SalesInvoiceUpdateManyWithoutConsumer_accountNestedInput
}
export type ConsumerAccountUncheckedUpdateWithoutAccount_allocationInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
role?: Prisma.EnumConsumerRoleFieldUpdateOperationsInput | $Enums.ConsumerRole
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
consumer_id?: Prisma.StringFieldUpdateOperationsInput | string
account_id?: Prisma.StringFieldUpdateOperationsInput | string
pos?: Prisma.PosUncheckedUpdateOneWithoutAccountNestedInput
permission?: Prisma.PermissionConsumerUncheckedUpdateOneWithoutConsumer_accountNestedInput
sales_invoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutConsumer_accountNestedInput
}
@@ -689,6 +786,7 @@ export type ConsumerAccountCreateWithoutPermissionInput = {
consumer: Prisma.ConsumerCreateNestedOneWithoutConsumer_accountsInput
account: Prisma.AccountCreateNestedOneWithoutConsumer_accountInput
pos?: Prisma.PosCreateNestedOneWithoutAccountInput
account_allocation?: Prisma.LicenseAccountAllocationCreateNestedOneWithoutAccountInput
sales_invoices?: Prisma.SalesInvoiceCreateNestedManyWithoutConsumer_accountInput
}
@@ -700,6 +798,7 @@ export type ConsumerAccountUncheckedCreateWithoutPermissionInput = {
consumer_id: string
account_id: string
pos?: Prisma.PosUncheckedCreateNestedOneWithoutAccountInput
account_allocation?: Prisma.LicenseAccountAllocationUncheckedCreateNestedOneWithoutAccountInput
sales_invoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutConsumer_accountInput
}
@@ -727,6 +826,7 @@ export type ConsumerAccountUpdateWithoutPermissionInput = {
consumer?: Prisma.ConsumerUpdateOneRequiredWithoutConsumer_accountsNestedInput
account?: Prisma.AccountUpdateOneRequiredWithoutConsumer_accountNestedInput
pos?: Prisma.PosUpdateOneWithoutAccountNestedInput
account_allocation?: Prisma.LicenseAccountAllocationUpdateOneWithoutAccountNestedInput
sales_invoices?: Prisma.SalesInvoiceUpdateManyWithoutConsumer_accountNestedInput
}
@@ -738,6 +838,7 @@ export type ConsumerAccountUncheckedUpdateWithoutPermissionInput = {
consumer_id?: Prisma.StringFieldUpdateOperationsInput | string
account_id?: Prisma.StringFieldUpdateOperationsInput | string
pos?: Prisma.PosUncheckedUpdateOneWithoutAccountNestedInput
account_allocation?: Prisma.LicenseAccountAllocationUncheckedUpdateOneWithoutAccountNestedInput
sales_invoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutConsumer_accountNestedInput
}
@@ -750,6 +851,7 @@ export type ConsumerAccountCreateWithoutSales_invoicesInput = {
account: Prisma.AccountCreateNestedOneWithoutConsumer_accountInput
pos?: Prisma.PosCreateNestedOneWithoutAccountInput
permission?: Prisma.PermissionConsumerCreateNestedOneWithoutConsumer_accountInput
account_allocation?: Prisma.LicenseAccountAllocationCreateNestedOneWithoutAccountInput
}
export type ConsumerAccountUncheckedCreateWithoutSales_invoicesInput = {
@@ -761,6 +863,7 @@ export type ConsumerAccountUncheckedCreateWithoutSales_invoicesInput = {
account_id: string
pos?: Prisma.PosUncheckedCreateNestedOneWithoutAccountInput
permission?: Prisma.PermissionConsumerUncheckedCreateNestedOneWithoutConsumer_accountInput
account_allocation?: Prisma.LicenseAccountAllocationUncheckedCreateNestedOneWithoutAccountInput
}
export type ConsumerAccountCreateOrConnectWithoutSales_invoicesInput = {
@@ -788,6 +891,7 @@ export type ConsumerAccountUpdateWithoutSales_invoicesInput = {
account?: Prisma.AccountUpdateOneRequiredWithoutConsumer_accountNestedInput
pos?: Prisma.PosUpdateOneWithoutAccountNestedInput
permission?: Prisma.PermissionConsumerUpdateOneWithoutConsumer_accountNestedInput
account_allocation?: Prisma.LicenseAccountAllocationUpdateOneWithoutAccountNestedInput
}
export type ConsumerAccountUncheckedUpdateWithoutSales_invoicesInput = {
@@ -799,6 +903,7 @@ export type ConsumerAccountUncheckedUpdateWithoutSales_invoicesInput = {
account_id?: Prisma.StringFieldUpdateOperationsInput | string
pos?: Prisma.PosUncheckedUpdateOneWithoutAccountNestedInput
permission?: Prisma.PermissionConsumerUncheckedUpdateOneWithoutConsumer_accountNestedInput
account_allocation?: Prisma.LicenseAccountAllocationUncheckedUpdateOneWithoutAccountNestedInput
}
export type ConsumerAccountCreateManyConsumerInput = {
@@ -817,6 +922,7 @@ export type ConsumerAccountUpdateWithoutConsumerInput = {
account?: Prisma.AccountUpdateOneRequiredWithoutConsumer_accountNestedInput
pos?: Prisma.PosUpdateOneWithoutAccountNestedInput
permission?: Prisma.PermissionConsumerUpdateOneWithoutConsumer_accountNestedInput
account_allocation?: Prisma.LicenseAccountAllocationUpdateOneWithoutAccountNestedInput
sales_invoices?: Prisma.SalesInvoiceUpdateManyWithoutConsumer_accountNestedInput
}
@@ -828,6 +934,7 @@ export type ConsumerAccountUncheckedUpdateWithoutConsumerInput = {
account_id?: Prisma.StringFieldUpdateOperationsInput | string
pos?: Prisma.PosUncheckedUpdateOneWithoutAccountNestedInput
permission?: Prisma.PermissionConsumerUncheckedUpdateOneWithoutConsumer_accountNestedInput
account_allocation?: Prisma.LicenseAccountAllocationUncheckedUpdateOneWithoutAccountNestedInput
sales_invoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutConsumer_accountNestedInput
}
@@ -881,6 +988,7 @@ export type ConsumerAccountSelect<ExtArgs extends runtime.Types.Extensions.Inter
account?: boolean | Prisma.AccountDefaultArgs<ExtArgs>
pos?: boolean | Prisma.ConsumerAccount$posArgs<ExtArgs>
permission?: boolean | Prisma.ConsumerAccount$permissionArgs<ExtArgs>
account_allocation?: boolean | Prisma.ConsumerAccount$account_allocationArgs<ExtArgs>
sales_invoices?: boolean | Prisma.ConsumerAccount$sales_invoicesArgs<ExtArgs>
_count?: boolean | Prisma.ConsumerAccountCountOutputTypeDefaultArgs<ExtArgs>
}, ExtArgs["result"]["consumerAccount"]>
@@ -902,6 +1010,7 @@ export type ConsumerAccountInclude<ExtArgs extends runtime.Types.Extensions.Inte
account?: boolean | Prisma.AccountDefaultArgs<ExtArgs>
pos?: boolean | Prisma.ConsumerAccount$posArgs<ExtArgs>
permission?: boolean | Prisma.ConsumerAccount$permissionArgs<ExtArgs>
account_allocation?: boolean | Prisma.ConsumerAccount$account_allocationArgs<ExtArgs>
sales_invoices?: boolean | Prisma.ConsumerAccount$sales_invoicesArgs<ExtArgs>
_count?: boolean | Prisma.ConsumerAccountCountOutputTypeDefaultArgs<ExtArgs>
}
@@ -913,6 +1022,7 @@ export type $ConsumerAccountPayload<ExtArgs extends runtime.Types.Extensions.Int
account: Prisma.$AccountPayload<ExtArgs>
pos: Prisma.$PosPayload<ExtArgs> | null
permission: Prisma.$PermissionConsumerPayload<ExtArgs> | null
account_allocation: Prisma.$LicenseAccountAllocationPayload<ExtArgs> | null
sales_invoices: Prisma.$SalesInvoicePayload<ExtArgs>[]
}
scalars: runtime.Types.Extensions.GetPayloadResult<{
@@ -1266,6 +1376,7 @@ export interface Prisma__ConsumerAccountClient<T, Null = never, ExtArgs extends
account<T extends Prisma.AccountDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.AccountDefaultArgs<ExtArgs>>): Prisma.Prisma__AccountClient<runtime.Types.Result.GetResult<Prisma.$AccountPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
pos<T extends Prisma.ConsumerAccount$posArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ConsumerAccount$posArgs<ExtArgs>>): Prisma.Prisma__PosClient<runtime.Types.Result.GetResult<Prisma.$PosPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
permission<T extends Prisma.ConsumerAccount$permissionArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ConsumerAccount$permissionArgs<ExtArgs>>): Prisma.Prisma__PermissionConsumerClient<runtime.Types.Result.GetResult<Prisma.$PermissionConsumerPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
account_allocation<T extends Prisma.ConsumerAccount$account_allocationArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ConsumerAccount$account_allocationArgs<ExtArgs>>): Prisma.Prisma__LicenseAccountAllocationClient<runtime.Types.Result.GetResult<Prisma.$LicenseAccountAllocationPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
sales_invoices<T extends Prisma.ConsumerAccount$sales_invoicesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ConsumerAccount$sales_invoicesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SalesInvoicePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
/**
* Attaches callbacks for the resolution and/or rejection of the Promise.
@@ -1687,6 +1798,25 @@ export type ConsumerAccount$permissionArgs<ExtArgs extends runtime.Types.Extensi
where?: Prisma.PermissionConsumerWhereInput
}
/**
* ConsumerAccount.account_allocation
*/
export type ConsumerAccount$account_allocationArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the LicenseAccountAllocation
*/
select?: Prisma.LicenseAccountAllocationSelect<ExtArgs> | null
/**
* Omit specific fields from the LicenseAccountAllocation
*/
omit?: Prisma.LicenseAccountAllocationOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.LicenseAccountAllocationInclude<ExtArgs> | null
where?: Prisma.LicenseAccountAllocationWhereInput
}
/**
* ConsumerAccount.sales_invoices
*/