From 3edc934f9499aa8ad73b5eaab76032c0d57ab4d5 Mon Sep 17 00:00:00 2001 From: Dustin Do Date: Thu, 6 Jun 2024 14:22:12 +0700 Subject: [PATCH] feat(api): add prisma schema --- apps/api/prisma/generated/zod/index.ts | 6842 ++++++++++++++++- .../migration.sql | 183 + apps/api/prisma/schema.prisma | 164 +- 3 files changed, 6970 insertions(+), 219 deletions(-) create mode 100644 apps/api/prisma/migrations/20240606080412_add_full_schemas/migration.sql diff --git a/apps/api/prisma/generated/zod/index.ts b/apps/api/prisma/generated/zod/index.ts index e7c61f26..c336a268 100644 --- a/apps/api/prisma/generated/zod/index.ts +++ b/apps/api/prisma/generated/zod/index.ts @@ -1,10 +1,31 @@ import { z } from 'zod'; -import type { Prisma } from '@prisma/client'; +import { Prisma } from '@prisma/client'; ///////////////////////////////////////// // HELPER FUNCTIONS ///////////////////////////////////////// +// DECIMAL +//------------------------------------------------------ + +export const DecimalJsLikeSchema: z.ZodType = z.object({ + d: z.array(z.number()), + e: z.number(), + s: z.number(), + toFixed: z.function(z.tuple([]), z.string()), +}) + +export const DECIMAL_STRING_REGEX = /^(?:-?Infinity|NaN|-?(?:0[bB][01]+(?:\.[01]+)?(?:[pP][-+]?\d+)?|0[oO][0-7]+(?:\.[0-7]+)?(?:[pP][-+]?\d+)?|0[xX][\da-fA-F]+(?:\.[\da-fA-F]+)?(?:[pP][-+]?\d+)?|(?:\d+|\d*\.\d+)(?:[eE][-+]?\d+)?))$/; + +export const isValidDecimalInput = + (v?: null | string | number | Prisma.DecimalJsLike): v is string | number | Prisma.DecimalJsLike => { + if (v === undefined || v === null) return false; + return ( + (typeof v === 'object' && 'd' in v && 'e' in v && 's' in v && 'toFixed' in v) || + (typeof v === 'string' && DECIMAL_STRING_REGEX.test(v)) || + typeof v === 'number' + ) + }; ///////////////////////////////////////// // ENUMS @@ -12,13 +33,42 @@ import type { Prisma } from '@prisma/client'; export const TransactionIsolationLevelSchema = z.enum(['ReadUncommitted','ReadCommitted','RepeatableRead','Serializable']); -export const UserScalarFieldEnumSchema = z.enum(['id','email','name']); +export const UserScalarFieldEnumSchema = z.enum(['id','createdAt','updatedAt','email','name']); + +export const UserWalletAccountScalarFieldEnumSchema = z.enum(['id','createdAt','updatedAt','name','icon','description','lastDigits','preferredCurrency','userId']); + +export const BudgetScalarFieldEnumSchema = z.enum(['id','createdAt','updatedAt','name','description','preferredCurrency','type']); + +export const BudgetPeriodConfigScalarFieldEnumSchema = z.enum(['id','createdAt','updatedAt','type','amount','currency','startDate','endDate','budgetId']); + +export const BudgetUserScalarFieldEnumSchema = z.enum(['id','createdAt','updatedAt','permission','userId','budgetId']); + +export const BudgetUserInvitationScalarFieldEnumSchema = z.enum(['id','createdAt','updatedAt','email','token','expiresAt','permission','createdByUserId','budgetId']); + +export const BudgetUserInvitationResponseScalarFieldEnumSchema = z.enum(['id','createdAt','updatedAt','acceptedAt','declinedAt','invitationId','createdUserId']); + +export const TransactionScalarFieldEnumSchema = z.enum(['id','createdAt','updatedAt','amount','currency','date','note','categoryId','budgetId','walletAccountId','createdByUserId']); + +export const CategoryScalarFieldEnumSchema = z.enum(['id','createdAt','updatedAt','name','description','icon','color','parentId']); export const SortOrderSchema = z.enum(['asc','desc']); export const QueryModeSchema = z.enum(['default','insensitive']); export const NullsOrderSchema = z.enum(['first','last']); + +export const BudgetTypeSchema = z.enum(['SPENDING','SAVING','INVESTING','DEBT']); + +export type BudgetTypeType = `${z.infer}` + +export const BudgetPeriodTypeSchema = z.enum(['MONTHLY','QUARTERLY','YEARLY','CUSTOM']); + +export type BudgetPeriodTypeType = `${z.infer}` + +export const BudgetUserPermissionSchema = z.enum(['OWNER','MEMBER']); + +export type BudgetUserPermissionType = `${z.infer}` + ///////////////////////////////////////// // MODELS ///////////////////////////////////////// @@ -29,12 +79,303 @@ export const NullsOrderSchema = z.enum(['first','last']); export const UserSchema = z.object({ id: z.string().cuid(), + createdAt: z.coerce.date(), + updatedAt: z.coerce.date(), email: z.string(), name: z.string().nullable(), }) export type User = z.infer +// USER RELATION SCHEMA +//------------------------------------------------------ + +export type UserRelations = { + walletAccounts: UserWalletAccountWithRelations[]; + budgetUsers: BudgetUserWithRelations[]; + transactions: TransactionWithRelations[]; + createdBudgetUserInvitations: BudgetUserInvitationWithRelations[]; + createdFromInvitation?: BudgetUserInvitationResponseWithRelations | null; +}; + +export type UserWithRelations = z.infer & UserRelations + +export const UserWithRelationsSchema: z.ZodType = UserSchema.merge(z.object({ + walletAccounts: z.lazy(() => UserWalletAccountWithRelationsSchema).array(), + budgetUsers: z.lazy(() => BudgetUserWithRelationsSchema).array(), + transactions: z.lazy(() => TransactionWithRelationsSchema).array(), + createdBudgetUserInvitations: z.lazy(() => BudgetUserInvitationWithRelationsSchema).array(), + createdFromInvitation: z.lazy(() => BudgetUserInvitationResponseWithRelationsSchema).nullable(), +})) + +///////////////////////////////////////// +// USER WALLET ACCOUNT SCHEMA +///////////////////////////////////////// + +export const UserWalletAccountSchema = z.object({ + id: z.string().cuid(), + createdAt: z.coerce.date(), + updatedAt: z.coerce.date(), + name: z.string(), + icon: z.string().nullable(), + description: z.string().nullable(), + lastDigits: z.string().nullable(), + preferredCurrency: z.string(), + userId: z.string(), +}) + +export type UserWalletAccount = z.infer + +// USER WALLET ACCOUNT RELATION SCHEMA +//------------------------------------------------------ + +export type UserWalletAccountRelations = { + user: UserWithRelations; + transactions: TransactionWithRelations[]; +}; + +export type UserWalletAccountWithRelations = z.infer & UserWalletAccountRelations + +export const UserWalletAccountWithRelationsSchema: z.ZodType = UserWalletAccountSchema.merge(z.object({ + user: z.lazy(() => UserWithRelationsSchema), + transactions: z.lazy(() => TransactionWithRelationsSchema).array(), +})) + +///////////////////////////////////////// +// BUDGET SCHEMA +///////////////////////////////////////// + +export const BudgetSchema = z.object({ + type: BudgetTypeSchema, + id: z.string().cuid(), + createdAt: z.coerce.date(), + updatedAt: z.coerce.date(), + name: z.string(), + description: z.string().nullable(), + preferredCurrency: z.string(), +}) + +export type Budget = z.infer + +// BUDGET RELATION SCHEMA +//------------------------------------------------------ + +export type BudgetRelations = { + periodConfig?: BudgetPeriodConfigWithRelations | null; + budgetUsers: BudgetUserWithRelations[]; + transactions: TransactionWithRelations[]; + invitations: BudgetUserInvitationWithRelations[]; +}; + +export type BudgetWithRelations = z.infer & BudgetRelations + +export const BudgetWithRelationsSchema: z.ZodType = BudgetSchema.merge(z.object({ + periodConfig: z.lazy(() => BudgetPeriodConfigWithRelationsSchema).nullable(), + budgetUsers: z.lazy(() => BudgetUserWithRelationsSchema).array(), + transactions: z.lazy(() => TransactionWithRelationsSchema).array(), + invitations: z.lazy(() => BudgetUserInvitationWithRelationsSchema).array(), +})) + +///////////////////////////////////////// +// BUDGET PERIOD CONFIG SCHEMA +///////////////////////////////////////// + +export const BudgetPeriodConfigSchema = z.object({ + type: BudgetPeriodTypeSchema, + id: z.string().cuid(), + createdAt: z.coerce.date(), + updatedAt: z.coerce.date(), + amount: z.instanceof(Prisma.Decimal, { message: "Field 'amount' must be a Decimal. Location: ['Models', 'BudgetPeriodConfig']"}), + currency: z.string(), + startDate: z.coerce.date().nullable(), + endDate: z.coerce.date().nullable(), + budgetId: z.string(), +}) + +export type BudgetPeriodConfig = z.infer + +// BUDGET PERIOD CONFIG RELATION SCHEMA +//------------------------------------------------------ + +export type BudgetPeriodConfigRelations = { + budget: BudgetWithRelations; +}; + +export type BudgetPeriodConfigWithRelations = z.infer & BudgetPeriodConfigRelations + +export const BudgetPeriodConfigWithRelationsSchema: z.ZodType = BudgetPeriodConfigSchema.merge(z.object({ + budget: z.lazy(() => BudgetWithRelationsSchema), +})) + +///////////////////////////////////////// +// BUDGET USER SCHEMA +///////////////////////////////////////// + +export const BudgetUserSchema = z.object({ + permission: BudgetUserPermissionSchema, + id: z.string().cuid(), + createdAt: z.coerce.date(), + updatedAt: z.coerce.date(), + userId: z.string(), + budgetId: z.string(), +}) + +export type BudgetUser = z.infer + +// BUDGET USER RELATION SCHEMA +//------------------------------------------------------ + +export type BudgetUserRelations = { + user: UserWithRelations; + budget: BudgetWithRelations; +}; + +export type BudgetUserWithRelations = z.infer & BudgetUserRelations + +export const BudgetUserWithRelationsSchema: z.ZodType = BudgetUserSchema.merge(z.object({ + user: z.lazy(() => UserWithRelationsSchema), + budget: z.lazy(() => BudgetWithRelationsSchema), +})) + +///////////////////////////////////////// +// BUDGET USER INVITATION SCHEMA +///////////////////////////////////////// + +export const BudgetUserInvitationSchema = z.object({ + permission: BudgetUserPermissionSchema.nullable(), + id: z.string().cuid(), + createdAt: z.coerce.date(), + updatedAt: z.coerce.date(), + email: z.string().nullable(), + token: z.string().uuid(), + expiresAt: z.coerce.date(), + createdByUserId: z.string(), + budgetId: z.string(), +}) + +export type BudgetUserInvitation = z.infer + +// BUDGET USER INVITATION RELATION SCHEMA +//------------------------------------------------------ + +export type BudgetUserInvitationRelations = { + createdByUser: UserWithRelations; + budget: BudgetWithRelations; + responses: BudgetUserInvitationResponseWithRelations[]; +}; + +export type BudgetUserInvitationWithRelations = z.infer & BudgetUserInvitationRelations + +export const BudgetUserInvitationWithRelationsSchema: z.ZodType = BudgetUserInvitationSchema.merge(z.object({ + createdByUser: z.lazy(() => UserWithRelationsSchema), + budget: z.lazy(() => BudgetWithRelationsSchema), + responses: z.lazy(() => BudgetUserInvitationResponseWithRelationsSchema).array(), +})) + +///////////////////////////////////////// +// BUDGET USER INVITATION RESPONSE SCHEMA +///////////////////////////////////////// + +export const BudgetUserInvitationResponseSchema = z.object({ + id: z.string().cuid(), + createdAt: z.coerce.date(), + updatedAt: z.coerce.date(), + acceptedAt: z.coerce.date().nullable(), + declinedAt: z.coerce.date().nullable(), + invitationId: z.string(), + createdUserId: z.string().nullable(), +}) + +export type BudgetUserInvitationResponse = z.infer + +// BUDGET USER INVITATION RESPONSE RELATION SCHEMA +//------------------------------------------------------ + +export type BudgetUserInvitationResponseRelations = { + invitation: BudgetUserInvitationWithRelations; + createdUser?: UserWithRelations | null; +}; + +export type BudgetUserInvitationResponseWithRelations = z.infer & BudgetUserInvitationResponseRelations + +export const BudgetUserInvitationResponseWithRelationsSchema: z.ZodType = BudgetUserInvitationResponseSchema.merge(z.object({ + invitation: z.lazy(() => BudgetUserInvitationWithRelationsSchema), + createdUser: z.lazy(() => UserWithRelationsSchema).nullable(), +})) + +///////////////////////////////////////// +// TRANSACTION SCHEMA +///////////////////////////////////////// + +export const TransactionSchema = z.object({ + id: z.string().cuid(), + createdAt: z.coerce.date(), + updatedAt: z.coerce.date(), + amount: z.instanceof(Prisma.Decimal, { message: "Field 'amount' must be a Decimal. Location: ['Models', 'Transaction']"}), + currency: z.string(), + date: z.coerce.date(), + note: z.string().nullable(), + categoryId: z.string().nullable(), + budgetId: z.string().nullable(), + walletAccountId: z.string(), + createdByUserId: z.string(), +}) + +export type Transaction = z.infer + +// TRANSACTION RELATION SCHEMA +//------------------------------------------------------ + +export type TransactionRelations = { + category?: CategoryWithRelations | null; + budget?: BudgetWithRelations | null; + walletAccount: UserWalletAccountWithRelations; + createdByUser: UserWithRelations; +}; + +export type TransactionWithRelations = z.infer & TransactionRelations + +export const TransactionWithRelationsSchema: z.ZodType = TransactionSchema.merge(z.object({ + category: z.lazy(() => CategoryWithRelationsSchema).nullable(), + budget: z.lazy(() => BudgetWithRelationsSchema).nullable(), + walletAccount: z.lazy(() => UserWalletAccountWithRelationsSchema), + createdByUser: z.lazy(() => UserWithRelationsSchema), +})) + +///////////////////////////////////////// +// CATEGORY SCHEMA +///////////////////////////////////////// + +export const CategorySchema = z.object({ + id: z.string().cuid(), + createdAt: z.coerce.date(), + updatedAt: z.coerce.date(), + name: z.string(), + description: z.string().nullable(), + icon: z.string().nullable(), + color: z.string().nullable(), + parentId: z.string().nullable(), +}) + +export type Category = z.infer + +// CATEGORY RELATION SCHEMA +//------------------------------------------------------ + +export type CategoryRelations = { + parent?: CategoryWithRelations | null; + children: CategoryWithRelations[]; + transactions: TransactionWithRelations[]; +}; + +export type CategoryWithRelations = z.infer & CategoryRelations + +export const CategoryWithRelationsSchema: z.ZodType = CategorySchema.merge(z.object({ + parent: z.lazy(() => CategoryWithRelationsSchema).nullable(), + children: z.lazy(() => CategoryWithRelationsSchema).array(), + transactions: z.lazy(() => TransactionWithRelationsSchema).array(), +})) + ///////////////////////////////////////// // SELECT & INCLUDE ///////////////////////////////////////// @@ -42,10 +383,306 @@ export type User = z.infer // USER //------------------------------------------------------ +export const UserIncludeSchema: z.ZodType = z.object({ + walletAccounts: z.union([z.boolean(),z.lazy(() => UserWalletAccountFindManyArgsSchema)]).optional(), + budgetUsers: z.union([z.boolean(),z.lazy(() => BudgetUserFindManyArgsSchema)]).optional(), + transactions: z.union([z.boolean(),z.lazy(() => TransactionFindManyArgsSchema)]).optional(), + createdBudgetUserInvitations: z.union([z.boolean(),z.lazy(() => BudgetUserInvitationFindManyArgsSchema)]).optional(), + createdFromInvitation: z.union([z.boolean(),z.lazy(() => BudgetUserInvitationResponseArgsSchema)]).optional(), + _count: z.union([z.boolean(),z.lazy(() => UserCountOutputTypeArgsSchema)]).optional(), +}).strict() + +export const UserArgsSchema: z.ZodType = z.object({ + select: z.lazy(() => UserSelectSchema).optional(), + include: z.lazy(() => UserIncludeSchema).optional(), +}).strict(); + +export const UserCountOutputTypeArgsSchema: z.ZodType = z.object({ + select: z.lazy(() => UserCountOutputTypeSelectSchema).nullish(), +}).strict(); + +export const UserCountOutputTypeSelectSchema: z.ZodType = z.object({ + walletAccounts: z.boolean().optional(), + budgetUsers: z.boolean().optional(), + transactions: z.boolean().optional(), + createdBudgetUserInvitations: z.boolean().optional(), +}).strict(); + export const UserSelectSchema: z.ZodType = z.object({ id: z.boolean().optional(), + createdAt: z.boolean().optional(), + updatedAt: z.boolean().optional(), + email: z.boolean().optional(), + name: z.boolean().optional(), + walletAccounts: z.union([z.boolean(),z.lazy(() => UserWalletAccountFindManyArgsSchema)]).optional(), + budgetUsers: z.union([z.boolean(),z.lazy(() => BudgetUserFindManyArgsSchema)]).optional(), + transactions: z.union([z.boolean(),z.lazy(() => TransactionFindManyArgsSchema)]).optional(), + createdBudgetUserInvitations: z.union([z.boolean(),z.lazy(() => BudgetUserInvitationFindManyArgsSchema)]).optional(), + createdFromInvitation: z.union([z.boolean(),z.lazy(() => BudgetUserInvitationResponseArgsSchema)]).optional(), + _count: z.union([z.boolean(),z.lazy(() => UserCountOutputTypeArgsSchema)]).optional(), +}).strict() + +// USER WALLET ACCOUNT +//------------------------------------------------------ + +export const UserWalletAccountIncludeSchema: z.ZodType = z.object({ + user: z.union([z.boolean(),z.lazy(() => UserArgsSchema)]).optional(), + transactions: z.union([z.boolean(),z.lazy(() => TransactionFindManyArgsSchema)]).optional(), + _count: z.union([z.boolean(),z.lazy(() => UserWalletAccountCountOutputTypeArgsSchema)]).optional(), +}).strict() + +export const UserWalletAccountArgsSchema: z.ZodType = z.object({ + select: z.lazy(() => UserWalletAccountSelectSchema).optional(), + include: z.lazy(() => UserWalletAccountIncludeSchema).optional(), +}).strict(); + +export const UserWalletAccountCountOutputTypeArgsSchema: z.ZodType = z.object({ + select: z.lazy(() => UserWalletAccountCountOutputTypeSelectSchema).nullish(), +}).strict(); + +export const UserWalletAccountCountOutputTypeSelectSchema: z.ZodType = z.object({ + transactions: z.boolean().optional(), +}).strict(); + +export const UserWalletAccountSelectSchema: z.ZodType = z.object({ + id: z.boolean().optional(), + createdAt: z.boolean().optional(), + updatedAt: z.boolean().optional(), + name: z.boolean().optional(), + icon: z.boolean().optional(), + description: z.boolean().optional(), + lastDigits: z.boolean().optional(), + preferredCurrency: z.boolean().optional(), + userId: z.boolean().optional(), + user: z.union([z.boolean(),z.lazy(() => UserArgsSchema)]).optional(), + transactions: z.union([z.boolean(),z.lazy(() => TransactionFindManyArgsSchema)]).optional(), + _count: z.union([z.boolean(),z.lazy(() => UserWalletAccountCountOutputTypeArgsSchema)]).optional(), +}).strict() + +// BUDGET +//------------------------------------------------------ + +export const BudgetIncludeSchema: z.ZodType = z.object({ + periodConfig: z.union([z.boolean(),z.lazy(() => BudgetPeriodConfigArgsSchema)]).optional(), + budgetUsers: z.union([z.boolean(),z.lazy(() => BudgetUserFindManyArgsSchema)]).optional(), + transactions: z.union([z.boolean(),z.lazy(() => TransactionFindManyArgsSchema)]).optional(), + invitations: z.union([z.boolean(),z.lazy(() => BudgetUserInvitationFindManyArgsSchema)]).optional(), + _count: z.union([z.boolean(),z.lazy(() => BudgetCountOutputTypeArgsSchema)]).optional(), +}).strict() + +export const BudgetArgsSchema: z.ZodType = z.object({ + select: z.lazy(() => BudgetSelectSchema).optional(), + include: z.lazy(() => BudgetIncludeSchema).optional(), +}).strict(); + +export const BudgetCountOutputTypeArgsSchema: z.ZodType = z.object({ + select: z.lazy(() => BudgetCountOutputTypeSelectSchema).nullish(), +}).strict(); + +export const BudgetCountOutputTypeSelectSchema: z.ZodType = z.object({ + budgetUsers: z.boolean().optional(), + transactions: z.boolean().optional(), + invitations: z.boolean().optional(), +}).strict(); + +export const BudgetSelectSchema: z.ZodType = z.object({ + id: z.boolean().optional(), + createdAt: z.boolean().optional(), + updatedAt: z.boolean().optional(), + name: z.boolean().optional(), + description: z.boolean().optional(), + preferredCurrency: z.boolean().optional(), + type: z.boolean().optional(), + periodConfig: z.union([z.boolean(),z.lazy(() => BudgetPeriodConfigArgsSchema)]).optional(), + budgetUsers: z.union([z.boolean(),z.lazy(() => BudgetUserFindManyArgsSchema)]).optional(), + transactions: z.union([z.boolean(),z.lazy(() => TransactionFindManyArgsSchema)]).optional(), + invitations: z.union([z.boolean(),z.lazy(() => BudgetUserInvitationFindManyArgsSchema)]).optional(), + _count: z.union([z.boolean(),z.lazy(() => BudgetCountOutputTypeArgsSchema)]).optional(), +}).strict() + +// BUDGET PERIOD CONFIG +//------------------------------------------------------ + +export const BudgetPeriodConfigIncludeSchema: z.ZodType = z.object({ + budget: z.union([z.boolean(),z.lazy(() => BudgetArgsSchema)]).optional(), +}).strict() + +export const BudgetPeriodConfigArgsSchema: z.ZodType = z.object({ + select: z.lazy(() => BudgetPeriodConfigSelectSchema).optional(), + include: z.lazy(() => BudgetPeriodConfigIncludeSchema).optional(), +}).strict(); + +export const BudgetPeriodConfigSelectSchema: z.ZodType = z.object({ + id: z.boolean().optional(), + createdAt: z.boolean().optional(), + updatedAt: z.boolean().optional(), + type: z.boolean().optional(), + amount: z.boolean().optional(), + currency: z.boolean().optional(), + startDate: z.boolean().optional(), + endDate: z.boolean().optional(), + budgetId: z.boolean().optional(), + budget: z.union([z.boolean(),z.lazy(() => BudgetArgsSchema)]).optional(), +}).strict() + +// BUDGET USER +//------------------------------------------------------ + +export const BudgetUserIncludeSchema: z.ZodType = z.object({ + user: z.union([z.boolean(),z.lazy(() => UserArgsSchema)]).optional(), + budget: z.union([z.boolean(),z.lazy(() => BudgetArgsSchema)]).optional(), +}).strict() + +export const BudgetUserArgsSchema: z.ZodType = z.object({ + select: z.lazy(() => BudgetUserSelectSchema).optional(), + include: z.lazy(() => BudgetUserIncludeSchema).optional(), +}).strict(); + +export const BudgetUserSelectSchema: z.ZodType = z.object({ + id: z.boolean().optional(), + createdAt: z.boolean().optional(), + updatedAt: z.boolean().optional(), + permission: z.boolean().optional(), + userId: z.boolean().optional(), + budgetId: z.boolean().optional(), + user: z.union([z.boolean(),z.lazy(() => UserArgsSchema)]).optional(), + budget: z.union([z.boolean(),z.lazy(() => BudgetArgsSchema)]).optional(), +}).strict() + +// BUDGET USER INVITATION +//------------------------------------------------------ + +export const BudgetUserInvitationIncludeSchema: z.ZodType = z.object({ + createdByUser: z.union([z.boolean(),z.lazy(() => UserArgsSchema)]).optional(), + budget: z.union([z.boolean(),z.lazy(() => BudgetArgsSchema)]).optional(), + responses: z.union([z.boolean(),z.lazy(() => BudgetUserInvitationResponseFindManyArgsSchema)]).optional(), + _count: z.union([z.boolean(),z.lazy(() => BudgetUserInvitationCountOutputTypeArgsSchema)]).optional(), +}).strict() + +export const BudgetUserInvitationArgsSchema: z.ZodType = z.object({ + select: z.lazy(() => BudgetUserInvitationSelectSchema).optional(), + include: z.lazy(() => BudgetUserInvitationIncludeSchema).optional(), +}).strict(); + +export const BudgetUserInvitationCountOutputTypeArgsSchema: z.ZodType = z.object({ + select: z.lazy(() => BudgetUserInvitationCountOutputTypeSelectSchema).nullish(), +}).strict(); + +export const BudgetUserInvitationCountOutputTypeSelectSchema: z.ZodType = z.object({ + responses: z.boolean().optional(), +}).strict(); + +export const BudgetUserInvitationSelectSchema: z.ZodType = z.object({ + id: z.boolean().optional(), + createdAt: z.boolean().optional(), + updatedAt: z.boolean().optional(), email: z.boolean().optional(), + token: z.boolean().optional(), + expiresAt: z.boolean().optional(), + permission: z.boolean().optional(), + createdByUserId: z.boolean().optional(), + budgetId: z.boolean().optional(), + createdByUser: z.union([z.boolean(),z.lazy(() => UserArgsSchema)]).optional(), + budget: z.union([z.boolean(),z.lazy(() => BudgetArgsSchema)]).optional(), + responses: z.union([z.boolean(),z.lazy(() => BudgetUserInvitationResponseFindManyArgsSchema)]).optional(), + _count: z.union([z.boolean(),z.lazy(() => BudgetUserInvitationCountOutputTypeArgsSchema)]).optional(), +}).strict() + +// BUDGET USER INVITATION RESPONSE +//------------------------------------------------------ + +export const BudgetUserInvitationResponseIncludeSchema: z.ZodType = z.object({ + invitation: z.union([z.boolean(),z.lazy(() => BudgetUserInvitationArgsSchema)]).optional(), + createdUser: z.union([z.boolean(),z.lazy(() => UserArgsSchema)]).optional(), +}).strict() + +export const BudgetUserInvitationResponseArgsSchema: z.ZodType = z.object({ + select: z.lazy(() => BudgetUserInvitationResponseSelectSchema).optional(), + include: z.lazy(() => BudgetUserInvitationResponseIncludeSchema).optional(), +}).strict(); + +export const BudgetUserInvitationResponseSelectSchema: z.ZodType = z.object({ + id: z.boolean().optional(), + createdAt: z.boolean().optional(), + updatedAt: z.boolean().optional(), + acceptedAt: z.boolean().optional(), + declinedAt: z.boolean().optional(), + invitationId: z.boolean().optional(), + createdUserId: z.boolean().optional(), + invitation: z.union([z.boolean(),z.lazy(() => BudgetUserInvitationArgsSchema)]).optional(), + createdUser: z.union([z.boolean(),z.lazy(() => UserArgsSchema)]).optional(), +}).strict() + +// TRANSACTION +//------------------------------------------------------ + +export const TransactionIncludeSchema: z.ZodType = z.object({ + category: z.union([z.boolean(),z.lazy(() => CategoryArgsSchema)]).optional(), + budget: z.union([z.boolean(),z.lazy(() => BudgetArgsSchema)]).optional(), + walletAccount: z.union([z.boolean(),z.lazy(() => UserWalletAccountArgsSchema)]).optional(), + createdByUser: z.union([z.boolean(),z.lazy(() => UserArgsSchema)]).optional(), +}).strict() + +export const TransactionArgsSchema: z.ZodType = z.object({ + select: z.lazy(() => TransactionSelectSchema).optional(), + include: z.lazy(() => TransactionIncludeSchema).optional(), +}).strict(); + +export const TransactionSelectSchema: z.ZodType = z.object({ + id: z.boolean().optional(), + createdAt: z.boolean().optional(), + updatedAt: z.boolean().optional(), + amount: z.boolean().optional(), + currency: z.boolean().optional(), + date: z.boolean().optional(), + note: z.boolean().optional(), + categoryId: z.boolean().optional(), + budgetId: z.boolean().optional(), + walletAccountId: z.boolean().optional(), + createdByUserId: z.boolean().optional(), + category: z.union([z.boolean(),z.lazy(() => CategoryArgsSchema)]).optional(), + budget: z.union([z.boolean(),z.lazy(() => BudgetArgsSchema)]).optional(), + walletAccount: z.union([z.boolean(),z.lazy(() => UserWalletAccountArgsSchema)]).optional(), + createdByUser: z.union([z.boolean(),z.lazy(() => UserArgsSchema)]).optional(), +}).strict() + +// CATEGORY +//------------------------------------------------------ + +export const CategoryIncludeSchema: z.ZodType = z.object({ + parent: z.union([z.boolean(),z.lazy(() => CategoryArgsSchema)]).optional(), + children: z.union([z.boolean(),z.lazy(() => CategoryFindManyArgsSchema)]).optional(), + transactions: z.union([z.boolean(),z.lazy(() => TransactionFindManyArgsSchema)]).optional(), + _count: z.union([z.boolean(),z.lazy(() => CategoryCountOutputTypeArgsSchema)]).optional(), +}).strict() + +export const CategoryArgsSchema: z.ZodType = z.object({ + select: z.lazy(() => CategorySelectSchema).optional(), + include: z.lazy(() => CategoryIncludeSchema).optional(), +}).strict(); + +export const CategoryCountOutputTypeArgsSchema: z.ZodType = z.object({ + select: z.lazy(() => CategoryCountOutputTypeSelectSchema).nullish(), +}).strict(); + +export const CategoryCountOutputTypeSelectSchema: z.ZodType = z.object({ + children: z.boolean().optional(), + transactions: z.boolean().optional(), +}).strict(); + +export const CategorySelectSchema: z.ZodType = z.object({ + id: z.boolean().optional(), + createdAt: z.boolean().optional(), + updatedAt: z.boolean().optional(), name: z.boolean().optional(), + description: z.boolean().optional(), + icon: z.boolean().optional(), + color: z.boolean().optional(), + parentId: z.boolean().optional(), + parent: z.union([z.boolean(),z.lazy(() => CategoryArgsSchema)]).optional(), + children: z.union([z.boolean(),z.lazy(() => CategoryFindManyArgsSchema)]).optional(), + transactions: z.union([z.boolean(),z.lazy(() => TransactionFindManyArgsSchema)]).optional(), + _count: z.union([z.boolean(),z.lazy(() => CategoryCountOutputTypeArgsSchema)]).optional(), }).strict() @@ -58,14 +695,28 @@ export const UserWhereInputSchema: z.ZodType = z.object({ OR: z.lazy(() => UserWhereInputSchema).array().optional(), NOT: z.union([ z.lazy(() => UserWhereInputSchema),z.lazy(() => UserWhereInputSchema).array() ]).optional(), id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), email: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), name: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + walletAccounts: z.lazy(() => UserWalletAccountListRelationFilterSchema).optional(), + budgetUsers: z.lazy(() => BudgetUserListRelationFilterSchema).optional(), + transactions: z.lazy(() => TransactionListRelationFilterSchema).optional(), + createdBudgetUserInvitations: z.lazy(() => BudgetUserInvitationListRelationFilterSchema).optional(), + createdFromInvitation: z.union([ z.lazy(() => BudgetUserInvitationResponseNullableRelationFilterSchema),z.lazy(() => BudgetUserInvitationResponseWhereInputSchema) ]).optional().nullable(), }).strict(); export const UserOrderByWithRelationInputSchema: z.ZodType = z.object({ id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), email: z.lazy(() => SortOrderSchema).optional(), name: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + walletAccounts: z.lazy(() => UserWalletAccountOrderByRelationAggregateInputSchema).optional(), + budgetUsers: z.lazy(() => BudgetUserOrderByRelationAggregateInputSchema).optional(), + transactions: z.lazy(() => TransactionOrderByRelationAggregateInputSchema).optional(), + createdBudgetUserInvitations: z.lazy(() => BudgetUserInvitationOrderByRelationAggregateInputSchema).optional(), + createdFromInvitation: z.lazy(() => BudgetUserInvitationResponseOrderByWithRelationInputSchema).optional() }).strict(); export const UserWhereUniqueInputSchema: z.ZodType = z.union([ @@ -86,11 +737,20 @@ export const UserWhereUniqueInputSchema: z.ZodType AND: z.union([ z.lazy(() => UserWhereInputSchema),z.lazy(() => UserWhereInputSchema).array() ]).optional(), OR: z.lazy(() => UserWhereInputSchema).array().optional(), NOT: z.union([ z.lazy(() => UserWhereInputSchema),z.lazy(() => UserWhereInputSchema).array() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), name: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + walletAccounts: z.lazy(() => UserWalletAccountListRelationFilterSchema).optional(), + budgetUsers: z.lazy(() => BudgetUserListRelationFilterSchema).optional(), + transactions: z.lazy(() => TransactionListRelationFilterSchema).optional(), + createdBudgetUserInvitations: z.lazy(() => BudgetUserInvitationListRelationFilterSchema).optional(), + createdFromInvitation: z.union([ z.lazy(() => BudgetUserInvitationResponseNullableRelationFilterSchema),z.lazy(() => BudgetUserInvitationResponseWhereInputSchema) ]).optional().nullable(), }).strict()); export const UserOrderByWithAggregationInputSchema: z.ZodType = z.object({ id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), email: z.lazy(() => SortOrderSchema).optional(), name: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), _count: z.lazy(() => UserCountOrderByAggregateInputSchema).optional(), @@ -103,301 +763,5681 @@ export const UserScalarWhereWithAggregatesInputSchema: z.ZodType UserScalarWhereWithAggregatesInputSchema).array().optional(), NOT: z.union([ z.lazy(() => UserScalarWhereWithAggregatesInputSchema),z.lazy(() => UserScalarWhereWithAggregatesInputSchema).array() ]).optional(), id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeWithAggregatesFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeWithAggregatesFilterSchema),z.coerce.date() ]).optional(), email: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), name: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), }).strict(); -export const UserCreateInputSchema: z.ZodType = z.object({ - id: z.string().cuid().optional(), - email: z.string(), - name: z.string().optional().nullable() +export const UserWalletAccountWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => UserWalletAccountWhereInputSchema),z.lazy(() => UserWalletAccountWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => UserWalletAccountWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => UserWalletAccountWhereInputSchema),z.lazy(() => UserWalletAccountWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + name: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + icon: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + description: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + lastDigits: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + preferredCurrency: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + userId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + user: z.union([ z.lazy(() => UserRelationFilterSchema),z.lazy(() => UserWhereInputSchema) ]).optional(), + transactions: z.lazy(() => TransactionListRelationFilterSchema).optional() }).strict(); -export const UserUncheckedCreateInputSchema: z.ZodType = z.object({ - id: z.string().cuid().optional(), - email: z.string(), - name: z.string().optional().nullable() +export const UserWalletAccountOrderByWithRelationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + name: z.lazy(() => SortOrderSchema).optional(), + icon: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + description: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + lastDigits: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + preferredCurrency: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + user: z.lazy(() => UserOrderByWithRelationInputSchema).optional(), + transactions: z.lazy(() => TransactionOrderByRelationAggregateInputSchema).optional() }).strict(); -export const UserUpdateInputSchema: z.ZodType = z.object({ - id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - email: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), +export const UserWalletAccountWhereUniqueInputSchema: z.ZodType = z.object({ + id: z.string().cuid() +}) +.and(z.object({ + id: z.string().cuid().optional(), + AND: z.union([ z.lazy(() => UserWalletAccountWhereInputSchema),z.lazy(() => UserWalletAccountWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => UserWalletAccountWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => UserWalletAccountWhereInputSchema),z.lazy(() => UserWalletAccountWhereInputSchema).array() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + name: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + icon: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + description: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + lastDigits: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + preferredCurrency: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + userId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + user: z.union([ z.lazy(() => UserRelationFilterSchema),z.lazy(() => UserWhereInputSchema) ]).optional(), + transactions: z.lazy(() => TransactionListRelationFilterSchema).optional() +}).strict()); + +export const UserWalletAccountOrderByWithAggregationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + name: z.lazy(() => SortOrderSchema).optional(), + icon: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + description: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + lastDigits: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + preferredCurrency: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + _count: z.lazy(() => UserWalletAccountCountOrderByAggregateInputSchema).optional(), + _max: z.lazy(() => UserWalletAccountMaxOrderByAggregateInputSchema).optional(), + _min: z.lazy(() => UserWalletAccountMinOrderByAggregateInputSchema).optional() }).strict(); -export const UserUncheckedUpdateInputSchema: z.ZodType = z.object({ - id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - email: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), +export const UserWalletAccountScalarWhereWithAggregatesInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => UserWalletAccountScalarWhereWithAggregatesInputSchema),z.lazy(() => UserWalletAccountScalarWhereWithAggregatesInputSchema).array() ]).optional(), + OR: z.lazy(() => UserWalletAccountScalarWhereWithAggregatesInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => UserWalletAccountScalarWhereWithAggregatesInputSchema),z.lazy(() => UserWalletAccountScalarWhereWithAggregatesInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeWithAggregatesFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeWithAggregatesFilterSchema),z.coerce.date() ]).optional(), + name: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + icon: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + description: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + lastDigits: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + preferredCurrency: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + userId: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), }).strict(); -export const UserCreateManyInputSchema: z.ZodType = z.object({ - id: z.string().cuid().optional(), - email: z.string(), - name: z.string().optional().nullable() +export const BudgetWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => BudgetWhereInputSchema),z.lazy(() => BudgetWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => BudgetWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => BudgetWhereInputSchema),z.lazy(() => BudgetWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + name: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + description: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + preferredCurrency: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + type: z.union([ z.lazy(() => EnumBudgetTypeFilterSchema),z.lazy(() => BudgetTypeSchema) ]).optional(), + periodConfig: z.union([ z.lazy(() => BudgetPeriodConfigNullableRelationFilterSchema),z.lazy(() => BudgetPeriodConfigWhereInputSchema) ]).optional().nullable(), + budgetUsers: z.lazy(() => BudgetUserListRelationFilterSchema).optional(), + transactions: z.lazy(() => TransactionListRelationFilterSchema).optional(), + invitations: z.lazy(() => BudgetUserInvitationListRelationFilterSchema).optional() }).strict(); -export const UserUpdateManyMutationInputSchema: z.ZodType = z.object({ - id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - email: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), +export const BudgetOrderByWithRelationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + name: z.lazy(() => SortOrderSchema).optional(), + description: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + preferredCurrency: z.lazy(() => SortOrderSchema).optional(), + type: z.lazy(() => SortOrderSchema).optional(), + periodConfig: z.lazy(() => BudgetPeriodConfigOrderByWithRelationInputSchema).optional(), + budgetUsers: z.lazy(() => BudgetUserOrderByRelationAggregateInputSchema).optional(), + transactions: z.lazy(() => TransactionOrderByRelationAggregateInputSchema).optional(), + invitations: z.lazy(() => BudgetUserInvitationOrderByRelationAggregateInputSchema).optional() }).strict(); -export const UserUncheckedUpdateManyInputSchema: z.ZodType = z.object({ - id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - email: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), - name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), +export const BudgetWhereUniqueInputSchema: z.ZodType = z.object({ + id: z.string().cuid() +}) +.and(z.object({ + id: z.string().cuid().optional(), + AND: z.union([ z.lazy(() => BudgetWhereInputSchema),z.lazy(() => BudgetWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => BudgetWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => BudgetWhereInputSchema),z.lazy(() => BudgetWhereInputSchema).array() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + name: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + description: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + preferredCurrency: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + type: z.union([ z.lazy(() => EnumBudgetTypeFilterSchema),z.lazy(() => BudgetTypeSchema) ]).optional(), + periodConfig: z.union([ z.lazy(() => BudgetPeriodConfigNullableRelationFilterSchema),z.lazy(() => BudgetPeriodConfigWhereInputSchema) ]).optional().nullable(), + budgetUsers: z.lazy(() => BudgetUserListRelationFilterSchema).optional(), + transactions: z.lazy(() => TransactionListRelationFilterSchema).optional(), + invitations: z.lazy(() => BudgetUserInvitationListRelationFilterSchema).optional() +}).strict()); + +export const BudgetOrderByWithAggregationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + name: z.lazy(() => SortOrderSchema).optional(), + description: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + preferredCurrency: z.lazy(() => SortOrderSchema).optional(), + type: z.lazy(() => SortOrderSchema).optional(), + _count: z.lazy(() => BudgetCountOrderByAggregateInputSchema).optional(), + _max: z.lazy(() => BudgetMaxOrderByAggregateInputSchema).optional(), + _min: z.lazy(() => BudgetMinOrderByAggregateInputSchema).optional() }).strict(); -export const StringFilterSchema: z.ZodType = z.object({ - equals: z.string().optional(), - in: z.string().array().optional(), - notIn: z.string().array().optional(), - lt: z.string().optional(), - lte: z.string().optional(), - gt: z.string().optional(), - gte: z.string().optional(), - contains: z.string().optional(), - startsWith: z.string().optional(), - endsWith: z.string().optional(), - mode: z.lazy(() => QueryModeSchema).optional(), - not: z.union([ z.string(),z.lazy(() => NestedStringFilterSchema) ]).optional(), +export const BudgetScalarWhereWithAggregatesInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => BudgetScalarWhereWithAggregatesInputSchema),z.lazy(() => BudgetScalarWhereWithAggregatesInputSchema).array() ]).optional(), + OR: z.lazy(() => BudgetScalarWhereWithAggregatesInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => BudgetScalarWhereWithAggregatesInputSchema),z.lazy(() => BudgetScalarWhereWithAggregatesInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeWithAggregatesFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeWithAggregatesFilterSchema),z.coerce.date() ]).optional(), + name: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + description: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + preferredCurrency: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + type: z.union([ z.lazy(() => EnumBudgetTypeWithAggregatesFilterSchema),z.lazy(() => BudgetTypeSchema) ]).optional(), }).strict(); -export const StringNullableFilterSchema: z.ZodType = z.object({ - equals: z.string().optional().nullable(), - in: z.string().array().optional().nullable(), - notIn: z.string().array().optional().nullable(), - lt: z.string().optional(), - lte: z.string().optional(), - gt: z.string().optional(), - gte: z.string().optional(), - contains: z.string().optional(), - startsWith: z.string().optional(), - endsWith: z.string().optional(), - mode: z.lazy(() => QueryModeSchema).optional(), - not: z.union([ z.string(),z.lazy(() => NestedStringNullableFilterSchema) ]).optional().nullable(), +export const BudgetPeriodConfigWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => BudgetPeriodConfigWhereInputSchema),z.lazy(() => BudgetPeriodConfigWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => BudgetPeriodConfigWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => BudgetPeriodConfigWhereInputSchema),z.lazy(() => BudgetPeriodConfigWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + type: z.union([ z.lazy(() => EnumBudgetPeriodTypeFilterSchema),z.lazy(() => BudgetPeriodTypeSchema) ]).optional(), + amount: z.union([ z.lazy(() => DecimalFilterSchema),z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }) ]).optional(), + currency: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + startDate: z.union([ z.lazy(() => DateTimeNullableFilterSchema),z.coerce.date() ]).optional().nullable(), + endDate: z.union([ z.lazy(() => DateTimeNullableFilterSchema),z.coerce.date() ]).optional().nullable(), + budgetId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + budget: z.union([ z.lazy(() => BudgetRelationFilterSchema),z.lazy(() => BudgetWhereInputSchema) ]).optional(), }).strict(); -export const SortOrderInputSchema: z.ZodType = z.object({ - sort: z.lazy(() => SortOrderSchema), - nulls: z.lazy(() => NullsOrderSchema).optional() +export const BudgetPeriodConfigOrderByWithRelationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + type: z.lazy(() => SortOrderSchema).optional(), + amount: z.lazy(() => SortOrderSchema).optional(), + currency: z.lazy(() => SortOrderSchema).optional(), + startDate: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + endDate: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + budgetId: z.lazy(() => SortOrderSchema).optional(), + budget: z.lazy(() => BudgetOrderByWithRelationInputSchema).optional() }).strict(); -export const UserCountOrderByAggregateInputSchema: z.ZodType = z.object({ +export const BudgetPeriodConfigWhereUniqueInputSchema: z.ZodType = z.union([ + z.object({ + id: z.string().cuid(), + budgetId: z.string() + }), + z.object({ + id: z.string().cuid(), + }), + z.object({ + budgetId: z.string(), + }), +]) +.and(z.object({ + id: z.string().cuid().optional(), + budgetId: z.string().optional(), + AND: z.union([ z.lazy(() => BudgetPeriodConfigWhereInputSchema),z.lazy(() => BudgetPeriodConfigWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => BudgetPeriodConfigWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => BudgetPeriodConfigWhereInputSchema),z.lazy(() => BudgetPeriodConfigWhereInputSchema).array() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + type: z.union([ z.lazy(() => EnumBudgetPeriodTypeFilterSchema),z.lazy(() => BudgetPeriodTypeSchema) ]).optional(), + amount: z.union([ z.lazy(() => DecimalFilterSchema),z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }) ]).optional(), + currency: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + startDate: z.union([ z.lazy(() => DateTimeNullableFilterSchema),z.coerce.date() ]).optional().nullable(), + endDate: z.union([ z.lazy(() => DateTimeNullableFilterSchema),z.coerce.date() ]).optional().nullable(), + budget: z.union([ z.lazy(() => BudgetRelationFilterSchema),z.lazy(() => BudgetWhereInputSchema) ]).optional(), +}).strict()); + +export const BudgetPeriodConfigOrderByWithAggregationInputSchema: z.ZodType = z.object({ id: z.lazy(() => SortOrderSchema).optional(), - email: z.lazy(() => SortOrderSchema).optional(), - name: z.lazy(() => SortOrderSchema).optional() + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + type: z.lazy(() => SortOrderSchema).optional(), + amount: z.lazy(() => SortOrderSchema).optional(), + currency: z.lazy(() => SortOrderSchema).optional(), + startDate: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + endDate: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + budgetId: z.lazy(() => SortOrderSchema).optional(), + _count: z.lazy(() => BudgetPeriodConfigCountOrderByAggregateInputSchema).optional(), + _avg: z.lazy(() => BudgetPeriodConfigAvgOrderByAggregateInputSchema).optional(), + _max: z.lazy(() => BudgetPeriodConfigMaxOrderByAggregateInputSchema).optional(), + _min: z.lazy(() => BudgetPeriodConfigMinOrderByAggregateInputSchema).optional(), + _sum: z.lazy(() => BudgetPeriodConfigSumOrderByAggregateInputSchema).optional() }).strict(); -export const UserMaxOrderByAggregateInputSchema: z.ZodType = z.object({ +export const BudgetPeriodConfigScalarWhereWithAggregatesInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => BudgetPeriodConfigScalarWhereWithAggregatesInputSchema),z.lazy(() => BudgetPeriodConfigScalarWhereWithAggregatesInputSchema).array() ]).optional(), + OR: z.lazy(() => BudgetPeriodConfigScalarWhereWithAggregatesInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => BudgetPeriodConfigScalarWhereWithAggregatesInputSchema),z.lazy(() => BudgetPeriodConfigScalarWhereWithAggregatesInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeWithAggregatesFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeWithAggregatesFilterSchema),z.coerce.date() ]).optional(), + type: z.union([ z.lazy(() => EnumBudgetPeriodTypeWithAggregatesFilterSchema),z.lazy(() => BudgetPeriodTypeSchema) ]).optional(), + amount: z.union([ z.lazy(() => DecimalWithAggregatesFilterSchema),z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }) ]).optional(), + currency: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + startDate: z.union([ z.lazy(() => DateTimeNullableWithAggregatesFilterSchema),z.coerce.date() ]).optional().nullable(), + endDate: z.union([ z.lazy(() => DateTimeNullableWithAggregatesFilterSchema),z.coerce.date() ]).optional().nullable(), + budgetId: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), +}).strict(); + +export const BudgetUserWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => BudgetUserWhereInputSchema),z.lazy(() => BudgetUserWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => BudgetUserWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => BudgetUserWhereInputSchema),z.lazy(() => BudgetUserWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + permission: z.union([ z.lazy(() => EnumBudgetUserPermissionFilterSchema),z.lazy(() => BudgetUserPermissionSchema) ]).optional(), + userId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + budgetId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + user: z.union([ z.lazy(() => UserRelationFilterSchema),z.lazy(() => UserWhereInputSchema) ]).optional(), + budget: z.union([ z.lazy(() => BudgetRelationFilterSchema),z.lazy(() => BudgetWhereInputSchema) ]).optional(), +}).strict(); + +export const BudgetUserOrderByWithRelationInputSchema: z.ZodType = z.object({ id: z.lazy(() => SortOrderSchema).optional(), - email: z.lazy(() => SortOrderSchema).optional(), - name: z.lazy(() => SortOrderSchema).optional() + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + permission: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + budgetId: z.lazy(() => SortOrderSchema).optional(), + user: z.lazy(() => UserOrderByWithRelationInputSchema).optional(), + budget: z.lazy(() => BudgetOrderByWithRelationInputSchema).optional() }).strict(); -export const UserMinOrderByAggregateInputSchema: z.ZodType = z.object({ +export const BudgetUserWhereUniqueInputSchema: z.ZodType = z.union([ + z.object({ + id: z.string().cuid(), + userId_budgetId: z.lazy(() => BudgetUserUserIdBudgetIdCompoundUniqueInputSchema) + }), + z.object({ + id: z.string().cuid(), + }), + z.object({ + userId_budgetId: z.lazy(() => BudgetUserUserIdBudgetIdCompoundUniqueInputSchema), + }), +]) +.and(z.object({ + id: z.string().cuid().optional(), + userId_budgetId: z.lazy(() => BudgetUserUserIdBudgetIdCompoundUniqueInputSchema).optional(), + AND: z.union([ z.lazy(() => BudgetUserWhereInputSchema),z.lazy(() => BudgetUserWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => BudgetUserWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => BudgetUserWhereInputSchema),z.lazy(() => BudgetUserWhereInputSchema).array() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + permission: z.union([ z.lazy(() => EnumBudgetUserPermissionFilterSchema),z.lazy(() => BudgetUserPermissionSchema) ]).optional(), + userId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + budgetId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + user: z.union([ z.lazy(() => UserRelationFilterSchema),z.lazy(() => UserWhereInputSchema) ]).optional(), + budget: z.union([ z.lazy(() => BudgetRelationFilterSchema),z.lazy(() => BudgetWhereInputSchema) ]).optional(), +}).strict()); + +export const BudgetUserOrderByWithAggregationInputSchema: z.ZodType = z.object({ id: z.lazy(() => SortOrderSchema).optional(), - email: z.lazy(() => SortOrderSchema).optional(), - name: z.lazy(() => SortOrderSchema).optional() + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + permission: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + budgetId: z.lazy(() => SortOrderSchema).optional(), + _count: z.lazy(() => BudgetUserCountOrderByAggregateInputSchema).optional(), + _max: z.lazy(() => BudgetUserMaxOrderByAggregateInputSchema).optional(), + _min: z.lazy(() => BudgetUserMinOrderByAggregateInputSchema).optional() }).strict(); -export const StringWithAggregatesFilterSchema: z.ZodType = z.object({ - equals: z.string().optional(), - in: z.string().array().optional(), - notIn: z.string().array().optional(), - lt: z.string().optional(), - lte: z.string().optional(), - gt: z.string().optional(), - gte: z.string().optional(), - contains: z.string().optional(), - startsWith: z.string().optional(), - endsWith: z.string().optional(), - mode: z.lazy(() => QueryModeSchema).optional(), - not: z.union([ z.string(),z.lazy(() => NestedStringWithAggregatesFilterSchema) ]).optional(), - _count: z.lazy(() => NestedIntFilterSchema).optional(), - _min: z.lazy(() => NestedStringFilterSchema).optional(), - _max: z.lazy(() => NestedStringFilterSchema).optional() +export const BudgetUserScalarWhereWithAggregatesInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => BudgetUserScalarWhereWithAggregatesInputSchema),z.lazy(() => BudgetUserScalarWhereWithAggregatesInputSchema).array() ]).optional(), + OR: z.lazy(() => BudgetUserScalarWhereWithAggregatesInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => BudgetUserScalarWhereWithAggregatesInputSchema),z.lazy(() => BudgetUserScalarWhereWithAggregatesInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeWithAggregatesFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeWithAggregatesFilterSchema),z.coerce.date() ]).optional(), + permission: z.union([ z.lazy(() => EnumBudgetUserPermissionWithAggregatesFilterSchema),z.lazy(() => BudgetUserPermissionSchema) ]).optional(), + userId: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + budgetId: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), }).strict(); -export const StringNullableWithAggregatesFilterSchema: z.ZodType = z.object({ - equals: z.string().optional().nullable(), - in: z.string().array().optional().nullable(), - notIn: z.string().array().optional().nullable(), - lt: z.string().optional(), - lte: z.string().optional(), - gt: z.string().optional(), - gte: z.string().optional(), - contains: z.string().optional(), - startsWith: z.string().optional(), - endsWith: z.string().optional(), - mode: z.lazy(() => QueryModeSchema).optional(), - not: z.union([ z.string(),z.lazy(() => NestedStringNullableWithAggregatesFilterSchema) ]).optional().nullable(), - _count: z.lazy(() => NestedIntNullableFilterSchema).optional(), - _min: z.lazy(() => NestedStringNullableFilterSchema).optional(), - _max: z.lazy(() => NestedStringNullableFilterSchema).optional() +export const BudgetUserInvitationWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => BudgetUserInvitationWhereInputSchema),z.lazy(() => BudgetUserInvitationWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => BudgetUserInvitationWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => BudgetUserInvitationWhereInputSchema),z.lazy(() => BudgetUserInvitationWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + email: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + token: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + expiresAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + permission: z.union([ z.lazy(() => EnumBudgetUserPermissionNullableFilterSchema),z.lazy(() => BudgetUserPermissionSchema) ]).optional().nullable(), + createdByUserId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + budgetId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + createdByUser: z.union([ z.lazy(() => UserRelationFilterSchema),z.lazy(() => UserWhereInputSchema) ]).optional(), + budget: z.union([ z.lazy(() => BudgetRelationFilterSchema),z.lazy(() => BudgetWhereInputSchema) ]).optional(), + responses: z.lazy(() => BudgetUserInvitationResponseListRelationFilterSchema).optional() }).strict(); -export const StringFieldUpdateOperationsInputSchema: z.ZodType = z.object({ - set: z.string().optional() +export const BudgetUserInvitationOrderByWithRelationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + email: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + token: z.lazy(() => SortOrderSchema).optional(), + expiresAt: z.lazy(() => SortOrderSchema).optional(), + permission: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + createdByUserId: z.lazy(() => SortOrderSchema).optional(), + budgetId: z.lazy(() => SortOrderSchema).optional(), + createdByUser: z.lazy(() => UserOrderByWithRelationInputSchema).optional(), + budget: z.lazy(() => BudgetOrderByWithRelationInputSchema).optional(), + responses: z.lazy(() => BudgetUserInvitationResponseOrderByRelationAggregateInputSchema).optional() }).strict(); -export const NullableStringFieldUpdateOperationsInputSchema: z.ZodType = z.object({ - set: z.string().optional().nullable() +export const BudgetUserInvitationWhereUniqueInputSchema: z.ZodType = z.union([ + z.object({ + id: z.string().cuid(), + token_budgetId: z.lazy(() => BudgetUserInvitationTokenBudgetIdCompoundUniqueInputSchema) + }), + z.object({ + id: z.string().cuid(), + }), + z.object({ + token_budgetId: z.lazy(() => BudgetUserInvitationTokenBudgetIdCompoundUniqueInputSchema), + }), +]) +.and(z.object({ + id: z.string().cuid().optional(), + token_budgetId: z.lazy(() => BudgetUserInvitationTokenBudgetIdCompoundUniqueInputSchema).optional(), + AND: z.union([ z.lazy(() => BudgetUserInvitationWhereInputSchema),z.lazy(() => BudgetUserInvitationWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => BudgetUserInvitationWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => BudgetUserInvitationWhereInputSchema),z.lazy(() => BudgetUserInvitationWhereInputSchema).array() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + email: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + token: z.union([ z.lazy(() => StringFilterSchema),z.string().uuid() ]).optional(), + expiresAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + permission: z.union([ z.lazy(() => EnumBudgetUserPermissionNullableFilterSchema),z.lazy(() => BudgetUserPermissionSchema) ]).optional().nullable(), + createdByUserId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + budgetId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + createdByUser: z.union([ z.lazy(() => UserRelationFilterSchema),z.lazy(() => UserWhereInputSchema) ]).optional(), + budget: z.union([ z.lazy(() => BudgetRelationFilterSchema),z.lazy(() => BudgetWhereInputSchema) ]).optional(), + responses: z.lazy(() => BudgetUserInvitationResponseListRelationFilterSchema).optional() +}).strict()); + +export const BudgetUserInvitationOrderByWithAggregationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + email: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + token: z.lazy(() => SortOrderSchema).optional(), + expiresAt: z.lazy(() => SortOrderSchema).optional(), + permission: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + createdByUserId: z.lazy(() => SortOrderSchema).optional(), + budgetId: z.lazy(() => SortOrderSchema).optional(), + _count: z.lazy(() => BudgetUserInvitationCountOrderByAggregateInputSchema).optional(), + _max: z.lazy(() => BudgetUserInvitationMaxOrderByAggregateInputSchema).optional(), + _min: z.lazy(() => BudgetUserInvitationMinOrderByAggregateInputSchema).optional() }).strict(); -export const NestedStringFilterSchema: z.ZodType = z.object({ - equals: z.string().optional(), - in: z.string().array().optional(), - notIn: z.string().array().optional(), - lt: z.string().optional(), - lte: z.string().optional(), - gt: z.string().optional(), - gte: z.string().optional(), - contains: z.string().optional(), - startsWith: z.string().optional(), - endsWith: z.string().optional(), - not: z.union([ z.string(),z.lazy(() => NestedStringFilterSchema) ]).optional(), +export const BudgetUserInvitationScalarWhereWithAggregatesInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => BudgetUserInvitationScalarWhereWithAggregatesInputSchema),z.lazy(() => BudgetUserInvitationScalarWhereWithAggregatesInputSchema).array() ]).optional(), + OR: z.lazy(() => BudgetUserInvitationScalarWhereWithAggregatesInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => BudgetUserInvitationScalarWhereWithAggregatesInputSchema),z.lazy(() => BudgetUserInvitationScalarWhereWithAggregatesInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeWithAggregatesFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeWithAggregatesFilterSchema),z.coerce.date() ]).optional(), + email: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + token: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + expiresAt: z.union([ z.lazy(() => DateTimeWithAggregatesFilterSchema),z.coerce.date() ]).optional(), + permission: z.union([ z.lazy(() => EnumBudgetUserPermissionNullableWithAggregatesFilterSchema),z.lazy(() => BudgetUserPermissionSchema) ]).optional().nullable(), + createdByUserId: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + budgetId: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), }).strict(); -export const NestedStringNullableFilterSchema: z.ZodType = z.object({ - equals: z.string().optional().nullable(), - in: z.string().array().optional().nullable(), - notIn: z.string().array().optional().nullable(), - lt: z.string().optional(), - lte: z.string().optional(), - gt: z.string().optional(), - gte: z.string().optional(), - contains: z.string().optional(), - startsWith: z.string().optional(), - endsWith: z.string().optional(), - not: z.union([ z.string(),z.lazy(() => NestedStringNullableFilterSchema) ]).optional().nullable(), +export const BudgetUserInvitationResponseWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => BudgetUserInvitationResponseWhereInputSchema),z.lazy(() => BudgetUserInvitationResponseWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => BudgetUserInvitationResponseWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => BudgetUserInvitationResponseWhereInputSchema),z.lazy(() => BudgetUserInvitationResponseWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + acceptedAt: z.union([ z.lazy(() => DateTimeNullableFilterSchema),z.coerce.date() ]).optional().nullable(), + declinedAt: z.union([ z.lazy(() => DateTimeNullableFilterSchema),z.coerce.date() ]).optional().nullable(), + invitationId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + createdUserId: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + invitation: z.union([ z.lazy(() => BudgetUserInvitationRelationFilterSchema),z.lazy(() => BudgetUserInvitationWhereInputSchema) ]).optional(), + createdUser: z.union([ z.lazy(() => UserNullableRelationFilterSchema),z.lazy(() => UserWhereInputSchema) ]).optional().nullable(), +}).strict(); + +export const BudgetUserInvitationResponseOrderByWithRelationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + acceptedAt: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + declinedAt: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + invitationId: z.lazy(() => SortOrderSchema).optional(), + createdUserId: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + invitation: z.lazy(() => BudgetUserInvitationOrderByWithRelationInputSchema).optional(), + createdUser: z.lazy(() => UserOrderByWithRelationInputSchema).optional() +}).strict(); + +export const BudgetUserInvitationResponseWhereUniqueInputSchema: z.ZodType = z.union([ + z.object({ + id: z.string().cuid(), + createdUserId: z.string() + }), + z.object({ + id: z.string().cuid(), + }), + z.object({ + createdUserId: z.string(), + }), +]) +.and(z.object({ + id: z.string().cuid().optional(), + createdUserId: z.string().optional(), + AND: z.union([ z.lazy(() => BudgetUserInvitationResponseWhereInputSchema),z.lazy(() => BudgetUserInvitationResponseWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => BudgetUserInvitationResponseWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => BudgetUserInvitationResponseWhereInputSchema),z.lazy(() => BudgetUserInvitationResponseWhereInputSchema).array() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + acceptedAt: z.union([ z.lazy(() => DateTimeNullableFilterSchema),z.coerce.date() ]).optional().nullable(), + declinedAt: z.union([ z.lazy(() => DateTimeNullableFilterSchema),z.coerce.date() ]).optional().nullable(), + invitationId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + invitation: z.union([ z.lazy(() => BudgetUserInvitationRelationFilterSchema),z.lazy(() => BudgetUserInvitationWhereInputSchema) ]).optional(), + createdUser: z.union([ z.lazy(() => UserNullableRelationFilterSchema),z.lazy(() => UserWhereInputSchema) ]).optional().nullable(), +}).strict()); + +export const BudgetUserInvitationResponseOrderByWithAggregationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + acceptedAt: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + declinedAt: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + invitationId: z.lazy(() => SortOrderSchema).optional(), + createdUserId: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + _count: z.lazy(() => BudgetUserInvitationResponseCountOrderByAggregateInputSchema).optional(), + _max: z.lazy(() => BudgetUserInvitationResponseMaxOrderByAggregateInputSchema).optional(), + _min: z.lazy(() => BudgetUserInvitationResponseMinOrderByAggregateInputSchema).optional() +}).strict(); + +export const BudgetUserInvitationResponseScalarWhereWithAggregatesInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => BudgetUserInvitationResponseScalarWhereWithAggregatesInputSchema),z.lazy(() => BudgetUserInvitationResponseScalarWhereWithAggregatesInputSchema).array() ]).optional(), + OR: z.lazy(() => BudgetUserInvitationResponseScalarWhereWithAggregatesInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => BudgetUserInvitationResponseScalarWhereWithAggregatesInputSchema),z.lazy(() => BudgetUserInvitationResponseScalarWhereWithAggregatesInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeWithAggregatesFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeWithAggregatesFilterSchema),z.coerce.date() ]).optional(), + acceptedAt: z.union([ z.lazy(() => DateTimeNullableWithAggregatesFilterSchema),z.coerce.date() ]).optional().nullable(), + declinedAt: z.union([ z.lazy(() => DateTimeNullableWithAggregatesFilterSchema),z.coerce.date() ]).optional().nullable(), + invitationId: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + createdUserId: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), +}).strict(); + +export const TransactionWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => TransactionWhereInputSchema),z.lazy(() => TransactionWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => TransactionWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => TransactionWhereInputSchema),z.lazy(() => TransactionWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + amount: z.union([ z.lazy(() => DecimalFilterSchema),z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }) ]).optional(), + currency: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + date: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + note: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + categoryId: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + budgetId: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + walletAccountId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + createdByUserId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + category: z.union([ z.lazy(() => CategoryNullableRelationFilterSchema),z.lazy(() => CategoryWhereInputSchema) ]).optional().nullable(), + budget: z.union([ z.lazy(() => BudgetNullableRelationFilterSchema),z.lazy(() => BudgetWhereInputSchema) ]).optional().nullable(), + walletAccount: z.union([ z.lazy(() => UserWalletAccountRelationFilterSchema),z.lazy(() => UserWalletAccountWhereInputSchema) ]).optional(), + createdByUser: z.union([ z.lazy(() => UserRelationFilterSchema),z.lazy(() => UserWhereInputSchema) ]).optional(), +}).strict(); + +export const TransactionOrderByWithRelationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + amount: z.lazy(() => SortOrderSchema).optional(), + currency: z.lazy(() => SortOrderSchema).optional(), + date: z.lazy(() => SortOrderSchema).optional(), + note: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + categoryId: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + budgetId: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + walletAccountId: z.lazy(() => SortOrderSchema).optional(), + createdByUserId: z.lazy(() => SortOrderSchema).optional(), + category: z.lazy(() => CategoryOrderByWithRelationInputSchema).optional(), + budget: z.lazy(() => BudgetOrderByWithRelationInputSchema).optional(), + walletAccount: z.lazy(() => UserWalletAccountOrderByWithRelationInputSchema).optional(), + createdByUser: z.lazy(() => UserOrderByWithRelationInputSchema).optional() +}).strict(); + +export const TransactionWhereUniqueInputSchema: z.ZodType = z.object({ + id: z.string().cuid() +}) +.and(z.object({ + id: z.string().cuid().optional(), + AND: z.union([ z.lazy(() => TransactionWhereInputSchema),z.lazy(() => TransactionWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => TransactionWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => TransactionWhereInputSchema),z.lazy(() => TransactionWhereInputSchema).array() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + amount: z.union([ z.lazy(() => DecimalFilterSchema),z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }) ]).optional(), + currency: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + date: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + note: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + categoryId: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + budgetId: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + walletAccountId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + createdByUserId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + category: z.union([ z.lazy(() => CategoryNullableRelationFilterSchema),z.lazy(() => CategoryWhereInputSchema) ]).optional().nullable(), + budget: z.union([ z.lazy(() => BudgetNullableRelationFilterSchema),z.lazy(() => BudgetWhereInputSchema) ]).optional().nullable(), + walletAccount: z.union([ z.lazy(() => UserWalletAccountRelationFilterSchema),z.lazy(() => UserWalletAccountWhereInputSchema) ]).optional(), + createdByUser: z.union([ z.lazy(() => UserRelationFilterSchema),z.lazy(() => UserWhereInputSchema) ]).optional(), +}).strict()); + +export const TransactionOrderByWithAggregationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + amount: z.lazy(() => SortOrderSchema).optional(), + currency: z.lazy(() => SortOrderSchema).optional(), + date: z.lazy(() => SortOrderSchema).optional(), + note: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + categoryId: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + budgetId: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + walletAccountId: z.lazy(() => SortOrderSchema).optional(), + createdByUserId: z.lazy(() => SortOrderSchema).optional(), + _count: z.lazy(() => TransactionCountOrderByAggregateInputSchema).optional(), + _avg: z.lazy(() => TransactionAvgOrderByAggregateInputSchema).optional(), + _max: z.lazy(() => TransactionMaxOrderByAggregateInputSchema).optional(), + _min: z.lazy(() => TransactionMinOrderByAggregateInputSchema).optional(), + _sum: z.lazy(() => TransactionSumOrderByAggregateInputSchema).optional() +}).strict(); + +export const TransactionScalarWhereWithAggregatesInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => TransactionScalarWhereWithAggregatesInputSchema),z.lazy(() => TransactionScalarWhereWithAggregatesInputSchema).array() ]).optional(), + OR: z.lazy(() => TransactionScalarWhereWithAggregatesInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => TransactionScalarWhereWithAggregatesInputSchema),z.lazy(() => TransactionScalarWhereWithAggregatesInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeWithAggregatesFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeWithAggregatesFilterSchema),z.coerce.date() ]).optional(), + amount: z.union([ z.lazy(() => DecimalWithAggregatesFilterSchema),z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }) ]).optional(), + currency: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + date: z.union([ z.lazy(() => DateTimeWithAggregatesFilterSchema),z.coerce.date() ]).optional(), + note: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + categoryId: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + budgetId: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + walletAccountId: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + createdByUserId: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), +}).strict(); + +export const CategoryWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => CategoryWhereInputSchema),z.lazy(() => CategoryWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => CategoryWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => CategoryWhereInputSchema),z.lazy(() => CategoryWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + name: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + description: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + icon: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + color: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + parentId: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + parent: z.union([ z.lazy(() => CategoryNullableRelationFilterSchema),z.lazy(() => CategoryWhereInputSchema) ]).optional().nullable(), + children: z.lazy(() => CategoryListRelationFilterSchema).optional(), + transactions: z.lazy(() => TransactionListRelationFilterSchema).optional() +}).strict(); + +export const CategoryOrderByWithRelationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + name: z.lazy(() => SortOrderSchema).optional(), + description: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + icon: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + color: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + parentId: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + parent: z.lazy(() => CategoryOrderByWithRelationInputSchema).optional(), + children: z.lazy(() => CategoryOrderByRelationAggregateInputSchema).optional(), + transactions: z.lazy(() => TransactionOrderByRelationAggregateInputSchema).optional() +}).strict(); + +export const CategoryWhereUniqueInputSchema: z.ZodType = z.object({ + id: z.string().cuid() +}) +.and(z.object({ + id: z.string().cuid().optional(), + AND: z.union([ z.lazy(() => CategoryWhereInputSchema),z.lazy(() => CategoryWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => CategoryWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => CategoryWhereInputSchema),z.lazy(() => CategoryWhereInputSchema).array() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + name: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + description: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + icon: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + color: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + parentId: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + parent: z.union([ z.lazy(() => CategoryNullableRelationFilterSchema),z.lazy(() => CategoryWhereInputSchema) ]).optional().nullable(), + children: z.lazy(() => CategoryListRelationFilterSchema).optional(), + transactions: z.lazy(() => TransactionListRelationFilterSchema).optional() +}).strict()); + +export const CategoryOrderByWithAggregationInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + name: z.lazy(() => SortOrderSchema).optional(), + description: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + icon: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + color: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + parentId: z.union([ z.lazy(() => SortOrderSchema),z.lazy(() => SortOrderInputSchema) ]).optional(), + _count: z.lazy(() => CategoryCountOrderByAggregateInputSchema).optional(), + _max: z.lazy(() => CategoryMaxOrderByAggregateInputSchema).optional(), + _min: z.lazy(() => CategoryMinOrderByAggregateInputSchema).optional() +}).strict(); + +export const CategoryScalarWhereWithAggregatesInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => CategoryScalarWhereWithAggregatesInputSchema),z.lazy(() => CategoryScalarWhereWithAggregatesInputSchema).array() ]).optional(), + OR: z.lazy(() => CategoryScalarWhereWithAggregatesInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => CategoryScalarWhereWithAggregatesInputSchema),z.lazy(() => CategoryScalarWhereWithAggregatesInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeWithAggregatesFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeWithAggregatesFilterSchema),z.coerce.date() ]).optional(), + name: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), + description: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + icon: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + color: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), + parentId: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(), +}).strict(); + +export const UserCreateInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + email: z.string(), + name: z.string().optional().nullable(), + walletAccounts: z.lazy(() => UserWalletAccountCreateNestedManyWithoutUserInputSchema).optional(), + budgetUsers: z.lazy(() => BudgetUserCreateNestedManyWithoutUserInputSchema).optional(), + transactions: z.lazy(() => TransactionCreateNestedManyWithoutCreatedByUserInputSchema).optional(), + createdBudgetUserInvitations: z.lazy(() => BudgetUserInvitationCreateNestedManyWithoutCreatedByUserInputSchema).optional(), + createdFromInvitation: z.lazy(() => BudgetUserInvitationResponseCreateNestedOneWithoutCreatedUserInputSchema).optional() +}).strict(); + +export const UserUncheckedCreateInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + email: z.string(), + name: z.string().optional().nullable(), + walletAccounts: z.lazy(() => UserWalletAccountUncheckedCreateNestedManyWithoutUserInputSchema).optional(), + budgetUsers: z.lazy(() => BudgetUserUncheckedCreateNestedManyWithoutUserInputSchema).optional(), + transactions: z.lazy(() => TransactionUncheckedCreateNestedManyWithoutCreatedByUserInputSchema).optional(), + createdBudgetUserInvitations: z.lazy(() => BudgetUserInvitationUncheckedCreateNestedManyWithoutCreatedByUserInputSchema).optional(), + createdFromInvitation: z.lazy(() => BudgetUserInvitationResponseUncheckedCreateNestedOneWithoutCreatedUserInputSchema).optional() +}).strict(); + +export const UserUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + email: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + walletAccounts: z.lazy(() => UserWalletAccountUpdateManyWithoutUserNestedInputSchema).optional(), + budgetUsers: z.lazy(() => BudgetUserUpdateManyWithoutUserNestedInputSchema).optional(), + transactions: z.lazy(() => TransactionUpdateManyWithoutCreatedByUserNestedInputSchema).optional(), + createdBudgetUserInvitations: z.lazy(() => BudgetUserInvitationUpdateManyWithoutCreatedByUserNestedInputSchema).optional(), + createdFromInvitation: z.lazy(() => BudgetUserInvitationResponseUpdateOneWithoutCreatedUserNestedInputSchema).optional() +}).strict(); + +export const UserUncheckedUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + email: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + walletAccounts: z.lazy(() => UserWalletAccountUncheckedUpdateManyWithoutUserNestedInputSchema).optional(), + budgetUsers: z.lazy(() => BudgetUserUncheckedUpdateManyWithoutUserNestedInputSchema).optional(), + transactions: z.lazy(() => TransactionUncheckedUpdateManyWithoutCreatedByUserNestedInputSchema).optional(), + createdBudgetUserInvitations: z.lazy(() => BudgetUserInvitationUncheckedUpdateManyWithoutCreatedByUserNestedInputSchema).optional(), + createdFromInvitation: z.lazy(() => BudgetUserInvitationResponseUncheckedUpdateOneWithoutCreatedUserNestedInputSchema).optional() }).strict(); -export const NestedStringWithAggregatesFilterSchema: z.ZodType = z.object({ - equals: z.string().optional(), - in: z.string().array().optional(), - notIn: z.string().array().optional(), - lt: z.string().optional(), - lte: z.string().optional(), - gt: z.string().optional(), - gte: z.string().optional(), - contains: z.string().optional(), - startsWith: z.string().optional(), - endsWith: z.string().optional(), - not: z.union([ z.string(),z.lazy(() => NestedStringWithAggregatesFilterSchema) ]).optional(), - _count: z.lazy(() => NestedIntFilterSchema).optional(), - _min: z.lazy(() => NestedStringFilterSchema).optional(), - _max: z.lazy(() => NestedStringFilterSchema).optional() -}).strict(); +export const UserCreateManyInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + email: z.string(), + name: z.string().optional().nullable() +}).strict(); + +export const UserUpdateManyMutationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + email: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), +}).strict(); + +export const UserUncheckedUpdateManyInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + email: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), +}).strict(); + +export const UserWalletAccountCreateInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + name: z.string(), + icon: z.string().optional().nullable(), + description: z.string().optional().nullable(), + lastDigits: z.string().optional().nullable(), + preferredCurrency: z.string(), + user: z.lazy(() => UserCreateNestedOneWithoutWalletAccountsInputSchema), + transactions: z.lazy(() => TransactionCreateNestedManyWithoutWalletAccountInputSchema).optional() +}).strict(); + +export const UserWalletAccountUncheckedCreateInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + name: z.string(), + icon: z.string().optional().nullable(), + description: z.string().optional().nullable(), + lastDigits: z.string().optional().nullable(), + preferredCurrency: z.string(), + userId: z.string(), + transactions: z.lazy(() => TransactionUncheckedCreateNestedManyWithoutWalletAccountInputSchema).optional() +}).strict(); + +export const UserWalletAccountUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + icon: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + lastDigits: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + preferredCurrency: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + user: z.lazy(() => UserUpdateOneRequiredWithoutWalletAccountsNestedInputSchema).optional(), + transactions: z.lazy(() => TransactionUpdateManyWithoutWalletAccountNestedInputSchema).optional() +}).strict(); + +export const UserWalletAccountUncheckedUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + icon: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + lastDigits: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + preferredCurrency: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + userId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + transactions: z.lazy(() => TransactionUncheckedUpdateManyWithoutWalletAccountNestedInputSchema).optional() +}).strict(); + +export const UserWalletAccountCreateManyInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + name: z.string(), + icon: z.string().optional().nullable(), + description: z.string().optional().nullable(), + lastDigits: z.string().optional().nullable(), + preferredCurrency: z.string(), + userId: z.string() +}).strict(); + +export const UserWalletAccountUpdateManyMutationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + icon: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + lastDigits: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + preferredCurrency: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const UserWalletAccountUncheckedUpdateManyInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + icon: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + lastDigits: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + preferredCurrency: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + userId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const BudgetCreateInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + name: z.string(), + description: z.string().optional().nullable(), + preferredCurrency: z.string(), + type: z.lazy(() => BudgetTypeSchema).optional(), + periodConfig: z.lazy(() => BudgetPeriodConfigCreateNestedOneWithoutBudgetInputSchema).optional(), + budgetUsers: z.lazy(() => BudgetUserCreateNestedManyWithoutBudgetInputSchema).optional(), + transactions: z.lazy(() => TransactionCreateNestedManyWithoutBudgetInputSchema).optional(), + invitations: z.lazy(() => BudgetUserInvitationCreateNestedManyWithoutBudgetInputSchema).optional() +}).strict(); + +export const BudgetUncheckedCreateInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + name: z.string(), + description: z.string().optional().nullable(), + preferredCurrency: z.string(), + type: z.lazy(() => BudgetTypeSchema).optional(), + periodConfig: z.lazy(() => BudgetPeriodConfigUncheckedCreateNestedOneWithoutBudgetInputSchema).optional(), + budgetUsers: z.lazy(() => BudgetUserUncheckedCreateNestedManyWithoutBudgetInputSchema).optional(), + transactions: z.lazy(() => TransactionUncheckedCreateNestedManyWithoutBudgetInputSchema).optional(), + invitations: z.lazy(() => BudgetUserInvitationUncheckedCreateNestedManyWithoutBudgetInputSchema).optional() +}).strict(); + +export const BudgetUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + preferredCurrency: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + type: z.union([ z.lazy(() => BudgetTypeSchema),z.lazy(() => EnumBudgetTypeFieldUpdateOperationsInputSchema) ]).optional(), + periodConfig: z.lazy(() => BudgetPeriodConfigUpdateOneWithoutBudgetNestedInputSchema).optional(), + budgetUsers: z.lazy(() => BudgetUserUpdateManyWithoutBudgetNestedInputSchema).optional(), + transactions: z.lazy(() => TransactionUpdateManyWithoutBudgetNestedInputSchema).optional(), + invitations: z.lazy(() => BudgetUserInvitationUpdateManyWithoutBudgetNestedInputSchema).optional() +}).strict(); + +export const BudgetUncheckedUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + preferredCurrency: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + type: z.union([ z.lazy(() => BudgetTypeSchema),z.lazy(() => EnumBudgetTypeFieldUpdateOperationsInputSchema) ]).optional(), + periodConfig: z.lazy(() => BudgetPeriodConfigUncheckedUpdateOneWithoutBudgetNestedInputSchema).optional(), + budgetUsers: z.lazy(() => BudgetUserUncheckedUpdateManyWithoutBudgetNestedInputSchema).optional(), + transactions: z.lazy(() => TransactionUncheckedUpdateManyWithoutBudgetNestedInputSchema).optional(), + invitations: z.lazy(() => BudgetUserInvitationUncheckedUpdateManyWithoutBudgetNestedInputSchema).optional() +}).strict(); + +export const BudgetCreateManyInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + name: z.string(), + description: z.string().optional().nullable(), + preferredCurrency: z.string(), + type: z.lazy(() => BudgetTypeSchema).optional() +}).strict(); + +export const BudgetUpdateManyMutationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + preferredCurrency: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + type: z.union([ z.lazy(() => BudgetTypeSchema),z.lazy(() => EnumBudgetTypeFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const BudgetUncheckedUpdateManyInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + preferredCurrency: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + type: z.union([ z.lazy(() => BudgetTypeSchema),z.lazy(() => EnumBudgetTypeFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const BudgetPeriodConfigCreateInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + type: z.lazy(() => BudgetPeriodTypeSchema), + amount: z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }), + currency: z.string(), + startDate: z.coerce.date().optional().nullable(), + endDate: z.coerce.date().optional().nullable(), + budget: z.lazy(() => BudgetCreateNestedOneWithoutPeriodConfigInputSchema) +}).strict(); + +export const BudgetPeriodConfigUncheckedCreateInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + type: z.lazy(() => BudgetPeriodTypeSchema), + amount: z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }), + currency: z.string(), + startDate: z.coerce.date().optional().nullable(), + endDate: z.coerce.date().optional().nullable(), + budgetId: z.string() +}).strict(); + +export const BudgetPeriodConfigUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + type: z.union([ z.lazy(() => BudgetPeriodTypeSchema),z.lazy(() => EnumBudgetPeriodTypeFieldUpdateOperationsInputSchema) ]).optional(), + amount: z.union([ z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }),z.lazy(() => DecimalFieldUpdateOperationsInputSchema) ]).optional(), + currency: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + startDate: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + endDate: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + budget: z.lazy(() => BudgetUpdateOneRequiredWithoutPeriodConfigNestedInputSchema).optional() +}).strict(); + +export const BudgetPeriodConfigUncheckedUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + type: z.union([ z.lazy(() => BudgetPeriodTypeSchema),z.lazy(() => EnumBudgetPeriodTypeFieldUpdateOperationsInputSchema) ]).optional(), + amount: z.union([ z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }),z.lazy(() => DecimalFieldUpdateOperationsInputSchema) ]).optional(), + currency: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + startDate: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + endDate: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + budgetId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const BudgetPeriodConfigCreateManyInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + type: z.lazy(() => BudgetPeriodTypeSchema), + amount: z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }), + currency: z.string(), + startDate: z.coerce.date().optional().nullable(), + endDate: z.coerce.date().optional().nullable(), + budgetId: z.string() +}).strict(); + +export const BudgetPeriodConfigUpdateManyMutationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + type: z.union([ z.lazy(() => BudgetPeriodTypeSchema),z.lazy(() => EnumBudgetPeriodTypeFieldUpdateOperationsInputSchema) ]).optional(), + amount: z.union([ z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }),z.lazy(() => DecimalFieldUpdateOperationsInputSchema) ]).optional(), + currency: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + startDate: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + endDate: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), +}).strict(); + +export const BudgetPeriodConfigUncheckedUpdateManyInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + type: z.union([ z.lazy(() => BudgetPeriodTypeSchema),z.lazy(() => EnumBudgetPeriodTypeFieldUpdateOperationsInputSchema) ]).optional(), + amount: z.union([ z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }),z.lazy(() => DecimalFieldUpdateOperationsInputSchema) ]).optional(), + currency: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + startDate: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + endDate: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + budgetId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const BudgetUserCreateInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + permission: z.lazy(() => BudgetUserPermissionSchema), + user: z.lazy(() => UserCreateNestedOneWithoutBudgetUsersInputSchema), + budget: z.lazy(() => BudgetCreateNestedOneWithoutBudgetUsersInputSchema) +}).strict(); + +export const BudgetUserUncheckedCreateInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + permission: z.lazy(() => BudgetUserPermissionSchema), + userId: z.string(), + budgetId: z.string() +}).strict(); + +export const BudgetUserUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + permission: z.union([ z.lazy(() => BudgetUserPermissionSchema),z.lazy(() => EnumBudgetUserPermissionFieldUpdateOperationsInputSchema) ]).optional(), + user: z.lazy(() => UserUpdateOneRequiredWithoutBudgetUsersNestedInputSchema).optional(), + budget: z.lazy(() => BudgetUpdateOneRequiredWithoutBudgetUsersNestedInputSchema).optional() +}).strict(); + +export const BudgetUserUncheckedUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + permission: z.union([ z.lazy(() => BudgetUserPermissionSchema),z.lazy(() => EnumBudgetUserPermissionFieldUpdateOperationsInputSchema) ]).optional(), + userId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + budgetId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const BudgetUserCreateManyInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + permission: z.lazy(() => BudgetUserPermissionSchema), + userId: z.string(), + budgetId: z.string() +}).strict(); + +export const BudgetUserUpdateManyMutationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + permission: z.union([ z.lazy(() => BudgetUserPermissionSchema),z.lazy(() => EnumBudgetUserPermissionFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const BudgetUserUncheckedUpdateManyInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + permission: z.union([ z.lazy(() => BudgetUserPermissionSchema),z.lazy(() => EnumBudgetUserPermissionFieldUpdateOperationsInputSchema) ]).optional(), + userId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + budgetId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const BudgetUserInvitationCreateInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + email: z.string().optional().nullable(), + token: z.string().uuid().optional(), + expiresAt: z.coerce.date(), + permission: z.lazy(() => BudgetUserPermissionSchema).optional().nullable(), + createdByUser: z.lazy(() => UserCreateNestedOneWithoutCreatedBudgetUserInvitationsInputSchema), + budget: z.lazy(() => BudgetCreateNestedOneWithoutInvitationsInputSchema), + responses: z.lazy(() => BudgetUserInvitationResponseCreateNestedManyWithoutInvitationInputSchema).optional() +}).strict(); + +export const BudgetUserInvitationUncheckedCreateInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + email: z.string().optional().nullable(), + token: z.string().uuid().optional(), + expiresAt: z.coerce.date(), + permission: z.lazy(() => BudgetUserPermissionSchema).optional().nullable(), + createdByUserId: z.string(), + budgetId: z.string(), + responses: z.lazy(() => BudgetUserInvitationResponseUncheckedCreateNestedManyWithoutInvitationInputSchema).optional() +}).strict(); + +export const BudgetUserInvitationUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + email: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + token: z.union([ z.string().uuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + expiresAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + permission: z.union([ z.lazy(() => BudgetUserPermissionSchema),z.lazy(() => NullableEnumBudgetUserPermissionFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdByUser: z.lazy(() => UserUpdateOneRequiredWithoutCreatedBudgetUserInvitationsNestedInputSchema).optional(), + budget: z.lazy(() => BudgetUpdateOneRequiredWithoutInvitationsNestedInputSchema).optional(), + responses: z.lazy(() => BudgetUserInvitationResponseUpdateManyWithoutInvitationNestedInputSchema).optional() +}).strict(); + +export const BudgetUserInvitationUncheckedUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + email: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + token: z.union([ z.string().uuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + expiresAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + permission: z.union([ z.lazy(() => BudgetUserPermissionSchema),z.lazy(() => NullableEnumBudgetUserPermissionFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdByUserId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + budgetId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + responses: z.lazy(() => BudgetUserInvitationResponseUncheckedUpdateManyWithoutInvitationNestedInputSchema).optional() +}).strict(); + +export const BudgetUserInvitationCreateManyInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + email: z.string().optional().nullable(), + token: z.string().uuid().optional(), + expiresAt: z.coerce.date(), + permission: z.lazy(() => BudgetUserPermissionSchema).optional().nullable(), + createdByUserId: z.string(), + budgetId: z.string() +}).strict(); + +export const BudgetUserInvitationUpdateManyMutationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + email: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + token: z.union([ z.string().uuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + expiresAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + permission: z.union([ z.lazy(() => BudgetUserPermissionSchema),z.lazy(() => NullableEnumBudgetUserPermissionFieldUpdateOperationsInputSchema) ]).optional().nullable(), +}).strict(); + +export const BudgetUserInvitationUncheckedUpdateManyInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + email: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + token: z.union([ z.string().uuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + expiresAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + permission: z.union([ z.lazy(() => BudgetUserPermissionSchema),z.lazy(() => NullableEnumBudgetUserPermissionFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdByUserId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + budgetId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const BudgetUserInvitationResponseCreateInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + acceptedAt: z.coerce.date().optional().nullable(), + declinedAt: z.coerce.date().optional().nullable(), + invitation: z.lazy(() => BudgetUserInvitationCreateNestedOneWithoutResponsesInputSchema), + createdUser: z.lazy(() => UserCreateNestedOneWithoutCreatedFromInvitationInputSchema).optional() +}).strict(); + +export const BudgetUserInvitationResponseUncheckedCreateInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + acceptedAt: z.coerce.date().optional().nullable(), + declinedAt: z.coerce.date().optional().nullable(), + invitationId: z.string(), + createdUserId: z.string().optional().nullable() +}).strict(); + +export const BudgetUserInvitationResponseUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + acceptedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + declinedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + invitation: z.lazy(() => BudgetUserInvitationUpdateOneRequiredWithoutResponsesNestedInputSchema).optional(), + createdUser: z.lazy(() => UserUpdateOneWithoutCreatedFromInvitationNestedInputSchema).optional() +}).strict(); + +export const BudgetUserInvitationResponseUncheckedUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + acceptedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + declinedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + invitationId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdUserId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), +}).strict(); + +export const BudgetUserInvitationResponseCreateManyInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + acceptedAt: z.coerce.date().optional().nullable(), + declinedAt: z.coerce.date().optional().nullable(), + invitationId: z.string(), + createdUserId: z.string().optional().nullable() +}).strict(); + +export const BudgetUserInvitationResponseUpdateManyMutationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + acceptedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + declinedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), +}).strict(); + +export const BudgetUserInvitationResponseUncheckedUpdateManyInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + acceptedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + declinedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + invitationId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdUserId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), +}).strict(); + +export const TransactionCreateInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + amount: z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }), + currency: z.string(), + date: z.coerce.date(), + note: z.string().optional().nullable(), + category: z.lazy(() => CategoryCreateNestedOneWithoutTransactionsInputSchema).optional(), + budget: z.lazy(() => BudgetCreateNestedOneWithoutTransactionsInputSchema).optional(), + walletAccount: z.lazy(() => UserWalletAccountCreateNestedOneWithoutTransactionsInputSchema), + createdByUser: z.lazy(() => UserCreateNestedOneWithoutTransactionsInputSchema) +}).strict(); + +export const TransactionUncheckedCreateInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + amount: z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }), + currency: z.string(), + date: z.coerce.date(), + note: z.string().optional().nullable(), + categoryId: z.string().optional().nullable(), + budgetId: z.string().optional().nullable(), + walletAccountId: z.string(), + createdByUserId: z.string() +}).strict(); + +export const TransactionUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + amount: z.union([ z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }),z.lazy(() => DecimalFieldUpdateOperationsInputSchema) ]).optional(), + currency: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + date: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + note: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + category: z.lazy(() => CategoryUpdateOneWithoutTransactionsNestedInputSchema).optional(), + budget: z.lazy(() => BudgetUpdateOneWithoutTransactionsNestedInputSchema).optional(), + walletAccount: z.lazy(() => UserWalletAccountUpdateOneRequiredWithoutTransactionsNestedInputSchema).optional(), + createdByUser: z.lazy(() => UserUpdateOneRequiredWithoutTransactionsNestedInputSchema).optional() +}).strict(); + +export const TransactionUncheckedUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + amount: z.union([ z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }),z.lazy(() => DecimalFieldUpdateOperationsInputSchema) ]).optional(), + currency: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + date: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + note: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + categoryId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + budgetId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + walletAccountId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdByUserId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const TransactionCreateManyInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + amount: z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }), + currency: z.string(), + date: z.coerce.date(), + note: z.string().optional().nullable(), + categoryId: z.string().optional().nullable(), + budgetId: z.string().optional().nullable(), + walletAccountId: z.string(), + createdByUserId: z.string() +}).strict(); + +export const TransactionUpdateManyMutationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + amount: z.union([ z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }),z.lazy(() => DecimalFieldUpdateOperationsInputSchema) ]).optional(), + currency: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + date: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + note: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), +}).strict(); + +export const TransactionUncheckedUpdateManyInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + amount: z.union([ z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }),z.lazy(() => DecimalFieldUpdateOperationsInputSchema) ]).optional(), + currency: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + date: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + note: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + categoryId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + budgetId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + walletAccountId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdByUserId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const CategoryCreateInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + name: z.string(), + description: z.string().optional().nullable(), + icon: z.string().optional().nullable(), + color: z.string().optional().nullable(), + parent: z.lazy(() => CategoryCreateNestedOneWithoutChildrenInputSchema).optional(), + children: z.lazy(() => CategoryCreateNestedManyWithoutParentInputSchema).optional(), + transactions: z.lazy(() => TransactionCreateNestedManyWithoutCategoryInputSchema).optional() +}).strict(); + +export const CategoryUncheckedCreateInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + name: z.string(), + description: z.string().optional().nullable(), + icon: z.string().optional().nullable(), + color: z.string().optional().nullable(), + parentId: z.string().optional().nullable(), + children: z.lazy(() => CategoryUncheckedCreateNestedManyWithoutParentInputSchema).optional(), + transactions: z.lazy(() => TransactionUncheckedCreateNestedManyWithoutCategoryInputSchema).optional() +}).strict(); + +export const CategoryUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + icon: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + color: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + parent: z.lazy(() => CategoryUpdateOneWithoutChildrenNestedInputSchema).optional(), + children: z.lazy(() => CategoryUpdateManyWithoutParentNestedInputSchema).optional(), + transactions: z.lazy(() => TransactionUpdateManyWithoutCategoryNestedInputSchema).optional() +}).strict(); + +export const CategoryUncheckedUpdateInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + icon: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + color: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + parentId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + children: z.lazy(() => CategoryUncheckedUpdateManyWithoutParentNestedInputSchema).optional(), + transactions: z.lazy(() => TransactionUncheckedUpdateManyWithoutCategoryNestedInputSchema).optional() +}).strict(); + +export const CategoryCreateManyInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + name: z.string(), + description: z.string().optional().nullable(), + icon: z.string().optional().nullable(), + color: z.string().optional().nullable(), + parentId: z.string().optional().nullable() +}).strict(); + +export const CategoryUpdateManyMutationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + icon: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + color: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), +}).strict(); + +export const CategoryUncheckedUpdateManyInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + icon: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + color: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + parentId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), +}).strict(); + +export const StringFilterSchema: z.ZodType = z.object({ + equals: z.string().optional(), + in: z.string().array().optional(), + notIn: z.string().array().optional(), + lt: z.string().optional(), + lte: z.string().optional(), + gt: z.string().optional(), + gte: z.string().optional(), + contains: z.string().optional(), + startsWith: z.string().optional(), + endsWith: z.string().optional(), + mode: z.lazy(() => QueryModeSchema).optional(), + not: z.union([ z.string(),z.lazy(() => NestedStringFilterSchema) ]).optional(), +}).strict(); + +export const DateTimeFilterSchema: z.ZodType = z.object({ + equals: z.coerce.date().optional(), + in: z.coerce.date().array().optional(), + notIn: z.coerce.date().array().optional(), + lt: z.coerce.date().optional(), + lte: z.coerce.date().optional(), + gt: z.coerce.date().optional(), + gte: z.coerce.date().optional(), + not: z.union([ z.coerce.date(),z.lazy(() => NestedDateTimeFilterSchema) ]).optional(), +}).strict(); + +export const StringNullableFilterSchema: z.ZodType = z.object({ + equals: z.string().optional().nullable(), + in: z.string().array().optional().nullable(), + notIn: z.string().array().optional().nullable(), + lt: z.string().optional(), + lte: z.string().optional(), + gt: z.string().optional(), + gte: z.string().optional(), + contains: z.string().optional(), + startsWith: z.string().optional(), + endsWith: z.string().optional(), + mode: z.lazy(() => QueryModeSchema).optional(), + not: z.union([ z.string(),z.lazy(() => NestedStringNullableFilterSchema) ]).optional().nullable(), +}).strict(); + +export const UserWalletAccountListRelationFilterSchema: z.ZodType = z.object({ + every: z.lazy(() => UserWalletAccountWhereInputSchema).optional(), + some: z.lazy(() => UserWalletAccountWhereInputSchema).optional(), + none: z.lazy(() => UserWalletAccountWhereInputSchema).optional() +}).strict(); + +export const BudgetUserListRelationFilterSchema: z.ZodType = z.object({ + every: z.lazy(() => BudgetUserWhereInputSchema).optional(), + some: z.lazy(() => BudgetUserWhereInputSchema).optional(), + none: z.lazy(() => BudgetUserWhereInputSchema).optional() +}).strict(); + +export const TransactionListRelationFilterSchema: z.ZodType = z.object({ + every: z.lazy(() => TransactionWhereInputSchema).optional(), + some: z.lazy(() => TransactionWhereInputSchema).optional(), + none: z.lazy(() => TransactionWhereInputSchema).optional() +}).strict(); + +export const BudgetUserInvitationListRelationFilterSchema: z.ZodType = z.object({ + every: z.lazy(() => BudgetUserInvitationWhereInputSchema).optional(), + some: z.lazy(() => BudgetUserInvitationWhereInputSchema).optional(), + none: z.lazy(() => BudgetUserInvitationWhereInputSchema).optional() +}).strict(); + +export const BudgetUserInvitationResponseNullableRelationFilterSchema: z.ZodType = z.object({ + is: z.lazy(() => BudgetUserInvitationResponseWhereInputSchema).optional().nullable(), + isNot: z.lazy(() => BudgetUserInvitationResponseWhereInputSchema).optional().nullable() +}).strict(); + +export const SortOrderInputSchema: z.ZodType = z.object({ + sort: z.lazy(() => SortOrderSchema), + nulls: z.lazy(() => NullsOrderSchema).optional() +}).strict(); + +export const UserWalletAccountOrderByRelationAggregateInputSchema: z.ZodType = z.object({ + _count: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const BudgetUserOrderByRelationAggregateInputSchema: z.ZodType = z.object({ + _count: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const TransactionOrderByRelationAggregateInputSchema: z.ZodType = z.object({ + _count: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const BudgetUserInvitationOrderByRelationAggregateInputSchema: z.ZodType = z.object({ + _count: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const UserCountOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + email: z.lazy(() => SortOrderSchema).optional(), + name: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const UserMaxOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + email: z.lazy(() => SortOrderSchema).optional(), + name: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const UserMinOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + email: z.lazy(() => SortOrderSchema).optional(), + name: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const StringWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.string().optional(), + in: z.string().array().optional(), + notIn: z.string().array().optional(), + lt: z.string().optional(), + lte: z.string().optional(), + gt: z.string().optional(), + gte: z.string().optional(), + contains: z.string().optional(), + startsWith: z.string().optional(), + endsWith: z.string().optional(), + mode: z.lazy(() => QueryModeSchema).optional(), + not: z.union([ z.string(),z.lazy(() => NestedStringWithAggregatesFilterSchema) ]).optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedStringFilterSchema).optional(), + _max: z.lazy(() => NestedStringFilterSchema).optional() +}).strict(); + +export const DateTimeWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.coerce.date().optional(), + in: z.coerce.date().array().optional(), + notIn: z.coerce.date().array().optional(), + lt: z.coerce.date().optional(), + lte: z.coerce.date().optional(), + gt: z.coerce.date().optional(), + gte: z.coerce.date().optional(), + not: z.union([ z.coerce.date(),z.lazy(() => NestedDateTimeWithAggregatesFilterSchema) ]).optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedDateTimeFilterSchema).optional(), + _max: z.lazy(() => NestedDateTimeFilterSchema).optional() +}).strict(); + +export const StringNullableWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.string().optional().nullable(), + in: z.string().array().optional().nullable(), + notIn: z.string().array().optional().nullable(), + lt: z.string().optional(), + lte: z.string().optional(), + gt: z.string().optional(), + gte: z.string().optional(), + contains: z.string().optional(), + startsWith: z.string().optional(), + endsWith: z.string().optional(), + mode: z.lazy(() => QueryModeSchema).optional(), + not: z.union([ z.string(),z.lazy(() => NestedStringNullableWithAggregatesFilterSchema) ]).optional().nullable(), + _count: z.lazy(() => NestedIntNullableFilterSchema).optional(), + _min: z.lazy(() => NestedStringNullableFilterSchema).optional(), + _max: z.lazy(() => NestedStringNullableFilterSchema).optional() +}).strict(); + +export const UserRelationFilterSchema: z.ZodType = z.object({ + is: z.lazy(() => UserWhereInputSchema).optional(), + isNot: z.lazy(() => UserWhereInputSchema).optional() +}).strict(); + +export const UserWalletAccountCountOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + name: z.lazy(() => SortOrderSchema).optional(), + icon: z.lazy(() => SortOrderSchema).optional(), + description: z.lazy(() => SortOrderSchema).optional(), + lastDigits: z.lazy(() => SortOrderSchema).optional(), + preferredCurrency: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const UserWalletAccountMaxOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + name: z.lazy(() => SortOrderSchema).optional(), + icon: z.lazy(() => SortOrderSchema).optional(), + description: z.lazy(() => SortOrderSchema).optional(), + lastDigits: z.lazy(() => SortOrderSchema).optional(), + preferredCurrency: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const UserWalletAccountMinOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + name: z.lazy(() => SortOrderSchema).optional(), + icon: z.lazy(() => SortOrderSchema).optional(), + description: z.lazy(() => SortOrderSchema).optional(), + lastDigits: z.lazy(() => SortOrderSchema).optional(), + preferredCurrency: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const EnumBudgetTypeFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => BudgetTypeSchema).optional(), + in: z.lazy(() => BudgetTypeSchema).array().optional(), + notIn: z.lazy(() => BudgetTypeSchema).array().optional(), + not: z.union([ z.lazy(() => BudgetTypeSchema),z.lazy(() => NestedEnumBudgetTypeFilterSchema) ]).optional(), +}).strict(); + +export const BudgetPeriodConfigNullableRelationFilterSchema: z.ZodType = z.object({ + is: z.lazy(() => BudgetPeriodConfigWhereInputSchema).optional().nullable(), + isNot: z.lazy(() => BudgetPeriodConfigWhereInputSchema).optional().nullable() +}).strict(); + +export const BudgetCountOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + name: z.lazy(() => SortOrderSchema).optional(), + description: z.lazy(() => SortOrderSchema).optional(), + preferredCurrency: z.lazy(() => SortOrderSchema).optional(), + type: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const BudgetMaxOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + name: z.lazy(() => SortOrderSchema).optional(), + description: z.lazy(() => SortOrderSchema).optional(), + preferredCurrency: z.lazy(() => SortOrderSchema).optional(), + type: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const BudgetMinOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + name: z.lazy(() => SortOrderSchema).optional(), + description: z.lazy(() => SortOrderSchema).optional(), + preferredCurrency: z.lazy(() => SortOrderSchema).optional(), + type: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const EnumBudgetTypeWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => BudgetTypeSchema).optional(), + in: z.lazy(() => BudgetTypeSchema).array().optional(), + notIn: z.lazy(() => BudgetTypeSchema).array().optional(), + not: z.union([ z.lazy(() => BudgetTypeSchema),z.lazy(() => NestedEnumBudgetTypeWithAggregatesFilterSchema) ]).optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedEnumBudgetTypeFilterSchema).optional(), + _max: z.lazy(() => NestedEnumBudgetTypeFilterSchema).optional() +}).strict(); + +export const EnumBudgetPeriodTypeFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => BudgetPeriodTypeSchema).optional(), + in: z.lazy(() => BudgetPeriodTypeSchema).array().optional(), + notIn: z.lazy(() => BudgetPeriodTypeSchema).array().optional(), + not: z.union([ z.lazy(() => BudgetPeriodTypeSchema),z.lazy(() => NestedEnumBudgetPeriodTypeFilterSchema) ]).optional(), +}).strict(); + +export const DecimalFilterSchema: z.ZodType = z.object({ + equals: z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }).optional(), + in: z.union([z.number().array(),z.string().array(),z.instanceof(Prisma.Decimal).array(),DecimalJsLikeSchema.array(),]).refine((v) => Array.isArray(v) && (v as any[]).every((v) => isValidDecimalInput(v)), { message: 'Must be a Decimal' }).optional(), + notIn: z.union([z.number().array(),z.string().array(),z.instanceof(Prisma.Decimal).array(),DecimalJsLikeSchema.array(),]).refine((v) => Array.isArray(v) && (v as any[]).every((v) => isValidDecimalInput(v)), { message: 'Must be a Decimal' }).optional(), + lt: z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }).optional(), + lte: z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }).optional(), + gt: z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }).optional(), + gte: z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }).optional(), + not: z.union([ z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }),z.lazy(() => NestedDecimalFilterSchema) ]).optional(), +}).strict(); + +export const DateTimeNullableFilterSchema: z.ZodType = z.object({ + equals: z.coerce.date().optional().nullable(), + in: z.coerce.date().array().optional().nullable(), + notIn: z.coerce.date().array().optional().nullable(), + lt: z.coerce.date().optional(), + lte: z.coerce.date().optional(), + gt: z.coerce.date().optional(), + gte: z.coerce.date().optional(), + not: z.union([ z.coerce.date(),z.lazy(() => NestedDateTimeNullableFilterSchema) ]).optional().nullable(), +}).strict(); + +export const BudgetRelationFilterSchema: z.ZodType = z.object({ + is: z.lazy(() => BudgetWhereInputSchema).optional(), + isNot: z.lazy(() => BudgetWhereInputSchema).optional() +}).strict(); + +export const BudgetPeriodConfigCountOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + type: z.lazy(() => SortOrderSchema).optional(), + amount: z.lazy(() => SortOrderSchema).optional(), + currency: z.lazy(() => SortOrderSchema).optional(), + startDate: z.lazy(() => SortOrderSchema).optional(), + endDate: z.lazy(() => SortOrderSchema).optional(), + budgetId: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const BudgetPeriodConfigAvgOrderByAggregateInputSchema: z.ZodType = z.object({ + amount: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const BudgetPeriodConfigMaxOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + type: z.lazy(() => SortOrderSchema).optional(), + amount: z.lazy(() => SortOrderSchema).optional(), + currency: z.lazy(() => SortOrderSchema).optional(), + startDate: z.lazy(() => SortOrderSchema).optional(), + endDate: z.lazy(() => SortOrderSchema).optional(), + budgetId: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const BudgetPeriodConfigMinOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + type: z.lazy(() => SortOrderSchema).optional(), + amount: z.lazy(() => SortOrderSchema).optional(), + currency: z.lazy(() => SortOrderSchema).optional(), + startDate: z.lazy(() => SortOrderSchema).optional(), + endDate: z.lazy(() => SortOrderSchema).optional(), + budgetId: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const BudgetPeriodConfigSumOrderByAggregateInputSchema: z.ZodType = z.object({ + amount: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const EnumBudgetPeriodTypeWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => BudgetPeriodTypeSchema).optional(), + in: z.lazy(() => BudgetPeriodTypeSchema).array().optional(), + notIn: z.lazy(() => BudgetPeriodTypeSchema).array().optional(), + not: z.union([ z.lazy(() => BudgetPeriodTypeSchema),z.lazy(() => NestedEnumBudgetPeriodTypeWithAggregatesFilterSchema) ]).optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedEnumBudgetPeriodTypeFilterSchema).optional(), + _max: z.lazy(() => NestedEnumBudgetPeriodTypeFilterSchema).optional() +}).strict(); + +export const DecimalWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }).optional(), + in: z.union([z.number().array(),z.string().array(),z.instanceof(Prisma.Decimal).array(),DecimalJsLikeSchema.array(),]).refine((v) => Array.isArray(v) && (v as any[]).every((v) => isValidDecimalInput(v)), { message: 'Must be a Decimal' }).optional(), + notIn: z.union([z.number().array(),z.string().array(),z.instanceof(Prisma.Decimal).array(),DecimalJsLikeSchema.array(),]).refine((v) => Array.isArray(v) && (v as any[]).every((v) => isValidDecimalInput(v)), { message: 'Must be a Decimal' }).optional(), + lt: z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }).optional(), + lte: z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }).optional(), + gt: z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }).optional(), + gte: z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }).optional(), + not: z.union([ z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }),z.lazy(() => NestedDecimalWithAggregatesFilterSchema) ]).optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _avg: z.lazy(() => NestedDecimalFilterSchema).optional(), + _sum: z.lazy(() => NestedDecimalFilterSchema).optional(), + _min: z.lazy(() => NestedDecimalFilterSchema).optional(), + _max: z.lazy(() => NestedDecimalFilterSchema).optional() +}).strict(); + +export const DateTimeNullableWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.coerce.date().optional().nullable(), + in: z.coerce.date().array().optional().nullable(), + notIn: z.coerce.date().array().optional().nullable(), + lt: z.coerce.date().optional(), + lte: z.coerce.date().optional(), + gt: z.coerce.date().optional(), + gte: z.coerce.date().optional(), + not: z.union([ z.coerce.date(),z.lazy(() => NestedDateTimeNullableWithAggregatesFilterSchema) ]).optional().nullable(), + _count: z.lazy(() => NestedIntNullableFilterSchema).optional(), + _min: z.lazy(() => NestedDateTimeNullableFilterSchema).optional(), + _max: z.lazy(() => NestedDateTimeNullableFilterSchema).optional() +}).strict(); + +export const EnumBudgetUserPermissionFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => BudgetUserPermissionSchema).optional(), + in: z.lazy(() => BudgetUserPermissionSchema).array().optional(), + notIn: z.lazy(() => BudgetUserPermissionSchema).array().optional(), + not: z.union([ z.lazy(() => BudgetUserPermissionSchema),z.lazy(() => NestedEnumBudgetUserPermissionFilterSchema) ]).optional(), +}).strict(); + +export const BudgetUserUserIdBudgetIdCompoundUniqueInputSchema: z.ZodType = z.object({ + userId: z.string(), + budgetId: z.string() +}).strict(); + +export const BudgetUserCountOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + permission: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + budgetId: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const BudgetUserMaxOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + permission: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + budgetId: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const BudgetUserMinOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + permission: z.lazy(() => SortOrderSchema).optional(), + userId: z.lazy(() => SortOrderSchema).optional(), + budgetId: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const EnumBudgetUserPermissionWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => BudgetUserPermissionSchema).optional(), + in: z.lazy(() => BudgetUserPermissionSchema).array().optional(), + notIn: z.lazy(() => BudgetUserPermissionSchema).array().optional(), + not: z.union([ z.lazy(() => BudgetUserPermissionSchema),z.lazy(() => NestedEnumBudgetUserPermissionWithAggregatesFilterSchema) ]).optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedEnumBudgetUserPermissionFilterSchema).optional(), + _max: z.lazy(() => NestedEnumBudgetUserPermissionFilterSchema).optional() +}).strict(); + +export const EnumBudgetUserPermissionNullableFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => BudgetUserPermissionSchema).optional().nullable(), + in: z.lazy(() => BudgetUserPermissionSchema).array().optional().nullable(), + notIn: z.lazy(() => BudgetUserPermissionSchema).array().optional().nullable(), + not: z.union([ z.lazy(() => BudgetUserPermissionSchema),z.lazy(() => NestedEnumBudgetUserPermissionNullableFilterSchema) ]).optional().nullable(), +}).strict(); + +export const BudgetUserInvitationResponseListRelationFilterSchema: z.ZodType = z.object({ + every: z.lazy(() => BudgetUserInvitationResponseWhereInputSchema).optional(), + some: z.lazy(() => BudgetUserInvitationResponseWhereInputSchema).optional(), + none: z.lazy(() => BudgetUserInvitationResponseWhereInputSchema).optional() +}).strict(); + +export const BudgetUserInvitationResponseOrderByRelationAggregateInputSchema: z.ZodType = z.object({ + _count: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const BudgetUserInvitationTokenBudgetIdCompoundUniqueInputSchema: z.ZodType = z.object({ + token: z.string(), + budgetId: z.string() +}).strict(); + +export const BudgetUserInvitationCountOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + email: z.lazy(() => SortOrderSchema).optional(), + token: z.lazy(() => SortOrderSchema).optional(), + expiresAt: z.lazy(() => SortOrderSchema).optional(), + permission: z.lazy(() => SortOrderSchema).optional(), + createdByUserId: z.lazy(() => SortOrderSchema).optional(), + budgetId: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const BudgetUserInvitationMaxOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + email: z.lazy(() => SortOrderSchema).optional(), + token: z.lazy(() => SortOrderSchema).optional(), + expiresAt: z.lazy(() => SortOrderSchema).optional(), + permission: z.lazy(() => SortOrderSchema).optional(), + createdByUserId: z.lazy(() => SortOrderSchema).optional(), + budgetId: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const BudgetUserInvitationMinOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + email: z.lazy(() => SortOrderSchema).optional(), + token: z.lazy(() => SortOrderSchema).optional(), + expiresAt: z.lazy(() => SortOrderSchema).optional(), + permission: z.lazy(() => SortOrderSchema).optional(), + createdByUserId: z.lazy(() => SortOrderSchema).optional(), + budgetId: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const EnumBudgetUserPermissionNullableWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => BudgetUserPermissionSchema).optional().nullable(), + in: z.lazy(() => BudgetUserPermissionSchema).array().optional().nullable(), + notIn: z.lazy(() => BudgetUserPermissionSchema).array().optional().nullable(), + not: z.union([ z.lazy(() => BudgetUserPermissionSchema),z.lazy(() => NestedEnumBudgetUserPermissionNullableWithAggregatesFilterSchema) ]).optional().nullable(), + _count: z.lazy(() => NestedIntNullableFilterSchema).optional(), + _min: z.lazy(() => NestedEnumBudgetUserPermissionNullableFilterSchema).optional(), + _max: z.lazy(() => NestedEnumBudgetUserPermissionNullableFilterSchema).optional() +}).strict(); + +export const BudgetUserInvitationRelationFilterSchema: z.ZodType = z.object({ + is: z.lazy(() => BudgetUserInvitationWhereInputSchema).optional(), + isNot: z.lazy(() => BudgetUserInvitationWhereInputSchema).optional() +}).strict(); + +export const UserNullableRelationFilterSchema: z.ZodType = z.object({ + is: z.lazy(() => UserWhereInputSchema).optional().nullable(), + isNot: z.lazy(() => UserWhereInputSchema).optional().nullable() +}).strict(); + +export const BudgetUserInvitationResponseCountOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + acceptedAt: z.lazy(() => SortOrderSchema).optional(), + declinedAt: z.lazy(() => SortOrderSchema).optional(), + invitationId: z.lazy(() => SortOrderSchema).optional(), + createdUserId: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const BudgetUserInvitationResponseMaxOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + acceptedAt: z.lazy(() => SortOrderSchema).optional(), + declinedAt: z.lazy(() => SortOrderSchema).optional(), + invitationId: z.lazy(() => SortOrderSchema).optional(), + createdUserId: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const BudgetUserInvitationResponseMinOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + acceptedAt: z.lazy(() => SortOrderSchema).optional(), + declinedAt: z.lazy(() => SortOrderSchema).optional(), + invitationId: z.lazy(() => SortOrderSchema).optional(), + createdUserId: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const CategoryNullableRelationFilterSchema: z.ZodType = z.object({ + is: z.lazy(() => CategoryWhereInputSchema).optional().nullable(), + isNot: z.lazy(() => CategoryWhereInputSchema).optional().nullable() +}).strict(); + +export const BudgetNullableRelationFilterSchema: z.ZodType = z.object({ + is: z.lazy(() => BudgetWhereInputSchema).optional().nullable(), + isNot: z.lazy(() => BudgetWhereInputSchema).optional().nullable() +}).strict(); + +export const UserWalletAccountRelationFilterSchema: z.ZodType = z.object({ + is: z.lazy(() => UserWalletAccountWhereInputSchema).optional(), + isNot: z.lazy(() => UserWalletAccountWhereInputSchema).optional() +}).strict(); + +export const TransactionCountOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + amount: z.lazy(() => SortOrderSchema).optional(), + currency: z.lazy(() => SortOrderSchema).optional(), + date: z.lazy(() => SortOrderSchema).optional(), + note: z.lazy(() => SortOrderSchema).optional(), + categoryId: z.lazy(() => SortOrderSchema).optional(), + budgetId: z.lazy(() => SortOrderSchema).optional(), + walletAccountId: z.lazy(() => SortOrderSchema).optional(), + createdByUserId: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const TransactionAvgOrderByAggregateInputSchema: z.ZodType = z.object({ + amount: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const TransactionMaxOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + amount: z.lazy(() => SortOrderSchema).optional(), + currency: z.lazy(() => SortOrderSchema).optional(), + date: z.lazy(() => SortOrderSchema).optional(), + note: z.lazy(() => SortOrderSchema).optional(), + categoryId: z.lazy(() => SortOrderSchema).optional(), + budgetId: z.lazy(() => SortOrderSchema).optional(), + walletAccountId: z.lazy(() => SortOrderSchema).optional(), + createdByUserId: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const TransactionMinOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + amount: z.lazy(() => SortOrderSchema).optional(), + currency: z.lazy(() => SortOrderSchema).optional(), + date: z.lazy(() => SortOrderSchema).optional(), + note: z.lazy(() => SortOrderSchema).optional(), + categoryId: z.lazy(() => SortOrderSchema).optional(), + budgetId: z.lazy(() => SortOrderSchema).optional(), + walletAccountId: z.lazy(() => SortOrderSchema).optional(), + createdByUserId: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const TransactionSumOrderByAggregateInputSchema: z.ZodType = z.object({ + amount: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const CategoryListRelationFilterSchema: z.ZodType = z.object({ + every: z.lazy(() => CategoryWhereInputSchema).optional(), + some: z.lazy(() => CategoryWhereInputSchema).optional(), + none: z.lazy(() => CategoryWhereInputSchema).optional() +}).strict(); + +export const CategoryOrderByRelationAggregateInputSchema: z.ZodType = z.object({ + _count: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const CategoryCountOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + name: z.lazy(() => SortOrderSchema).optional(), + description: z.lazy(() => SortOrderSchema).optional(), + icon: z.lazy(() => SortOrderSchema).optional(), + color: z.lazy(() => SortOrderSchema).optional(), + parentId: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const CategoryMaxOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + name: z.lazy(() => SortOrderSchema).optional(), + description: z.lazy(() => SortOrderSchema).optional(), + icon: z.lazy(() => SortOrderSchema).optional(), + color: z.lazy(() => SortOrderSchema).optional(), + parentId: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const CategoryMinOrderByAggregateInputSchema: z.ZodType = z.object({ + id: z.lazy(() => SortOrderSchema).optional(), + createdAt: z.lazy(() => SortOrderSchema).optional(), + updatedAt: z.lazy(() => SortOrderSchema).optional(), + name: z.lazy(() => SortOrderSchema).optional(), + description: z.lazy(() => SortOrderSchema).optional(), + icon: z.lazy(() => SortOrderSchema).optional(), + color: z.lazy(() => SortOrderSchema).optional(), + parentId: z.lazy(() => SortOrderSchema).optional() +}).strict(); + +export const UserWalletAccountCreateNestedManyWithoutUserInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => UserWalletAccountCreateWithoutUserInputSchema),z.lazy(() => UserWalletAccountCreateWithoutUserInputSchema).array(),z.lazy(() => UserWalletAccountUncheckedCreateWithoutUserInputSchema),z.lazy(() => UserWalletAccountUncheckedCreateWithoutUserInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => UserWalletAccountCreateOrConnectWithoutUserInputSchema),z.lazy(() => UserWalletAccountCreateOrConnectWithoutUserInputSchema).array() ]).optional(), + createMany: z.lazy(() => UserWalletAccountCreateManyUserInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => UserWalletAccountWhereUniqueInputSchema),z.lazy(() => UserWalletAccountWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const BudgetUserCreateNestedManyWithoutUserInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => BudgetUserCreateWithoutUserInputSchema),z.lazy(() => BudgetUserCreateWithoutUserInputSchema).array(),z.lazy(() => BudgetUserUncheckedCreateWithoutUserInputSchema),z.lazy(() => BudgetUserUncheckedCreateWithoutUserInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => BudgetUserCreateOrConnectWithoutUserInputSchema),z.lazy(() => BudgetUserCreateOrConnectWithoutUserInputSchema).array() ]).optional(), + createMany: z.lazy(() => BudgetUserCreateManyUserInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => BudgetUserWhereUniqueInputSchema),z.lazy(() => BudgetUserWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const TransactionCreateNestedManyWithoutCreatedByUserInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TransactionCreateWithoutCreatedByUserInputSchema),z.lazy(() => TransactionCreateWithoutCreatedByUserInputSchema).array(),z.lazy(() => TransactionUncheckedCreateWithoutCreatedByUserInputSchema),z.lazy(() => TransactionUncheckedCreateWithoutCreatedByUserInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TransactionCreateOrConnectWithoutCreatedByUserInputSchema),z.lazy(() => TransactionCreateOrConnectWithoutCreatedByUserInputSchema).array() ]).optional(), + createMany: z.lazy(() => TransactionCreateManyCreatedByUserInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => TransactionWhereUniqueInputSchema),z.lazy(() => TransactionWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const BudgetUserInvitationCreateNestedManyWithoutCreatedByUserInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => BudgetUserInvitationCreateWithoutCreatedByUserInputSchema),z.lazy(() => BudgetUserInvitationCreateWithoutCreatedByUserInputSchema).array(),z.lazy(() => BudgetUserInvitationUncheckedCreateWithoutCreatedByUserInputSchema),z.lazy(() => BudgetUserInvitationUncheckedCreateWithoutCreatedByUserInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => BudgetUserInvitationCreateOrConnectWithoutCreatedByUserInputSchema),z.lazy(() => BudgetUserInvitationCreateOrConnectWithoutCreatedByUserInputSchema).array() ]).optional(), + createMany: z.lazy(() => BudgetUserInvitationCreateManyCreatedByUserInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema),z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const BudgetUserInvitationResponseCreateNestedOneWithoutCreatedUserInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => BudgetUserInvitationResponseCreateWithoutCreatedUserInputSchema),z.lazy(() => BudgetUserInvitationResponseUncheckedCreateWithoutCreatedUserInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => BudgetUserInvitationResponseCreateOrConnectWithoutCreatedUserInputSchema).optional(), + connect: z.lazy(() => BudgetUserInvitationResponseWhereUniqueInputSchema).optional() +}).strict(); + +export const UserWalletAccountUncheckedCreateNestedManyWithoutUserInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => UserWalletAccountCreateWithoutUserInputSchema),z.lazy(() => UserWalletAccountCreateWithoutUserInputSchema).array(),z.lazy(() => UserWalletAccountUncheckedCreateWithoutUserInputSchema),z.lazy(() => UserWalletAccountUncheckedCreateWithoutUserInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => UserWalletAccountCreateOrConnectWithoutUserInputSchema),z.lazy(() => UserWalletAccountCreateOrConnectWithoutUserInputSchema).array() ]).optional(), + createMany: z.lazy(() => UserWalletAccountCreateManyUserInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => UserWalletAccountWhereUniqueInputSchema),z.lazy(() => UserWalletAccountWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const BudgetUserUncheckedCreateNestedManyWithoutUserInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => BudgetUserCreateWithoutUserInputSchema),z.lazy(() => BudgetUserCreateWithoutUserInputSchema).array(),z.lazy(() => BudgetUserUncheckedCreateWithoutUserInputSchema),z.lazy(() => BudgetUserUncheckedCreateWithoutUserInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => BudgetUserCreateOrConnectWithoutUserInputSchema),z.lazy(() => BudgetUserCreateOrConnectWithoutUserInputSchema).array() ]).optional(), + createMany: z.lazy(() => BudgetUserCreateManyUserInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => BudgetUserWhereUniqueInputSchema),z.lazy(() => BudgetUserWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const TransactionUncheckedCreateNestedManyWithoutCreatedByUserInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TransactionCreateWithoutCreatedByUserInputSchema),z.lazy(() => TransactionCreateWithoutCreatedByUserInputSchema).array(),z.lazy(() => TransactionUncheckedCreateWithoutCreatedByUserInputSchema),z.lazy(() => TransactionUncheckedCreateWithoutCreatedByUserInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TransactionCreateOrConnectWithoutCreatedByUserInputSchema),z.lazy(() => TransactionCreateOrConnectWithoutCreatedByUserInputSchema).array() ]).optional(), + createMany: z.lazy(() => TransactionCreateManyCreatedByUserInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => TransactionWhereUniqueInputSchema),z.lazy(() => TransactionWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const BudgetUserInvitationUncheckedCreateNestedManyWithoutCreatedByUserInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => BudgetUserInvitationCreateWithoutCreatedByUserInputSchema),z.lazy(() => BudgetUserInvitationCreateWithoutCreatedByUserInputSchema).array(),z.lazy(() => BudgetUserInvitationUncheckedCreateWithoutCreatedByUserInputSchema),z.lazy(() => BudgetUserInvitationUncheckedCreateWithoutCreatedByUserInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => BudgetUserInvitationCreateOrConnectWithoutCreatedByUserInputSchema),z.lazy(() => BudgetUserInvitationCreateOrConnectWithoutCreatedByUserInputSchema).array() ]).optional(), + createMany: z.lazy(() => BudgetUserInvitationCreateManyCreatedByUserInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema),z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const BudgetUserInvitationResponseUncheckedCreateNestedOneWithoutCreatedUserInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => BudgetUserInvitationResponseCreateWithoutCreatedUserInputSchema),z.lazy(() => BudgetUserInvitationResponseUncheckedCreateWithoutCreatedUserInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => BudgetUserInvitationResponseCreateOrConnectWithoutCreatedUserInputSchema).optional(), + connect: z.lazy(() => BudgetUserInvitationResponseWhereUniqueInputSchema).optional() +}).strict(); + +export const StringFieldUpdateOperationsInputSchema: z.ZodType = z.object({ + set: z.string().optional() +}).strict(); + +export const DateTimeFieldUpdateOperationsInputSchema: z.ZodType = z.object({ + set: z.coerce.date().optional() +}).strict(); + +export const NullableStringFieldUpdateOperationsInputSchema: z.ZodType = z.object({ + set: z.string().optional().nullable() +}).strict(); + +export const UserWalletAccountUpdateManyWithoutUserNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => UserWalletAccountCreateWithoutUserInputSchema),z.lazy(() => UserWalletAccountCreateWithoutUserInputSchema).array(),z.lazy(() => UserWalletAccountUncheckedCreateWithoutUserInputSchema),z.lazy(() => UserWalletAccountUncheckedCreateWithoutUserInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => UserWalletAccountCreateOrConnectWithoutUserInputSchema),z.lazy(() => UserWalletAccountCreateOrConnectWithoutUserInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => UserWalletAccountUpsertWithWhereUniqueWithoutUserInputSchema),z.lazy(() => UserWalletAccountUpsertWithWhereUniqueWithoutUserInputSchema).array() ]).optional(), + createMany: z.lazy(() => UserWalletAccountCreateManyUserInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => UserWalletAccountWhereUniqueInputSchema),z.lazy(() => UserWalletAccountWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => UserWalletAccountWhereUniqueInputSchema),z.lazy(() => UserWalletAccountWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => UserWalletAccountWhereUniqueInputSchema),z.lazy(() => UserWalletAccountWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => UserWalletAccountWhereUniqueInputSchema),z.lazy(() => UserWalletAccountWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => UserWalletAccountUpdateWithWhereUniqueWithoutUserInputSchema),z.lazy(() => UserWalletAccountUpdateWithWhereUniqueWithoutUserInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => UserWalletAccountUpdateManyWithWhereWithoutUserInputSchema),z.lazy(() => UserWalletAccountUpdateManyWithWhereWithoutUserInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => UserWalletAccountScalarWhereInputSchema),z.lazy(() => UserWalletAccountScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const BudgetUserUpdateManyWithoutUserNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => BudgetUserCreateWithoutUserInputSchema),z.lazy(() => BudgetUserCreateWithoutUserInputSchema).array(),z.lazy(() => BudgetUserUncheckedCreateWithoutUserInputSchema),z.lazy(() => BudgetUserUncheckedCreateWithoutUserInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => BudgetUserCreateOrConnectWithoutUserInputSchema),z.lazy(() => BudgetUserCreateOrConnectWithoutUserInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => BudgetUserUpsertWithWhereUniqueWithoutUserInputSchema),z.lazy(() => BudgetUserUpsertWithWhereUniqueWithoutUserInputSchema).array() ]).optional(), + createMany: z.lazy(() => BudgetUserCreateManyUserInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => BudgetUserWhereUniqueInputSchema),z.lazy(() => BudgetUserWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => BudgetUserWhereUniqueInputSchema),z.lazy(() => BudgetUserWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => BudgetUserWhereUniqueInputSchema),z.lazy(() => BudgetUserWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => BudgetUserWhereUniqueInputSchema),z.lazy(() => BudgetUserWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => BudgetUserUpdateWithWhereUniqueWithoutUserInputSchema),z.lazy(() => BudgetUserUpdateWithWhereUniqueWithoutUserInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => BudgetUserUpdateManyWithWhereWithoutUserInputSchema),z.lazy(() => BudgetUserUpdateManyWithWhereWithoutUserInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => BudgetUserScalarWhereInputSchema),z.lazy(() => BudgetUserScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const TransactionUpdateManyWithoutCreatedByUserNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TransactionCreateWithoutCreatedByUserInputSchema),z.lazy(() => TransactionCreateWithoutCreatedByUserInputSchema).array(),z.lazy(() => TransactionUncheckedCreateWithoutCreatedByUserInputSchema),z.lazy(() => TransactionUncheckedCreateWithoutCreatedByUserInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TransactionCreateOrConnectWithoutCreatedByUserInputSchema),z.lazy(() => TransactionCreateOrConnectWithoutCreatedByUserInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => TransactionUpsertWithWhereUniqueWithoutCreatedByUserInputSchema),z.lazy(() => TransactionUpsertWithWhereUniqueWithoutCreatedByUserInputSchema).array() ]).optional(), + createMany: z.lazy(() => TransactionCreateManyCreatedByUserInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => TransactionWhereUniqueInputSchema),z.lazy(() => TransactionWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => TransactionWhereUniqueInputSchema),z.lazy(() => TransactionWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => TransactionWhereUniqueInputSchema),z.lazy(() => TransactionWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => TransactionWhereUniqueInputSchema),z.lazy(() => TransactionWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => TransactionUpdateWithWhereUniqueWithoutCreatedByUserInputSchema),z.lazy(() => TransactionUpdateWithWhereUniqueWithoutCreatedByUserInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => TransactionUpdateManyWithWhereWithoutCreatedByUserInputSchema),z.lazy(() => TransactionUpdateManyWithWhereWithoutCreatedByUserInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => TransactionScalarWhereInputSchema),z.lazy(() => TransactionScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const BudgetUserInvitationUpdateManyWithoutCreatedByUserNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => BudgetUserInvitationCreateWithoutCreatedByUserInputSchema),z.lazy(() => BudgetUserInvitationCreateWithoutCreatedByUserInputSchema).array(),z.lazy(() => BudgetUserInvitationUncheckedCreateWithoutCreatedByUserInputSchema),z.lazy(() => BudgetUserInvitationUncheckedCreateWithoutCreatedByUserInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => BudgetUserInvitationCreateOrConnectWithoutCreatedByUserInputSchema),z.lazy(() => BudgetUserInvitationCreateOrConnectWithoutCreatedByUserInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => BudgetUserInvitationUpsertWithWhereUniqueWithoutCreatedByUserInputSchema),z.lazy(() => BudgetUserInvitationUpsertWithWhereUniqueWithoutCreatedByUserInputSchema).array() ]).optional(), + createMany: z.lazy(() => BudgetUserInvitationCreateManyCreatedByUserInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema),z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema),z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema),z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema),z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => BudgetUserInvitationUpdateWithWhereUniqueWithoutCreatedByUserInputSchema),z.lazy(() => BudgetUserInvitationUpdateWithWhereUniqueWithoutCreatedByUserInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => BudgetUserInvitationUpdateManyWithWhereWithoutCreatedByUserInputSchema),z.lazy(() => BudgetUserInvitationUpdateManyWithWhereWithoutCreatedByUserInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => BudgetUserInvitationScalarWhereInputSchema),z.lazy(() => BudgetUserInvitationScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const BudgetUserInvitationResponseUpdateOneWithoutCreatedUserNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => BudgetUserInvitationResponseCreateWithoutCreatedUserInputSchema),z.lazy(() => BudgetUserInvitationResponseUncheckedCreateWithoutCreatedUserInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => BudgetUserInvitationResponseCreateOrConnectWithoutCreatedUserInputSchema).optional(), + upsert: z.lazy(() => BudgetUserInvitationResponseUpsertWithoutCreatedUserInputSchema).optional(), + disconnect: z.union([ z.boolean(),z.lazy(() => BudgetUserInvitationResponseWhereInputSchema) ]).optional(), + delete: z.union([ z.boolean(),z.lazy(() => BudgetUserInvitationResponseWhereInputSchema) ]).optional(), + connect: z.lazy(() => BudgetUserInvitationResponseWhereUniqueInputSchema).optional(), + update: z.union([ z.lazy(() => BudgetUserInvitationResponseUpdateToOneWithWhereWithoutCreatedUserInputSchema),z.lazy(() => BudgetUserInvitationResponseUpdateWithoutCreatedUserInputSchema),z.lazy(() => BudgetUserInvitationResponseUncheckedUpdateWithoutCreatedUserInputSchema) ]).optional(), +}).strict(); + +export const UserWalletAccountUncheckedUpdateManyWithoutUserNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => UserWalletAccountCreateWithoutUserInputSchema),z.lazy(() => UserWalletAccountCreateWithoutUserInputSchema).array(),z.lazy(() => UserWalletAccountUncheckedCreateWithoutUserInputSchema),z.lazy(() => UserWalletAccountUncheckedCreateWithoutUserInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => UserWalletAccountCreateOrConnectWithoutUserInputSchema),z.lazy(() => UserWalletAccountCreateOrConnectWithoutUserInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => UserWalletAccountUpsertWithWhereUniqueWithoutUserInputSchema),z.lazy(() => UserWalletAccountUpsertWithWhereUniqueWithoutUserInputSchema).array() ]).optional(), + createMany: z.lazy(() => UserWalletAccountCreateManyUserInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => UserWalletAccountWhereUniqueInputSchema),z.lazy(() => UserWalletAccountWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => UserWalletAccountWhereUniqueInputSchema),z.lazy(() => UserWalletAccountWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => UserWalletAccountWhereUniqueInputSchema),z.lazy(() => UserWalletAccountWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => UserWalletAccountWhereUniqueInputSchema),z.lazy(() => UserWalletAccountWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => UserWalletAccountUpdateWithWhereUniqueWithoutUserInputSchema),z.lazy(() => UserWalletAccountUpdateWithWhereUniqueWithoutUserInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => UserWalletAccountUpdateManyWithWhereWithoutUserInputSchema),z.lazy(() => UserWalletAccountUpdateManyWithWhereWithoutUserInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => UserWalletAccountScalarWhereInputSchema),z.lazy(() => UserWalletAccountScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const BudgetUserUncheckedUpdateManyWithoutUserNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => BudgetUserCreateWithoutUserInputSchema),z.lazy(() => BudgetUserCreateWithoutUserInputSchema).array(),z.lazy(() => BudgetUserUncheckedCreateWithoutUserInputSchema),z.lazy(() => BudgetUserUncheckedCreateWithoutUserInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => BudgetUserCreateOrConnectWithoutUserInputSchema),z.lazy(() => BudgetUserCreateOrConnectWithoutUserInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => BudgetUserUpsertWithWhereUniqueWithoutUserInputSchema),z.lazy(() => BudgetUserUpsertWithWhereUniqueWithoutUserInputSchema).array() ]).optional(), + createMany: z.lazy(() => BudgetUserCreateManyUserInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => BudgetUserWhereUniqueInputSchema),z.lazy(() => BudgetUserWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => BudgetUserWhereUniqueInputSchema),z.lazy(() => BudgetUserWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => BudgetUserWhereUniqueInputSchema),z.lazy(() => BudgetUserWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => BudgetUserWhereUniqueInputSchema),z.lazy(() => BudgetUserWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => BudgetUserUpdateWithWhereUniqueWithoutUserInputSchema),z.lazy(() => BudgetUserUpdateWithWhereUniqueWithoutUserInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => BudgetUserUpdateManyWithWhereWithoutUserInputSchema),z.lazy(() => BudgetUserUpdateManyWithWhereWithoutUserInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => BudgetUserScalarWhereInputSchema),z.lazy(() => BudgetUserScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const TransactionUncheckedUpdateManyWithoutCreatedByUserNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TransactionCreateWithoutCreatedByUserInputSchema),z.lazy(() => TransactionCreateWithoutCreatedByUserInputSchema).array(),z.lazy(() => TransactionUncheckedCreateWithoutCreatedByUserInputSchema),z.lazy(() => TransactionUncheckedCreateWithoutCreatedByUserInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TransactionCreateOrConnectWithoutCreatedByUserInputSchema),z.lazy(() => TransactionCreateOrConnectWithoutCreatedByUserInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => TransactionUpsertWithWhereUniqueWithoutCreatedByUserInputSchema),z.lazy(() => TransactionUpsertWithWhereUniqueWithoutCreatedByUserInputSchema).array() ]).optional(), + createMany: z.lazy(() => TransactionCreateManyCreatedByUserInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => TransactionWhereUniqueInputSchema),z.lazy(() => TransactionWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => TransactionWhereUniqueInputSchema),z.lazy(() => TransactionWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => TransactionWhereUniqueInputSchema),z.lazy(() => TransactionWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => TransactionWhereUniqueInputSchema),z.lazy(() => TransactionWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => TransactionUpdateWithWhereUniqueWithoutCreatedByUserInputSchema),z.lazy(() => TransactionUpdateWithWhereUniqueWithoutCreatedByUserInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => TransactionUpdateManyWithWhereWithoutCreatedByUserInputSchema),z.lazy(() => TransactionUpdateManyWithWhereWithoutCreatedByUserInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => TransactionScalarWhereInputSchema),z.lazy(() => TransactionScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const BudgetUserInvitationUncheckedUpdateManyWithoutCreatedByUserNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => BudgetUserInvitationCreateWithoutCreatedByUserInputSchema),z.lazy(() => BudgetUserInvitationCreateWithoutCreatedByUserInputSchema).array(),z.lazy(() => BudgetUserInvitationUncheckedCreateWithoutCreatedByUserInputSchema),z.lazy(() => BudgetUserInvitationUncheckedCreateWithoutCreatedByUserInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => BudgetUserInvitationCreateOrConnectWithoutCreatedByUserInputSchema),z.lazy(() => BudgetUserInvitationCreateOrConnectWithoutCreatedByUserInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => BudgetUserInvitationUpsertWithWhereUniqueWithoutCreatedByUserInputSchema),z.lazy(() => BudgetUserInvitationUpsertWithWhereUniqueWithoutCreatedByUserInputSchema).array() ]).optional(), + createMany: z.lazy(() => BudgetUserInvitationCreateManyCreatedByUserInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema),z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema),z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema),z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema),z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => BudgetUserInvitationUpdateWithWhereUniqueWithoutCreatedByUserInputSchema),z.lazy(() => BudgetUserInvitationUpdateWithWhereUniqueWithoutCreatedByUserInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => BudgetUserInvitationUpdateManyWithWhereWithoutCreatedByUserInputSchema),z.lazy(() => BudgetUserInvitationUpdateManyWithWhereWithoutCreatedByUserInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => BudgetUserInvitationScalarWhereInputSchema),z.lazy(() => BudgetUserInvitationScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const BudgetUserInvitationResponseUncheckedUpdateOneWithoutCreatedUserNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => BudgetUserInvitationResponseCreateWithoutCreatedUserInputSchema),z.lazy(() => BudgetUserInvitationResponseUncheckedCreateWithoutCreatedUserInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => BudgetUserInvitationResponseCreateOrConnectWithoutCreatedUserInputSchema).optional(), + upsert: z.lazy(() => BudgetUserInvitationResponseUpsertWithoutCreatedUserInputSchema).optional(), + disconnect: z.union([ z.boolean(),z.lazy(() => BudgetUserInvitationResponseWhereInputSchema) ]).optional(), + delete: z.union([ z.boolean(),z.lazy(() => BudgetUserInvitationResponseWhereInputSchema) ]).optional(), + connect: z.lazy(() => BudgetUserInvitationResponseWhereUniqueInputSchema).optional(), + update: z.union([ z.lazy(() => BudgetUserInvitationResponseUpdateToOneWithWhereWithoutCreatedUserInputSchema),z.lazy(() => BudgetUserInvitationResponseUpdateWithoutCreatedUserInputSchema),z.lazy(() => BudgetUserInvitationResponseUncheckedUpdateWithoutCreatedUserInputSchema) ]).optional(), +}).strict(); + +export const UserCreateNestedOneWithoutWalletAccountsInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => UserCreateWithoutWalletAccountsInputSchema),z.lazy(() => UserUncheckedCreateWithoutWalletAccountsInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => UserCreateOrConnectWithoutWalletAccountsInputSchema).optional(), + connect: z.lazy(() => UserWhereUniqueInputSchema).optional() +}).strict(); + +export const TransactionCreateNestedManyWithoutWalletAccountInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TransactionCreateWithoutWalletAccountInputSchema),z.lazy(() => TransactionCreateWithoutWalletAccountInputSchema).array(),z.lazy(() => TransactionUncheckedCreateWithoutWalletAccountInputSchema),z.lazy(() => TransactionUncheckedCreateWithoutWalletAccountInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TransactionCreateOrConnectWithoutWalletAccountInputSchema),z.lazy(() => TransactionCreateOrConnectWithoutWalletAccountInputSchema).array() ]).optional(), + createMany: z.lazy(() => TransactionCreateManyWalletAccountInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => TransactionWhereUniqueInputSchema),z.lazy(() => TransactionWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const TransactionUncheckedCreateNestedManyWithoutWalletAccountInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TransactionCreateWithoutWalletAccountInputSchema),z.lazy(() => TransactionCreateWithoutWalletAccountInputSchema).array(),z.lazy(() => TransactionUncheckedCreateWithoutWalletAccountInputSchema),z.lazy(() => TransactionUncheckedCreateWithoutWalletAccountInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TransactionCreateOrConnectWithoutWalletAccountInputSchema),z.lazy(() => TransactionCreateOrConnectWithoutWalletAccountInputSchema).array() ]).optional(), + createMany: z.lazy(() => TransactionCreateManyWalletAccountInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => TransactionWhereUniqueInputSchema),z.lazy(() => TransactionWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const UserUpdateOneRequiredWithoutWalletAccountsNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => UserCreateWithoutWalletAccountsInputSchema),z.lazy(() => UserUncheckedCreateWithoutWalletAccountsInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => UserCreateOrConnectWithoutWalletAccountsInputSchema).optional(), + upsert: z.lazy(() => UserUpsertWithoutWalletAccountsInputSchema).optional(), + connect: z.lazy(() => UserWhereUniqueInputSchema).optional(), + update: z.union([ z.lazy(() => UserUpdateToOneWithWhereWithoutWalletAccountsInputSchema),z.lazy(() => UserUpdateWithoutWalletAccountsInputSchema),z.lazy(() => UserUncheckedUpdateWithoutWalletAccountsInputSchema) ]).optional(), +}).strict(); + +export const TransactionUpdateManyWithoutWalletAccountNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TransactionCreateWithoutWalletAccountInputSchema),z.lazy(() => TransactionCreateWithoutWalletAccountInputSchema).array(),z.lazy(() => TransactionUncheckedCreateWithoutWalletAccountInputSchema),z.lazy(() => TransactionUncheckedCreateWithoutWalletAccountInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TransactionCreateOrConnectWithoutWalletAccountInputSchema),z.lazy(() => TransactionCreateOrConnectWithoutWalletAccountInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => TransactionUpsertWithWhereUniqueWithoutWalletAccountInputSchema),z.lazy(() => TransactionUpsertWithWhereUniqueWithoutWalletAccountInputSchema).array() ]).optional(), + createMany: z.lazy(() => TransactionCreateManyWalletAccountInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => TransactionWhereUniqueInputSchema),z.lazy(() => TransactionWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => TransactionWhereUniqueInputSchema),z.lazy(() => TransactionWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => TransactionWhereUniqueInputSchema),z.lazy(() => TransactionWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => TransactionWhereUniqueInputSchema),z.lazy(() => TransactionWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => TransactionUpdateWithWhereUniqueWithoutWalletAccountInputSchema),z.lazy(() => TransactionUpdateWithWhereUniqueWithoutWalletAccountInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => TransactionUpdateManyWithWhereWithoutWalletAccountInputSchema),z.lazy(() => TransactionUpdateManyWithWhereWithoutWalletAccountInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => TransactionScalarWhereInputSchema),z.lazy(() => TransactionScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const TransactionUncheckedUpdateManyWithoutWalletAccountNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TransactionCreateWithoutWalletAccountInputSchema),z.lazy(() => TransactionCreateWithoutWalletAccountInputSchema).array(),z.lazy(() => TransactionUncheckedCreateWithoutWalletAccountInputSchema),z.lazy(() => TransactionUncheckedCreateWithoutWalletAccountInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TransactionCreateOrConnectWithoutWalletAccountInputSchema),z.lazy(() => TransactionCreateOrConnectWithoutWalletAccountInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => TransactionUpsertWithWhereUniqueWithoutWalletAccountInputSchema),z.lazy(() => TransactionUpsertWithWhereUniqueWithoutWalletAccountInputSchema).array() ]).optional(), + createMany: z.lazy(() => TransactionCreateManyWalletAccountInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => TransactionWhereUniqueInputSchema),z.lazy(() => TransactionWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => TransactionWhereUniqueInputSchema),z.lazy(() => TransactionWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => TransactionWhereUniqueInputSchema),z.lazy(() => TransactionWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => TransactionWhereUniqueInputSchema),z.lazy(() => TransactionWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => TransactionUpdateWithWhereUniqueWithoutWalletAccountInputSchema),z.lazy(() => TransactionUpdateWithWhereUniqueWithoutWalletAccountInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => TransactionUpdateManyWithWhereWithoutWalletAccountInputSchema),z.lazy(() => TransactionUpdateManyWithWhereWithoutWalletAccountInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => TransactionScalarWhereInputSchema),z.lazy(() => TransactionScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const BudgetPeriodConfigCreateNestedOneWithoutBudgetInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => BudgetPeriodConfigCreateWithoutBudgetInputSchema),z.lazy(() => BudgetPeriodConfigUncheckedCreateWithoutBudgetInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => BudgetPeriodConfigCreateOrConnectWithoutBudgetInputSchema).optional(), + connect: z.lazy(() => BudgetPeriodConfigWhereUniqueInputSchema).optional() +}).strict(); + +export const BudgetUserCreateNestedManyWithoutBudgetInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => BudgetUserCreateWithoutBudgetInputSchema),z.lazy(() => BudgetUserCreateWithoutBudgetInputSchema).array(),z.lazy(() => BudgetUserUncheckedCreateWithoutBudgetInputSchema),z.lazy(() => BudgetUserUncheckedCreateWithoutBudgetInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => BudgetUserCreateOrConnectWithoutBudgetInputSchema),z.lazy(() => BudgetUserCreateOrConnectWithoutBudgetInputSchema).array() ]).optional(), + createMany: z.lazy(() => BudgetUserCreateManyBudgetInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => BudgetUserWhereUniqueInputSchema),z.lazy(() => BudgetUserWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const TransactionCreateNestedManyWithoutBudgetInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TransactionCreateWithoutBudgetInputSchema),z.lazy(() => TransactionCreateWithoutBudgetInputSchema).array(),z.lazy(() => TransactionUncheckedCreateWithoutBudgetInputSchema),z.lazy(() => TransactionUncheckedCreateWithoutBudgetInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TransactionCreateOrConnectWithoutBudgetInputSchema),z.lazy(() => TransactionCreateOrConnectWithoutBudgetInputSchema).array() ]).optional(), + createMany: z.lazy(() => TransactionCreateManyBudgetInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => TransactionWhereUniqueInputSchema),z.lazy(() => TransactionWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const BudgetUserInvitationCreateNestedManyWithoutBudgetInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => BudgetUserInvitationCreateWithoutBudgetInputSchema),z.lazy(() => BudgetUserInvitationCreateWithoutBudgetInputSchema).array(),z.lazy(() => BudgetUserInvitationUncheckedCreateWithoutBudgetInputSchema),z.lazy(() => BudgetUserInvitationUncheckedCreateWithoutBudgetInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => BudgetUserInvitationCreateOrConnectWithoutBudgetInputSchema),z.lazy(() => BudgetUserInvitationCreateOrConnectWithoutBudgetInputSchema).array() ]).optional(), + createMany: z.lazy(() => BudgetUserInvitationCreateManyBudgetInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema),z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const BudgetPeriodConfigUncheckedCreateNestedOneWithoutBudgetInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => BudgetPeriodConfigCreateWithoutBudgetInputSchema),z.lazy(() => BudgetPeriodConfigUncheckedCreateWithoutBudgetInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => BudgetPeriodConfigCreateOrConnectWithoutBudgetInputSchema).optional(), + connect: z.lazy(() => BudgetPeriodConfigWhereUniqueInputSchema).optional() +}).strict(); + +export const BudgetUserUncheckedCreateNestedManyWithoutBudgetInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => BudgetUserCreateWithoutBudgetInputSchema),z.lazy(() => BudgetUserCreateWithoutBudgetInputSchema).array(),z.lazy(() => BudgetUserUncheckedCreateWithoutBudgetInputSchema),z.lazy(() => BudgetUserUncheckedCreateWithoutBudgetInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => BudgetUserCreateOrConnectWithoutBudgetInputSchema),z.lazy(() => BudgetUserCreateOrConnectWithoutBudgetInputSchema).array() ]).optional(), + createMany: z.lazy(() => BudgetUserCreateManyBudgetInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => BudgetUserWhereUniqueInputSchema),z.lazy(() => BudgetUserWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const TransactionUncheckedCreateNestedManyWithoutBudgetInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TransactionCreateWithoutBudgetInputSchema),z.lazy(() => TransactionCreateWithoutBudgetInputSchema).array(),z.lazy(() => TransactionUncheckedCreateWithoutBudgetInputSchema),z.lazy(() => TransactionUncheckedCreateWithoutBudgetInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TransactionCreateOrConnectWithoutBudgetInputSchema),z.lazy(() => TransactionCreateOrConnectWithoutBudgetInputSchema).array() ]).optional(), + createMany: z.lazy(() => TransactionCreateManyBudgetInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => TransactionWhereUniqueInputSchema),z.lazy(() => TransactionWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const BudgetUserInvitationUncheckedCreateNestedManyWithoutBudgetInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => BudgetUserInvitationCreateWithoutBudgetInputSchema),z.lazy(() => BudgetUserInvitationCreateWithoutBudgetInputSchema).array(),z.lazy(() => BudgetUserInvitationUncheckedCreateWithoutBudgetInputSchema),z.lazy(() => BudgetUserInvitationUncheckedCreateWithoutBudgetInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => BudgetUserInvitationCreateOrConnectWithoutBudgetInputSchema),z.lazy(() => BudgetUserInvitationCreateOrConnectWithoutBudgetInputSchema).array() ]).optional(), + createMany: z.lazy(() => BudgetUserInvitationCreateManyBudgetInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema),z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const EnumBudgetTypeFieldUpdateOperationsInputSchema: z.ZodType = z.object({ + set: z.lazy(() => BudgetTypeSchema).optional() +}).strict(); + +export const BudgetPeriodConfigUpdateOneWithoutBudgetNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => BudgetPeriodConfigCreateWithoutBudgetInputSchema),z.lazy(() => BudgetPeriodConfigUncheckedCreateWithoutBudgetInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => BudgetPeriodConfigCreateOrConnectWithoutBudgetInputSchema).optional(), + upsert: z.lazy(() => BudgetPeriodConfigUpsertWithoutBudgetInputSchema).optional(), + disconnect: z.union([ z.boolean(),z.lazy(() => BudgetPeriodConfigWhereInputSchema) ]).optional(), + delete: z.union([ z.boolean(),z.lazy(() => BudgetPeriodConfigWhereInputSchema) ]).optional(), + connect: z.lazy(() => BudgetPeriodConfigWhereUniqueInputSchema).optional(), + update: z.union([ z.lazy(() => BudgetPeriodConfigUpdateToOneWithWhereWithoutBudgetInputSchema),z.lazy(() => BudgetPeriodConfigUpdateWithoutBudgetInputSchema),z.lazy(() => BudgetPeriodConfigUncheckedUpdateWithoutBudgetInputSchema) ]).optional(), +}).strict(); + +export const BudgetUserUpdateManyWithoutBudgetNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => BudgetUserCreateWithoutBudgetInputSchema),z.lazy(() => BudgetUserCreateWithoutBudgetInputSchema).array(),z.lazy(() => BudgetUserUncheckedCreateWithoutBudgetInputSchema),z.lazy(() => BudgetUserUncheckedCreateWithoutBudgetInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => BudgetUserCreateOrConnectWithoutBudgetInputSchema),z.lazy(() => BudgetUserCreateOrConnectWithoutBudgetInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => BudgetUserUpsertWithWhereUniqueWithoutBudgetInputSchema),z.lazy(() => BudgetUserUpsertWithWhereUniqueWithoutBudgetInputSchema).array() ]).optional(), + createMany: z.lazy(() => BudgetUserCreateManyBudgetInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => BudgetUserWhereUniqueInputSchema),z.lazy(() => BudgetUserWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => BudgetUserWhereUniqueInputSchema),z.lazy(() => BudgetUserWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => BudgetUserWhereUniqueInputSchema),z.lazy(() => BudgetUserWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => BudgetUserWhereUniqueInputSchema),z.lazy(() => BudgetUserWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => BudgetUserUpdateWithWhereUniqueWithoutBudgetInputSchema),z.lazy(() => BudgetUserUpdateWithWhereUniqueWithoutBudgetInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => BudgetUserUpdateManyWithWhereWithoutBudgetInputSchema),z.lazy(() => BudgetUserUpdateManyWithWhereWithoutBudgetInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => BudgetUserScalarWhereInputSchema),z.lazy(() => BudgetUserScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const TransactionUpdateManyWithoutBudgetNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TransactionCreateWithoutBudgetInputSchema),z.lazy(() => TransactionCreateWithoutBudgetInputSchema).array(),z.lazy(() => TransactionUncheckedCreateWithoutBudgetInputSchema),z.lazy(() => TransactionUncheckedCreateWithoutBudgetInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TransactionCreateOrConnectWithoutBudgetInputSchema),z.lazy(() => TransactionCreateOrConnectWithoutBudgetInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => TransactionUpsertWithWhereUniqueWithoutBudgetInputSchema),z.lazy(() => TransactionUpsertWithWhereUniqueWithoutBudgetInputSchema).array() ]).optional(), + createMany: z.lazy(() => TransactionCreateManyBudgetInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => TransactionWhereUniqueInputSchema),z.lazy(() => TransactionWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => TransactionWhereUniqueInputSchema),z.lazy(() => TransactionWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => TransactionWhereUniqueInputSchema),z.lazy(() => TransactionWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => TransactionWhereUniqueInputSchema),z.lazy(() => TransactionWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => TransactionUpdateWithWhereUniqueWithoutBudgetInputSchema),z.lazy(() => TransactionUpdateWithWhereUniqueWithoutBudgetInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => TransactionUpdateManyWithWhereWithoutBudgetInputSchema),z.lazy(() => TransactionUpdateManyWithWhereWithoutBudgetInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => TransactionScalarWhereInputSchema),z.lazy(() => TransactionScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const BudgetUserInvitationUpdateManyWithoutBudgetNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => BudgetUserInvitationCreateWithoutBudgetInputSchema),z.lazy(() => BudgetUserInvitationCreateWithoutBudgetInputSchema).array(),z.lazy(() => BudgetUserInvitationUncheckedCreateWithoutBudgetInputSchema),z.lazy(() => BudgetUserInvitationUncheckedCreateWithoutBudgetInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => BudgetUserInvitationCreateOrConnectWithoutBudgetInputSchema),z.lazy(() => BudgetUserInvitationCreateOrConnectWithoutBudgetInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => BudgetUserInvitationUpsertWithWhereUniqueWithoutBudgetInputSchema),z.lazy(() => BudgetUserInvitationUpsertWithWhereUniqueWithoutBudgetInputSchema).array() ]).optional(), + createMany: z.lazy(() => BudgetUserInvitationCreateManyBudgetInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema),z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema),z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema),z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema),z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => BudgetUserInvitationUpdateWithWhereUniqueWithoutBudgetInputSchema),z.lazy(() => BudgetUserInvitationUpdateWithWhereUniqueWithoutBudgetInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => BudgetUserInvitationUpdateManyWithWhereWithoutBudgetInputSchema),z.lazy(() => BudgetUserInvitationUpdateManyWithWhereWithoutBudgetInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => BudgetUserInvitationScalarWhereInputSchema),z.lazy(() => BudgetUserInvitationScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const BudgetPeriodConfigUncheckedUpdateOneWithoutBudgetNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => BudgetPeriodConfigCreateWithoutBudgetInputSchema),z.lazy(() => BudgetPeriodConfigUncheckedCreateWithoutBudgetInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => BudgetPeriodConfigCreateOrConnectWithoutBudgetInputSchema).optional(), + upsert: z.lazy(() => BudgetPeriodConfigUpsertWithoutBudgetInputSchema).optional(), + disconnect: z.union([ z.boolean(),z.lazy(() => BudgetPeriodConfigWhereInputSchema) ]).optional(), + delete: z.union([ z.boolean(),z.lazy(() => BudgetPeriodConfigWhereInputSchema) ]).optional(), + connect: z.lazy(() => BudgetPeriodConfigWhereUniqueInputSchema).optional(), + update: z.union([ z.lazy(() => BudgetPeriodConfigUpdateToOneWithWhereWithoutBudgetInputSchema),z.lazy(() => BudgetPeriodConfigUpdateWithoutBudgetInputSchema),z.lazy(() => BudgetPeriodConfigUncheckedUpdateWithoutBudgetInputSchema) ]).optional(), +}).strict(); + +export const BudgetUserUncheckedUpdateManyWithoutBudgetNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => BudgetUserCreateWithoutBudgetInputSchema),z.lazy(() => BudgetUserCreateWithoutBudgetInputSchema).array(),z.lazy(() => BudgetUserUncheckedCreateWithoutBudgetInputSchema),z.lazy(() => BudgetUserUncheckedCreateWithoutBudgetInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => BudgetUserCreateOrConnectWithoutBudgetInputSchema),z.lazy(() => BudgetUserCreateOrConnectWithoutBudgetInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => BudgetUserUpsertWithWhereUniqueWithoutBudgetInputSchema),z.lazy(() => BudgetUserUpsertWithWhereUniqueWithoutBudgetInputSchema).array() ]).optional(), + createMany: z.lazy(() => BudgetUserCreateManyBudgetInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => BudgetUserWhereUniqueInputSchema),z.lazy(() => BudgetUserWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => BudgetUserWhereUniqueInputSchema),z.lazy(() => BudgetUserWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => BudgetUserWhereUniqueInputSchema),z.lazy(() => BudgetUserWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => BudgetUserWhereUniqueInputSchema),z.lazy(() => BudgetUserWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => BudgetUserUpdateWithWhereUniqueWithoutBudgetInputSchema),z.lazy(() => BudgetUserUpdateWithWhereUniqueWithoutBudgetInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => BudgetUserUpdateManyWithWhereWithoutBudgetInputSchema),z.lazy(() => BudgetUserUpdateManyWithWhereWithoutBudgetInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => BudgetUserScalarWhereInputSchema),z.lazy(() => BudgetUserScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const TransactionUncheckedUpdateManyWithoutBudgetNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TransactionCreateWithoutBudgetInputSchema),z.lazy(() => TransactionCreateWithoutBudgetInputSchema).array(),z.lazy(() => TransactionUncheckedCreateWithoutBudgetInputSchema),z.lazy(() => TransactionUncheckedCreateWithoutBudgetInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TransactionCreateOrConnectWithoutBudgetInputSchema),z.lazy(() => TransactionCreateOrConnectWithoutBudgetInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => TransactionUpsertWithWhereUniqueWithoutBudgetInputSchema),z.lazy(() => TransactionUpsertWithWhereUniqueWithoutBudgetInputSchema).array() ]).optional(), + createMany: z.lazy(() => TransactionCreateManyBudgetInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => TransactionWhereUniqueInputSchema),z.lazy(() => TransactionWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => TransactionWhereUniqueInputSchema),z.lazy(() => TransactionWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => TransactionWhereUniqueInputSchema),z.lazy(() => TransactionWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => TransactionWhereUniqueInputSchema),z.lazy(() => TransactionWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => TransactionUpdateWithWhereUniqueWithoutBudgetInputSchema),z.lazy(() => TransactionUpdateWithWhereUniqueWithoutBudgetInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => TransactionUpdateManyWithWhereWithoutBudgetInputSchema),z.lazy(() => TransactionUpdateManyWithWhereWithoutBudgetInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => TransactionScalarWhereInputSchema),z.lazy(() => TransactionScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const BudgetUserInvitationUncheckedUpdateManyWithoutBudgetNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => BudgetUserInvitationCreateWithoutBudgetInputSchema),z.lazy(() => BudgetUserInvitationCreateWithoutBudgetInputSchema).array(),z.lazy(() => BudgetUserInvitationUncheckedCreateWithoutBudgetInputSchema),z.lazy(() => BudgetUserInvitationUncheckedCreateWithoutBudgetInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => BudgetUserInvitationCreateOrConnectWithoutBudgetInputSchema),z.lazy(() => BudgetUserInvitationCreateOrConnectWithoutBudgetInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => BudgetUserInvitationUpsertWithWhereUniqueWithoutBudgetInputSchema),z.lazy(() => BudgetUserInvitationUpsertWithWhereUniqueWithoutBudgetInputSchema).array() ]).optional(), + createMany: z.lazy(() => BudgetUserInvitationCreateManyBudgetInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema),z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema),z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema),z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema),z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => BudgetUserInvitationUpdateWithWhereUniqueWithoutBudgetInputSchema),z.lazy(() => BudgetUserInvitationUpdateWithWhereUniqueWithoutBudgetInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => BudgetUserInvitationUpdateManyWithWhereWithoutBudgetInputSchema),z.lazy(() => BudgetUserInvitationUpdateManyWithWhereWithoutBudgetInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => BudgetUserInvitationScalarWhereInputSchema),z.lazy(() => BudgetUserInvitationScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const BudgetCreateNestedOneWithoutPeriodConfigInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => BudgetCreateWithoutPeriodConfigInputSchema),z.lazy(() => BudgetUncheckedCreateWithoutPeriodConfigInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => BudgetCreateOrConnectWithoutPeriodConfigInputSchema).optional(), + connect: z.lazy(() => BudgetWhereUniqueInputSchema).optional() +}).strict(); + +export const EnumBudgetPeriodTypeFieldUpdateOperationsInputSchema: z.ZodType = z.object({ + set: z.lazy(() => BudgetPeriodTypeSchema).optional() +}).strict(); + +export const DecimalFieldUpdateOperationsInputSchema: z.ZodType = z.object({ + set: z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }).optional(), + increment: z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }).optional(), + decrement: z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }).optional(), + multiply: z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }).optional(), + divide: z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }).optional() +}).strict(); + +export const NullableDateTimeFieldUpdateOperationsInputSchema: z.ZodType = z.object({ + set: z.coerce.date().optional().nullable() +}).strict(); + +export const BudgetUpdateOneRequiredWithoutPeriodConfigNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => BudgetCreateWithoutPeriodConfigInputSchema),z.lazy(() => BudgetUncheckedCreateWithoutPeriodConfigInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => BudgetCreateOrConnectWithoutPeriodConfigInputSchema).optional(), + upsert: z.lazy(() => BudgetUpsertWithoutPeriodConfigInputSchema).optional(), + connect: z.lazy(() => BudgetWhereUniqueInputSchema).optional(), + update: z.union([ z.lazy(() => BudgetUpdateToOneWithWhereWithoutPeriodConfigInputSchema),z.lazy(() => BudgetUpdateWithoutPeriodConfigInputSchema),z.lazy(() => BudgetUncheckedUpdateWithoutPeriodConfigInputSchema) ]).optional(), +}).strict(); + +export const UserCreateNestedOneWithoutBudgetUsersInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => UserCreateWithoutBudgetUsersInputSchema),z.lazy(() => UserUncheckedCreateWithoutBudgetUsersInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => UserCreateOrConnectWithoutBudgetUsersInputSchema).optional(), + connect: z.lazy(() => UserWhereUniqueInputSchema).optional() +}).strict(); + +export const BudgetCreateNestedOneWithoutBudgetUsersInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => BudgetCreateWithoutBudgetUsersInputSchema),z.lazy(() => BudgetUncheckedCreateWithoutBudgetUsersInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => BudgetCreateOrConnectWithoutBudgetUsersInputSchema).optional(), + connect: z.lazy(() => BudgetWhereUniqueInputSchema).optional() +}).strict(); + +export const EnumBudgetUserPermissionFieldUpdateOperationsInputSchema: z.ZodType = z.object({ + set: z.lazy(() => BudgetUserPermissionSchema).optional() +}).strict(); + +export const UserUpdateOneRequiredWithoutBudgetUsersNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => UserCreateWithoutBudgetUsersInputSchema),z.lazy(() => UserUncheckedCreateWithoutBudgetUsersInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => UserCreateOrConnectWithoutBudgetUsersInputSchema).optional(), + upsert: z.lazy(() => UserUpsertWithoutBudgetUsersInputSchema).optional(), + connect: z.lazy(() => UserWhereUniqueInputSchema).optional(), + update: z.union([ z.lazy(() => UserUpdateToOneWithWhereWithoutBudgetUsersInputSchema),z.lazy(() => UserUpdateWithoutBudgetUsersInputSchema),z.lazy(() => UserUncheckedUpdateWithoutBudgetUsersInputSchema) ]).optional(), +}).strict(); + +export const BudgetUpdateOneRequiredWithoutBudgetUsersNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => BudgetCreateWithoutBudgetUsersInputSchema),z.lazy(() => BudgetUncheckedCreateWithoutBudgetUsersInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => BudgetCreateOrConnectWithoutBudgetUsersInputSchema).optional(), + upsert: z.lazy(() => BudgetUpsertWithoutBudgetUsersInputSchema).optional(), + connect: z.lazy(() => BudgetWhereUniqueInputSchema).optional(), + update: z.union([ z.lazy(() => BudgetUpdateToOneWithWhereWithoutBudgetUsersInputSchema),z.lazy(() => BudgetUpdateWithoutBudgetUsersInputSchema),z.lazy(() => BudgetUncheckedUpdateWithoutBudgetUsersInputSchema) ]).optional(), +}).strict(); + +export const UserCreateNestedOneWithoutCreatedBudgetUserInvitationsInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => UserCreateWithoutCreatedBudgetUserInvitationsInputSchema),z.lazy(() => UserUncheckedCreateWithoutCreatedBudgetUserInvitationsInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => UserCreateOrConnectWithoutCreatedBudgetUserInvitationsInputSchema).optional(), + connect: z.lazy(() => UserWhereUniqueInputSchema).optional() +}).strict(); + +export const BudgetCreateNestedOneWithoutInvitationsInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => BudgetCreateWithoutInvitationsInputSchema),z.lazy(() => BudgetUncheckedCreateWithoutInvitationsInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => BudgetCreateOrConnectWithoutInvitationsInputSchema).optional(), + connect: z.lazy(() => BudgetWhereUniqueInputSchema).optional() +}).strict(); + +export const BudgetUserInvitationResponseCreateNestedManyWithoutInvitationInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => BudgetUserInvitationResponseCreateWithoutInvitationInputSchema),z.lazy(() => BudgetUserInvitationResponseCreateWithoutInvitationInputSchema).array(),z.lazy(() => BudgetUserInvitationResponseUncheckedCreateWithoutInvitationInputSchema),z.lazy(() => BudgetUserInvitationResponseUncheckedCreateWithoutInvitationInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => BudgetUserInvitationResponseCreateOrConnectWithoutInvitationInputSchema),z.lazy(() => BudgetUserInvitationResponseCreateOrConnectWithoutInvitationInputSchema).array() ]).optional(), + createMany: z.lazy(() => BudgetUserInvitationResponseCreateManyInvitationInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => BudgetUserInvitationResponseWhereUniqueInputSchema),z.lazy(() => BudgetUserInvitationResponseWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const BudgetUserInvitationResponseUncheckedCreateNestedManyWithoutInvitationInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => BudgetUserInvitationResponseCreateWithoutInvitationInputSchema),z.lazy(() => BudgetUserInvitationResponseCreateWithoutInvitationInputSchema).array(),z.lazy(() => BudgetUserInvitationResponseUncheckedCreateWithoutInvitationInputSchema),z.lazy(() => BudgetUserInvitationResponseUncheckedCreateWithoutInvitationInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => BudgetUserInvitationResponseCreateOrConnectWithoutInvitationInputSchema),z.lazy(() => BudgetUserInvitationResponseCreateOrConnectWithoutInvitationInputSchema).array() ]).optional(), + createMany: z.lazy(() => BudgetUserInvitationResponseCreateManyInvitationInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => BudgetUserInvitationResponseWhereUniqueInputSchema),z.lazy(() => BudgetUserInvitationResponseWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const NullableEnumBudgetUserPermissionFieldUpdateOperationsInputSchema: z.ZodType = z.object({ + set: z.lazy(() => BudgetUserPermissionSchema).optional().nullable() +}).strict(); + +export const UserUpdateOneRequiredWithoutCreatedBudgetUserInvitationsNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => UserCreateWithoutCreatedBudgetUserInvitationsInputSchema),z.lazy(() => UserUncheckedCreateWithoutCreatedBudgetUserInvitationsInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => UserCreateOrConnectWithoutCreatedBudgetUserInvitationsInputSchema).optional(), + upsert: z.lazy(() => UserUpsertWithoutCreatedBudgetUserInvitationsInputSchema).optional(), + connect: z.lazy(() => UserWhereUniqueInputSchema).optional(), + update: z.union([ z.lazy(() => UserUpdateToOneWithWhereWithoutCreatedBudgetUserInvitationsInputSchema),z.lazy(() => UserUpdateWithoutCreatedBudgetUserInvitationsInputSchema),z.lazy(() => UserUncheckedUpdateWithoutCreatedBudgetUserInvitationsInputSchema) ]).optional(), +}).strict(); + +export const BudgetUpdateOneRequiredWithoutInvitationsNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => BudgetCreateWithoutInvitationsInputSchema),z.lazy(() => BudgetUncheckedCreateWithoutInvitationsInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => BudgetCreateOrConnectWithoutInvitationsInputSchema).optional(), + upsert: z.lazy(() => BudgetUpsertWithoutInvitationsInputSchema).optional(), + connect: z.lazy(() => BudgetWhereUniqueInputSchema).optional(), + update: z.union([ z.lazy(() => BudgetUpdateToOneWithWhereWithoutInvitationsInputSchema),z.lazy(() => BudgetUpdateWithoutInvitationsInputSchema),z.lazy(() => BudgetUncheckedUpdateWithoutInvitationsInputSchema) ]).optional(), +}).strict(); + +export const BudgetUserInvitationResponseUpdateManyWithoutInvitationNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => BudgetUserInvitationResponseCreateWithoutInvitationInputSchema),z.lazy(() => BudgetUserInvitationResponseCreateWithoutInvitationInputSchema).array(),z.lazy(() => BudgetUserInvitationResponseUncheckedCreateWithoutInvitationInputSchema),z.lazy(() => BudgetUserInvitationResponseUncheckedCreateWithoutInvitationInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => BudgetUserInvitationResponseCreateOrConnectWithoutInvitationInputSchema),z.lazy(() => BudgetUserInvitationResponseCreateOrConnectWithoutInvitationInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => BudgetUserInvitationResponseUpsertWithWhereUniqueWithoutInvitationInputSchema),z.lazy(() => BudgetUserInvitationResponseUpsertWithWhereUniqueWithoutInvitationInputSchema).array() ]).optional(), + createMany: z.lazy(() => BudgetUserInvitationResponseCreateManyInvitationInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => BudgetUserInvitationResponseWhereUniqueInputSchema),z.lazy(() => BudgetUserInvitationResponseWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => BudgetUserInvitationResponseWhereUniqueInputSchema),z.lazy(() => BudgetUserInvitationResponseWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => BudgetUserInvitationResponseWhereUniqueInputSchema),z.lazy(() => BudgetUserInvitationResponseWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => BudgetUserInvitationResponseWhereUniqueInputSchema),z.lazy(() => BudgetUserInvitationResponseWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => BudgetUserInvitationResponseUpdateWithWhereUniqueWithoutInvitationInputSchema),z.lazy(() => BudgetUserInvitationResponseUpdateWithWhereUniqueWithoutInvitationInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => BudgetUserInvitationResponseUpdateManyWithWhereWithoutInvitationInputSchema),z.lazy(() => BudgetUserInvitationResponseUpdateManyWithWhereWithoutInvitationInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => BudgetUserInvitationResponseScalarWhereInputSchema),z.lazy(() => BudgetUserInvitationResponseScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const BudgetUserInvitationResponseUncheckedUpdateManyWithoutInvitationNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => BudgetUserInvitationResponseCreateWithoutInvitationInputSchema),z.lazy(() => BudgetUserInvitationResponseCreateWithoutInvitationInputSchema).array(),z.lazy(() => BudgetUserInvitationResponseUncheckedCreateWithoutInvitationInputSchema),z.lazy(() => BudgetUserInvitationResponseUncheckedCreateWithoutInvitationInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => BudgetUserInvitationResponseCreateOrConnectWithoutInvitationInputSchema),z.lazy(() => BudgetUserInvitationResponseCreateOrConnectWithoutInvitationInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => BudgetUserInvitationResponseUpsertWithWhereUniqueWithoutInvitationInputSchema),z.lazy(() => BudgetUserInvitationResponseUpsertWithWhereUniqueWithoutInvitationInputSchema).array() ]).optional(), + createMany: z.lazy(() => BudgetUserInvitationResponseCreateManyInvitationInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => BudgetUserInvitationResponseWhereUniqueInputSchema),z.lazy(() => BudgetUserInvitationResponseWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => BudgetUserInvitationResponseWhereUniqueInputSchema),z.lazy(() => BudgetUserInvitationResponseWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => BudgetUserInvitationResponseWhereUniqueInputSchema),z.lazy(() => BudgetUserInvitationResponseWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => BudgetUserInvitationResponseWhereUniqueInputSchema),z.lazy(() => BudgetUserInvitationResponseWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => BudgetUserInvitationResponseUpdateWithWhereUniqueWithoutInvitationInputSchema),z.lazy(() => BudgetUserInvitationResponseUpdateWithWhereUniqueWithoutInvitationInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => BudgetUserInvitationResponseUpdateManyWithWhereWithoutInvitationInputSchema),z.lazy(() => BudgetUserInvitationResponseUpdateManyWithWhereWithoutInvitationInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => BudgetUserInvitationResponseScalarWhereInputSchema),z.lazy(() => BudgetUserInvitationResponseScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const BudgetUserInvitationCreateNestedOneWithoutResponsesInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => BudgetUserInvitationCreateWithoutResponsesInputSchema),z.lazy(() => BudgetUserInvitationUncheckedCreateWithoutResponsesInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => BudgetUserInvitationCreateOrConnectWithoutResponsesInputSchema).optional(), + connect: z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema).optional() +}).strict(); + +export const UserCreateNestedOneWithoutCreatedFromInvitationInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => UserCreateWithoutCreatedFromInvitationInputSchema),z.lazy(() => UserUncheckedCreateWithoutCreatedFromInvitationInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => UserCreateOrConnectWithoutCreatedFromInvitationInputSchema).optional(), + connect: z.lazy(() => UserWhereUniqueInputSchema).optional() +}).strict(); + +export const BudgetUserInvitationUpdateOneRequiredWithoutResponsesNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => BudgetUserInvitationCreateWithoutResponsesInputSchema),z.lazy(() => BudgetUserInvitationUncheckedCreateWithoutResponsesInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => BudgetUserInvitationCreateOrConnectWithoutResponsesInputSchema).optional(), + upsert: z.lazy(() => BudgetUserInvitationUpsertWithoutResponsesInputSchema).optional(), + connect: z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema).optional(), + update: z.union([ z.lazy(() => BudgetUserInvitationUpdateToOneWithWhereWithoutResponsesInputSchema),z.lazy(() => BudgetUserInvitationUpdateWithoutResponsesInputSchema),z.lazy(() => BudgetUserInvitationUncheckedUpdateWithoutResponsesInputSchema) ]).optional(), +}).strict(); + +export const UserUpdateOneWithoutCreatedFromInvitationNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => UserCreateWithoutCreatedFromInvitationInputSchema),z.lazy(() => UserUncheckedCreateWithoutCreatedFromInvitationInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => UserCreateOrConnectWithoutCreatedFromInvitationInputSchema).optional(), + upsert: z.lazy(() => UserUpsertWithoutCreatedFromInvitationInputSchema).optional(), + disconnect: z.union([ z.boolean(),z.lazy(() => UserWhereInputSchema) ]).optional(), + delete: z.union([ z.boolean(),z.lazy(() => UserWhereInputSchema) ]).optional(), + connect: z.lazy(() => UserWhereUniqueInputSchema).optional(), + update: z.union([ z.lazy(() => UserUpdateToOneWithWhereWithoutCreatedFromInvitationInputSchema),z.lazy(() => UserUpdateWithoutCreatedFromInvitationInputSchema),z.lazy(() => UserUncheckedUpdateWithoutCreatedFromInvitationInputSchema) ]).optional(), +}).strict(); + +export const CategoryCreateNestedOneWithoutTransactionsInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => CategoryCreateWithoutTransactionsInputSchema),z.lazy(() => CategoryUncheckedCreateWithoutTransactionsInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => CategoryCreateOrConnectWithoutTransactionsInputSchema).optional(), + connect: z.lazy(() => CategoryWhereUniqueInputSchema).optional() +}).strict(); + +export const BudgetCreateNestedOneWithoutTransactionsInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => BudgetCreateWithoutTransactionsInputSchema),z.lazy(() => BudgetUncheckedCreateWithoutTransactionsInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => BudgetCreateOrConnectWithoutTransactionsInputSchema).optional(), + connect: z.lazy(() => BudgetWhereUniqueInputSchema).optional() +}).strict(); + +export const UserWalletAccountCreateNestedOneWithoutTransactionsInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => UserWalletAccountCreateWithoutTransactionsInputSchema),z.lazy(() => UserWalletAccountUncheckedCreateWithoutTransactionsInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => UserWalletAccountCreateOrConnectWithoutTransactionsInputSchema).optional(), + connect: z.lazy(() => UserWalletAccountWhereUniqueInputSchema).optional() +}).strict(); + +export const UserCreateNestedOneWithoutTransactionsInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => UserCreateWithoutTransactionsInputSchema),z.lazy(() => UserUncheckedCreateWithoutTransactionsInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => UserCreateOrConnectWithoutTransactionsInputSchema).optional(), + connect: z.lazy(() => UserWhereUniqueInputSchema).optional() +}).strict(); + +export const CategoryUpdateOneWithoutTransactionsNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => CategoryCreateWithoutTransactionsInputSchema),z.lazy(() => CategoryUncheckedCreateWithoutTransactionsInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => CategoryCreateOrConnectWithoutTransactionsInputSchema).optional(), + upsert: z.lazy(() => CategoryUpsertWithoutTransactionsInputSchema).optional(), + disconnect: z.union([ z.boolean(),z.lazy(() => CategoryWhereInputSchema) ]).optional(), + delete: z.union([ z.boolean(),z.lazy(() => CategoryWhereInputSchema) ]).optional(), + connect: z.lazy(() => CategoryWhereUniqueInputSchema).optional(), + update: z.union([ z.lazy(() => CategoryUpdateToOneWithWhereWithoutTransactionsInputSchema),z.lazy(() => CategoryUpdateWithoutTransactionsInputSchema),z.lazy(() => CategoryUncheckedUpdateWithoutTransactionsInputSchema) ]).optional(), +}).strict(); + +export const BudgetUpdateOneWithoutTransactionsNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => BudgetCreateWithoutTransactionsInputSchema),z.lazy(() => BudgetUncheckedCreateWithoutTransactionsInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => BudgetCreateOrConnectWithoutTransactionsInputSchema).optional(), + upsert: z.lazy(() => BudgetUpsertWithoutTransactionsInputSchema).optional(), + disconnect: z.union([ z.boolean(),z.lazy(() => BudgetWhereInputSchema) ]).optional(), + delete: z.union([ z.boolean(),z.lazy(() => BudgetWhereInputSchema) ]).optional(), + connect: z.lazy(() => BudgetWhereUniqueInputSchema).optional(), + update: z.union([ z.lazy(() => BudgetUpdateToOneWithWhereWithoutTransactionsInputSchema),z.lazy(() => BudgetUpdateWithoutTransactionsInputSchema),z.lazy(() => BudgetUncheckedUpdateWithoutTransactionsInputSchema) ]).optional(), +}).strict(); + +export const UserWalletAccountUpdateOneRequiredWithoutTransactionsNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => UserWalletAccountCreateWithoutTransactionsInputSchema),z.lazy(() => UserWalletAccountUncheckedCreateWithoutTransactionsInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => UserWalletAccountCreateOrConnectWithoutTransactionsInputSchema).optional(), + upsert: z.lazy(() => UserWalletAccountUpsertWithoutTransactionsInputSchema).optional(), + connect: z.lazy(() => UserWalletAccountWhereUniqueInputSchema).optional(), + update: z.union([ z.lazy(() => UserWalletAccountUpdateToOneWithWhereWithoutTransactionsInputSchema),z.lazy(() => UserWalletAccountUpdateWithoutTransactionsInputSchema),z.lazy(() => UserWalletAccountUncheckedUpdateWithoutTransactionsInputSchema) ]).optional(), +}).strict(); + +export const UserUpdateOneRequiredWithoutTransactionsNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => UserCreateWithoutTransactionsInputSchema),z.lazy(() => UserUncheckedCreateWithoutTransactionsInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => UserCreateOrConnectWithoutTransactionsInputSchema).optional(), + upsert: z.lazy(() => UserUpsertWithoutTransactionsInputSchema).optional(), + connect: z.lazy(() => UserWhereUniqueInputSchema).optional(), + update: z.union([ z.lazy(() => UserUpdateToOneWithWhereWithoutTransactionsInputSchema),z.lazy(() => UserUpdateWithoutTransactionsInputSchema),z.lazy(() => UserUncheckedUpdateWithoutTransactionsInputSchema) ]).optional(), +}).strict(); + +export const CategoryCreateNestedOneWithoutChildrenInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => CategoryCreateWithoutChildrenInputSchema),z.lazy(() => CategoryUncheckedCreateWithoutChildrenInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => CategoryCreateOrConnectWithoutChildrenInputSchema).optional(), + connect: z.lazy(() => CategoryWhereUniqueInputSchema).optional() +}).strict(); + +export const CategoryCreateNestedManyWithoutParentInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => CategoryCreateWithoutParentInputSchema),z.lazy(() => CategoryCreateWithoutParentInputSchema).array(),z.lazy(() => CategoryUncheckedCreateWithoutParentInputSchema),z.lazy(() => CategoryUncheckedCreateWithoutParentInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => CategoryCreateOrConnectWithoutParentInputSchema),z.lazy(() => CategoryCreateOrConnectWithoutParentInputSchema).array() ]).optional(), + createMany: z.lazy(() => CategoryCreateManyParentInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => CategoryWhereUniqueInputSchema),z.lazy(() => CategoryWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const TransactionCreateNestedManyWithoutCategoryInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TransactionCreateWithoutCategoryInputSchema),z.lazy(() => TransactionCreateWithoutCategoryInputSchema).array(),z.lazy(() => TransactionUncheckedCreateWithoutCategoryInputSchema),z.lazy(() => TransactionUncheckedCreateWithoutCategoryInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TransactionCreateOrConnectWithoutCategoryInputSchema),z.lazy(() => TransactionCreateOrConnectWithoutCategoryInputSchema).array() ]).optional(), + createMany: z.lazy(() => TransactionCreateManyCategoryInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => TransactionWhereUniqueInputSchema),z.lazy(() => TransactionWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const CategoryUncheckedCreateNestedManyWithoutParentInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => CategoryCreateWithoutParentInputSchema),z.lazy(() => CategoryCreateWithoutParentInputSchema).array(),z.lazy(() => CategoryUncheckedCreateWithoutParentInputSchema),z.lazy(() => CategoryUncheckedCreateWithoutParentInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => CategoryCreateOrConnectWithoutParentInputSchema),z.lazy(() => CategoryCreateOrConnectWithoutParentInputSchema).array() ]).optional(), + createMany: z.lazy(() => CategoryCreateManyParentInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => CategoryWhereUniqueInputSchema),z.lazy(() => CategoryWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const TransactionUncheckedCreateNestedManyWithoutCategoryInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TransactionCreateWithoutCategoryInputSchema),z.lazy(() => TransactionCreateWithoutCategoryInputSchema).array(),z.lazy(() => TransactionUncheckedCreateWithoutCategoryInputSchema),z.lazy(() => TransactionUncheckedCreateWithoutCategoryInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TransactionCreateOrConnectWithoutCategoryInputSchema),z.lazy(() => TransactionCreateOrConnectWithoutCategoryInputSchema).array() ]).optional(), + createMany: z.lazy(() => TransactionCreateManyCategoryInputEnvelopeSchema).optional(), + connect: z.union([ z.lazy(() => TransactionWhereUniqueInputSchema),z.lazy(() => TransactionWhereUniqueInputSchema).array() ]).optional(), +}).strict(); + +export const CategoryUpdateOneWithoutChildrenNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => CategoryCreateWithoutChildrenInputSchema),z.lazy(() => CategoryUncheckedCreateWithoutChildrenInputSchema) ]).optional(), + connectOrCreate: z.lazy(() => CategoryCreateOrConnectWithoutChildrenInputSchema).optional(), + upsert: z.lazy(() => CategoryUpsertWithoutChildrenInputSchema).optional(), + disconnect: z.union([ z.boolean(),z.lazy(() => CategoryWhereInputSchema) ]).optional(), + delete: z.union([ z.boolean(),z.lazy(() => CategoryWhereInputSchema) ]).optional(), + connect: z.lazy(() => CategoryWhereUniqueInputSchema).optional(), + update: z.union([ z.lazy(() => CategoryUpdateToOneWithWhereWithoutChildrenInputSchema),z.lazy(() => CategoryUpdateWithoutChildrenInputSchema),z.lazy(() => CategoryUncheckedUpdateWithoutChildrenInputSchema) ]).optional(), +}).strict(); + +export const CategoryUpdateManyWithoutParentNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => CategoryCreateWithoutParentInputSchema),z.lazy(() => CategoryCreateWithoutParentInputSchema).array(),z.lazy(() => CategoryUncheckedCreateWithoutParentInputSchema),z.lazy(() => CategoryUncheckedCreateWithoutParentInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => CategoryCreateOrConnectWithoutParentInputSchema),z.lazy(() => CategoryCreateOrConnectWithoutParentInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => CategoryUpsertWithWhereUniqueWithoutParentInputSchema),z.lazy(() => CategoryUpsertWithWhereUniqueWithoutParentInputSchema).array() ]).optional(), + createMany: z.lazy(() => CategoryCreateManyParentInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => CategoryWhereUniqueInputSchema),z.lazy(() => CategoryWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => CategoryWhereUniqueInputSchema),z.lazy(() => CategoryWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => CategoryWhereUniqueInputSchema),z.lazy(() => CategoryWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => CategoryWhereUniqueInputSchema),z.lazy(() => CategoryWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => CategoryUpdateWithWhereUniqueWithoutParentInputSchema),z.lazy(() => CategoryUpdateWithWhereUniqueWithoutParentInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => CategoryUpdateManyWithWhereWithoutParentInputSchema),z.lazy(() => CategoryUpdateManyWithWhereWithoutParentInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => CategoryScalarWhereInputSchema),z.lazy(() => CategoryScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const TransactionUpdateManyWithoutCategoryNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TransactionCreateWithoutCategoryInputSchema),z.lazy(() => TransactionCreateWithoutCategoryInputSchema).array(),z.lazy(() => TransactionUncheckedCreateWithoutCategoryInputSchema),z.lazy(() => TransactionUncheckedCreateWithoutCategoryInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TransactionCreateOrConnectWithoutCategoryInputSchema),z.lazy(() => TransactionCreateOrConnectWithoutCategoryInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => TransactionUpsertWithWhereUniqueWithoutCategoryInputSchema),z.lazy(() => TransactionUpsertWithWhereUniqueWithoutCategoryInputSchema).array() ]).optional(), + createMany: z.lazy(() => TransactionCreateManyCategoryInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => TransactionWhereUniqueInputSchema),z.lazy(() => TransactionWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => TransactionWhereUniqueInputSchema),z.lazy(() => TransactionWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => TransactionWhereUniqueInputSchema),z.lazy(() => TransactionWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => TransactionWhereUniqueInputSchema),z.lazy(() => TransactionWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => TransactionUpdateWithWhereUniqueWithoutCategoryInputSchema),z.lazy(() => TransactionUpdateWithWhereUniqueWithoutCategoryInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => TransactionUpdateManyWithWhereWithoutCategoryInputSchema),z.lazy(() => TransactionUpdateManyWithWhereWithoutCategoryInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => TransactionScalarWhereInputSchema),z.lazy(() => TransactionScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const CategoryUncheckedUpdateManyWithoutParentNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => CategoryCreateWithoutParentInputSchema),z.lazy(() => CategoryCreateWithoutParentInputSchema).array(),z.lazy(() => CategoryUncheckedCreateWithoutParentInputSchema),z.lazy(() => CategoryUncheckedCreateWithoutParentInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => CategoryCreateOrConnectWithoutParentInputSchema),z.lazy(() => CategoryCreateOrConnectWithoutParentInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => CategoryUpsertWithWhereUniqueWithoutParentInputSchema),z.lazy(() => CategoryUpsertWithWhereUniqueWithoutParentInputSchema).array() ]).optional(), + createMany: z.lazy(() => CategoryCreateManyParentInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => CategoryWhereUniqueInputSchema),z.lazy(() => CategoryWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => CategoryWhereUniqueInputSchema),z.lazy(() => CategoryWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => CategoryWhereUniqueInputSchema),z.lazy(() => CategoryWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => CategoryWhereUniqueInputSchema),z.lazy(() => CategoryWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => CategoryUpdateWithWhereUniqueWithoutParentInputSchema),z.lazy(() => CategoryUpdateWithWhereUniqueWithoutParentInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => CategoryUpdateManyWithWhereWithoutParentInputSchema),z.lazy(() => CategoryUpdateManyWithWhereWithoutParentInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => CategoryScalarWhereInputSchema),z.lazy(() => CategoryScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const TransactionUncheckedUpdateManyWithoutCategoryNestedInputSchema: z.ZodType = z.object({ + create: z.union([ z.lazy(() => TransactionCreateWithoutCategoryInputSchema),z.lazy(() => TransactionCreateWithoutCategoryInputSchema).array(),z.lazy(() => TransactionUncheckedCreateWithoutCategoryInputSchema),z.lazy(() => TransactionUncheckedCreateWithoutCategoryInputSchema).array() ]).optional(), + connectOrCreate: z.union([ z.lazy(() => TransactionCreateOrConnectWithoutCategoryInputSchema),z.lazy(() => TransactionCreateOrConnectWithoutCategoryInputSchema).array() ]).optional(), + upsert: z.union([ z.lazy(() => TransactionUpsertWithWhereUniqueWithoutCategoryInputSchema),z.lazy(() => TransactionUpsertWithWhereUniqueWithoutCategoryInputSchema).array() ]).optional(), + createMany: z.lazy(() => TransactionCreateManyCategoryInputEnvelopeSchema).optional(), + set: z.union([ z.lazy(() => TransactionWhereUniqueInputSchema),z.lazy(() => TransactionWhereUniqueInputSchema).array() ]).optional(), + disconnect: z.union([ z.lazy(() => TransactionWhereUniqueInputSchema),z.lazy(() => TransactionWhereUniqueInputSchema).array() ]).optional(), + delete: z.union([ z.lazy(() => TransactionWhereUniqueInputSchema),z.lazy(() => TransactionWhereUniqueInputSchema).array() ]).optional(), + connect: z.union([ z.lazy(() => TransactionWhereUniqueInputSchema),z.lazy(() => TransactionWhereUniqueInputSchema).array() ]).optional(), + update: z.union([ z.lazy(() => TransactionUpdateWithWhereUniqueWithoutCategoryInputSchema),z.lazy(() => TransactionUpdateWithWhereUniqueWithoutCategoryInputSchema).array() ]).optional(), + updateMany: z.union([ z.lazy(() => TransactionUpdateManyWithWhereWithoutCategoryInputSchema),z.lazy(() => TransactionUpdateManyWithWhereWithoutCategoryInputSchema).array() ]).optional(), + deleteMany: z.union([ z.lazy(() => TransactionScalarWhereInputSchema),z.lazy(() => TransactionScalarWhereInputSchema).array() ]).optional(), +}).strict(); + +export const NestedStringFilterSchema: z.ZodType = z.object({ + equals: z.string().optional(), + in: z.string().array().optional(), + notIn: z.string().array().optional(), + lt: z.string().optional(), + lte: z.string().optional(), + gt: z.string().optional(), + gte: z.string().optional(), + contains: z.string().optional(), + startsWith: z.string().optional(), + endsWith: z.string().optional(), + not: z.union([ z.string(),z.lazy(() => NestedStringFilterSchema) ]).optional(), +}).strict(); + +export const NestedDateTimeFilterSchema: z.ZodType = z.object({ + equals: z.coerce.date().optional(), + in: z.coerce.date().array().optional(), + notIn: z.coerce.date().array().optional(), + lt: z.coerce.date().optional(), + lte: z.coerce.date().optional(), + gt: z.coerce.date().optional(), + gte: z.coerce.date().optional(), + not: z.union([ z.coerce.date(),z.lazy(() => NestedDateTimeFilterSchema) ]).optional(), +}).strict(); + +export const NestedStringNullableFilterSchema: z.ZodType = z.object({ + equals: z.string().optional().nullable(), + in: z.string().array().optional().nullable(), + notIn: z.string().array().optional().nullable(), + lt: z.string().optional(), + lte: z.string().optional(), + gt: z.string().optional(), + gte: z.string().optional(), + contains: z.string().optional(), + startsWith: z.string().optional(), + endsWith: z.string().optional(), + not: z.union([ z.string(),z.lazy(() => NestedStringNullableFilterSchema) ]).optional().nullable(), +}).strict(); + +export const NestedStringWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.string().optional(), + in: z.string().array().optional(), + notIn: z.string().array().optional(), + lt: z.string().optional(), + lte: z.string().optional(), + gt: z.string().optional(), + gte: z.string().optional(), + contains: z.string().optional(), + startsWith: z.string().optional(), + endsWith: z.string().optional(), + not: z.union([ z.string(),z.lazy(() => NestedStringWithAggregatesFilterSchema) ]).optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedStringFilterSchema).optional(), + _max: z.lazy(() => NestedStringFilterSchema).optional() +}).strict(); + +export const NestedIntFilterSchema: z.ZodType = z.object({ + equals: z.number().optional(), + in: z.number().array().optional(), + notIn: z.number().array().optional(), + lt: z.number().optional(), + lte: z.number().optional(), + gt: z.number().optional(), + gte: z.number().optional(), + not: z.union([ z.number(),z.lazy(() => NestedIntFilterSchema) ]).optional(), +}).strict(); + +export const NestedDateTimeWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.coerce.date().optional(), + in: z.coerce.date().array().optional(), + notIn: z.coerce.date().array().optional(), + lt: z.coerce.date().optional(), + lte: z.coerce.date().optional(), + gt: z.coerce.date().optional(), + gte: z.coerce.date().optional(), + not: z.union([ z.coerce.date(),z.lazy(() => NestedDateTimeWithAggregatesFilterSchema) ]).optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedDateTimeFilterSchema).optional(), + _max: z.lazy(() => NestedDateTimeFilterSchema).optional() +}).strict(); + +export const NestedStringNullableWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.string().optional().nullable(), + in: z.string().array().optional().nullable(), + notIn: z.string().array().optional().nullable(), + lt: z.string().optional(), + lte: z.string().optional(), + gt: z.string().optional(), + gte: z.string().optional(), + contains: z.string().optional(), + startsWith: z.string().optional(), + endsWith: z.string().optional(), + not: z.union([ z.string(),z.lazy(() => NestedStringNullableWithAggregatesFilterSchema) ]).optional().nullable(), + _count: z.lazy(() => NestedIntNullableFilterSchema).optional(), + _min: z.lazy(() => NestedStringNullableFilterSchema).optional(), + _max: z.lazy(() => NestedStringNullableFilterSchema).optional() +}).strict(); + +export const NestedIntNullableFilterSchema: z.ZodType = z.object({ + equals: z.number().optional().nullable(), + in: z.number().array().optional().nullable(), + notIn: z.number().array().optional().nullable(), + lt: z.number().optional(), + lte: z.number().optional(), + gt: z.number().optional(), + gte: z.number().optional(), + not: z.union([ z.number(),z.lazy(() => NestedIntNullableFilterSchema) ]).optional().nullable(), +}).strict(); + +export const NestedEnumBudgetTypeFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => BudgetTypeSchema).optional(), + in: z.lazy(() => BudgetTypeSchema).array().optional(), + notIn: z.lazy(() => BudgetTypeSchema).array().optional(), + not: z.union([ z.lazy(() => BudgetTypeSchema),z.lazy(() => NestedEnumBudgetTypeFilterSchema) ]).optional(), +}).strict(); + +export const NestedEnumBudgetTypeWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => BudgetTypeSchema).optional(), + in: z.lazy(() => BudgetTypeSchema).array().optional(), + notIn: z.lazy(() => BudgetTypeSchema).array().optional(), + not: z.union([ z.lazy(() => BudgetTypeSchema),z.lazy(() => NestedEnumBudgetTypeWithAggregatesFilterSchema) ]).optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedEnumBudgetTypeFilterSchema).optional(), + _max: z.lazy(() => NestedEnumBudgetTypeFilterSchema).optional() +}).strict(); + +export const NestedEnumBudgetPeriodTypeFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => BudgetPeriodTypeSchema).optional(), + in: z.lazy(() => BudgetPeriodTypeSchema).array().optional(), + notIn: z.lazy(() => BudgetPeriodTypeSchema).array().optional(), + not: z.union([ z.lazy(() => BudgetPeriodTypeSchema),z.lazy(() => NestedEnumBudgetPeriodTypeFilterSchema) ]).optional(), +}).strict(); + +export const NestedDecimalFilterSchema: z.ZodType = z.object({ + equals: z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }).optional(), + in: z.union([z.number().array(),z.string().array(),z.instanceof(Prisma.Decimal).array(),DecimalJsLikeSchema.array(),]).refine((v) => Array.isArray(v) && (v as any[]).every((v) => isValidDecimalInput(v)), { message: 'Must be a Decimal' }).optional(), + notIn: z.union([z.number().array(),z.string().array(),z.instanceof(Prisma.Decimal).array(),DecimalJsLikeSchema.array(),]).refine((v) => Array.isArray(v) && (v as any[]).every((v) => isValidDecimalInput(v)), { message: 'Must be a Decimal' }).optional(), + lt: z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }).optional(), + lte: z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }).optional(), + gt: z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }).optional(), + gte: z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }).optional(), + not: z.union([ z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }),z.lazy(() => NestedDecimalFilterSchema) ]).optional(), +}).strict(); + +export const NestedDateTimeNullableFilterSchema: z.ZodType = z.object({ + equals: z.coerce.date().optional().nullable(), + in: z.coerce.date().array().optional().nullable(), + notIn: z.coerce.date().array().optional().nullable(), + lt: z.coerce.date().optional(), + lte: z.coerce.date().optional(), + gt: z.coerce.date().optional(), + gte: z.coerce.date().optional(), + not: z.union([ z.coerce.date(),z.lazy(() => NestedDateTimeNullableFilterSchema) ]).optional().nullable(), +}).strict(); + +export const NestedEnumBudgetPeriodTypeWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => BudgetPeriodTypeSchema).optional(), + in: z.lazy(() => BudgetPeriodTypeSchema).array().optional(), + notIn: z.lazy(() => BudgetPeriodTypeSchema).array().optional(), + not: z.union([ z.lazy(() => BudgetPeriodTypeSchema),z.lazy(() => NestedEnumBudgetPeriodTypeWithAggregatesFilterSchema) ]).optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedEnumBudgetPeriodTypeFilterSchema).optional(), + _max: z.lazy(() => NestedEnumBudgetPeriodTypeFilterSchema).optional() +}).strict(); + +export const NestedDecimalWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }).optional(), + in: z.union([z.number().array(),z.string().array(),z.instanceof(Prisma.Decimal).array(),DecimalJsLikeSchema.array(),]).refine((v) => Array.isArray(v) && (v as any[]).every((v) => isValidDecimalInput(v)), { message: 'Must be a Decimal' }).optional(), + notIn: z.union([z.number().array(),z.string().array(),z.instanceof(Prisma.Decimal).array(),DecimalJsLikeSchema.array(),]).refine((v) => Array.isArray(v) && (v as any[]).every((v) => isValidDecimalInput(v)), { message: 'Must be a Decimal' }).optional(), + lt: z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }).optional(), + lte: z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }).optional(), + gt: z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }).optional(), + gte: z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }).optional(), + not: z.union([ z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }),z.lazy(() => NestedDecimalWithAggregatesFilterSchema) ]).optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _avg: z.lazy(() => NestedDecimalFilterSchema).optional(), + _sum: z.lazy(() => NestedDecimalFilterSchema).optional(), + _min: z.lazy(() => NestedDecimalFilterSchema).optional(), + _max: z.lazy(() => NestedDecimalFilterSchema).optional() +}).strict(); + +export const NestedDateTimeNullableWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.coerce.date().optional().nullable(), + in: z.coerce.date().array().optional().nullable(), + notIn: z.coerce.date().array().optional().nullable(), + lt: z.coerce.date().optional(), + lte: z.coerce.date().optional(), + gt: z.coerce.date().optional(), + gte: z.coerce.date().optional(), + not: z.union([ z.coerce.date(),z.lazy(() => NestedDateTimeNullableWithAggregatesFilterSchema) ]).optional().nullable(), + _count: z.lazy(() => NestedIntNullableFilterSchema).optional(), + _min: z.lazy(() => NestedDateTimeNullableFilterSchema).optional(), + _max: z.lazy(() => NestedDateTimeNullableFilterSchema).optional() +}).strict(); + +export const NestedEnumBudgetUserPermissionFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => BudgetUserPermissionSchema).optional(), + in: z.lazy(() => BudgetUserPermissionSchema).array().optional(), + notIn: z.lazy(() => BudgetUserPermissionSchema).array().optional(), + not: z.union([ z.lazy(() => BudgetUserPermissionSchema),z.lazy(() => NestedEnumBudgetUserPermissionFilterSchema) ]).optional(), +}).strict(); + +export const NestedEnumBudgetUserPermissionWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => BudgetUserPermissionSchema).optional(), + in: z.lazy(() => BudgetUserPermissionSchema).array().optional(), + notIn: z.lazy(() => BudgetUserPermissionSchema).array().optional(), + not: z.union([ z.lazy(() => BudgetUserPermissionSchema),z.lazy(() => NestedEnumBudgetUserPermissionWithAggregatesFilterSchema) ]).optional(), + _count: z.lazy(() => NestedIntFilterSchema).optional(), + _min: z.lazy(() => NestedEnumBudgetUserPermissionFilterSchema).optional(), + _max: z.lazy(() => NestedEnumBudgetUserPermissionFilterSchema).optional() +}).strict(); + +export const NestedEnumBudgetUserPermissionNullableFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => BudgetUserPermissionSchema).optional().nullable(), + in: z.lazy(() => BudgetUserPermissionSchema).array().optional().nullable(), + notIn: z.lazy(() => BudgetUserPermissionSchema).array().optional().nullable(), + not: z.union([ z.lazy(() => BudgetUserPermissionSchema),z.lazy(() => NestedEnumBudgetUserPermissionNullableFilterSchema) ]).optional().nullable(), +}).strict(); + +export const NestedEnumBudgetUserPermissionNullableWithAggregatesFilterSchema: z.ZodType = z.object({ + equals: z.lazy(() => BudgetUserPermissionSchema).optional().nullable(), + in: z.lazy(() => BudgetUserPermissionSchema).array().optional().nullable(), + notIn: z.lazy(() => BudgetUserPermissionSchema).array().optional().nullable(), + not: z.union([ z.lazy(() => BudgetUserPermissionSchema),z.lazy(() => NestedEnumBudgetUserPermissionNullableWithAggregatesFilterSchema) ]).optional().nullable(), + _count: z.lazy(() => NestedIntNullableFilterSchema).optional(), + _min: z.lazy(() => NestedEnumBudgetUserPermissionNullableFilterSchema).optional(), + _max: z.lazy(() => NestedEnumBudgetUserPermissionNullableFilterSchema).optional() +}).strict(); + +export const UserWalletAccountCreateWithoutUserInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + name: z.string(), + icon: z.string().optional().nullable(), + description: z.string().optional().nullable(), + lastDigits: z.string().optional().nullable(), + preferredCurrency: z.string(), + transactions: z.lazy(() => TransactionCreateNestedManyWithoutWalletAccountInputSchema).optional() +}).strict(); + +export const UserWalletAccountUncheckedCreateWithoutUserInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + name: z.string(), + icon: z.string().optional().nullable(), + description: z.string().optional().nullable(), + lastDigits: z.string().optional().nullable(), + preferredCurrency: z.string(), + transactions: z.lazy(() => TransactionUncheckedCreateNestedManyWithoutWalletAccountInputSchema).optional() +}).strict(); + +export const UserWalletAccountCreateOrConnectWithoutUserInputSchema: z.ZodType = z.object({ + where: z.lazy(() => UserWalletAccountWhereUniqueInputSchema), + create: z.union([ z.lazy(() => UserWalletAccountCreateWithoutUserInputSchema),z.lazy(() => UserWalletAccountUncheckedCreateWithoutUserInputSchema) ]), +}).strict(); + +export const UserWalletAccountCreateManyUserInputEnvelopeSchema: z.ZodType = z.object({ + data: z.union([ z.lazy(() => UserWalletAccountCreateManyUserInputSchema),z.lazy(() => UserWalletAccountCreateManyUserInputSchema).array() ]), + skipDuplicates: z.boolean().optional() +}).strict(); + +export const BudgetUserCreateWithoutUserInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + permission: z.lazy(() => BudgetUserPermissionSchema), + budget: z.lazy(() => BudgetCreateNestedOneWithoutBudgetUsersInputSchema) +}).strict(); + +export const BudgetUserUncheckedCreateWithoutUserInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + permission: z.lazy(() => BudgetUserPermissionSchema), + budgetId: z.string() +}).strict(); + +export const BudgetUserCreateOrConnectWithoutUserInputSchema: z.ZodType = z.object({ + where: z.lazy(() => BudgetUserWhereUniqueInputSchema), + create: z.union([ z.lazy(() => BudgetUserCreateWithoutUserInputSchema),z.lazy(() => BudgetUserUncheckedCreateWithoutUserInputSchema) ]), +}).strict(); + +export const BudgetUserCreateManyUserInputEnvelopeSchema: z.ZodType = z.object({ + data: z.union([ z.lazy(() => BudgetUserCreateManyUserInputSchema),z.lazy(() => BudgetUserCreateManyUserInputSchema).array() ]), + skipDuplicates: z.boolean().optional() +}).strict(); + +export const TransactionCreateWithoutCreatedByUserInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + amount: z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }), + currency: z.string(), + date: z.coerce.date(), + note: z.string().optional().nullable(), + category: z.lazy(() => CategoryCreateNestedOneWithoutTransactionsInputSchema).optional(), + budget: z.lazy(() => BudgetCreateNestedOneWithoutTransactionsInputSchema).optional(), + walletAccount: z.lazy(() => UserWalletAccountCreateNestedOneWithoutTransactionsInputSchema) +}).strict(); + +export const TransactionUncheckedCreateWithoutCreatedByUserInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + amount: z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }), + currency: z.string(), + date: z.coerce.date(), + note: z.string().optional().nullable(), + categoryId: z.string().optional().nullable(), + budgetId: z.string().optional().nullable(), + walletAccountId: z.string() +}).strict(); + +export const TransactionCreateOrConnectWithoutCreatedByUserInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TransactionWhereUniqueInputSchema), + create: z.union([ z.lazy(() => TransactionCreateWithoutCreatedByUserInputSchema),z.lazy(() => TransactionUncheckedCreateWithoutCreatedByUserInputSchema) ]), +}).strict(); + +export const TransactionCreateManyCreatedByUserInputEnvelopeSchema: z.ZodType = z.object({ + data: z.union([ z.lazy(() => TransactionCreateManyCreatedByUserInputSchema),z.lazy(() => TransactionCreateManyCreatedByUserInputSchema).array() ]), + skipDuplicates: z.boolean().optional() +}).strict(); + +export const BudgetUserInvitationCreateWithoutCreatedByUserInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + email: z.string().optional().nullable(), + token: z.string().uuid().optional(), + expiresAt: z.coerce.date(), + permission: z.lazy(() => BudgetUserPermissionSchema).optional().nullable(), + budget: z.lazy(() => BudgetCreateNestedOneWithoutInvitationsInputSchema), + responses: z.lazy(() => BudgetUserInvitationResponseCreateNestedManyWithoutInvitationInputSchema).optional() +}).strict(); + +export const BudgetUserInvitationUncheckedCreateWithoutCreatedByUserInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + email: z.string().optional().nullable(), + token: z.string().uuid().optional(), + expiresAt: z.coerce.date(), + permission: z.lazy(() => BudgetUserPermissionSchema).optional().nullable(), + budgetId: z.string(), + responses: z.lazy(() => BudgetUserInvitationResponseUncheckedCreateNestedManyWithoutInvitationInputSchema).optional() +}).strict(); + +export const BudgetUserInvitationCreateOrConnectWithoutCreatedByUserInputSchema: z.ZodType = z.object({ + where: z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema), + create: z.union([ z.lazy(() => BudgetUserInvitationCreateWithoutCreatedByUserInputSchema),z.lazy(() => BudgetUserInvitationUncheckedCreateWithoutCreatedByUserInputSchema) ]), +}).strict(); + +export const BudgetUserInvitationCreateManyCreatedByUserInputEnvelopeSchema: z.ZodType = z.object({ + data: z.union([ z.lazy(() => BudgetUserInvitationCreateManyCreatedByUserInputSchema),z.lazy(() => BudgetUserInvitationCreateManyCreatedByUserInputSchema).array() ]), + skipDuplicates: z.boolean().optional() +}).strict(); + +export const BudgetUserInvitationResponseCreateWithoutCreatedUserInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + acceptedAt: z.coerce.date().optional().nullable(), + declinedAt: z.coerce.date().optional().nullable(), + invitation: z.lazy(() => BudgetUserInvitationCreateNestedOneWithoutResponsesInputSchema) +}).strict(); + +export const BudgetUserInvitationResponseUncheckedCreateWithoutCreatedUserInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + acceptedAt: z.coerce.date().optional().nullable(), + declinedAt: z.coerce.date().optional().nullable(), + invitationId: z.string() +}).strict(); + +export const BudgetUserInvitationResponseCreateOrConnectWithoutCreatedUserInputSchema: z.ZodType = z.object({ + where: z.lazy(() => BudgetUserInvitationResponseWhereUniqueInputSchema), + create: z.union([ z.lazy(() => BudgetUserInvitationResponseCreateWithoutCreatedUserInputSchema),z.lazy(() => BudgetUserInvitationResponseUncheckedCreateWithoutCreatedUserInputSchema) ]), +}).strict(); + +export const UserWalletAccountUpsertWithWhereUniqueWithoutUserInputSchema: z.ZodType = z.object({ + where: z.lazy(() => UserWalletAccountWhereUniqueInputSchema), + update: z.union([ z.lazy(() => UserWalletAccountUpdateWithoutUserInputSchema),z.lazy(() => UserWalletAccountUncheckedUpdateWithoutUserInputSchema) ]), + create: z.union([ z.lazy(() => UserWalletAccountCreateWithoutUserInputSchema),z.lazy(() => UserWalletAccountUncheckedCreateWithoutUserInputSchema) ]), +}).strict(); + +export const UserWalletAccountUpdateWithWhereUniqueWithoutUserInputSchema: z.ZodType = z.object({ + where: z.lazy(() => UserWalletAccountWhereUniqueInputSchema), + data: z.union([ z.lazy(() => UserWalletAccountUpdateWithoutUserInputSchema),z.lazy(() => UserWalletAccountUncheckedUpdateWithoutUserInputSchema) ]), +}).strict(); + +export const UserWalletAccountUpdateManyWithWhereWithoutUserInputSchema: z.ZodType = z.object({ + where: z.lazy(() => UserWalletAccountScalarWhereInputSchema), + data: z.union([ z.lazy(() => UserWalletAccountUpdateManyMutationInputSchema),z.lazy(() => UserWalletAccountUncheckedUpdateManyWithoutUserInputSchema) ]), +}).strict(); + +export const UserWalletAccountScalarWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => UserWalletAccountScalarWhereInputSchema),z.lazy(() => UserWalletAccountScalarWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => UserWalletAccountScalarWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => UserWalletAccountScalarWhereInputSchema),z.lazy(() => UserWalletAccountScalarWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + name: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + icon: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + description: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + lastDigits: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + preferredCurrency: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + userId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), +}).strict(); + +export const BudgetUserUpsertWithWhereUniqueWithoutUserInputSchema: z.ZodType = z.object({ + where: z.lazy(() => BudgetUserWhereUniqueInputSchema), + update: z.union([ z.lazy(() => BudgetUserUpdateWithoutUserInputSchema),z.lazy(() => BudgetUserUncheckedUpdateWithoutUserInputSchema) ]), + create: z.union([ z.lazy(() => BudgetUserCreateWithoutUserInputSchema),z.lazy(() => BudgetUserUncheckedCreateWithoutUserInputSchema) ]), +}).strict(); + +export const BudgetUserUpdateWithWhereUniqueWithoutUserInputSchema: z.ZodType = z.object({ + where: z.lazy(() => BudgetUserWhereUniqueInputSchema), + data: z.union([ z.lazy(() => BudgetUserUpdateWithoutUserInputSchema),z.lazy(() => BudgetUserUncheckedUpdateWithoutUserInputSchema) ]), +}).strict(); + +export const BudgetUserUpdateManyWithWhereWithoutUserInputSchema: z.ZodType = z.object({ + where: z.lazy(() => BudgetUserScalarWhereInputSchema), + data: z.union([ z.lazy(() => BudgetUserUpdateManyMutationInputSchema),z.lazy(() => BudgetUserUncheckedUpdateManyWithoutUserInputSchema) ]), +}).strict(); + +export const BudgetUserScalarWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => BudgetUserScalarWhereInputSchema),z.lazy(() => BudgetUserScalarWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => BudgetUserScalarWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => BudgetUserScalarWhereInputSchema),z.lazy(() => BudgetUserScalarWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + permission: z.union([ z.lazy(() => EnumBudgetUserPermissionFilterSchema),z.lazy(() => BudgetUserPermissionSchema) ]).optional(), + userId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + budgetId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), +}).strict(); + +export const TransactionUpsertWithWhereUniqueWithoutCreatedByUserInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TransactionWhereUniqueInputSchema), + update: z.union([ z.lazy(() => TransactionUpdateWithoutCreatedByUserInputSchema),z.lazy(() => TransactionUncheckedUpdateWithoutCreatedByUserInputSchema) ]), + create: z.union([ z.lazy(() => TransactionCreateWithoutCreatedByUserInputSchema),z.lazy(() => TransactionUncheckedCreateWithoutCreatedByUserInputSchema) ]), +}).strict(); + +export const TransactionUpdateWithWhereUniqueWithoutCreatedByUserInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TransactionWhereUniqueInputSchema), + data: z.union([ z.lazy(() => TransactionUpdateWithoutCreatedByUserInputSchema),z.lazy(() => TransactionUncheckedUpdateWithoutCreatedByUserInputSchema) ]), +}).strict(); + +export const TransactionUpdateManyWithWhereWithoutCreatedByUserInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TransactionScalarWhereInputSchema), + data: z.union([ z.lazy(() => TransactionUpdateManyMutationInputSchema),z.lazy(() => TransactionUncheckedUpdateManyWithoutCreatedByUserInputSchema) ]), +}).strict(); + +export const TransactionScalarWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => TransactionScalarWhereInputSchema),z.lazy(() => TransactionScalarWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => TransactionScalarWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => TransactionScalarWhereInputSchema),z.lazy(() => TransactionScalarWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + amount: z.union([ z.lazy(() => DecimalFilterSchema),z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }) ]).optional(), + currency: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + date: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + note: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + categoryId: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + budgetId: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + walletAccountId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + createdByUserId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), +}).strict(); + +export const BudgetUserInvitationUpsertWithWhereUniqueWithoutCreatedByUserInputSchema: z.ZodType = z.object({ + where: z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema), + update: z.union([ z.lazy(() => BudgetUserInvitationUpdateWithoutCreatedByUserInputSchema),z.lazy(() => BudgetUserInvitationUncheckedUpdateWithoutCreatedByUserInputSchema) ]), + create: z.union([ z.lazy(() => BudgetUserInvitationCreateWithoutCreatedByUserInputSchema),z.lazy(() => BudgetUserInvitationUncheckedCreateWithoutCreatedByUserInputSchema) ]), +}).strict(); + +export const BudgetUserInvitationUpdateWithWhereUniqueWithoutCreatedByUserInputSchema: z.ZodType = z.object({ + where: z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema), + data: z.union([ z.lazy(() => BudgetUserInvitationUpdateWithoutCreatedByUserInputSchema),z.lazy(() => BudgetUserInvitationUncheckedUpdateWithoutCreatedByUserInputSchema) ]), +}).strict(); + +export const BudgetUserInvitationUpdateManyWithWhereWithoutCreatedByUserInputSchema: z.ZodType = z.object({ + where: z.lazy(() => BudgetUserInvitationScalarWhereInputSchema), + data: z.union([ z.lazy(() => BudgetUserInvitationUpdateManyMutationInputSchema),z.lazy(() => BudgetUserInvitationUncheckedUpdateManyWithoutCreatedByUserInputSchema) ]), +}).strict(); + +export const BudgetUserInvitationScalarWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => BudgetUserInvitationScalarWhereInputSchema),z.lazy(() => BudgetUserInvitationScalarWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => BudgetUserInvitationScalarWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => BudgetUserInvitationScalarWhereInputSchema),z.lazy(() => BudgetUserInvitationScalarWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + email: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + token: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + expiresAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + permission: z.union([ z.lazy(() => EnumBudgetUserPermissionNullableFilterSchema),z.lazy(() => BudgetUserPermissionSchema) ]).optional().nullable(), + createdByUserId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + budgetId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), +}).strict(); + +export const BudgetUserInvitationResponseUpsertWithoutCreatedUserInputSchema: z.ZodType = z.object({ + update: z.union([ z.lazy(() => BudgetUserInvitationResponseUpdateWithoutCreatedUserInputSchema),z.lazy(() => BudgetUserInvitationResponseUncheckedUpdateWithoutCreatedUserInputSchema) ]), + create: z.union([ z.lazy(() => BudgetUserInvitationResponseCreateWithoutCreatedUserInputSchema),z.lazy(() => BudgetUserInvitationResponseUncheckedCreateWithoutCreatedUserInputSchema) ]), + where: z.lazy(() => BudgetUserInvitationResponseWhereInputSchema).optional() +}).strict(); + +export const BudgetUserInvitationResponseUpdateToOneWithWhereWithoutCreatedUserInputSchema: z.ZodType = z.object({ + where: z.lazy(() => BudgetUserInvitationResponseWhereInputSchema).optional(), + data: z.union([ z.lazy(() => BudgetUserInvitationResponseUpdateWithoutCreatedUserInputSchema),z.lazy(() => BudgetUserInvitationResponseUncheckedUpdateWithoutCreatedUserInputSchema) ]), +}).strict(); + +export const BudgetUserInvitationResponseUpdateWithoutCreatedUserInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + acceptedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + declinedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + invitation: z.lazy(() => BudgetUserInvitationUpdateOneRequiredWithoutResponsesNestedInputSchema).optional() +}).strict(); + +export const BudgetUserInvitationResponseUncheckedUpdateWithoutCreatedUserInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + acceptedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + declinedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + invitationId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const UserCreateWithoutWalletAccountsInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + email: z.string(), + name: z.string().optional().nullable(), + budgetUsers: z.lazy(() => BudgetUserCreateNestedManyWithoutUserInputSchema).optional(), + transactions: z.lazy(() => TransactionCreateNestedManyWithoutCreatedByUserInputSchema).optional(), + createdBudgetUserInvitations: z.lazy(() => BudgetUserInvitationCreateNestedManyWithoutCreatedByUserInputSchema).optional(), + createdFromInvitation: z.lazy(() => BudgetUserInvitationResponseCreateNestedOneWithoutCreatedUserInputSchema).optional() +}).strict(); + +export const UserUncheckedCreateWithoutWalletAccountsInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + email: z.string(), + name: z.string().optional().nullable(), + budgetUsers: z.lazy(() => BudgetUserUncheckedCreateNestedManyWithoutUserInputSchema).optional(), + transactions: z.lazy(() => TransactionUncheckedCreateNestedManyWithoutCreatedByUserInputSchema).optional(), + createdBudgetUserInvitations: z.lazy(() => BudgetUserInvitationUncheckedCreateNestedManyWithoutCreatedByUserInputSchema).optional(), + createdFromInvitation: z.lazy(() => BudgetUserInvitationResponseUncheckedCreateNestedOneWithoutCreatedUserInputSchema).optional() +}).strict(); + +export const UserCreateOrConnectWithoutWalletAccountsInputSchema: z.ZodType = z.object({ + where: z.lazy(() => UserWhereUniqueInputSchema), + create: z.union([ z.lazy(() => UserCreateWithoutWalletAccountsInputSchema),z.lazy(() => UserUncheckedCreateWithoutWalletAccountsInputSchema) ]), +}).strict(); + +export const TransactionCreateWithoutWalletAccountInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + amount: z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }), + currency: z.string(), + date: z.coerce.date(), + note: z.string().optional().nullable(), + category: z.lazy(() => CategoryCreateNestedOneWithoutTransactionsInputSchema).optional(), + budget: z.lazy(() => BudgetCreateNestedOneWithoutTransactionsInputSchema).optional(), + createdByUser: z.lazy(() => UserCreateNestedOneWithoutTransactionsInputSchema) +}).strict(); + +export const TransactionUncheckedCreateWithoutWalletAccountInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + amount: z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }), + currency: z.string(), + date: z.coerce.date(), + note: z.string().optional().nullable(), + categoryId: z.string().optional().nullable(), + budgetId: z.string().optional().nullable(), + createdByUserId: z.string() +}).strict(); + +export const TransactionCreateOrConnectWithoutWalletAccountInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TransactionWhereUniqueInputSchema), + create: z.union([ z.lazy(() => TransactionCreateWithoutWalletAccountInputSchema),z.lazy(() => TransactionUncheckedCreateWithoutWalletAccountInputSchema) ]), +}).strict(); + +export const TransactionCreateManyWalletAccountInputEnvelopeSchema: z.ZodType = z.object({ + data: z.union([ z.lazy(() => TransactionCreateManyWalletAccountInputSchema),z.lazy(() => TransactionCreateManyWalletAccountInputSchema).array() ]), + skipDuplicates: z.boolean().optional() +}).strict(); + +export const UserUpsertWithoutWalletAccountsInputSchema: z.ZodType = z.object({ + update: z.union([ z.lazy(() => UserUpdateWithoutWalletAccountsInputSchema),z.lazy(() => UserUncheckedUpdateWithoutWalletAccountsInputSchema) ]), + create: z.union([ z.lazy(() => UserCreateWithoutWalletAccountsInputSchema),z.lazy(() => UserUncheckedCreateWithoutWalletAccountsInputSchema) ]), + where: z.lazy(() => UserWhereInputSchema).optional() +}).strict(); + +export const UserUpdateToOneWithWhereWithoutWalletAccountsInputSchema: z.ZodType = z.object({ + where: z.lazy(() => UserWhereInputSchema).optional(), + data: z.union([ z.lazy(() => UserUpdateWithoutWalletAccountsInputSchema),z.lazy(() => UserUncheckedUpdateWithoutWalletAccountsInputSchema) ]), +}).strict(); + +export const UserUpdateWithoutWalletAccountsInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + email: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + budgetUsers: z.lazy(() => BudgetUserUpdateManyWithoutUserNestedInputSchema).optional(), + transactions: z.lazy(() => TransactionUpdateManyWithoutCreatedByUserNestedInputSchema).optional(), + createdBudgetUserInvitations: z.lazy(() => BudgetUserInvitationUpdateManyWithoutCreatedByUserNestedInputSchema).optional(), + createdFromInvitation: z.lazy(() => BudgetUserInvitationResponseUpdateOneWithoutCreatedUserNestedInputSchema).optional() +}).strict(); + +export const UserUncheckedUpdateWithoutWalletAccountsInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + email: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + budgetUsers: z.lazy(() => BudgetUserUncheckedUpdateManyWithoutUserNestedInputSchema).optional(), + transactions: z.lazy(() => TransactionUncheckedUpdateManyWithoutCreatedByUserNestedInputSchema).optional(), + createdBudgetUserInvitations: z.lazy(() => BudgetUserInvitationUncheckedUpdateManyWithoutCreatedByUserNestedInputSchema).optional(), + createdFromInvitation: z.lazy(() => BudgetUserInvitationResponseUncheckedUpdateOneWithoutCreatedUserNestedInputSchema).optional() +}).strict(); + +export const TransactionUpsertWithWhereUniqueWithoutWalletAccountInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TransactionWhereUniqueInputSchema), + update: z.union([ z.lazy(() => TransactionUpdateWithoutWalletAccountInputSchema),z.lazy(() => TransactionUncheckedUpdateWithoutWalletAccountInputSchema) ]), + create: z.union([ z.lazy(() => TransactionCreateWithoutWalletAccountInputSchema),z.lazy(() => TransactionUncheckedCreateWithoutWalletAccountInputSchema) ]), +}).strict(); + +export const TransactionUpdateWithWhereUniqueWithoutWalletAccountInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TransactionWhereUniqueInputSchema), + data: z.union([ z.lazy(() => TransactionUpdateWithoutWalletAccountInputSchema),z.lazy(() => TransactionUncheckedUpdateWithoutWalletAccountInputSchema) ]), +}).strict(); + +export const TransactionUpdateManyWithWhereWithoutWalletAccountInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TransactionScalarWhereInputSchema), + data: z.union([ z.lazy(() => TransactionUpdateManyMutationInputSchema),z.lazy(() => TransactionUncheckedUpdateManyWithoutWalletAccountInputSchema) ]), +}).strict(); + +export const BudgetPeriodConfigCreateWithoutBudgetInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + type: z.lazy(() => BudgetPeriodTypeSchema), + amount: z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }), + currency: z.string(), + startDate: z.coerce.date().optional().nullable(), + endDate: z.coerce.date().optional().nullable() +}).strict(); + +export const BudgetPeriodConfigUncheckedCreateWithoutBudgetInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + type: z.lazy(() => BudgetPeriodTypeSchema), + amount: z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }), + currency: z.string(), + startDate: z.coerce.date().optional().nullable(), + endDate: z.coerce.date().optional().nullable() +}).strict(); + +export const BudgetPeriodConfigCreateOrConnectWithoutBudgetInputSchema: z.ZodType = z.object({ + where: z.lazy(() => BudgetPeriodConfigWhereUniqueInputSchema), + create: z.union([ z.lazy(() => BudgetPeriodConfigCreateWithoutBudgetInputSchema),z.lazy(() => BudgetPeriodConfigUncheckedCreateWithoutBudgetInputSchema) ]), +}).strict(); + +export const BudgetUserCreateWithoutBudgetInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + permission: z.lazy(() => BudgetUserPermissionSchema), + user: z.lazy(() => UserCreateNestedOneWithoutBudgetUsersInputSchema) +}).strict(); + +export const BudgetUserUncheckedCreateWithoutBudgetInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + permission: z.lazy(() => BudgetUserPermissionSchema), + userId: z.string() +}).strict(); + +export const BudgetUserCreateOrConnectWithoutBudgetInputSchema: z.ZodType = z.object({ + where: z.lazy(() => BudgetUserWhereUniqueInputSchema), + create: z.union([ z.lazy(() => BudgetUserCreateWithoutBudgetInputSchema),z.lazy(() => BudgetUserUncheckedCreateWithoutBudgetInputSchema) ]), +}).strict(); + +export const BudgetUserCreateManyBudgetInputEnvelopeSchema: z.ZodType = z.object({ + data: z.union([ z.lazy(() => BudgetUserCreateManyBudgetInputSchema),z.lazy(() => BudgetUserCreateManyBudgetInputSchema).array() ]), + skipDuplicates: z.boolean().optional() +}).strict(); + +export const TransactionCreateWithoutBudgetInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + amount: z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }), + currency: z.string(), + date: z.coerce.date(), + note: z.string().optional().nullable(), + category: z.lazy(() => CategoryCreateNestedOneWithoutTransactionsInputSchema).optional(), + walletAccount: z.lazy(() => UserWalletAccountCreateNestedOneWithoutTransactionsInputSchema), + createdByUser: z.lazy(() => UserCreateNestedOneWithoutTransactionsInputSchema) +}).strict(); + +export const TransactionUncheckedCreateWithoutBudgetInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + amount: z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }), + currency: z.string(), + date: z.coerce.date(), + note: z.string().optional().nullable(), + categoryId: z.string().optional().nullable(), + walletAccountId: z.string(), + createdByUserId: z.string() +}).strict(); + +export const TransactionCreateOrConnectWithoutBudgetInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TransactionWhereUniqueInputSchema), + create: z.union([ z.lazy(() => TransactionCreateWithoutBudgetInputSchema),z.lazy(() => TransactionUncheckedCreateWithoutBudgetInputSchema) ]), +}).strict(); + +export const TransactionCreateManyBudgetInputEnvelopeSchema: z.ZodType = z.object({ + data: z.union([ z.lazy(() => TransactionCreateManyBudgetInputSchema),z.lazy(() => TransactionCreateManyBudgetInputSchema).array() ]), + skipDuplicates: z.boolean().optional() +}).strict(); + +export const BudgetUserInvitationCreateWithoutBudgetInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + email: z.string().optional().nullable(), + token: z.string().uuid().optional(), + expiresAt: z.coerce.date(), + permission: z.lazy(() => BudgetUserPermissionSchema).optional().nullable(), + createdByUser: z.lazy(() => UserCreateNestedOneWithoutCreatedBudgetUserInvitationsInputSchema), + responses: z.lazy(() => BudgetUserInvitationResponseCreateNestedManyWithoutInvitationInputSchema).optional() +}).strict(); + +export const BudgetUserInvitationUncheckedCreateWithoutBudgetInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + email: z.string().optional().nullable(), + token: z.string().uuid().optional(), + expiresAt: z.coerce.date(), + permission: z.lazy(() => BudgetUserPermissionSchema).optional().nullable(), + createdByUserId: z.string(), + responses: z.lazy(() => BudgetUserInvitationResponseUncheckedCreateNestedManyWithoutInvitationInputSchema).optional() +}).strict(); + +export const BudgetUserInvitationCreateOrConnectWithoutBudgetInputSchema: z.ZodType = z.object({ + where: z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema), + create: z.union([ z.lazy(() => BudgetUserInvitationCreateWithoutBudgetInputSchema),z.lazy(() => BudgetUserInvitationUncheckedCreateWithoutBudgetInputSchema) ]), +}).strict(); + +export const BudgetUserInvitationCreateManyBudgetInputEnvelopeSchema: z.ZodType = z.object({ + data: z.union([ z.lazy(() => BudgetUserInvitationCreateManyBudgetInputSchema),z.lazy(() => BudgetUserInvitationCreateManyBudgetInputSchema).array() ]), + skipDuplicates: z.boolean().optional() +}).strict(); + +export const BudgetPeriodConfigUpsertWithoutBudgetInputSchema: z.ZodType = z.object({ + update: z.union([ z.lazy(() => BudgetPeriodConfigUpdateWithoutBudgetInputSchema),z.lazy(() => BudgetPeriodConfigUncheckedUpdateWithoutBudgetInputSchema) ]), + create: z.union([ z.lazy(() => BudgetPeriodConfigCreateWithoutBudgetInputSchema),z.lazy(() => BudgetPeriodConfigUncheckedCreateWithoutBudgetInputSchema) ]), + where: z.lazy(() => BudgetPeriodConfigWhereInputSchema).optional() +}).strict(); + +export const BudgetPeriodConfigUpdateToOneWithWhereWithoutBudgetInputSchema: z.ZodType = z.object({ + where: z.lazy(() => BudgetPeriodConfigWhereInputSchema).optional(), + data: z.union([ z.lazy(() => BudgetPeriodConfigUpdateWithoutBudgetInputSchema),z.lazy(() => BudgetPeriodConfigUncheckedUpdateWithoutBudgetInputSchema) ]), +}).strict(); + +export const BudgetPeriodConfigUpdateWithoutBudgetInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + type: z.union([ z.lazy(() => BudgetPeriodTypeSchema),z.lazy(() => EnumBudgetPeriodTypeFieldUpdateOperationsInputSchema) ]).optional(), + amount: z.union([ z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }),z.lazy(() => DecimalFieldUpdateOperationsInputSchema) ]).optional(), + currency: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + startDate: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + endDate: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), +}).strict(); + +export const BudgetPeriodConfigUncheckedUpdateWithoutBudgetInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + type: z.union([ z.lazy(() => BudgetPeriodTypeSchema),z.lazy(() => EnumBudgetPeriodTypeFieldUpdateOperationsInputSchema) ]).optional(), + amount: z.union([ z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }),z.lazy(() => DecimalFieldUpdateOperationsInputSchema) ]).optional(), + currency: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + startDate: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + endDate: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), +}).strict(); + +export const BudgetUserUpsertWithWhereUniqueWithoutBudgetInputSchema: z.ZodType = z.object({ + where: z.lazy(() => BudgetUserWhereUniqueInputSchema), + update: z.union([ z.lazy(() => BudgetUserUpdateWithoutBudgetInputSchema),z.lazy(() => BudgetUserUncheckedUpdateWithoutBudgetInputSchema) ]), + create: z.union([ z.lazy(() => BudgetUserCreateWithoutBudgetInputSchema),z.lazy(() => BudgetUserUncheckedCreateWithoutBudgetInputSchema) ]), +}).strict(); + +export const BudgetUserUpdateWithWhereUniqueWithoutBudgetInputSchema: z.ZodType = z.object({ + where: z.lazy(() => BudgetUserWhereUniqueInputSchema), + data: z.union([ z.lazy(() => BudgetUserUpdateWithoutBudgetInputSchema),z.lazy(() => BudgetUserUncheckedUpdateWithoutBudgetInputSchema) ]), +}).strict(); + +export const BudgetUserUpdateManyWithWhereWithoutBudgetInputSchema: z.ZodType = z.object({ + where: z.lazy(() => BudgetUserScalarWhereInputSchema), + data: z.union([ z.lazy(() => BudgetUserUpdateManyMutationInputSchema),z.lazy(() => BudgetUserUncheckedUpdateManyWithoutBudgetInputSchema) ]), +}).strict(); + +export const TransactionUpsertWithWhereUniqueWithoutBudgetInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TransactionWhereUniqueInputSchema), + update: z.union([ z.lazy(() => TransactionUpdateWithoutBudgetInputSchema),z.lazy(() => TransactionUncheckedUpdateWithoutBudgetInputSchema) ]), + create: z.union([ z.lazy(() => TransactionCreateWithoutBudgetInputSchema),z.lazy(() => TransactionUncheckedCreateWithoutBudgetInputSchema) ]), +}).strict(); + +export const TransactionUpdateWithWhereUniqueWithoutBudgetInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TransactionWhereUniqueInputSchema), + data: z.union([ z.lazy(() => TransactionUpdateWithoutBudgetInputSchema),z.lazy(() => TransactionUncheckedUpdateWithoutBudgetInputSchema) ]), +}).strict(); + +export const TransactionUpdateManyWithWhereWithoutBudgetInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TransactionScalarWhereInputSchema), + data: z.union([ z.lazy(() => TransactionUpdateManyMutationInputSchema),z.lazy(() => TransactionUncheckedUpdateManyWithoutBudgetInputSchema) ]), +}).strict(); + +export const BudgetUserInvitationUpsertWithWhereUniqueWithoutBudgetInputSchema: z.ZodType = z.object({ + where: z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema), + update: z.union([ z.lazy(() => BudgetUserInvitationUpdateWithoutBudgetInputSchema),z.lazy(() => BudgetUserInvitationUncheckedUpdateWithoutBudgetInputSchema) ]), + create: z.union([ z.lazy(() => BudgetUserInvitationCreateWithoutBudgetInputSchema),z.lazy(() => BudgetUserInvitationUncheckedCreateWithoutBudgetInputSchema) ]), +}).strict(); + +export const BudgetUserInvitationUpdateWithWhereUniqueWithoutBudgetInputSchema: z.ZodType = z.object({ + where: z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema), + data: z.union([ z.lazy(() => BudgetUserInvitationUpdateWithoutBudgetInputSchema),z.lazy(() => BudgetUserInvitationUncheckedUpdateWithoutBudgetInputSchema) ]), +}).strict(); + +export const BudgetUserInvitationUpdateManyWithWhereWithoutBudgetInputSchema: z.ZodType = z.object({ + where: z.lazy(() => BudgetUserInvitationScalarWhereInputSchema), + data: z.union([ z.lazy(() => BudgetUserInvitationUpdateManyMutationInputSchema),z.lazy(() => BudgetUserInvitationUncheckedUpdateManyWithoutBudgetInputSchema) ]), +}).strict(); + +export const BudgetCreateWithoutPeriodConfigInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + name: z.string(), + description: z.string().optional().nullable(), + preferredCurrency: z.string(), + type: z.lazy(() => BudgetTypeSchema).optional(), + budgetUsers: z.lazy(() => BudgetUserCreateNestedManyWithoutBudgetInputSchema).optional(), + transactions: z.lazy(() => TransactionCreateNestedManyWithoutBudgetInputSchema).optional(), + invitations: z.lazy(() => BudgetUserInvitationCreateNestedManyWithoutBudgetInputSchema).optional() +}).strict(); + +export const BudgetUncheckedCreateWithoutPeriodConfigInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + name: z.string(), + description: z.string().optional().nullable(), + preferredCurrency: z.string(), + type: z.lazy(() => BudgetTypeSchema).optional(), + budgetUsers: z.lazy(() => BudgetUserUncheckedCreateNestedManyWithoutBudgetInputSchema).optional(), + transactions: z.lazy(() => TransactionUncheckedCreateNestedManyWithoutBudgetInputSchema).optional(), + invitations: z.lazy(() => BudgetUserInvitationUncheckedCreateNestedManyWithoutBudgetInputSchema).optional() +}).strict(); + +export const BudgetCreateOrConnectWithoutPeriodConfigInputSchema: z.ZodType = z.object({ + where: z.lazy(() => BudgetWhereUniqueInputSchema), + create: z.union([ z.lazy(() => BudgetCreateWithoutPeriodConfigInputSchema),z.lazy(() => BudgetUncheckedCreateWithoutPeriodConfigInputSchema) ]), +}).strict(); + +export const BudgetUpsertWithoutPeriodConfigInputSchema: z.ZodType = z.object({ + update: z.union([ z.lazy(() => BudgetUpdateWithoutPeriodConfigInputSchema),z.lazy(() => BudgetUncheckedUpdateWithoutPeriodConfigInputSchema) ]), + create: z.union([ z.lazy(() => BudgetCreateWithoutPeriodConfigInputSchema),z.lazy(() => BudgetUncheckedCreateWithoutPeriodConfigInputSchema) ]), + where: z.lazy(() => BudgetWhereInputSchema).optional() +}).strict(); + +export const BudgetUpdateToOneWithWhereWithoutPeriodConfigInputSchema: z.ZodType = z.object({ + where: z.lazy(() => BudgetWhereInputSchema).optional(), + data: z.union([ z.lazy(() => BudgetUpdateWithoutPeriodConfigInputSchema),z.lazy(() => BudgetUncheckedUpdateWithoutPeriodConfigInputSchema) ]), +}).strict(); + +export const BudgetUpdateWithoutPeriodConfigInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + preferredCurrency: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + type: z.union([ z.lazy(() => BudgetTypeSchema),z.lazy(() => EnumBudgetTypeFieldUpdateOperationsInputSchema) ]).optional(), + budgetUsers: z.lazy(() => BudgetUserUpdateManyWithoutBudgetNestedInputSchema).optional(), + transactions: z.lazy(() => TransactionUpdateManyWithoutBudgetNestedInputSchema).optional(), + invitations: z.lazy(() => BudgetUserInvitationUpdateManyWithoutBudgetNestedInputSchema).optional() +}).strict(); + +export const BudgetUncheckedUpdateWithoutPeriodConfigInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + preferredCurrency: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + type: z.union([ z.lazy(() => BudgetTypeSchema),z.lazy(() => EnumBudgetTypeFieldUpdateOperationsInputSchema) ]).optional(), + budgetUsers: z.lazy(() => BudgetUserUncheckedUpdateManyWithoutBudgetNestedInputSchema).optional(), + transactions: z.lazy(() => TransactionUncheckedUpdateManyWithoutBudgetNestedInputSchema).optional(), + invitations: z.lazy(() => BudgetUserInvitationUncheckedUpdateManyWithoutBudgetNestedInputSchema).optional() +}).strict(); + +export const UserCreateWithoutBudgetUsersInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + email: z.string(), + name: z.string().optional().nullable(), + walletAccounts: z.lazy(() => UserWalletAccountCreateNestedManyWithoutUserInputSchema).optional(), + transactions: z.lazy(() => TransactionCreateNestedManyWithoutCreatedByUserInputSchema).optional(), + createdBudgetUserInvitations: z.lazy(() => BudgetUserInvitationCreateNestedManyWithoutCreatedByUserInputSchema).optional(), + createdFromInvitation: z.lazy(() => BudgetUserInvitationResponseCreateNestedOneWithoutCreatedUserInputSchema).optional() +}).strict(); + +export const UserUncheckedCreateWithoutBudgetUsersInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + email: z.string(), + name: z.string().optional().nullable(), + walletAccounts: z.lazy(() => UserWalletAccountUncheckedCreateNestedManyWithoutUserInputSchema).optional(), + transactions: z.lazy(() => TransactionUncheckedCreateNestedManyWithoutCreatedByUserInputSchema).optional(), + createdBudgetUserInvitations: z.lazy(() => BudgetUserInvitationUncheckedCreateNestedManyWithoutCreatedByUserInputSchema).optional(), + createdFromInvitation: z.lazy(() => BudgetUserInvitationResponseUncheckedCreateNestedOneWithoutCreatedUserInputSchema).optional() +}).strict(); + +export const UserCreateOrConnectWithoutBudgetUsersInputSchema: z.ZodType = z.object({ + where: z.lazy(() => UserWhereUniqueInputSchema), + create: z.union([ z.lazy(() => UserCreateWithoutBudgetUsersInputSchema),z.lazy(() => UserUncheckedCreateWithoutBudgetUsersInputSchema) ]), +}).strict(); + +export const BudgetCreateWithoutBudgetUsersInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + name: z.string(), + description: z.string().optional().nullable(), + preferredCurrency: z.string(), + type: z.lazy(() => BudgetTypeSchema).optional(), + periodConfig: z.lazy(() => BudgetPeriodConfigCreateNestedOneWithoutBudgetInputSchema).optional(), + transactions: z.lazy(() => TransactionCreateNestedManyWithoutBudgetInputSchema).optional(), + invitations: z.lazy(() => BudgetUserInvitationCreateNestedManyWithoutBudgetInputSchema).optional() +}).strict(); + +export const BudgetUncheckedCreateWithoutBudgetUsersInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + name: z.string(), + description: z.string().optional().nullable(), + preferredCurrency: z.string(), + type: z.lazy(() => BudgetTypeSchema).optional(), + periodConfig: z.lazy(() => BudgetPeriodConfigUncheckedCreateNestedOneWithoutBudgetInputSchema).optional(), + transactions: z.lazy(() => TransactionUncheckedCreateNestedManyWithoutBudgetInputSchema).optional(), + invitations: z.lazy(() => BudgetUserInvitationUncheckedCreateNestedManyWithoutBudgetInputSchema).optional() +}).strict(); + +export const BudgetCreateOrConnectWithoutBudgetUsersInputSchema: z.ZodType = z.object({ + where: z.lazy(() => BudgetWhereUniqueInputSchema), + create: z.union([ z.lazy(() => BudgetCreateWithoutBudgetUsersInputSchema),z.lazy(() => BudgetUncheckedCreateWithoutBudgetUsersInputSchema) ]), +}).strict(); + +export const UserUpsertWithoutBudgetUsersInputSchema: z.ZodType = z.object({ + update: z.union([ z.lazy(() => UserUpdateWithoutBudgetUsersInputSchema),z.lazy(() => UserUncheckedUpdateWithoutBudgetUsersInputSchema) ]), + create: z.union([ z.lazy(() => UserCreateWithoutBudgetUsersInputSchema),z.lazy(() => UserUncheckedCreateWithoutBudgetUsersInputSchema) ]), + where: z.lazy(() => UserWhereInputSchema).optional() +}).strict(); + +export const UserUpdateToOneWithWhereWithoutBudgetUsersInputSchema: z.ZodType = z.object({ + where: z.lazy(() => UserWhereInputSchema).optional(), + data: z.union([ z.lazy(() => UserUpdateWithoutBudgetUsersInputSchema),z.lazy(() => UserUncheckedUpdateWithoutBudgetUsersInputSchema) ]), +}).strict(); + +export const UserUpdateWithoutBudgetUsersInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + email: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + walletAccounts: z.lazy(() => UserWalletAccountUpdateManyWithoutUserNestedInputSchema).optional(), + transactions: z.lazy(() => TransactionUpdateManyWithoutCreatedByUserNestedInputSchema).optional(), + createdBudgetUserInvitations: z.lazy(() => BudgetUserInvitationUpdateManyWithoutCreatedByUserNestedInputSchema).optional(), + createdFromInvitation: z.lazy(() => BudgetUserInvitationResponseUpdateOneWithoutCreatedUserNestedInputSchema).optional() +}).strict(); + +export const UserUncheckedUpdateWithoutBudgetUsersInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + email: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + walletAccounts: z.lazy(() => UserWalletAccountUncheckedUpdateManyWithoutUserNestedInputSchema).optional(), + transactions: z.lazy(() => TransactionUncheckedUpdateManyWithoutCreatedByUserNestedInputSchema).optional(), + createdBudgetUserInvitations: z.lazy(() => BudgetUserInvitationUncheckedUpdateManyWithoutCreatedByUserNestedInputSchema).optional(), + createdFromInvitation: z.lazy(() => BudgetUserInvitationResponseUncheckedUpdateOneWithoutCreatedUserNestedInputSchema).optional() +}).strict(); + +export const BudgetUpsertWithoutBudgetUsersInputSchema: z.ZodType = z.object({ + update: z.union([ z.lazy(() => BudgetUpdateWithoutBudgetUsersInputSchema),z.lazy(() => BudgetUncheckedUpdateWithoutBudgetUsersInputSchema) ]), + create: z.union([ z.lazy(() => BudgetCreateWithoutBudgetUsersInputSchema),z.lazy(() => BudgetUncheckedCreateWithoutBudgetUsersInputSchema) ]), + where: z.lazy(() => BudgetWhereInputSchema).optional() +}).strict(); + +export const BudgetUpdateToOneWithWhereWithoutBudgetUsersInputSchema: z.ZodType = z.object({ + where: z.lazy(() => BudgetWhereInputSchema).optional(), + data: z.union([ z.lazy(() => BudgetUpdateWithoutBudgetUsersInputSchema),z.lazy(() => BudgetUncheckedUpdateWithoutBudgetUsersInputSchema) ]), +}).strict(); + +export const BudgetUpdateWithoutBudgetUsersInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + preferredCurrency: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + type: z.union([ z.lazy(() => BudgetTypeSchema),z.lazy(() => EnumBudgetTypeFieldUpdateOperationsInputSchema) ]).optional(), + periodConfig: z.lazy(() => BudgetPeriodConfigUpdateOneWithoutBudgetNestedInputSchema).optional(), + transactions: z.lazy(() => TransactionUpdateManyWithoutBudgetNestedInputSchema).optional(), + invitations: z.lazy(() => BudgetUserInvitationUpdateManyWithoutBudgetNestedInputSchema).optional() +}).strict(); + +export const BudgetUncheckedUpdateWithoutBudgetUsersInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + preferredCurrency: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + type: z.union([ z.lazy(() => BudgetTypeSchema),z.lazy(() => EnumBudgetTypeFieldUpdateOperationsInputSchema) ]).optional(), + periodConfig: z.lazy(() => BudgetPeriodConfigUncheckedUpdateOneWithoutBudgetNestedInputSchema).optional(), + transactions: z.lazy(() => TransactionUncheckedUpdateManyWithoutBudgetNestedInputSchema).optional(), + invitations: z.lazy(() => BudgetUserInvitationUncheckedUpdateManyWithoutBudgetNestedInputSchema).optional() +}).strict(); + +export const UserCreateWithoutCreatedBudgetUserInvitationsInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + email: z.string(), + name: z.string().optional().nullable(), + walletAccounts: z.lazy(() => UserWalletAccountCreateNestedManyWithoutUserInputSchema).optional(), + budgetUsers: z.lazy(() => BudgetUserCreateNestedManyWithoutUserInputSchema).optional(), + transactions: z.lazy(() => TransactionCreateNestedManyWithoutCreatedByUserInputSchema).optional(), + createdFromInvitation: z.lazy(() => BudgetUserInvitationResponseCreateNestedOneWithoutCreatedUserInputSchema).optional() +}).strict(); + +export const UserUncheckedCreateWithoutCreatedBudgetUserInvitationsInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + email: z.string(), + name: z.string().optional().nullable(), + walletAccounts: z.lazy(() => UserWalletAccountUncheckedCreateNestedManyWithoutUserInputSchema).optional(), + budgetUsers: z.lazy(() => BudgetUserUncheckedCreateNestedManyWithoutUserInputSchema).optional(), + transactions: z.lazy(() => TransactionUncheckedCreateNestedManyWithoutCreatedByUserInputSchema).optional(), + createdFromInvitation: z.lazy(() => BudgetUserInvitationResponseUncheckedCreateNestedOneWithoutCreatedUserInputSchema).optional() +}).strict(); + +export const UserCreateOrConnectWithoutCreatedBudgetUserInvitationsInputSchema: z.ZodType = z.object({ + where: z.lazy(() => UserWhereUniqueInputSchema), + create: z.union([ z.lazy(() => UserCreateWithoutCreatedBudgetUserInvitationsInputSchema),z.lazy(() => UserUncheckedCreateWithoutCreatedBudgetUserInvitationsInputSchema) ]), +}).strict(); + +export const BudgetCreateWithoutInvitationsInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + name: z.string(), + description: z.string().optional().nullable(), + preferredCurrency: z.string(), + type: z.lazy(() => BudgetTypeSchema).optional(), + periodConfig: z.lazy(() => BudgetPeriodConfigCreateNestedOneWithoutBudgetInputSchema).optional(), + budgetUsers: z.lazy(() => BudgetUserCreateNestedManyWithoutBudgetInputSchema).optional(), + transactions: z.lazy(() => TransactionCreateNestedManyWithoutBudgetInputSchema).optional() +}).strict(); + +export const BudgetUncheckedCreateWithoutInvitationsInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + name: z.string(), + description: z.string().optional().nullable(), + preferredCurrency: z.string(), + type: z.lazy(() => BudgetTypeSchema).optional(), + periodConfig: z.lazy(() => BudgetPeriodConfigUncheckedCreateNestedOneWithoutBudgetInputSchema).optional(), + budgetUsers: z.lazy(() => BudgetUserUncheckedCreateNestedManyWithoutBudgetInputSchema).optional(), + transactions: z.lazy(() => TransactionUncheckedCreateNestedManyWithoutBudgetInputSchema).optional() +}).strict(); + +export const BudgetCreateOrConnectWithoutInvitationsInputSchema: z.ZodType = z.object({ + where: z.lazy(() => BudgetWhereUniqueInputSchema), + create: z.union([ z.lazy(() => BudgetCreateWithoutInvitationsInputSchema),z.lazy(() => BudgetUncheckedCreateWithoutInvitationsInputSchema) ]), +}).strict(); + +export const BudgetUserInvitationResponseCreateWithoutInvitationInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + acceptedAt: z.coerce.date().optional().nullable(), + declinedAt: z.coerce.date().optional().nullable(), + createdUser: z.lazy(() => UserCreateNestedOneWithoutCreatedFromInvitationInputSchema).optional() +}).strict(); + +export const BudgetUserInvitationResponseUncheckedCreateWithoutInvitationInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + acceptedAt: z.coerce.date().optional().nullable(), + declinedAt: z.coerce.date().optional().nullable(), + createdUserId: z.string().optional().nullable() +}).strict(); + +export const BudgetUserInvitationResponseCreateOrConnectWithoutInvitationInputSchema: z.ZodType = z.object({ + where: z.lazy(() => BudgetUserInvitationResponseWhereUniqueInputSchema), + create: z.union([ z.lazy(() => BudgetUserInvitationResponseCreateWithoutInvitationInputSchema),z.lazy(() => BudgetUserInvitationResponseUncheckedCreateWithoutInvitationInputSchema) ]), +}).strict(); + +export const BudgetUserInvitationResponseCreateManyInvitationInputEnvelopeSchema: z.ZodType = z.object({ + data: z.union([ z.lazy(() => BudgetUserInvitationResponseCreateManyInvitationInputSchema),z.lazy(() => BudgetUserInvitationResponseCreateManyInvitationInputSchema).array() ]), + skipDuplicates: z.boolean().optional() +}).strict(); + +export const UserUpsertWithoutCreatedBudgetUserInvitationsInputSchema: z.ZodType = z.object({ + update: z.union([ z.lazy(() => UserUpdateWithoutCreatedBudgetUserInvitationsInputSchema),z.lazy(() => UserUncheckedUpdateWithoutCreatedBudgetUserInvitationsInputSchema) ]), + create: z.union([ z.lazy(() => UserCreateWithoutCreatedBudgetUserInvitationsInputSchema),z.lazy(() => UserUncheckedCreateWithoutCreatedBudgetUserInvitationsInputSchema) ]), + where: z.lazy(() => UserWhereInputSchema).optional() +}).strict(); + +export const UserUpdateToOneWithWhereWithoutCreatedBudgetUserInvitationsInputSchema: z.ZodType = z.object({ + where: z.lazy(() => UserWhereInputSchema).optional(), + data: z.union([ z.lazy(() => UserUpdateWithoutCreatedBudgetUserInvitationsInputSchema),z.lazy(() => UserUncheckedUpdateWithoutCreatedBudgetUserInvitationsInputSchema) ]), +}).strict(); + +export const UserUpdateWithoutCreatedBudgetUserInvitationsInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + email: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + walletAccounts: z.lazy(() => UserWalletAccountUpdateManyWithoutUserNestedInputSchema).optional(), + budgetUsers: z.lazy(() => BudgetUserUpdateManyWithoutUserNestedInputSchema).optional(), + transactions: z.lazy(() => TransactionUpdateManyWithoutCreatedByUserNestedInputSchema).optional(), + createdFromInvitation: z.lazy(() => BudgetUserInvitationResponseUpdateOneWithoutCreatedUserNestedInputSchema).optional() +}).strict(); + +export const UserUncheckedUpdateWithoutCreatedBudgetUserInvitationsInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + email: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + walletAccounts: z.lazy(() => UserWalletAccountUncheckedUpdateManyWithoutUserNestedInputSchema).optional(), + budgetUsers: z.lazy(() => BudgetUserUncheckedUpdateManyWithoutUserNestedInputSchema).optional(), + transactions: z.lazy(() => TransactionUncheckedUpdateManyWithoutCreatedByUserNestedInputSchema).optional(), + createdFromInvitation: z.lazy(() => BudgetUserInvitationResponseUncheckedUpdateOneWithoutCreatedUserNestedInputSchema).optional() +}).strict(); + +export const BudgetUpsertWithoutInvitationsInputSchema: z.ZodType = z.object({ + update: z.union([ z.lazy(() => BudgetUpdateWithoutInvitationsInputSchema),z.lazy(() => BudgetUncheckedUpdateWithoutInvitationsInputSchema) ]), + create: z.union([ z.lazy(() => BudgetCreateWithoutInvitationsInputSchema),z.lazy(() => BudgetUncheckedCreateWithoutInvitationsInputSchema) ]), + where: z.lazy(() => BudgetWhereInputSchema).optional() +}).strict(); + +export const BudgetUpdateToOneWithWhereWithoutInvitationsInputSchema: z.ZodType = z.object({ + where: z.lazy(() => BudgetWhereInputSchema).optional(), + data: z.union([ z.lazy(() => BudgetUpdateWithoutInvitationsInputSchema),z.lazy(() => BudgetUncheckedUpdateWithoutInvitationsInputSchema) ]), +}).strict(); + +export const BudgetUpdateWithoutInvitationsInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + preferredCurrency: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + type: z.union([ z.lazy(() => BudgetTypeSchema),z.lazy(() => EnumBudgetTypeFieldUpdateOperationsInputSchema) ]).optional(), + periodConfig: z.lazy(() => BudgetPeriodConfigUpdateOneWithoutBudgetNestedInputSchema).optional(), + budgetUsers: z.lazy(() => BudgetUserUpdateManyWithoutBudgetNestedInputSchema).optional(), + transactions: z.lazy(() => TransactionUpdateManyWithoutBudgetNestedInputSchema).optional() +}).strict(); + +export const BudgetUncheckedUpdateWithoutInvitationsInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + preferredCurrency: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + type: z.union([ z.lazy(() => BudgetTypeSchema),z.lazy(() => EnumBudgetTypeFieldUpdateOperationsInputSchema) ]).optional(), + periodConfig: z.lazy(() => BudgetPeriodConfigUncheckedUpdateOneWithoutBudgetNestedInputSchema).optional(), + budgetUsers: z.lazy(() => BudgetUserUncheckedUpdateManyWithoutBudgetNestedInputSchema).optional(), + transactions: z.lazy(() => TransactionUncheckedUpdateManyWithoutBudgetNestedInputSchema).optional() +}).strict(); + +export const BudgetUserInvitationResponseUpsertWithWhereUniqueWithoutInvitationInputSchema: z.ZodType = z.object({ + where: z.lazy(() => BudgetUserInvitationResponseWhereUniqueInputSchema), + update: z.union([ z.lazy(() => BudgetUserInvitationResponseUpdateWithoutInvitationInputSchema),z.lazy(() => BudgetUserInvitationResponseUncheckedUpdateWithoutInvitationInputSchema) ]), + create: z.union([ z.lazy(() => BudgetUserInvitationResponseCreateWithoutInvitationInputSchema),z.lazy(() => BudgetUserInvitationResponseUncheckedCreateWithoutInvitationInputSchema) ]), +}).strict(); + +export const BudgetUserInvitationResponseUpdateWithWhereUniqueWithoutInvitationInputSchema: z.ZodType = z.object({ + where: z.lazy(() => BudgetUserInvitationResponseWhereUniqueInputSchema), + data: z.union([ z.lazy(() => BudgetUserInvitationResponseUpdateWithoutInvitationInputSchema),z.lazy(() => BudgetUserInvitationResponseUncheckedUpdateWithoutInvitationInputSchema) ]), +}).strict(); + +export const BudgetUserInvitationResponseUpdateManyWithWhereWithoutInvitationInputSchema: z.ZodType = z.object({ + where: z.lazy(() => BudgetUserInvitationResponseScalarWhereInputSchema), + data: z.union([ z.lazy(() => BudgetUserInvitationResponseUpdateManyMutationInputSchema),z.lazy(() => BudgetUserInvitationResponseUncheckedUpdateManyWithoutInvitationInputSchema) ]), +}).strict(); + +export const BudgetUserInvitationResponseScalarWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => BudgetUserInvitationResponseScalarWhereInputSchema),z.lazy(() => BudgetUserInvitationResponseScalarWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => BudgetUserInvitationResponseScalarWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => BudgetUserInvitationResponseScalarWhereInputSchema),z.lazy(() => BudgetUserInvitationResponseScalarWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + acceptedAt: z.union([ z.lazy(() => DateTimeNullableFilterSchema),z.coerce.date() ]).optional().nullable(), + declinedAt: z.union([ z.lazy(() => DateTimeNullableFilterSchema),z.coerce.date() ]).optional().nullable(), + invitationId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + createdUserId: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), +}).strict(); + +export const BudgetUserInvitationCreateWithoutResponsesInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + email: z.string().optional().nullable(), + token: z.string().uuid().optional(), + expiresAt: z.coerce.date(), + permission: z.lazy(() => BudgetUserPermissionSchema).optional().nullable(), + createdByUser: z.lazy(() => UserCreateNestedOneWithoutCreatedBudgetUserInvitationsInputSchema), + budget: z.lazy(() => BudgetCreateNestedOneWithoutInvitationsInputSchema) +}).strict(); + +export const BudgetUserInvitationUncheckedCreateWithoutResponsesInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + email: z.string().optional().nullable(), + token: z.string().uuid().optional(), + expiresAt: z.coerce.date(), + permission: z.lazy(() => BudgetUserPermissionSchema).optional().nullable(), + createdByUserId: z.string(), + budgetId: z.string() +}).strict(); + +export const BudgetUserInvitationCreateOrConnectWithoutResponsesInputSchema: z.ZodType = z.object({ + where: z.lazy(() => BudgetUserInvitationWhereUniqueInputSchema), + create: z.union([ z.lazy(() => BudgetUserInvitationCreateWithoutResponsesInputSchema),z.lazy(() => BudgetUserInvitationUncheckedCreateWithoutResponsesInputSchema) ]), +}).strict(); + +export const UserCreateWithoutCreatedFromInvitationInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + email: z.string(), + name: z.string().optional().nullable(), + walletAccounts: z.lazy(() => UserWalletAccountCreateNestedManyWithoutUserInputSchema).optional(), + budgetUsers: z.lazy(() => BudgetUserCreateNestedManyWithoutUserInputSchema).optional(), + transactions: z.lazy(() => TransactionCreateNestedManyWithoutCreatedByUserInputSchema).optional(), + createdBudgetUserInvitations: z.lazy(() => BudgetUserInvitationCreateNestedManyWithoutCreatedByUserInputSchema).optional() +}).strict(); + +export const UserUncheckedCreateWithoutCreatedFromInvitationInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + email: z.string(), + name: z.string().optional().nullable(), + walletAccounts: z.lazy(() => UserWalletAccountUncheckedCreateNestedManyWithoutUserInputSchema).optional(), + budgetUsers: z.lazy(() => BudgetUserUncheckedCreateNestedManyWithoutUserInputSchema).optional(), + transactions: z.lazy(() => TransactionUncheckedCreateNestedManyWithoutCreatedByUserInputSchema).optional(), + createdBudgetUserInvitations: z.lazy(() => BudgetUserInvitationUncheckedCreateNestedManyWithoutCreatedByUserInputSchema).optional() +}).strict(); + +export const UserCreateOrConnectWithoutCreatedFromInvitationInputSchema: z.ZodType = z.object({ + where: z.lazy(() => UserWhereUniqueInputSchema), + create: z.union([ z.lazy(() => UserCreateWithoutCreatedFromInvitationInputSchema),z.lazy(() => UserUncheckedCreateWithoutCreatedFromInvitationInputSchema) ]), +}).strict(); + +export const BudgetUserInvitationUpsertWithoutResponsesInputSchema: z.ZodType = z.object({ + update: z.union([ z.lazy(() => BudgetUserInvitationUpdateWithoutResponsesInputSchema),z.lazy(() => BudgetUserInvitationUncheckedUpdateWithoutResponsesInputSchema) ]), + create: z.union([ z.lazy(() => BudgetUserInvitationCreateWithoutResponsesInputSchema),z.lazy(() => BudgetUserInvitationUncheckedCreateWithoutResponsesInputSchema) ]), + where: z.lazy(() => BudgetUserInvitationWhereInputSchema).optional() +}).strict(); + +export const BudgetUserInvitationUpdateToOneWithWhereWithoutResponsesInputSchema: z.ZodType = z.object({ + where: z.lazy(() => BudgetUserInvitationWhereInputSchema).optional(), + data: z.union([ z.lazy(() => BudgetUserInvitationUpdateWithoutResponsesInputSchema),z.lazy(() => BudgetUserInvitationUncheckedUpdateWithoutResponsesInputSchema) ]), +}).strict(); + +export const BudgetUserInvitationUpdateWithoutResponsesInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + email: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + token: z.union([ z.string().uuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + expiresAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + permission: z.union([ z.lazy(() => BudgetUserPermissionSchema),z.lazy(() => NullableEnumBudgetUserPermissionFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdByUser: z.lazy(() => UserUpdateOneRequiredWithoutCreatedBudgetUserInvitationsNestedInputSchema).optional(), + budget: z.lazy(() => BudgetUpdateOneRequiredWithoutInvitationsNestedInputSchema).optional() +}).strict(); + +export const BudgetUserInvitationUncheckedUpdateWithoutResponsesInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + email: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + token: z.union([ z.string().uuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + expiresAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + permission: z.union([ z.lazy(() => BudgetUserPermissionSchema),z.lazy(() => NullableEnumBudgetUserPermissionFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdByUserId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + budgetId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const UserUpsertWithoutCreatedFromInvitationInputSchema: z.ZodType = z.object({ + update: z.union([ z.lazy(() => UserUpdateWithoutCreatedFromInvitationInputSchema),z.lazy(() => UserUncheckedUpdateWithoutCreatedFromInvitationInputSchema) ]), + create: z.union([ z.lazy(() => UserCreateWithoutCreatedFromInvitationInputSchema),z.lazy(() => UserUncheckedCreateWithoutCreatedFromInvitationInputSchema) ]), + where: z.lazy(() => UserWhereInputSchema).optional() +}).strict(); + +export const UserUpdateToOneWithWhereWithoutCreatedFromInvitationInputSchema: z.ZodType = z.object({ + where: z.lazy(() => UserWhereInputSchema).optional(), + data: z.union([ z.lazy(() => UserUpdateWithoutCreatedFromInvitationInputSchema),z.lazy(() => UserUncheckedUpdateWithoutCreatedFromInvitationInputSchema) ]), +}).strict(); + +export const UserUpdateWithoutCreatedFromInvitationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + email: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + walletAccounts: z.lazy(() => UserWalletAccountUpdateManyWithoutUserNestedInputSchema).optional(), + budgetUsers: z.lazy(() => BudgetUserUpdateManyWithoutUserNestedInputSchema).optional(), + transactions: z.lazy(() => TransactionUpdateManyWithoutCreatedByUserNestedInputSchema).optional(), + createdBudgetUserInvitations: z.lazy(() => BudgetUserInvitationUpdateManyWithoutCreatedByUserNestedInputSchema).optional() +}).strict(); + +export const UserUncheckedUpdateWithoutCreatedFromInvitationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + email: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + walletAccounts: z.lazy(() => UserWalletAccountUncheckedUpdateManyWithoutUserNestedInputSchema).optional(), + budgetUsers: z.lazy(() => BudgetUserUncheckedUpdateManyWithoutUserNestedInputSchema).optional(), + transactions: z.lazy(() => TransactionUncheckedUpdateManyWithoutCreatedByUserNestedInputSchema).optional(), + createdBudgetUserInvitations: z.lazy(() => BudgetUserInvitationUncheckedUpdateManyWithoutCreatedByUserNestedInputSchema).optional() +}).strict(); + +export const CategoryCreateWithoutTransactionsInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + name: z.string(), + description: z.string().optional().nullable(), + icon: z.string().optional().nullable(), + color: z.string().optional().nullable(), + parent: z.lazy(() => CategoryCreateNestedOneWithoutChildrenInputSchema).optional(), + children: z.lazy(() => CategoryCreateNestedManyWithoutParentInputSchema).optional() +}).strict(); + +export const CategoryUncheckedCreateWithoutTransactionsInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + name: z.string(), + description: z.string().optional().nullable(), + icon: z.string().optional().nullable(), + color: z.string().optional().nullable(), + parentId: z.string().optional().nullable(), + children: z.lazy(() => CategoryUncheckedCreateNestedManyWithoutParentInputSchema).optional() +}).strict(); + +export const CategoryCreateOrConnectWithoutTransactionsInputSchema: z.ZodType = z.object({ + where: z.lazy(() => CategoryWhereUniqueInputSchema), + create: z.union([ z.lazy(() => CategoryCreateWithoutTransactionsInputSchema),z.lazy(() => CategoryUncheckedCreateWithoutTransactionsInputSchema) ]), +}).strict(); + +export const BudgetCreateWithoutTransactionsInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + name: z.string(), + description: z.string().optional().nullable(), + preferredCurrency: z.string(), + type: z.lazy(() => BudgetTypeSchema).optional(), + periodConfig: z.lazy(() => BudgetPeriodConfigCreateNestedOneWithoutBudgetInputSchema).optional(), + budgetUsers: z.lazy(() => BudgetUserCreateNestedManyWithoutBudgetInputSchema).optional(), + invitations: z.lazy(() => BudgetUserInvitationCreateNestedManyWithoutBudgetInputSchema).optional() +}).strict(); + +export const BudgetUncheckedCreateWithoutTransactionsInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + name: z.string(), + description: z.string().optional().nullable(), + preferredCurrency: z.string(), + type: z.lazy(() => BudgetTypeSchema).optional(), + periodConfig: z.lazy(() => BudgetPeriodConfigUncheckedCreateNestedOneWithoutBudgetInputSchema).optional(), + budgetUsers: z.lazy(() => BudgetUserUncheckedCreateNestedManyWithoutBudgetInputSchema).optional(), + invitations: z.lazy(() => BudgetUserInvitationUncheckedCreateNestedManyWithoutBudgetInputSchema).optional() +}).strict(); + +export const BudgetCreateOrConnectWithoutTransactionsInputSchema: z.ZodType = z.object({ + where: z.lazy(() => BudgetWhereUniqueInputSchema), + create: z.union([ z.lazy(() => BudgetCreateWithoutTransactionsInputSchema),z.lazy(() => BudgetUncheckedCreateWithoutTransactionsInputSchema) ]), +}).strict(); + +export const UserWalletAccountCreateWithoutTransactionsInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + name: z.string(), + icon: z.string().optional().nullable(), + description: z.string().optional().nullable(), + lastDigits: z.string().optional().nullable(), + preferredCurrency: z.string(), + user: z.lazy(() => UserCreateNestedOneWithoutWalletAccountsInputSchema) +}).strict(); + +export const UserWalletAccountUncheckedCreateWithoutTransactionsInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + name: z.string(), + icon: z.string().optional().nullable(), + description: z.string().optional().nullable(), + lastDigits: z.string().optional().nullable(), + preferredCurrency: z.string(), + userId: z.string() +}).strict(); + +export const UserWalletAccountCreateOrConnectWithoutTransactionsInputSchema: z.ZodType = z.object({ + where: z.lazy(() => UserWalletAccountWhereUniqueInputSchema), + create: z.union([ z.lazy(() => UserWalletAccountCreateWithoutTransactionsInputSchema),z.lazy(() => UserWalletAccountUncheckedCreateWithoutTransactionsInputSchema) ]), +}).strict(); + +export const UserCreateWithoutTransactionsInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + email: z.string(), + name: z.string().optional().nullable(), + walletAccounts: z.lazy(() => UserWalletAccountCreateNestedManyWithoutUserInputSchema).optional(), + budgetUsers: z.lazy(() => BudgetUserCreateNestedManyWithoutUserInputSchema).optional(), + createdBudgetUserInvitations: z.lazy(() => BudgetUserInvitationCreateNestedManyWithoutCreatedByUserInputSchema).optional(), + createdFromInvitation: z.lazy(() => BudgetUserInvitationResponseCreateNestedOneWithoutCreatedUserInputSchema).optional() +}).strict(); + +export const UserUncheckedCreateWithoutTransactionsInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + email: z.string(), + name: z.string().optional().nullable(), + walletAccounts: z.lazy(() => UserWalletAccountUncheckedCreateNestedManyWithoutUserInputSchema).optional(), + budgetUsers: z.lazy(() => BudgetUserUncheckedCreateNestedManyWithoutUserInputSchema).optional(), + createdBudgetUserInvitations: z.lazy(() => BudgetUserInvitationUncheckedCreateNestedManyWithoutCreatedByUserInputSchema).optional(), + createdFromInvitation: z.lazy(() => BudgetUserInvitationResponseUncheckedCreateNestedOneWithoutCreatedUserInputSchema).optional() +}).strict(); + +export const UserCreateOrConnectWithoutTransactionsInputSchema: z.ZodType = z.object({ + where: z.lazy(() => UserWhereUniqueInputSchema), + create: z.union([ z.lazy(() => UserCreateWithoutTransactionsInputSchema),z.lazy(() => UserUncheckedCreateWithoutTransactionsInputSchema) ]), +}).strict(); + +export const CategoryUpsertWithoutTransactionsInputSchema: z.ZodType = z.object({ + update: z.union([ z.lazy(() => CategoryUpdateWithoutTransactionsInputSchema),z.lazy(() => CategoryUncheckedUpdateWithoutTransactionsInputSchema) ]), + create: z.union([ z.lazy(() => CategoryCreateWithoutTransactionsInputSchema),z.lazy(() => CategoryUncheckedCreateWithoutTransactionsInputSchema) ]), + where: z.lazy(() => CategoryWhereInputSchema).optional() +}).strict(); + +export const CategoryUpdateToOneWithWhereWithoutTransactionsInputSchema: z.ZodType = z.object({ + where: z.lazy(() => CategoryWhereInputSchema).optional(), + data: z.union([ z.lazy(() => CategoryUpdateWithoutTransactionsInputSchema),z.lazy(() => CategoryUncheckedUpdateWithoutTransactionsInputSchema) ]), +}).strict(); + +export const CategoryUpdateWithoutTransactionsInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + icon: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + color: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + parent: z.lazy(() => CategoryUpdateOneWithoutChildrenNestedInputSchema).optional(), + children: z.lazy(() => CategoryUpdateManyWithoutParentNestedInputSchema).optional() +}).strict(); + +export const CategoryUncheckedUpdateWithoutTransactionsInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + icon: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + color: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + parentId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + children: z.lazy(() => CategoryUncheckedUpdateManyWithoutParentNestedInputSchema).optional() +}).strict(); + +export const BudgetUpsertWithoutTransactionsInputSchema: z.ZodType = z.object({ + update: z.union([ z.lazy(() => BudgetUpdateWithoutTransactionsInputSchema),z.lazy(() => BudgetUncheckedUpdateWithoutTransactionsInputSchema) ]), + create: z.union([ z.lazy(() => BudgetCreateWithoutTransactionsInputSchema),z.lazy(() => BudgetUncheckedCreateWithoutTransactionsInputSchema) ]), + where: z.lazy(() => BudgetWhereInputSchema).optional() +}).strict(); + +export const BudgetUpdateToOneWithWhereWithoutTransactionsInputSchema: z.ZodType = z.object({ + where: z.lazy(() => BudgetWhereInputSchema).optional(), + data: z.union([ z.lazy(() => BudgetUpdateWithoutTransactionsInputSchema),z.lazy(() => BudgetUncheckedUpdateWithoutTransactionsInputSchema) ]), +}).strict(); + +export const BudgetUpdateWithoutTransactionsInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + preferredCurrency: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + type: z.union([ z.lazy(() => BudgetTypeSchema),z.lazy(() => EnumBudgetTypeFieldUpdateOperationsInputSchema) ]).optional(), + periodConfig: z.lazy(() => BudgetPeriodConfigUpdateOneWithoutBudgetNestedInputSchema).optional(), + budgetUsers: z.lazy(() => BudgetUserUpdateManyWithoutBudgetNestedInputSchema).optional(), + invitations: z.lazy(() => BudgetUserInvitationUpdateManyWithoutBudgetNestedInputSchema).optional() +}).strict(); + +export const BudgetUncheckedUpdateWithoutTransactionsInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + preferredCurrency: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + type: z.union([ z.lazy(() => BudgetTypeSchema),z.lazy(() => EnumBudgetTypeFieldUpdateOperationsInputSchema) ]).optional(), + periodConfig: z.lazy(() => BudgetPeriodConfigUncheckedUpdateOneWithoutBudgetNestedInputSchema).optional(), + budgetUsers: z.lazy(() => BudgetUserUncheckedUpdateManyWithoutBudgetNestedInputSchema).optional(), + invitations: z.lazy(() => BudgetUserInvitationUncheckedUpdateManyWithoutBudgetNestedInputSchema).optional() +}).strict(); + +export const UserWalletAccountUpsertWithoutTransactionsInputSchema: z.ZodType = z.object({ + update: z.union([ z.lazy(() => UserWalletAccountUpdateWithoutTransactionsInputSchema),z.lazy(() => UserWalletAccountUncheckedUpdateWithoutTransactionsInputSchema) ]), + create: z.union([ z.lazy(() => UserWalletAccountCreateWithoutTransactionsInputSchema),z.lazy(() => UserWalletAccountUncheckedCreateWithoutTransactionsInputSchema) ]), + where: z.lazy(() => UserWalletAccountWhereInputSchema).optional() +}).strict(); + +export const UserWalletAccountUpdateToOneWithWhereWithoutTransactionsInputSchema: z.ZodType = z.object({ + where: z.lazy(() => UserWalletAccountWhereInputSchema).optional(), + data: z.union([ z.lazy(() => UserWalletAccountUpdateWithoutTransactionsInputSchema),z.lazy(() => UserWalletAccountUncheckedUpdateWithoutTransactionsInputSchema) ]), +}).strict(); + +export const UserWalletAccountUpdateWithoutTransactionsInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + icon: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + lastDigits: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + preferredCurrency: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + user: z.lazy(() => UserUpdateOneRequiredWithoutWalletAccountsNestedInputSchema).optional() +}).strict(); + +export const UserWalletAccountUncheckedUpdateWithoutTransactionsInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + icon: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + lastDigits: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + preferredCurrency: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + userId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const UserUpsertWithoutTransactionsInputSchema: z.ZodType = z.object({ + update: z.union([ z.lazy(() => UserUpdateWithoutTransactionsInputSchema),z.lazy(() => UserUncheckedUpdateWithoutTransactionsInputSchema) ]), + create: z.union([ z.lazy(() => UserCreateWithoutTransactionsInputSchema),z.lazy(() => UserUncheckedCreateWithoutTransactionsInputSchema) ]), + where: z.lazy(() => UserWhereInputSchema).optional() +}).strict(); + +export const UserUpdateToOneWithWhereWithoutTransactionsInputSchema: z.ZodType = z.object({ + where: z.lazy(() => UserWhereInputSchema).optional(), + data: z.union([ z.lazy(() => UserUpdateWithoutTransactionsInputSchema),z.lazy(() => UserUncheckedUpdateWithoutTransactionsInputSchema) ]), +}).strict(); + +export const UserUpdateWithoutTransactionsInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + email: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + walletAccounts: z.lazy(() => UserWalletAccountUpdateManyWithoutUserNestedInputSchema).optional(), + budgetUsers: z.lazy(() => BudgetUserUpdateManyWithoutUserNestedInputSchema).optional(), + createdBudgetUserInvitations: z.lazy(() => BudgetUserInvitationUpdateManyWithoutCreatedByUserNestedInputSchema).optional(), + createdFromInvitation: z.lazy(() => BudgetUserInvitationResponseUpdateOneWithoutCreatedUserNestedInputSchema).optional() +}).strict(); + +export const UserUncheckedUpdateWithoutTransactionsInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + email: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + walletAccounts: z.lazy(() => UserWalletAccountUncheckedUpdateManyWithoutUserNestedInputSchema).optional(), + budgetUsers: z.lazy(() => BudgetUserUncheckedUpdateManyWithoutUserNestedInputSchema).optional(), + createdBudgetUserInvitations: z.lazy(() => BudgetUserInvitationUncheckedUpdateManyWithoutCreatedByUserNestedInputSchema).optional(), + createdFromInvitation: z.lazy(() => BudgetUserInvitationResponseUncheckedUpdateOneWithoutCreatedUserNestedInputSchema).optional() +}).strict(); + +export const CategoryCreateWithoutChildrenInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + name: z.string(), + description: z.string().optional().nullable(), + icon: z.string().optional().nullable(), + color: z.string().optional().nullable(), + parent: z.lazy(() => CategoryCreateNestedOneWithoutChildrenInputSchema).optional(), + transactions: z.lazy(() => TransactionCreateNestedManyWithoutCategoryInputSchema).optional() +}).strict(); + +export const CategoryUncheckedCreateWithoutChildrenInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + name: z.string(), + description: z.string().optional().nullable(), + icon: z.string().optional().nullable(), + color: z.string().optional().nullable(), + parentId: z.string().optional().nullable(), + transactions: z.lazy(() => TransactionUncheckedCreateNestedManyWithoutCategoryInputSchema).optional() +}).strict(); + +export const CategoryCreateOrConnectWithoutChildrenInputSchema: z.ZodType = z.object({ + where: z.lazy(() => CategoryWhereUniqueInputSchema), + create: z.union([ z.lazy(() => CategoryCreateWithoutChildrenInputSchema),z.lazy(() => CategoryUncheckedCreateWithoutChildrenInputSchema) ]), +}).strict(); + +export const CategoryCreateWithoutParentInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + name: z.string(), + description: z.string().optional().nullable(), + icon: z.string().optional().nullable(), + color: z.string().optional().nullable(), + children: z.lazy(() => CategoryCreateNestedManyWithoutParentInputSchema).optional(), + transactions: z.lazy(() => TransactionCreateNestedManyWithoutCategoryInputSchema).optional() +}).strict(); + +export const CategoryUncheckedCreateWithoutParentInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + name: z.string(), + description: z.string().optional().nullable(), + icon: z.string().optional().nullable(), + color: z.string().optional().nullable(), + children: z.lazy(() => CategoryUncheckedCreateNestedManyWithoutParentInputSchema).optional(), + transactions: z.lazy(() => TransactionUncheckedCreateNestedManyWithoutCategoryInputSchema).optional() +}).strict(); + +export const CategoryCreateOrConnectWithoutParentInputSchema: z.ZodType = z.object({ + where: z.lazy(() => CategoryWhereUniqueInputSchema), + create: z.union([ z.lazy(() => CategoryCreateWithoutParentInputSchema),z.lazy(() => CategoryUncheckedCreateWithoutParentInputSchema) ]), +}).strict(); + +export const CategoryCreateManyParentInputEnvelopeSchema: z.ZodType = z.object({ + data: z.union([ z.lazy(() => CategoryCreateManyParentInputSchema),z.lazy(() => CategoryCreateManyParentInputSchema).array() ]), + skipDuplicates: z.boolean().optional() +}).strict(); + +export const TransactionCreateWithoutCategoryInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + amount: z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }), + currency: z.string(), + date: z.coerce.date(), + note: z.string().optional().nullable(), + budget: z.lazy(() => BudgetCreateNestedOneWithoutTransactionsInputSchema).optional(), + walletAccount: z.lazy(() => UserWalletAccountCreateNestedOneWithoutTransactionsInputSchema), + createdByUser: z.lazy(() => UserCreateNestedOneWithoutTransactionsInputSchema) +}).strict(); + +export const TransactionUncheckedCreateWithoutCategoryInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + amount: z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }), + currency: z.string(), + date: z.coerce.date(), + note: z.string().optional().nullable(), + budgetId: z.string().optional().nullable(), + walletAccountId: z.string(), + createdByUserId: z.string() +}).strict(); + +export const TransactionCreateOrConnectWithoutCategoryInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TransactionWhereUniqueInputSchema), + create: z.union([ z.lazy(() => TransactionCreateWithoutCategoryInputSchema),z.lazy(() => TransactionUncheckedCreateWithoutCategoryInputSchema) ]), +}).strict(); + +export const TransactionCreateManyCategoryInputEnvelopeSchema: z.ZodType = z.object({ + data: z.union([ z.lazy(() => TransactionCreateManyCategoryInputSchema),z.lazy(() => TransactionCreateManyCategoryInputSchema).array() ]), + skipDuplicates: z.boolean().optional() +}).strict(); + +export const CategoryUpsertWithoutChildrenInputSchema: z.ZodType = z.object({ + update: z.union([ z.lazy(() => CategoryUpdateWithoutChildrenInputSchema),z.lazy(() => CategoryUncheckedUpdateWithoutChildrenInputSchema) ]), + create: z.union([ z.lazy(() => CategoryCreateWithoutChildrenInputSchema),z.lazy(() => CategoryUncheckedCreateWithoutChildrenInputSchema) ]), + where: z.lazy(() => CategoryWhereInputSchema).optional() +}).strict(); + +export const CategoryUpdateToOneWithWhereWithoutChildrenInputSchema: z.ZodType = z.object({ + where: z.lazy(() => CategoryWhereInputSchema).optional(), + data: z.union([ z.lazy(() => CategoryUpdateWithoutChildrenInputSchema),z.lazy(() => CategoryUncheckedUpdateWithoutChildrenInputSchema) ]), +}).strict(); + +export const CategoryUpdateWithoutChildrenInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + icon: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + color: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + parent: z.lazy(() => CategoryUpdateOneWithoutChildrenNestedInputSchema).optional(), + transactions: z.lazy(() => TransactionUpdateManyWithoutCategoryNestedInputSchema).optional() +}).strict(); + +export const CategoryUncheckedUpdateWithoutChildrenInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + icon: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + color: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + parentId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + transactions: z.lazy(() => TransactionUncheckedUpdateManyWithoutCategoryNestedInputSchema).optional() +}).strict(); + +export const CategoryUpsertWithWhereUniqueWithoutParentInputSchema: z.ZodType = z.object({ + where: z.lazy(() => CategoryWhereUniqueInputSchema), + update: z.union([ z.lazy(() => CategoryUpdateWithoutParentInputSchema),z.lazy(() => CategoryUncheckedUpdateWithoutParentInputSchema) ]), + create: z.union([ z.lazy(() => CategoryCreateWithoutParentInputSchema),z.lazy(() => CategoryUncheckedCreateWithoutParentInputSchema) ]), +}).strict(); + +export const CategoryUpdateWithWhereUniqueWithoutParentInputSchema: z.ZodType = z.object({ + where: z.lazy(() => CategoryWhereUniqueInputSchema), + data: z.union([ z.lazy(() => CategoryUpdateWithoutParentInputSchema),z.lazy(() => CategoryUncheckedUpdateWithoutParentInputSchema) ]), +}).strict(); + +export const CategoryUpdateManyWithWhereWithoutParentInputSchema: z.ZodType = z.object({ + where: z.lazy(() => CategoryScalarWhereInputSchema), + data: z.union([ z.lazy(() => CategoryUpdateManyMutationInputSchema),z.lazy(() => CategoryUncheckedUpdateManyWithoutParentInputSchema) ]), +}).strict(); + +export const CategoryScalarWhereInputSchema: z.ZodType = z.object({ + AND: z.union([ z.lazy(() => CategoryScalarWhereInputSchema),z.lazy(() => CategoryScalarWhereInputSchema).array() ]).optional(), + OR: z.lazy(() => CategoryScalarWhereInputSchema).array().optional(), + NOT: z.union([ z.lazy(() => CategoryScalarWhereInputSchema),z.lazy(() => CategoryScalarWhereInputSchema).array() ]).optional(), + id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + createdAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + updatedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), + name: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), + description: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + icon: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + color: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), + parentId: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(), +}).strict(); + +export const TransactionUpsertWithWhereUniqueWithoutCategoryInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TransactionWhereUniqueInputSchema), + update: z.union([ z.lazy(() => TransactionUpdateWithoutCategoryInputSchema),z.lazy(() => TransactionUncheckedUpdateWithoutCategoryInputSchema) ]), + create: z.union([ z.lazy(() => TransactionCreateWithoutCategoryInputSchema),z.lazy(() => TransactionUncheckedCreateWithoutCategoryInputSchema) ]), +}).strict(); + +export const TransactionUpdateWithWhereUniqueWithoutCategoryInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TransactionWhereUniqueInputSchema), + data: z.union([ z.lazy(() => TransactionUpdateWithoutCategoryInputSchema),z.lazy(() => TransactionUncheckedUpdateWithoutCategoryInputSchema) ]), +}).strict(); + +export const TransactionUpdateManyWithWhereWithoutCategoryInputSchema: z.ZodType = z.object({ + where: z.lazy(() => TransactionScalarWhereInputSchema), + data: z.union([ z.lazy(() => TransactionUpdateManyMutationInputSchema),z.lazy(() => TransactionUncheckedUpdateManyWithoutCategoryInputSchema) ]), +}).strict(); + +export const UserWalletAccountCreateManyUserInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + name: z.string(), + icon: z.string().optional().nullable(), + description: z.string().optional().nullable(), + lastDigits: z.string().optional().nullable(), + preferredCurrency: z.string() +}).strict(); + +export const BudgetUserCreateManyUserInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + permission: z.lazy(() => BudgetUserPermissionSchema), + budgetId: z.string() +}).strict(); + +export const TransactionCreateManyCreatedByUserInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + amount: z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }), + currency: z.string(), + date: z.coerce.date(), + note: z.string().optional().nullable(), + categoryId: z.string().optional().nullable(), + budgetId: z.string().optional().nullable(), + walletAccountId: z.string() +}).strict(); + +export const BudgetUserInvitationCreateManyCreatedByUserInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + email: z.string().optional().nullable(), + token: z.string().uuid().optional(), + expiresAt: z.coerce.date(), + permission: z.lazy(() => BudgetUserPermissionSchema).optional().nullable(), + budgetId: z.string() +}).strict(); + +export const UserWalletAccountUpdateWithoutUserInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + icon: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + lastDigits: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + preferredCurrency: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + transactions: z.lazy(() => TransactionUpdateManyWithoutWalletAccountNestedInputSchema).optional() +}).strict(); + +export const UserWalletAccountUncheckedUpdateWithoutUserInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + icon: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + lastDigits: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + preferredCurrency: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + transactions: z.lazy(() => TransactionUncheckedUpdateManyWithoutWalletAccountNestedInputSchema).optional() +}).strict(); + +export const UserWalletAccountUncheckedUpdateManyWithoutUserInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + icon: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + lastDigits: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + preferredCurrency: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const BudgetUserUpdateWithoutUserInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + permission: z.union([ z.lazy(() => BudgetUserPermissionSchema),z.lazy(() => EnumBudgetUserPermissionFieldUpdateOperationsInputSchema) ]).optional(), + budget: z.lazy(() => BudgetUpdateOneRequiredWithoutBudgetUsersNestedInputSchema).optional() +}).strict(); + +export const BudgetUserUncheckedUpdateWithoutUserInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + permission: z.union([ z.lazy(() => BudgetUserPermissionSchema),z.lazy(() => EnumBudgetUserPermissionFieldUpdateOperationsInputSchema) ]).optional(), + budgetId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const BudgetUserUncheckedUpdateManyWithoutUserInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + permission: z.union([ z.lazy(() => BudgetUserPermissionSchema),z.lazy(() => EnumBudgetUserPermissionFieldUpdateOperationsInputSchema) ]).optional(), + budgetId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const TransactionUpdateWithoutCreatedByUserInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + amount: z.union([ z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }),z.lazy(() => DecimalFieldUpdateOperationsInputSchema) ]).optional(), + currency: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + date: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + note: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + category: z.lazy(() => CategoryUpdateOneWithoutTransactionsNestedInputSchema).optional(), + budget: z.lazy(() => BudgetUpdateOneWithoutTransactionsNestedInputSchema).optional(), + walletAccount: z.lazy(() => UserWalletAccountUpdateOneRequiredWithoutTransactionsNestedInputSchema).optional() +}).strict(); + +export const TransactionUncheckedUpdateWithoutCreatedByUserInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + amount: z.union([ z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }),z.lazy(() => DecimalFieldUpdateOperationsInputSchema) ]).optional(), + currency: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + date: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + note: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + categoryId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + budgetId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + walletAccountId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const TransactionUncheckedUpdateManyWithoutCreatedByUserInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + amount: z.union([ z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }),z.lazy(() => DecimalFieldUpdateOperationsInputSchema) ]).optional(), + currency: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + date: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + note: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + categoryId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + budgetId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + walletAccountId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const BudgetUserInvitationUpdateWithoutCreatedByUserInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + email: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + token: z.union([ z.string().uuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + expiresAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + permission: z.union([ z.lazy(() => BudgetUserPermissionSchema),z.lazy(() => NullableEnumBudgetUserPermissionFieldUpdateOperationsInputSchema) ]).optional().nullable(), + budget: z.lazy(() => BudgetUpdateOneRequiredWithoutInvitationsNestedInputSchema).optional(), + responses: z.lazy(() => BudgetUserInvitationResponseUpdateManyWithoutInvitationNestedInputSchema).optional() +}).strict(); + +export const BudgetUserInvitationUncheckedUpdateWithoutCreatedByUserInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + email: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + token: z.union([ z.string().uuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + expiresAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + permission: z.union([ z.lazy(() => BudgetUserPermissionSchema),z.lazy(() => NullableEnumBudgetUserPermissionFieldUpdateOperationsInputSchema) ]).optional().nullable(), + budgetId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + responses: z.lazy(() => BudgetUserInvitationResponseUncheckedUpdateManyWithoutInvitationNestedInputSchema).optional() +}).strict(); + +export const BudgetUserInvitationUncheckedUpdateManyWithoutCreatedByUserInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + email: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + token: z.union([ z.string().uuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + expiresAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + permission: z.union([ z.lazy(() => BudgetUserPermissionSchema),z.lazy(() => NullableEnumBudgetUserPermissionFieldUpdateOperationsInputSchema) ]).optional().nullable(), + budgetId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const TransactionCreateManyWalletAccountInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + amount: z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }), + currency: z.string(), + date: z.coerce.date(), + note: z.string().optional().nullable(), + categoryId: z.string().optional().nullable(), + budgetId: z.string().optional().nullable(), + createdByUserId: z.string() +}).strict(); + +export const TransactionUpdateWithoutWalletAccountInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + amount: z.union([ z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }),z.lazy(() => DecimalFieldUpdateOperationsInputSchema) ]).optional(), + currency: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + date: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + note: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + category: z.lazy(() => CategoryUpdateOneWithoutTransactionsNestedInputSchema).optional(), + budget: z.lazy(() => BudgetUpdateOneWithoutTransactionsNestedInputSchema).optional(), + createdByUser: z.lazy(() => UserUpdateOneRequiredWithoutTransactionsNestedInputSchema).optional() +}).strict(); + +export const TransactionUncheckedUpdateWithoutWalletAccountInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + amount: z.union([ z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }),z.lazy(() => DecimalFieldUpdateOperationsInputSchema) ]).optional(), + currency: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + date: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + note: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + categoryId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + budgetId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdByUserId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const TransactionUncheckedUpdateManyWithoutWalletAccountInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + amount: z.union([ z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }),z.lazy(() => DecimalFieldUpdateOperationsInputSchema) ]).optional(), + currency: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + date: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + note: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + categoryId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + budgetId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdByUserId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const BudgetUserCreateManyBudgetInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + permission: z.lazy(() => BudgetUserPermissionSchema), + userId: z.string() +}).strict(); + +export const TransactionCreateManyBudgetInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + amount: z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }), + currency: z.string(), + date: z.coerce.date(), + note: z.string().optional().nullable(), + categoryId: z.string().optional().nullable(), + walletAccountId: z.string(), + createdByUserId: z.string() +}).strict(); + +export const BudgetUserInvitationCreateManyBudgetInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + email: z.string().optional().nullable(), + token: z.string().uuid().optional(), + expiresAt: z.coerce.date(), + permission: z.lazy(() => BudgetUserPermissionSchema).optional().nullable(), + createdByUserId: z.string() +}).strict(); + +export const BudgetUserUpdateWithoutBudgetInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + permission: z.union([ z.lazy(() => BudgetUserPermissionSchema),z.lazy(() => EnumBudgetUserPermissionFieldUpdateOperationsInputSchema) ]).optional(), + user: z.lazy(() => UserUpdateOneRequiredWithoutBudgetUsersNestedInputSchema).optional() +}).strict(); + +export const BudgetUserUncheckedUpdateWithoutBudgetInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + permission: z.union([ z.lazy(() => BudgetUserPermissionSchema),z.lazy(() => EnumBudgetUserPermissionFieldUpdateOperationsInputSchema) ]).optional(), + userId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const BudgetUserUncheckedUpdateManyWithoutBudgetInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + permission: z.union([ z.lazy(() => BudgetUserPermissionSchema),z.lazy(() => EnumBudgetUserPermissionFieldUpdateOperationsInputSchema) ]).optional(), + userId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const TransactionUpdateWithoutBudgetInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + amount: z.union([ z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }),z.lazy(() => DecimalFieldUpdateOperationsInputSchema) ]).optional(), + currency: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + date: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + note: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + category: z.lazy(() => CategoryUpdateOneWithoutTransactionsNestedInputSchema).optional(), + walletAccount: z.lazy(() => UserWalletAccountUpdateOneRequiredWithoutTransactionsNestedInputSchema).optional(), + createdByUser: z.lazy(() => UserUpdateOneRequiredWithoutTransactionsNestedInputSchema).optional() +}).strict(); + +export const TransactionUncheckedUpdateWithoutBudgetInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + amount: z.union([ z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }),z.lazy(() => DecimalFieldUpdateOperationsInputSchema) ]).optional(), + currency: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + date: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + note: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + categoryId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + walletAccountId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdByUserId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const TransactionUncheckedUpdateManyWithoutBudgetInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + amount: z.union([ z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }),z.lazy(() => DecimalFieldUpdateOperationsInputSchema) ]).optional(), + currency: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + date: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + note: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + categoryId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + walletAccountId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdByUserId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const BudgetUserInvitationUpdateWithoutBudgetInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + email: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + token: z.union([ z.string().uuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + expiresAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + permission: z.union([ z.lazy(() => BudgetUserPermissionSchema),z.lazy(() => NullableEnumBudgetUserPermissionFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdByUser: z.lazy(() => UserUpdateOneRequiredWithoutCreatedBudgetUserInvitationsNestedInputSchema).optional(), + responses: z.lazy(() => BudgetUserInvitationResponseUpdateManyWithoutInvitationNestedInputSchema).optional() +}).strict(); + +export const BudgetUserInvitationUncheckedUpdateWithoutBudgetInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + email: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + token: z.union([ z.string().uuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + expiresAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + permission: z.union([ z.lazy(() => BudgetUserPermissionSchema),z.lazy(() => NullableEnumBudgetUserPermissionFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdByUserId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + responses: z.lazy(() => BudgetUserInvitationResponseUncheckedUpdateManyWithoutInvitationNestedInputSchema).optional() +}).strict(); + +export const BudgetUserInvitationUncheckedUpdateManyWithoutBudgetInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + email: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + token: z.union([ z.string().uuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + expiresAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + permission: z.union([ z.lazy(() => BudgetUserPermissionSchema),z.lazy(() => NullableEnumBudgetUserPermissionFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdByUserId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const BudgetUserInvitationResponseCreateManyInvitationInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + acceptedAt: z.coerce.date().optional().nullable(), + declinedAt: z.coerce.date().optional().nullable(), + createdUserId: z.string().optional().nullable() +}).strict(); + +export const BudgetUserInvitationResponseUpdateWithoutInvitationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + acceptedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + declinedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdUser: z.lazy(() => UserUpdateOneWithoutCreatedFromInvitationNestedInputSchema).optional() +}).strict(); + +export const BudgetUserInvitationResponseUncheckedUpdateWithoutInvitationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + acceptedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + declinedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdUserId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), +}).strict(); + +export const BudgetUserInvitationResponseUncheckedUpdateManyWithoutInvitationInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + acceptedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + declinedAt: z.union([ z.coerce.date(),z.lazy(() => NullableDateTimeFieldUpdateOperationsInputSchema) ]).optional().nullable(), + createdUserId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), +}).strict(); + +export const CategoryCreateManyParentInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + name: z.string(), + description: z.string().optional().nullable(), + icon: z.string().optional().nullable(), + color: z.string().optional().nullable() +}).strict(); + +export const TransactionCreateManyCategoryInputSchema: z.ZodType = z.object({ + id: z.string().cuid().optional(), + createdAt: z.coerce.date().optional(), + updatedAt: z.coerce.date().optional(), + amount: z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }), + currency: z.string(), + date: z.coerce.date(), + note: z.string().optional().nullable(), + budgetId: z.string().optional().nullable(), + walletAccountId: z.string(), + createdByUserId: z.string() +}).strict(); + +export const CategoryUpdateWithoutParentInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + icon: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + color: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + children: z.lazy(() => CategoryUpdateManyWithoutParentNestedInputSchema).optional(), + transactions: z.lazy(() => TransactionUpdateManyWithoutCategoryNestedInputSchema).optional() +}).strict(); + +export const CategoryUncheckedUpdateWithoutParentInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + icon: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + color: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + children: z.lazy(() => CategoryUncheckedUpdateManyWithoutParentNestedInputSchema).optional(), + transactions: z.lazy(() => TransactionUncheckedUpdateManyWithoutCategoryNestedInputSchema).optional() +}).strict(); + +export const CategoryUncheckedUpdateManyWithoutParentInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + name: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + description: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + icon: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + color: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), +}).strict(); + +export const TransactionUpdateWithoutCategoryInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + amount: z.union([ z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }),z.lazy(() => DecimalFieldUpdateOperationsInputSchema) ]).optional(), + currency: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + date: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + note: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + budget: z.lazy(() => BudgetUpdateOneWithoutTransactionsNestedInputSchema).optional(), + walletAccount: z.lazy(() => UserWalletAccountUpdateOneRequiredWithoutTransactionsNestedInputSchema).optional(), + createdByUser: z.lazy(() => UserUpdateOneRequiredWithoutTransactionsNestedInputSchema).optional() +}).strict(); + +export const TransactionUncheckedUpdateWithoutCategoryInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + amount: z.union([ z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }),z.lazy(() => DecimalFieldUpdateOperationsInputSchema) ]).optional(), + currency: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + date: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + note: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + budgetId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + walletAccountId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdByUserId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +export const TransactionUncheckedUpdateManyWithoutCategoryInputSchema: z.ZodType = z.object({ + id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + amount: z.union([ z.union([z.number(),z.string(),z.instanceof(Prisma.Decimal),DecimalJsLikeSchema,]).refine((v) => isValidDecimalInput(v), { message: 'Must be a Decimal' }),z.lazy(() => DecimalFieldUpdateOperationsInputSchema) ]).optional(), + currency: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + date: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), + note: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + budgetId: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(), + walletAccountId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), + createdByUserId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), +}).strict(); + +///////////////////////////////////////// +// ARGS +///////////////////////////////////////// + +export const UserFindFirstArgsSchema: z.ZodType = z.object({ + select: UserSelectSchema.optional(), + include: UserIncludeSchema.optional(), + where: UserWhereInputSchema.optional(), + orderBy: z.union([ UserOrderByWithRelationInputSchema.array(),UserOrderByWithRelationInputSchema ]).optional(), + cursor: UserWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ UserScalarFieldEnumSchema,UserScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const UserFindFirstOrThrowArgsSchema: z.ZodType = z.object({ + select: UserSelectSchema.optional(), + include: UserIncludeSchema.optional(), + where: UserWhereInputSchema.optional(), + orderBy: z.union([ UserOrderByWithRelationInputSchema.array(),UserOrderByWithRelationInputSchema ]).optional(), + cursor: UserWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ UserScalarFieldEnumSchema,UserScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const UserFindManyArgsSchema: z.ZodType = z.object({ + select: UserSelectSchema.optional(), + include: UserIncludeSchema.optional(), + where: UserWhereInputSchema.optional(), + orderBy: z.union([ UserOrderByWithRelationInputSchema.array(),UserOrderByWithRelationInputSchema ]).optional(), + cursor: UserWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ UserScalarFieldEnumSchema,UserScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const UserAggregateArgsSchema: z.ZodType = z.object({ + where: UserWhereInputSchema.optional(), + orderBy: z.union([ UserOrderByWithRelationInputSchema.array(),UserOrderByWithRelationInputSchema ]).optional(), + cursor: UserWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() ; + +export const UserGroupByArgsSchema: z.ZodType = z.object({ + where: UserWhereInputSchema.optional(), + orderBy: z.union([ UserOrderByWithAggregationInputSchema.array(),UserOrderByWithAggregationInputSchema ]).optional(), + by: UserScalarFieldEnumSchema.array(), + having: UserScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() ; + +export const UserFindUniqueArgsSchema: z.ZodType = z.object({ + select: UserSelectSchema.optional(), + include: UserIncludeSchema.optional(), + where: UserWhereUniqueInputSchema, +}).strict() ; + +export const UserFindUniqueOrThrowArgsSchema: z.ZodType = z.object({ + select: UserSelectSchema.optional(), + include: UserIncludeSchema.optional(), + where: UserWhereUniqueInputSchema, +}).strict() ; + +export const UserWalletAccountFindFirstArgsSchema: z.ZodType = z.object({ + select: UserWalletAccountSelectSchema.optional(), + include: UserWalletAccountIncludeSchema.optional(), + where: UserWalletAccountWhereInputSchema.optional(), + orderBy: z.union([ UserWalletAccountOrderByWithRelationInputSchema.array(),UserWalletAccountOrderByWithRelationInputSchema ]).optional(), + cursor: UserWalletAccountWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ UserWalletAccountScalarFieldEnumSchema,UserWalletAccountScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const UserWalletAccountFindFirstOrThrowArgsSchema: z.ZodType = z.object({ + select: UserWalletAccountSelectSchema.optional(), + include: UserWalletAccountIncludeSchema.optional(), + where: UserWalletAccountWhereInputSchema.optional(), + orderBy: z.union([ UserWalletAccountOrderByWithRelationInputSchema.array(),UserWalletAccountOrderByWithRelationInputSchema ]).optional(), + cursor: UserWalletAccountWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ UserWalletAccountScalarFieldEnumSchema,UserWalletAccountScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const UserWalletAccountFindManyArgsSchema: z.ZodType = z.object({ + select: UserWalletAccountSelectSchema.optional(), + include: UserWalletAccountIncludeSchema.optional(), + where: UserWalletAccountWhereInputSchema.optional(), + orderBy: z.union([ UserWalletAccountOrderByWithRelationInputSchema.array(),UserWalletAccountOrderByWithRelationInputSchema ]).optional(), + cursor: UserWalletAccountWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ UserWalletAccountScalarFieldEnumSchema,UserWalletAccountScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const UserWalletAccountAggregateArgsSchema: z.ZodType = z.object({ + where: UserWalletAccountWhereInputSchema.optional(), + orderBy: z.union([ UserWalletAccountOrderByWithRelationInputSchema.array(),UserWalletAccountOrderByWithRelationInputSchema ]).optional(), + cursor: UserWalletAccountWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() ; + +export const UserWalletAccountGroupByArgsSchema: z.ZodType = z.object({ + where: UserWalletAccountWhereInputSchema.optional(), + orderBy: z.union([ UserWalletAccountOrderByWithAggregationInputSchema.array(),UserWalletAccountOrderByWithAggregationInputSchema ]).optional(), + by: UserWalletAccountScalarFieldEnumSchema.array(), + having: UserWalletAccountScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() ; + +export const UserWalletAccountFindUniqueArgsSchema: z.ZodType = z.object({ + select: UserWalletAccountSelectSchema.optional(), + include: UserWalletAccountIncludeSchema.optional(), + where: UserWalletAccountWhereUniqueInputSchema, +}).strict() ; + +export const UserWalletAccountFindUniqueOrThrowArgsSchema: z.ZodType = z.object({ + select: UserWalletAccountSelectSchema.optional(), + include: UserWalletAccountIncludeSchema.optional(), + where: UserWalletAccountWhereUniqueInputSchema, +}).strict() ; + +export const BudgetFindFirstArgsSchema: z.ZodType = z.object({ + select: BudgetSelectSchema.optional(), + include: BudgetIncludeSchema.optional(), + where: BudgetWhereInputSchema.optional(), + orderBy: z.union([ BudgetOrderByWithRelationInputSchema.array(),BudgetOrderByWithRelationInputSchema ]).optional(), + cursor: BudgetWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ BudgetScalarFieldEnumSchema,BudgetScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const BudgetFindFirstOrThrowArgsSchema: z.ZodType = z.object({ + select: BudgetSelectSchema.optional(), + include: BudgetIncludeSchema.optional(), + where: BudgetWhereInputSchema.optional(), + orderBy: z.union([ BudgetOrderByWithRelationInputSchema.array(),BudgetOrderByWithRelationInputSchema ]).optional(), + cursor: BudgetWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ BudgetScalarFieldEnumSchema,BudgetScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const BudgetFindManyArgsSchema: z.ZodType = z.object({ + select: BudgetSelectSchema.optional(), + include: BudgetIncludeSchema.optional(), + where: BudgetWhereInputSchema.optional(), + orderBy: z.union([ BudgetOrderByWithRelationInputSchema.array(),BudgetOrderByWithRelationInputSchema ]).optional(), + cursor: BudgetWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ BudgetScalarFieldEnumSchema,BudgetScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const BudgetAggregateArgsSchema: z.ZodType = z.object({ + where: BudgetWhereInputSchema.optional(), + orderBy: z.union([ BudgetOrderByWithRelationInputSchema.array(),BudgetOrderByWithRelationInputSchema ]).optional(), + cursor: BudgetWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() ; + +export const BudgetGroupByArgsSchema: z.ZodType = z.object({ + where: BudgetWhereInputSchema.optional(), + orderBy: z.union([ BudgetOrderByWithAggregationInputSchema.array(),BudgetOrderByWithAggregationInputSchema ]).optional(), + by: BudgetScalarFieldEnumSchema.array(), + having: BudgetScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() ; + +export const BudgetFindUniqueArgsSchema: z.ZodType = z.object({ + select: BudgetSelectSchema.optional(), + include: BudgetIncludeSchema.optional(), + where: BudgetWhereUniqueInputSchema, +}).strict() ; + +export const BudgetFindUniqueOrThrowArgsSchema: z.ZodType = z.object({ + select: BudgetSelectSchema.optional(), + include: BudgetIncludeSchema.optional(), + where: BudgetWhereUniqueInputSchema, +}).strict() ; + +export const BudgetPeriodConfigFindFirstArgsSchema: z.ZodType = z.object({ + select: BudgetPeriodConfigSelectSchema.optional(), + include: BudgetPeriodConfigIncludeSchema.optional(), + where: BudgetPeriodConfigWhereInputSchema.optional(), + orderBy: z.union([ BudgetPeriodConfigOrderByWithRelationInputSchema.array(),BudgetPeriodConfigOrderByWithRelationInputSchema ]).optional(), + cursor: BudgetPeriodConfigWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ BudgetPeriodConfigScalarFieldEnumSchema,BudgetPeriodConfigScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const BudgetPeriodConfigFindFirstOrThrowArgsSchema: z.ZodType = z.object({ + select: BudgetPeriodConfigSelectSchema.optional(), + include: BudgetPeriodConfigIncludeSchema.optional(), + where: BudgetPeriodConfigWhereInputSchema.optional(), + orderBy: z.union([ BudgetPeriodConfigOrderByWithRelationInputSchema.array(),BudgetPeriodConfigOrderByWithRelationInputSchema ]).optional(), + cursor: BudgetPeriodConfigWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ BudgetPeriodConfigScalarFieldEnumSchema,BudgetPeriodConfigScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const BudgetPeriodConfigFindManyArgsSchema: z.ZodType = z.object({ + select: BudgetPeriodConfigSelectSchema.optional(), + include: BudgetPeriodConfigIncludeSchema.optional(), + where: BudgetPeriodConfigWhereInputSchema.optional(), + orderBy: z.union([ BudgetPeriodConfigOrderByWithRelationInputSchema.array(),BudgetPeriodConfigOrderByWithRelationInputSchema ]).optional(), + cursor: BudgetPeriodConfigWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ BudgetPeriodConfigScalarFieldEnumSchema,BudgetPeriodConfigScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const BudgetPeriodConfigAggregateArgsSchema: z.ZodType = z.object({ + where: BudgetPeriodConfigWhereInputSchema.optional(), + orderBy: z.union([ BudgetPeriodConfigOrderByWithRelationInputSchema.array(),BudgetPeriodConfigOrderByWithRelationInputSchema ]).optional(), + cursor: BudgetPeriodConfigWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() ; + +export const BudgetPeriodConfigGroupByArgsSchema: z.ZodType = z.object({ + where: BudgetPeriodConfigWhereInputSchema.optional(), + orderBy: z.union([ BudgetPeriodConfigOrderByWithAggregationInputSchema.array(),BudgetPeriodConfigOrderByWithAggregationInputSchema ]).optional(), + by: BudgetPeriodConfigScalarFieldEnumSchema.array(), + having: BudgetPeriodConfigScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() ; + +export const BudgetPeriodConfigFindUniqueArgsSchema: z.ZodType = z.object({ + select: BudgetPeriodConfigSelectSchema.optional(), + include: BudgetPeriodConfigIncludeSchema.optional(), + where: BudgetPeriodConfigWhereUniqueInputSchema, +}).strict() ; + +export const BudgetPeriodConfigFindUniqueOrThrowArgsSchema: z.ZodType = z.object({ + select: BudgetPeriodConfigSelectSchema.optional(), + include: BudgetPeriodConfigIncludeSchema.optional(), + where: BudgetPeriodConfigWhereUniqueInputSchema, +}).strict() ; + +export const BudgetUserFindFirstArgsSchema: z.ZodType = z.object({ + select: BudgetUserSelectSchema.optional(), + include: BudgetUserIncludeSchema.optional(), + where: BudgetUserWhereInputSchema.optional(), + orderBy: z.union([ BudgetUserOrderByWithRelationInputSchema.array(),BudgetUserOrderByWithRelationInputSchema ]).optional(), + cursor: BudgetUserWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ BudgetUserScalarFieldEnumSchema,BudgetUserScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const BudgetUserFindFirstOrThrowArgsSchema: z.ZodType = z.object({ + select: BudgetUserSelectSchema.optional(), + include: BudgetUserIncludeSchema.optional(), + where: BudgetUserWhereInputSchema.optional(), + orderBy: z.union([ BudgetUserOrderByWithRelationInputSchema.array(),BudgetUserOrderByWithRelationInputSchema ]).optional(), + cursor: BudgetUserWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ BudgetUserScalarFieldEnumSchema,BudgetUserScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const BudgetUserFindManyArgsSchema: z.ZodType = z.object({ + select: BudgetUserSelectSchema.optional(), + include: BudgetUserIncludeSchema.optional(), + where: BudgetUserWhereInputSchema.optional(), + orderBy: z.union([ BudgetUserOrderByWithRelationInputSchema.array(),BudgetUserOrderByWithRelationInputSchema ]).optional(), + cursor: BudgetUserWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ BudgetUserScalarFieldEnumSchema,BudgetUserScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const BudgetUserAggregateArgsSchema: z.ZodType = z.object({ + where: BudgetUserWhereInputSchema.optional(), + orderBy: z.union([ BudgetUserOrderByWithRelationInputSchema.array(),BudgetUserOrderByWithRelationInputSchema ]).optional(), + cursor: BudgetUserWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() ; + +export const BudgetUserGroupByArgsSchema: z.ZodType = z.object({ + where: BudgetUserWhereInputSchema.optional(), + orderBy: z.union([ BudgetUserOrderByWithAggregationInputSchema.array(),BudgetUserOrderByWithAggregationInputSchema ]).optional(), + by: BudgetUserScalarFieldEnumSchema.array(), + having: BudgetUserScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() ; + +export const BudgetUserFindUniqueArgsSchema: z.ZodType = z.object({ + select: BudgetUserSelectSchema.optional(), + include: BudgetUserIncludeSchema.optional(), + where: BudgetUserWhereUniqueInputSchema, +}).strict() ; + +export const BudgetUserFindUniqueOrThrowArgsSchema: z.ZodType = z.object({ + select: BudgetUserSelectSchema.optional(), + include: BudgetUserIncludeSchema.optional(), + where: BudgetUserWhereUniqueInputSchema, +}).strict() ; + +export const BudgetUserInvitationFindFirstArgsSchema: z.ZodType = z.object({ + select: BudgetUserInvitationSelectSchema.optional(), + include: BudgetUserInvitationIncludeSchema.optional(), + where: BudgetUserInvitationWhereInputSchema.optional(), + orderBy: z.union([ BudgetUserInvitationOrderByWithRelationInputSchema.array(),BudgetUserInvitationOrderByWithRelationInputSchema ]).optional(), + cursor: BudgetUserInvitationWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ BudgetUserInvitationScalarFieldEnumSchema,BudgetUserInvitationScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const BudgetUserInvitationFindFirstOrThrowArgsSchema: z.ZodType = z.object({ + select: BudgetUserInvitationSelectSchema.optional(), + include: BudgetUserInvitationIncludeSchema.optional(), + where: BudgetUserInvitationWhereInputSchema.optional(), + orderBy: z.union([ BudgetUserInvitationOrderByWithRelationInputSchema.array(),BudgetUserInvitationOrderByWithRelationInputSchema ]).optional(), + cursor: BudgetUserInvitationWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ BudgetUserInvitationScalarFieldEnumSchema,BudgetUserInvitationScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const BudgetUserInvitationFindManyArgsSchema: z.ZodType = z.object({ + select: BudgetUserInvitationSelectSchema.optional(), + include: BudgetUserInvitationIncludeSchema.optional(), + where: BudgetUserInvitationWhereInputSchema.optional(), + orderBy: z.union([ BudgetUserInvitationOrderByWithRelationInputSchema.array(),BudgetUserInvitationOrderByWithRelationInputSchema ]).optional(), + cursor: BudgetUserInvitationWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ BudgetUserInvitationScalarFieldEnumSchema,BudgetUserInvitationScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const BudgetUserInvitationAggregateArgsSchema: z.ZodType = z.object({ + where: BudgetUserInvitationWhereInputSchema.optional(), + orderBy: z.union([ BudgetUserInvitationOrderByWithRelationInputSchema.array(),BudgetUserInvitationOrderByWithRelationInputSchema ]).optional(), + cursor: BudgetUserInvitationWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() ; + +export const BudgetUserInvitationGroupByArgsSchema: z.ZodType = z.object({ + where: BudgetUserInvitationWhereInputSchema.optional(), + orderBy: z.union([ BudgetUserInvitationOrderByWithAggregationInputSchema.array(),BudgetUserInvitationOrderByWithAggregationInputSchema ]).optional(), + by: BudgetUserInvitationScalarFieldEnumSchema.array(), + having: BudgetUserInvitationScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() ; + +export const BudgetUserInvitationFindUniqueArgsSchema: z.ZodType = z.object({ + select: BudgetUserInvitationSelectSchema.optional(), + include: BudgetUserInvitationIncludeSchema.optional(), + where: BudgetUserInvitationWhereUniqueInputSchema, +}).strict() ; + +export const BudgetUserInvitationFindUniqueOrThrowArgsSchema: z.ZodType = z.object({ + select: BudgetUserInvitationSelectSchema.optional(), + include: BudgetUserInvitationIncludeSchema.optional(), + where: BudgetUserInvitationWhereUniqueInputSchema, +}).strict() ; + +export const BudgetUserInvitationResponseFindFirstArgsSchema: z.ZodType = z.object({ + select: BudgetUserInvitationResponseSelectSchema.optional(), + include: BudgetUserInvitationResponseIncludeSchema.optional(), + where: BudgetUserInvitationResponseWhereInputSchema.optional(), + orderBy: z.union([ BudgetUserInvitationResponseOrderByWithRelationInputSchema.array(),BudgetUserInvitationResponseOrderByWithRelationInputSchema ]).optional(), + cursor: BudgetUserInvitationResponseWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ BudgetUserInvitationResponseScalarFieldEnumSchema,BudgetUserInvitationResponseScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const BudgetUserInvitationResponseFindFirstOrThrowArgsSchema: z.ZodType = z.object({ + select: BudgetUserInvitationResponseSelectSchema.optional(), + include: BudgetUserInvitationResponseIncludeSchema.optional(), + where: BudgetUserInvitationResponseWhereInputSchema.optional(), + orderBy: z.union([ BudgetUserInvitationResponseOrderByWithRelationInputSchema.array(),BudgetUserInvitationResponseOrderByWithRelationInputSchema ]).optional(), + cursor: BudgetUserInvitationResponseWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ BudgetUserInvitationResponseScalarFieldEnumSchema,BudgetUserInvitationResponseScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const BudgetUserInvitationResponseFindManyArgsSchema: z.ZodType = z.object({ + select: BudgetUserInvitationResponseSelectSchema.optional(), + include: BudgetUserInvitationResponseIncludeSchema.optional(), + where: BudgetUserInvitationResponseWhereInputSchema.optional(), + orderBy: z.union([ BudgetUserInvitationResponseOrderByWithRelationInputSchema.array(),BudgetUserInvitationResponseOrderByWithRelationInputSchema ]).optional(), + cursor: BudgetUserInvitationResponseWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ BudgetUserInvitationResponseScalarFieldEnumSchema,BudgetUserInvitationResponseScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; + +export const BudgetUserInvitationResponseAggregateArgsSchema: z.ZodType = z.object({ + where: BudgetUserInvitationResponseWhereInputSchema.optional(), + orderBy: z.union([ BudgetUserInvitationResponseOrderByWithRelationInputSchema.array(),BudgetUserInvitationResponseOrderByWithRelationInputSchema ]).optional(), + cursor: BudgetUserInvitationResponseWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() ; + +export const BudgetUserInvitationResponseGroupByArgsSchema: z.ZodType = z.object({ + where: BudgetUserInvitationResponseWhereInputSchema.optional(), + orderBy: z.union([ BudgetUserInvitationResponseOrderByWithAggregationInputSchema.array(),BudgetUserInvitationResponseOrderByWithAggregationInputSchema ]).optional(), + by: BudgetUserInvitationResponseScalarFieldEnumSchema.array(), + having: BudgetUserInvitationResponseScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() ; + +export const BudgetUserInvitationResponseFindUniqueArgsSchema: z.ZodType = z.object({ + select: BudgetUserInvitationResponseSelectSchema.optional(), + include: BudgetUserInvitationResponseIncludeSchema.optional(), + where: BudgetUserInvitationResponseWhereUniqueInputSchema, +}).strict() ; -export const NestedIntFilterSchema: z.ZodType = z.object({ - equals: z.number().optional(), - in: z.number().array().optional(), - notIn: z.number().array().optional(), - lt: z.number().optional(), - lte: z.number().optional(), - gt: z.number().optional(), - gte: z.number().optional(), - not: z.union([ z.number(),z.lazy(() => NestedIntFilterSchema) ]).optional(), -}).strict(); +export const BudgetUserInvitationResponseFindUniqueOrThrowArgsSchema: z.ZodType = z.object({ + select: BudgetUserInvitationResponseSelectSchema.optional(), + include: BudgetUserInvitationResponseIncludeSchema.optional(), + where: BudgetUserInvitationResponseWhereUniqueInputSchema, +}).strict() ; -export const NestedStringNullableWithAggregatesFilterSchema: z.ZodType = z.object({ - equals: z.string().optional().nullable(), - in: z.string().array().optional().nullable(), - notIn: z.string().array().optional().nullable(), - lt: z.string().optional(), - lte: z.string().optional(), - gt: z.string().optional(), - gte: z.string().optional(), - contains: z.string().optional(), - startsWith: z.string().optional(), - endsWith: z.string().optional(), - not: z.union([ z.string(),z.lazy(() => NestedStringNullableWithAggregatesFilterSchema) ]).optional().nullable(), - _count: z.lazy(() => NestedIntNullableFilterSchema).optional(), - _min: z.lazy(() => NestedStringNullableFilterSchema).optional(), - _max: z.lazy(() => NestedStringNullableFilterSchema).optional() -}).strict(); +export const TransactionFindFirstArgsSchema: z.ZodType = z.object({ + select: TransactionSelectSchema.optional(), + include: TransactionIncludeSchema.optional(), + where: TransactionWhereInputSchema.optional(), + orderBy: z.union([ TransactionOrderByWithRelationInputSchema.array(),TransactionOrderByWithRelationInputSchema ]).optional(), + cursor: TransactionWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ TransactionScalarFieldEnumSchema,TransactionScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; -export const NestedIntNullableFilterSchema: z.ZodType = z.object({ - equals: z.number().optional().nullable(), - in: z.number().array().optional().nullable(), - notIn: z.number().array().optional().nullable(), - lt: z.number().optional(), - lte: z.number().optional(), - gt: z.number().optional(), - gte: z.number().optional(), - not: z.union([ z.number(),z.lazy(() => NestedIntNullableFilterSchema) ]).optional().nullable(), -}).strict(); +export const TransactionFindFirstOrThrowArgsSchema: z.ZodType = z.object({ + select: TransactionSelectSchema.optional(), + include: TransactionIncludeSchema.optional(), + where: TransactionWhereInputSchema.optional(), + orderBy: z.union([ TransactionOrderByWithRelationInputSchema.array(),TransactionOrderByWithRelationInputSchema ]).optional(), + cursor: TransactionWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ TransactionScalarFieldEnumSchema,TransactionScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; -///////////////////////////////////////// -// ARGS -///////////////////////////////////////// +export const TransactionFindManyArgsSchema: z.ZodType = z.object({ + select: TransactionSelectSchema.optional(), + include: TransactionIncludeSchema.optional(), + where: TransactionWhereInputSchema.optional(), + orderBy: z.union([ TransactionOrderByWithRelationInputSchema.array(),TransactionOrderByWithRelationInputSchema ]).optional(), + cursor: TransactionWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), + distinct: z.union([ TransactionScalarFieldEnumSchema,TransactionScalarFieldEnumSchema.array() ]).optional(), +}).strict() ; -export const UserFindFirstArgsSchema: z.ZodType = z.object({ - select: UserSelectSchema.optional(), - where: UserWhereInputSchema.optional(), - orderBy: z.union([ UserOrderByWithRelationInputSchema.array(),UserOrderByWithRelationInputSchema ]).optional(), - cursor: UserWhereUniqueInputSchema.optional(), +export const TransactionAggregateArgsSchema: z.ZodType = z.object({ + where: TransactionWhereInputSchema.optional(), + orderBy: z.union([ TransactionOrderByWithRelationInputSchema.array(),TransactionOrderByWithRelationInputSchema ]).optional(), + cursor: TransactionWhereUniqueInputSchema.optional(), take: z.number().optional(), skip: z.number().optional(), - distinct: z.union([ UserScalarFieldEnumSchema,UserScalarFieldEnumSchema.array() ]).optional(), }).strict() ; -export const UserFindFirstOrThrowArgsSchema: z.ZodType = z.object({ - select: UserSelectSchema.optional(), - where: UserWhereInputSchema.optional(), - orderBy: z.union([ UserOrderByWithRelationInputSchema.array(),UserOrderByWithRelationInputSchema ]).optional(), - cursor: UserWhereUniqueInputSchema.optional(), +export const TransactionGroupByArgsSchema: z.ZodType = z.object({ + where: TransactionWhereInputSchema.optional(), + orderBy: z.union([ TransactionOrderByWithAggregationInputSchema.array(),TransactionOrderByWithAggregationInputSchema ]).optional(), + by: TransactionScalarFieldEnumSchema.array(), + having: TransactionScalarWhereWithAggregatesInputSchema.optional(), take: z.number().optional(), skip: z.number().optional(), - distinct: z.union([ UserScalarFieldEnumSchema,UserScalarFieldEnumSchema.array() ]).optional(), }).strict() ; -export const UserFindManyArgsSchema: z.ZodType = z.object({ - select: UserSelectSchema.optional(), - where: UserWhereInputSchema.optional(), - orderBy: z.union([ UserOrderByWithRelationInputSchema.array(),UserOrderByWithRelationInputSchema ]).optional(), - cursor: UserWhereUniqueInputSchema.optional(), +export const TransactionFindUniqueArgsSchema: z.ZodType = z.object({ + select: TransactionSelectSchema.optional(), + include: TransactionIncludeSchema.optional(), + where: TransactionWhereUniqueInputSchema, +}).strict() ; + +export const TransactionFindUniqueOrThrowArgsSchema: z.ZodType = z.object({ + select: TransactionSelectSchema.optional(), + include: TransactionIncludeSchema.optional(), + where: TransactionWhereUniqueInputSchema, +}).strict() ; + +export const CategoryFindFirstArgsSchema: z.ZodType = z.object({ + select: CategorySelectSchema.optional(), + include: CategoryIncludeSchema.optional(), + where: CategoryWhereInputSchema.optional(), + orderBy: z.union([ CategoryOrderByWithRelationInputSchema.array(),CategoryOrderByWithRelationInputSchema ]).optional(), + cursor: CategoryWhereUniqueInputSchema.optional(), take: z.number().optional(), skip: z.number().optional(), - distinct: z.union([ UserScalarFieldEnumSchema,UserScalarFieldEnumSchema.array() ]).optional(), + distinct: z.union([ CategoryScalarFieldEnumSchema,CategoryScalarFieldEnumSchema.array() ]).optional(), }).strict() ; -export const UserAggregateArgsSchema: z.ZodType = z.object({ - where: UserWhereInputSchema.optional(), - orderBy: z.union([ UserOrderByWithRelationInputSchema.array(),UserOrderByWithRelationInputSchema ]).optional(), - cursor: UserWhereUniqueInputSchema.optional(), +export const CategoryFindFirstOrThrowArgsSchema: z.ZodType = z.object({ + select: CategorySelectSchema.optional(), + include: CategoryIncludeSchema.optional(), + where: CategoryWhereInputSchema.optional(), + orderBy: z.union([ CategoryOrderByWithRelationInputSchema.array(),CategoryOrderByWithRelationInputSchema ]).optional(), + cursor: CategoryWhereUniqueInputSchema.optional(), take: z.number().optional(), skip: z.number().optional(), + distinct: z.union([ CategoryScalarFieldEnumSchema,CategoryScalarFieldEnumSchema.array() ]).optional(), }).strict() ; -export const UserGroupByArgsSchema: z.ZodType = z.object({ - where: UserWhereInputSchema.optional(), - orderBy: z.union([ UserOrderByWithAggregationInputSchema.array(),UserOrderByWithAggregationInputSchema ]).optional(), - by: UserScalarFieldEnumSchema.array(), - having: UserScalarWhereWithAggregatesInputSchema.optional(), +export const CategoryFindManyArgsSchema: z.ZodType = z.object({ + select: CategorySelectSchema.optional(), + include: CategoryIncludeSchema.optional(), + where: CategoryWhereInputSchema.optional(), + orderBy: z.union([ CategoryOrderByWithRelationInputSchema.array(),CategoryOrderByWithRelationInputSchema ]).optional(), + cursor: CategoryWhereUniqueInputSchema.optional(), take: z.number().optional(), skip: z.number().optional(), + distinct: z.union([ CategoryScalarFieldEnumSchema,CategoryScalarFieldEnumSchema.array() ]).optional(), }).strict() ; -export const UserFindUniqueArgsSchema: z.ZodType = z.object({ - select: UserSelectSchema.optional(), - where: UserWhereUniqueInputSchema, +export const CategoryAggregateArgsSchema: z.ZodType = z.object({ + where: CategoryWhereInputSchema.optional(), + orderBy: z.union([ CategoryOrderByWithRelationInputSchema.array(),CategoryOrderByWithRelationInputSchema ]).optional(), + cursor: CategoryWhereUniqueInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), }).strict() ; -export const UserFindUniqueOrThrowArgsSchema: z.ZodType = z.object({ - select: UserSelectSchema.optional(), - where: UserWhereUniqueInputSchema, +export const CategoryGroupByArgsSchema: z.ZodType = z.object({ + where: CategoryWhereInputSchema.optional(), + orderBy: z.union([ CategoryOrderByWithAggregationInputSchema.array(),CategoryOrderByWithAggregationInputSchema ]).optional(), + by: CategoryScalarFieldEnumSchema.array(), + having: CategoryScalarWhereWithAggregatesInputSchema.optional(), + take: z.number().optional(), + skip: z.number().optional(), +}).strict() ; + +export const CategoryFindUniqueArgsSchema: z.ZodType = z.object({ + select: CategorySelectSchema.optional(), + include: CategoryIncludeSchema.optional(), + where: CategoryWhereUniqueInputSchema, +}).strict() ; + +export const CategoryFindUniqueOrThrowArgsSchema: z.ZodType = z.object({ + select: CategorySelectSchema.optional(), + include: CategoryIncludeSchema.optional(), + where: CategoryWhereUniqueInputSchema, }).strict() ; export const UserCreateArgsSchema: z.ZodType = z.object({ select: UserSelectSchema.optional(), + include: UserIncludeSchema.optional(), data: z.union([ UserCreateInputSchema,UserUncheckedCreateInputSchema ]), }).strict() ; export const UserUpsertArgsSchema: z.ZodType = z.object({ select: UserSelectSchema.optional(), + include: UserIncludeSchema.optional(), where: UserWhereUniqueInputSchema, create: z.union([ UserCreateInputSchema,UserUncheckedCreateInputSchema ]), update: z.union([ UserUpdateInputSchema,UserUncheckedUpdateInputSchema ]), @@ -415,11 +6455,13 @@ export const UserCreateManyAndReturnArgsSchema: z.ZodType = z.object({ select: UserSelectSchema.optional(), + include: UserIncludeSchema.optional(), where: UserWhereUniqueInputSchema, }).strict() ; export const UserUpdateArgsSchema: z.ZodType = z.object({ select: UserSelectSchema.optional(), + include: UserIncludeSchema.optional(), data: z.union([ UserUpdateInputSchema,UserUncheckedUpdateInputSchema ]), where: UserWhereUniqueInputSchema, }).strict() ; @@ -431,4 +6473,372 @@ export const UserUpdateManyArgsSchema: z.ZodType = z. export const UserDeleteManyArgsSchema: z.ZodType = z.object({ where: UserWhereInputSchema.optional(), +}).strict() ; + +export const UserWalletAccountCreateArgsSchema: z.ZodType = z.object({ + select: UserWalletAccountSelectSchema.optional(), + include: UserWalletAccountIncludeSchema.optional(), + data: z.union([ UserWalletAccountCreateInputSchema,UserWalletAccountUncheckedCreateInputSchema ]), +}).strict() ; + +export const UserWalletAccountUpsertArgsSchema: z.ZodType = z.object({ + select: UserWalletAccountSelectSchema.optional(), + include: UserWalletAccountIncludeSchema.optional(), + where: UserWalletAccountWhereUniqueInputSchema, + create: z.union([ UserWalletAccountCreateInputSchema,UserWalletAccountUncheckedCreateInputSchema ]), + update: z.union([ UserWalletAccountUpdateInputSchema,UserWalletAccountUncheckedUpdateInputSchema ]), +}).strict() ; + +export const UserWalletAccountCreateManyArgsSchema: z.ZodType = z.object({ + data: z.union([ UserWalletAccountCreateManyInputSchema,UserWalletAccountCreateManyInputSchema.array() ]), + skipDuplicates: z.boolean().optional(), +}).strict() ; + +export const UserWalletAccountCreateManyAndReturnArgsSchema: z.ZodType = z.object({ + data: z.union([ UserWalletAccountCreateManyInputSchema,UserWalletAccountCreateManyInputSchema.array() ]), + skipDuplicates: z.boolean().optional(), +}).strict() ; + +export const UserWalletAccountDeleteArgsSchema: z.ZodType = z.object({ + select: UserWalletAccountSelectSchema.optional(), + include: UserWalletAccountIncludeSchema.optional(), + where: UserWalletAccountWhereUniqueInputSchema, +}).strict() ; + +export const UserWalletAccountUpdateArgsSchema: z.ZodType = z.object({ + select: UserWalletAccountSelectSchema.optional(), + include: UserWalletAccountIncludeSchema.optional(), + data: z.union([ UserWalletAccountUpdateInputSchema,UserWalletAccountUncheckedUpdateInputSchema ]), + where: UserWalletAccountWhereUniqueInputSchema, +}).strict() ; + +export const UserWalletAccountUpdateManyArgsSchema: z.ZodType = z.object({ + data: z.union([ UserWalletAccountUpdateManyMutationInputSchema,UserWalletAccountUncheckedUpdateManyInputSchema ]), + where: UserWalletAccountWhereInputSchema.optional(), +}).strict() ; + +export const UserWalletAccountDeleteManyArgsSchema: z.ZodType = z.object({ + where: UserWalletAccountWhereInputSchema.optional(), +}).strict() ; + +export const BudgetCreateArgsSchema: z.ZodType = z.object({ + select: BudgetSelectSchema.optional(), + include: BudgetIncludeSchema.optional(), + data: z.union([ BudgetCreateInputSchema,BudgetUncheckedCreateInputSchema ]), +}).strict() ; + +export const BudgetUpsertArgsSchema: z.ZodType = z.object({ + select: BudgetSelectSchema.optional(), + include: BudgetIncludeSchema.optional(), + where: BudgetWhereUniqueInputSchema, + create: z.union([ BudgetCreateInputSchema,BudgetUncheckedCreateInputSchema ]), + update: z.union([ BudgetUpdateInputSchema,BudgetUncheckedUpdateInputSchema ]), +}).strict() ; + +export const BudgetCreateManyArgsSchema: z.ZodType = z.object({ + data: z.union([ BudgetCreateManyInputSchema,BudgetCreateManyInputSchema.array() ]), + skipDuplicates: z.boolean().optional(), +}).strict() ; + +export const BudgetCreateManyAndReturnArgsSchema: z.ZodType = z.object({ + data: z.union([ BudgetCreateManyInputSchema,BudgetCreateManyInputSchema.array() ]), + skipDuplicates: z.boolean().optional(), +}).strict() ; + +export const BudgetDeleteArgsSchema: z.ZodType = z.object({ + select: BudgetSelectSchema.optional(), + include: BudgetIncludeSchema.optional(), + where: BudgetWhereUniqueInputSchema, +}).strict() ; + +export const BudgetUpdateArgsSchema: z.ZodType = z.object({ + select: BudgetSelectSchema.optional(), + include: BudgetIncludeSchema.optional(), + data: z.union([ BudgetUpdateInputSchema,BudgetUncheckedUpdateInputSchema ]), + where: BudgetWhereUniqueInputSchema, +}).strict() ; + +export const BudgetUpdateManyArgsSchema: z.ZodType = z.object({ + data: z.union([ BudgetUpdateManyMutationInputSchema,BudgetUncheckedUpdateManyInputSchema ]), + where: BudgetWhereInputSchema.optional(), +}).strict() ; + +export const BudgetDeleteManyArgsSchema: z.ZodType = z.object({ + where: BudgetWhereInputSchema.optional(), +}).strict() ; + +export const BudgetPeriodConfigCreateArgsSchema: z.ZodType = z.object({ + select: BudgetPeriodConfigSelectSchema.optional(), + include: BudgetPeriodConfigIncludeSchema.optional(), + data: z.union([ BudgetPeriodConfigCreateInputSchema,BudgetPeriodConfigUncheckedCreateInputSchema ]), +}).strict() ; + +export const BudgetPeriodConfigUpsertArgsSchema: z.ZodType = z.object({ + select: BudgetPeriodConfigSelectSchema.optional(), + include: BudgetPeriodConfigIncludeSchema.optional(), + where: BudgetPeriodConfigWhereUniqueInputSchema, + create: z.union([ BudgetPeriodConfigCreateInputSchema,BudgetPeriodConfigUncheckedCreateInputSchema ]), + update: z.union([ BudgetPeriodConfigUpdateInputSchema,BudgetPeriodConfigUncheckedUpdateInputSchema ]), +}).strict() ; + +export const BudgetPeriodConfigCreateManyArgsSchema: z.ZodType = z.object({ + data: z.union([ BudgetPeriodConfigCreateManyInputSchema,BudgetPeriodConfigCreateManyInputSchema.array() ]), + skipDuplicates: z.boolean().optional(), +}).strict() ; + +export const BudgetPeriodConfigCreateManyAndReturnArgsSchema: z.ZodType = z.object({ + data: z.union([ BudgetPeriodConfigCreateManyInputSchema,BudgetPeriodConfigCreateManyInputSchema.array() ]), + skipDuplicates: z.boolean().optional(), +}).strict() ; + +export const BudgetPeriodConfigDeleteArgsSchema: z.ZodType = z.object({ + select: BudgetPeriodConfigSelectSchema.optional(), + include: BudgetPeriodConfigIncludeSchema.optional(), + where: BudgetPeriodConfigWhereUniqueInputSchema, +}).strict() ; + +export const BudgetPeriodConfigUpdateArgsSchema: z.ZodType = z.object({ + select: BudgetPeriodConfigSelectSchema.optional(), + include: BudgetPeriodConfigIncludeSchema.optional(), + data: z.union([ BudgetPeriodConfigUpdateInputSchema,BudgetPeriodConfigUncheckedUpdateInputSchema ]), + where: BudgetPeriodConfigWhereUniqueInputSchema, +}).strict() ; + +export const BudgetPeriodConfigUpdateManyArgsSchema: z.ZodType = z.object({ + data: z.union([ BudgetPeriodConfigUpdateManyMutationInputSchema,BudgetPeriodConfigUncheckedUpdateManyInputSchema ]), + where: BudgetPeriodConfigWhereInputSchema.optional(), +}).strict() ; + +export const BudgetPeriodConfigDeleteManyArgsSchema: z.ZodType = z.object({ + where: BudgetPeriodConfigWhereInputSchema.optional(), +}).strict() ; + +export const BudgetUserCreateArgsSchema: z.ZodType = z.object({ + select: BudgetUserSelectSchema.optional(), + include: BudgetUserIncludeSchema.optional(), + data: z.union([ BudgetUserCreateInputSchema,BudgetUserUncheckedCreateInputSchema ]), +}).strict() ; + +export const BudgetUserUpsertArgsSchema: z.ZodType = z.object({ + select: BudgetUserSelectSchema.optional(), + include: BudgetUserIncludeSchema.optional(), + where: BudgetUserWhereUniqueInputSchema, + create: z.union([ BudgetUserCreateInputSchema,BudgetUserUncheckedCreateInputSchema ]), + update: z.union([ BudgetUserUpdateInputSchema,BudgetUserUncheckedUpdateInputSchema ]), +}).strict() ; + +export const BudgetUserCreateManyArgsSchema: z.ZodType = z.object({ + data: z.union([ BudgetUserCreateManyInputSchema,BudgetUserCreateManyInputSchema.array() ]), + skipDuplicates: z.boolean().optional(), +}).strict() ; + +export const BudgetUserCreateManyAndReturnArgsSchema: z.ZodType = z.object({ + data: z.union([ BudgetUserCreateManyInputSchema,BudgetUserCreateManyInputSchema.array() ]), + skipDuplicates: z.boolean().optional(), +}).strict() ; + +export const BudgetUserDeleteArgsSchema: z.ZodType = z.object({ + select: BudgetUserSelectSchema.optional(), + include: BudgetUserIncludeSchema.optional(), + where: BudgetUserWhereUniqueInputSchema, +}).strict() ; + +export const BudgetUserUpdateArgsSchema: z.ZodType = z.object({ + select: BudgetUserSelectSchema.optional(), + include: BudgetUserIncludeSchema.optional(), + data: z.union([ BudgetUserUpdateInputSchema,BudgetUserUncheckedUpdateInputSchema ]), + where: BudgetUserWhereUniqueInputSchema, +}).strict() ; + +export const BudgetUserUpdateManyArgsSchema: z.ZodType = z.object({ + data: z.union([ BudgetUserUpdateManyMutationInputSchema,BudgetUserUncheckedUpdateManyInputSchema ]), + where: BudgetUserWhereInputSchema.optional(), +}).strict() ; + +export const BudgetUserDeleteManyArgsSchema: z.ZodType = z.object({ + where: BudgetUserWhereInputSchema.optional(), +}).strict() ; + +export const BudgetUserInvitationCreateArgsSchema: z.ZodType = z.object({ + select: BudgetUserInvitationSelectSchema.optional(), + include: BudgetUserInvitationIncludeSchema.optional(), + data: z.union([ BudgetUserInvitationCreateInputSchema,BudgetUserInvitationUncheckedCreateInputSchema ]), +}).strict() ; + +export const BudgetUserInvitationUpsertArgsSchema: z.ZodType = z.object({ + select: BudgetUserInvitationSelectSchema.optional(), + include: BudgetUserInvitationIncludeSchema.optional(), + where: BudgetUserInvitationWhereUniqueInputSchema, + create: z.union([ BudgetUserInvitationCreateInputSchema,BudgetUserInvitationUncheckedCreateInputSchema ]), + update: z.union([ BudgetUserInvitationUpdateInputSchema,BudgetUserInvitationUncheckedUpdateInputSchema ]), +}).strict() ; + +export const BudgetUserInvitationCreateManyArgsSchema: z.ZodType = z.object({ + data: z.union([ BudgetUserInvitationCreateManyInputSchema,BudgetUserInvitationCreateManyInputSchema.array() ]), + skipDuplicates: z.boolean().optional(), +}).strict() ; + +export const BudgetUserInvitationCreateManyAndReturnArgsSchema: z.ZodType = z.object({ + data: z.union([ BudgetUserInvitationCreateManyInputSchema,BudgetUserInvitationCreateManyInputSchema.array() ]), + skipDuplicates: z.boolean().optional(), +}).strict() ; + +export const BudgetUserInvitationDeleteArgsSchema: z.ZodType = z.object({ + select: BudgetUserInvitationSelectSchema.optional(), + include: BudgetUserInvitationIncludeSchema.optional(), + where: BudgetUserInvitationWhereUniqueInputSchema, +}).strict() ; + +export const BudgetUserInvitationUpdateArgsSchema: z.ZodType = z.object({ + select: BudgetUserInvitationSelectSchema.optional(), + include: BudgetUserInvitationIncludeSchema.optional(), + data: z.union([ BudgetUserInvitationUpdateInputSchema,BudgetUserInvitationUncheckedUpdateInputSchema ]), + where: BudgetUserInvitationWhereUniqueInputSchema, +}).strict() ; + +export const BudgetUserInvitationUpdateManyArgsSchema: z.ZodType = z.object({ + data: z.union([ BudgetUserInvitationUpdateManyMutationInputSchema,BudgetUserInvitationUncheckedUpdateManyInputSchema ]), + where: BudgetUserInvitationWhereInputSchema.optional(), +}).strict() ; + +export const BudgetUserInvitationDeleteManyArgsSchema: z.ZodType = z.object({ + where: BudgetUserInvitationWhereInputSchema.optional(), +}).strict() ; + +export const BudgetUserInvitationResponseCreateArgsSchema: z.ZodType = z.object({ + select: BudgetUserInvitationResponseSelectSchema.optional(), + include: BudgetUserInvitationResponseIncludeSchema.optional(), + data: z.union([ BudgetUserInvitationResponseCreateInputSchema,BudgetUserInvitationResponseUncheckedCreateInputSchema ]), +}).strict() ; + +export const BudgetUserInvitationResponseUpsertArgsSchema: z.ZodType = z.object({ + select: BudgetUserInvitationResponseSelectSchema.optional(), + include: BudgetUserInvitationResponseIncludeSchema.optional(), + where: BudgetUserInvitationResponseWhereUniqueInputSchema, + create: z.union([ BudgetUserInvitationResponseCreateInputSchema,BudgetUserInvitationResponseUncheckedCreateInputSchema ]), + update: z.union([ BudgetUserInvitationResponseUpdateInputSchema,BudgetUserInvitationResponseUncheckedUpdateInputSchema ]), +}).strict() ; + +export const BudgetUserInvitationResponseCreateManyArgsSchema: z.ZodType = z.object({ + data: z.union([ BudgetUserInvitationResponseCreateManyInputSchema,BudgetUserInvitationResponseCreateManyInputSchema.array() ]), + skipDuplicates: z.boolean().optional(), +}).strict() ; + +export const BudgetUserInvitationResponseCreateManyAndReturnArgsSchema: z.ZodType = z.object({ + data: z.union([ BudgetUserInvitationResponseCreateManyInputSchema,BudgetUserInvitationResponseCreateManyInputSchema.array() ]), + skipDuplicates: z.boolean().optional(), +}).strict() ; + +export const BudgetUserInvitationResponseDeleteArgsSchema: z.ZodType = z.object({ + select: BudgetUserInvitationResponseSelectSchema.optional(), + include: BudgetUserInvitationResponseIncludeSchema.optional(), + where: BudgetUserInvitationResponseWhereUniqueInputSchema, +}).strict() ; + +export const BudgetUserInvitationResponseUpdateArgsSchema: z.ZodType = z.object({ + select: BudgetUserInvitationResponseSelectSchema.optional(), + include: BudgetUserInvitationResponseIncludeSchema.optional(), + data: z.union([ BudgetUserInvitationResponseUpdateInputSchema,BudgetUserInvitationResponseUncheckedUpdateInputSchema ]), + where: BudgetUserInvitationResponseWhereUniqueInputSchema, +}).strict() ; + +export const BudgetUserInvitationResponseUpdateManyArgsSchema: z.ZodType = z.object({ + data: z.union([ BudgetUserInvitationResponseUpdateManyMutationInputSchema,BudgetUserInvitationResponseUncheckedUpdateManyInputSchema ]), + where: BudgetUserInvitationResponseWhereInputSchema.optional(), +}).strict() ; + +export const BudgetUserInvitationResponseDeleteManyArgsSchema: z.ZodType = z.object({ + where: BudgetUserInvitationResponseWhereInputSchema.optional(), +}).strict() ; + +export const TransactionCreateArgsSchema: z.ZodType = z.object({ + select: TransactionSelectSchema.optional(), + include: TransactionIncludeSchema.optional(), + data: z.union([ TransactionCreateInputSchema,TransactionUncheckedCreateInputSchema ]), +}).strict() ; + +export const TransactionUpsertArgsSchema: z.ZodType = z.object({ + select: TransactionSelectSchema.optional(), + include: TransactionIncludeSchema.optional(), + where: TransactionWhereUniqueInputSchema, + create: z.union([ TransactionCreateInputSchema,TransactionUncheckedCreateInputSchema ]), + update: z.union([ TransactionUpdateInputSchema,TransactionUncheckedUpdateInputSchema ]), +}).strict() ; + +export const TransactionCreateManyArgsSchema: z.ZodType = z.object({ + data: z.union([ TransactionCreateManyInputSchema,TransactionCreateManyInputSchema.array() ]), + skipDuplicates: z.boolean().optional(), +}).strict() ; + +export const TransactionCreateManyAndReturnArgsSchema: z.ZodType = z.object({ + data: z.union([ TransactionCreateManyInputSchema,TransactionCreateManyInputSchema.array() ]), + skipDuplicates: z.boolean().optional(), +}).strict() ; + +export const TransactionDeleteArgsSchema: z.ZodType = z.object({ + select: TransactionSelectSchema.optional(), + include: TransactionIncludeSchema.optional(), + where: TransactionWhereUniqueInputSchema, +}).strict() ; + +export const TransactionUpdateArgsSchema: z.ZodType = z.object({ + select: TransactionSelectSchema.optional(), + include: TransactionIncludeSchema.optional(), + data: z.union([ TransactionUpdateInputSchema,TransactionUncheckedUpdateInputSchema ]), + where: TransactionWhereUniqueInputSchema, +}).strict() ; + +export const TransactionUpdateManyArgsSchema: z.ZodType = z.object({ + data: z.union([ TransactionUpdateManyMutationInputSchema,TransactionUncheckedUpdateManyInputSchema ]), + where: TransactionWhereInputSchema.optional(), +}).strict() ; + +export const TransactionDeleteManyArgsSchema: z.ZodType = z.object({ + where: TransactionWhereInputSchema.optional(), +}).strict() ; + +export const CategoryCreateArgsSchema: z.ZodType = z.object({ + select: CategorySelectSchema.optional(), + include: CategoryIncludeSchema.optional(), + data: z.union([ CategoryCreateInputSchema,CategoryUncheckedCreateInputSchema ]), +}).strict() ; + +export const CategoryUpsertArgsSchema: z.ZodType = z.object({ + select: CategorySelectSchema.optional(), + include: CategoryIncludeSchema.optional(), + where: CategoryWhereUniqueInputSchema, + create: z.union([ CategoryCreateInputSchema,CategoryUncheckedCreateInputSchema ]), + update: z.union([ CategoryUpdateInputSchema,CategoryUncheckedUpdateInputSchema ]), +}).strict() ; + +export const CategoryCreateManyArgsSchema: z.ZodType = z.object({ + data: z.union([ CategoryCreateManyInputSchema,CategoryCreateManyInputSchema.array() ]), + skipDuplicates: z.boolean().optional(), +}).strict() ; + +export const CategoryCreateManyAndReturnArgsSchema: z.ZodType = z.object({ + data: z.union([ CategoryCreateManyInputSchema,CategoryCreateManyInputSchema.array() ]), + skipDuplicates: z.boolean().optional(), +}).strict() ; + +export const CategoryDeleteArgsSchema: z.ZodType = z.object({ + select: CategorySelectSchema.optional(), + include: CategoryIncludeSchema.optional(), + where: CategoryWhereUniqueInputSchema, +}).strict() ; + +export const CategoryUpdateArgsSchema: z.ZodType = z.object({ + select: CategorySelectSchema.optional(), + include: CategoryIncludeSchema.optional(), + data: z.union([ CategoryUpdateInputSchema,CategoryUncheckedUpdateInputSchema ]), + where: CategoryWhereUniqueInputSchema, +}).strict() ; + +export const CategoryUpdateManyArgsSchema: z.ZodType = z.object({ + data: z.union([ CategoryUpdateManyMutationInputSchema,CategoryUncheckedUpdateManyInputSchema ]), + where: CategoryWhereInputSchema.optional(), +}).strict() ; + +export const CategoryDeleteManyArgsSchema: z.ZodType = z.object({ + where: CategoryWhereInputSchema.optional(), }).strict() ; \ No newline at end of file diff --git a/apps/api/prisma/migrations/20240606080412_add_full_schemas/migration.sql b/apps/api/prisma/migrations/20240606080412_add_full_schemas/migration.sql new file mode 100644 index 00000000..7088b0d3 --- /dev/null +++ b/apps/api/prisma/migrations/20240606080412_add_full_schemas/migration.sql @@ -0,0 +1,183 @@ +/* + Warnings: + + - Added the required column `updatedAt` to the `User` table without a default value. This is not possible if the table is not empty. + +*/ +-- CreateEnum +CREATE TYPE "BudgetType" AS ENUM ('SPENDING', 'SAVING', 'INVESTING', 'DEBT'); + +-- CreateEnum +CREATE TYPE "BudgetPeriodType" AS ENUM ('MONTHLY', 'QUARTERLY', 'YEARLY', 'CUSTOM'); + +-- CreateEnum +CREATE TYPE "BudgetUserPermission" AS ENUM ('OWNER', 'MEMBER'); + +-- AlterTable +ALTER TABLE "User" ADD COLUMN "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, +ADD COLUMN "updatedAt" TIMESTAMP(3) NOT NULL; + +-- CreateTable +CREATE TABLE "UserWalletAccount" ( + "id" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "name" TEXT NOT NULL, + "icon" TEXT, + "description" TEXT, + "lastDigits" TEXT, + "preferredCurrency" TEXT NOT NULL, + "userId" TEXT NOT NULL, + + CONSTRAINT "UserWalletAccount_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "Budget" ( + "id" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "name" TEXT NOT NULL, + "description" TEXT, + "preferredCurrency" TEXT NOT NULL, + "type" "BudgetType" NOT NULL DEFAULT 'SPENDING', + + CONSTRAINT "Budget_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "BudgetPeriodConfig" ( + "id" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "type" "BudgetPeriodType" NOT NULL, + "amount" DECIMAL(65,30) NOT NULL, + "currency" TEXT NOT NULL, + "startDate" TIMESTAMP(3), + "endDate" TIMESTAMP(3), + "budgetId" TEXT NOT NULL, + + CONSTRAINT "BudgetPeriodConfig_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "BudgetUser" ( + "id" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "permission" "BudgetUserPermission" NOT NULL, + "userId" TEXT NOT NULL, + "budgetId" TEXT NOT NULL, + + CONSTRAINT "BudgetUser_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "BudgetUserInvitation" ( + "id" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "email" TEXT, + "token" TEXT NOT NULL, + "expiresAt" TIMESTAMP(3) NOT NULL, + "permission" "BudgetUserPermission", + "createdByUserId" TEXT NOT NULL, + "budgetId" TEXT NOT NULL, + + CONSTRAINT "BudgetUserInvitation_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "BudgetUserInvitationResponse" ( + "id" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "acceptedAt" TIMESTAMP(3), + "declinedAt" TIMESTAMP(3), + "invitationId" TEXT NOT NULL, + "createdUserId" TEXT, + + CONSTRAINT "BudgetUserInvitationResponse_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "Transaction" ( + "id" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "amount" DECIMAL(65,30) NOT NULL, + "currency" TEXT NOT NULL, + "date" TIMESTAMP(3) NOT NULL, + "note" TEXT, + "categoryId" TEXT, + "budgetId" TEXT, + "walletAccountId" TEXT NOT NULL, + "createdByUserId" TEXT NOT NULL, + + CONSTRAINT "Transaction_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "Category" ( + "id" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "name" TEXT NOT NULL, + "description" TEXT, + "icon" TEXT, + "color" TEXT, + "parentId" TEXT, + + CONSTRAINT "Category_pkey" PRIMARY KEY ("id") +); + +-- CreateIndex +CREATE UNIQUE INDEX "BudgetPeriodConfig_budgetId_key" ON "BudgetPeriodConfig"("budgetId"); + +-- CreateIndex +CREATE UNIQUE INDEX "BudgetUser_userId_budgetId_key" ON "BudgetUser"("userId", "budgetId"); + +-- CreateIndex +CREATE UNIQUE INDEX "BudgetUserInvitation_token_budgetId_key" ON "BudgetUserInvitation"("token", "budgetId"); + +-- CreateIndex +CREATE UNIQUE INDEX "BudgetUserInvitationResponse_createdUserId_key" ON "BudgetUserInvitationResponse"("createdUserId"); + +-- AddForeignKey +ALTER TABLE "UserWalletAccount" ADD CONSTRAINT "UserWalletAccount_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "BudgetPeriodConfig" ADD CONSTRAINT "BudgetPeriodConfig_budgetId_fkey" FOREIGN KEY ("budgetId") REFERENCES "Budget"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "BudgetUser" ADD CONSTRAINT "BudgetUser_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "BudgetUser" ADD CONSTRAINT "BudgetUser_budgetId_fkey" FOREIGN KEY ("budgetId") REFERENCES "Budget"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "BudgetUserInvitation" ADD CONSTRAINT "BudgetUserInvitation_createdByUserId_fkey" FOREIGN KEY ("createdByUserId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "BudgetUserInvitation" ADD CONSTRAINT "BudgetUserInvitation_budgetId_fkey" FOREIGN KEY ("budgetId") REFERENCES "Budget"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "BudgetUserInvitationResponse" ADD CONSTRAINT "BudgetUserInvitationResponse_invitationId_fkey" FOREIGN KEY ("invitationId") REFERENCES "BudgetUserInvitation"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "BudgetUserInvitationResponse" ADD CONSTRAINT "BudgetUserInvitationResponse_createdUserId_fkey" FOREIGN KEY ("createdUserId") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "Transaction" ADD CONSTRAINT "Transaction_categoryId_fkey" FOREIGN KEY ("categoryId") REFERENCES "Category"("id") ON DELETE SET NULL ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "Transaction" ADD CONSTRAINT "Transaction_budgetId_fkey" FOREIGN KEY ("budgetId") REFERENCES "Budget"("id") ON DELETE SET NULL ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "Transaction" ADD CONSTRAINT "Transaction_walletAccountId_fkey" FOREIGN KEY ("walletAccountId") REFERENCES "UserWalletAccount"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "Transaction" ADD CONSTRAINT "Transaction_createdByUserId_fkey" FOREIGN KEY ("createdByUserId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "Category" ADD CONSTRAINT "Category_parentId_fkey" FOREIGN KEY ("parentId") REFERENCES "Category"("id") ON DELETE SET NULL ON UPDATE CASCADE; diff --git a/apps/api/prisma/schema.prisma b/apps/api/prisma/schema.prisma index 9dbe5d54..86e86d63 100644 --- a/apps/api/prisma/schema.prisma +++ b/apps/api/prisma/schema.prisma @@ -14,7 +14,165 @@ datasource db { } model User { - id String @id @default(cuid()) - email String @unique - name String? + id String @id @default(cuid()) + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + + email String @unique + name String? + walletAccounts UserWalletAccount[] + budgetUsers BudgetUser[] + transactions Transaction[] + createdBudgetUserInvitations BudgetUserInvitation[] + createdFromInvitation BudgetUserInvitationResponse? +} + +model UserWalletAccount { + id String @id @default(cuid()) + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + + name String + icon String? + description String? + lastDigits String? + preferredCurrency String + + userId String + user User @relation(fields: [userId], references: [id]) + transactions Transaction[] +} + +model Budget { + id String @id @default(cuid()) + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + + name String + description String? + preferredCurrency String + type BudgetType @default(SPENDING) + + periodConfig BudgetPeriodConfig? + budgetUsers BudgetUser[] + transactions Transaction[] + invitations BudgetUserInvitation[] +} + +enum BudgetType { + SPENDING + SAVING + INVESTING + DEBT +} + +model BudgetPeriodConfig { + id String @id @default(cuid()) + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + + type BudgetPeriodType + amount Decimal + currency String + startDate DateTime? + endDate DateTime? + + budget Budget @relation(fields: [budgetId], references: [id], onDelete: Cascade) + budgetId String @unique +} + +enum BudgetPeriodType { + MONTHLY + QUARTERLY + YEARLY + CUSTOM +} + +model BudgetUser { + id String @id @default(cuid()) + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + + permission BudgetUserPermission + + userId String + user User @relation(fields: [userId], references: [id]) + budgetId String + budget Budget @relation(fields: [budgetId], references: [id]) + + @@unique([userId, budgetId]) +} + +enum BudgetUserPermission { + OWNER + MEMBER +} + +model BudgetUserInvitation { + id String @id @default(cuid()) + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + + email String? + token String @default(uuid()) + expiresAt DateTime + permission BudgetUserPermission? + + createdByUserId String + createdByUser User @relation(fields: [createdByUserId], references: [id]) + budgetId String + budget Budget @relation(fields: [budgetId], references: [id], onDelete: Cascade) + responses BudgetUserInvitationResponse[] + + @@unique([token, budgetId]) +} + +model BudgetUserInvitationResponse { + id String @id @default(cuid()) + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + + acceptedAt DateTime? + declinedAt DateTime? + + invitationId String + invitation BudgetUserInvitation @relation(fields: [invitationId], references: [id]) + createdUserId String? @unique + createdUser User? @relation(fields: [createdUserId], references: [id]) +} + +model Transaction { + id String @id @default(cuid()) + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + + amount Decimal + currency String + date DateTime + note String? + + categoryId String? + category Category? @relation(fields: [categoryId], references: [id], onDelete: SetNull) + budgetId String? + budget Budget? @relation(fields: [budgetId], references: [id]) + walletAccountId String + walletAccount UserWalletAccount @relation(fields: [walletAccountId], references: [id]) + createdByUserId String + createdByUser User @relation(fields: [createdByUserId], references: [id]) +} + +model Category { + id String @id @default(cuid()) + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + + name String + description String? + icon String? + color String? + + parent Category? @relation("CategoryToCategory", fields: [parentId], references: [id], onDelete: SetNull) + parentId String? + children Category[] @relation("CategoryToCategory") + transactions Transaction[] }