diff --git a/prisma/postgres/generated/prisma/client/postgres/browser.ts b/prisma/postgres/generated/prisma/client/postgres/browser.ts index 38b7d62..fe780ad 100644 --- a/prisma/postgres/generated/prisma/client/postgres/browser.ts +++ b/prisma/postgres/generated/prisma/client/postgres/browser.ts @@ -97,21 +97,6 @@ export type OAuthSessions = Prisma.OAuthSessionsModel * */ export type Sessions = Prisma.SessionsModel -/** - * Model Blobs - * - */ -export type Blobs = Prisma.BlobsModel -/** - * Model Attachments - * - */ -export type Attachments = Prisma.AttachmentsModel -/** - * Model AttachmentVariants - * - */ -export type AttachmentVariants = Prisma.AttachmentVariantsModel /** * Model Preferences * diff --git a/prisma/postgres/generated/prisma/client/postgres/client.ts b/prisma/postgres/generated/prisma/client/postgres/client.ts index 068e1b7..9c48901 100644 --- a/prisma/postgres/generated/prisma/client/postgres/client.ts +++ b/prisma/postgres/generated/prisma/client/postgres/client.ts @@ -117,21 +117,6 @@ export type OAuthSessions = Prisma.OAuthSessionsModel * */ export type Sessions = Prisma.SessionsModel -/** - * Model Blobs - * - */ -export type Blobs = Prisma.BlobsModel -/** - * Model Attachments - * - */ -export type Attachments = Prisma.AttachmentsModel -/** - * Model AttachmentVariants - * - */ -export type AttachmentVariants = Prisma.AttachmentVariantsModel /** * Model Preferences * diff --git a/prisma/postgres/generated/prisma/client/postgres/commonInputTypes.ts b/prisma/postgres/generated/prisma/client/postgres/commonInputTypes.ts index ce15478..b07cbd4 100644 --- a/prisma/postgres/generated/prisma/client/postgres/commonInputTypes.ts +++ b/prisma/postgres/generated/prisma/client/postgres/commonInputTypes.ts @@ -402,40 +402,6 @@ export type JsonWithAggregatesFilterBase<$PrismaModel = never> = { _max?: Prisma.NestedJsonFilter<$PrismaModel> } -export type EnumAttachmentStatusFilter<$PrismaModel = never> = { - equals?: $Enums.AttachmentStatus | Prisma.EnumAttachmentStatusFieldRefInput<$PrismaModel> - in?: $Enums.AttachmentStatus[] | Prisma.ListEnumAttachmentStatusFieldRefInput<$PrismaModel> - notIn?: $Enums.AttachmentStatus[] | Prisma.ListEnumAttachmentStatusFieldRefInput<$PrismaModel> - not?: Prisma.NestedEnumAttachmentStatusFilter<$PrismaModel> | $Enums.AttachmentStatus -} - -export type EnumRetentionPolicyFilter<$PrismaModel = never> = { - equals?: $Enums.RetentionPolicy | Prisma.EnumRetentionPolicyFieldRefInput<$PrismaModel> - in?: $Enums.RetentionPolicy[] | Prisma.ListEnumRetentionPolicyFieldRefInput<$PrismaModel> - notIn?: $Enums.RetentionPolicy[] | Prisma.ListEnumRetentionPolicyFieldRefInput<$PrismaModel> - not?: Prisma.NestedEnumRetentionPolicyFilter<$PrismaModel> | $Enums.RetentionPolicy -} - -export type EnumAttachmentStatusWithAggregatesFilter<$PrismaModel = never> = { - equals?: $Enums.AttachmentStatus | Prisma.EnumAttachmentStatusFieldRefInput<$PrismaModel> - in?: $Enums.AttachmentStatus[] | Prisma.ListEnumAttachmentStatusFieldRefInput<$PrismaModel> - notIn?: $Enums.AttachmentStatus[] | Prisma.ListEnumAttachmentStatusFieldRefInput<$PrismaModel> - not?: Prisma.NestedEnumAttachmentStatusWithAggregatesFilter<$PrismaModel> | $Enums.AttachmentStatus - _count?: Prisma.NestedIntFilter<$PrismaModel> - _min?: Prisma.NestedEnumAttachmentStatusFilter<$PrismaModel> - _max?: Prisma.NestedEnumAttachmentStatusFilter<$PrismaModel> -} - -export type EnumRetentionPolicyWithAggregatesFilter<$PrismaModel = never> = { - equals?: $Enums.RetentionPolicy | Prisma.EnumRetentionPolicyFieldRefInput<$PrismaModel> - in?: $Enums.RetentionPolicy[] | Prisma.ListEnumRetentionPolicyFieldRefInput<$PrismaModel> - notIn?: $Enums.RetentionPolicy[] | Prisma.ListEnumRetentionPolicyFieldRefInput<$PrismaModel> - not?: Prisma.NestedEnumRetentionPolicyWithAggregatesFilter<$PrismaModel> | $Enums.RetentionPolicy - _count?: Prisma.NestedIntFilter<$PrismaModel> - _min?: Prisma.NestedEnumRetentionPolicyFilter<$PrismaModel> - _max?: Prisma.NestedEnumRetentionPolicyFilter<$PrismaModel> -} - export type BoolNullableFilter<$PrismaModel = never> = { equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> | null not?: Prisma.NestedBoolNullableFilter<$PrismaModel> | boolean | null @@ -837,40 +803,6 @@ export type NestedJsonFilterBase<$PrismaModel = never> = { not?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter } -export type NestedEnumAttachmentStatusFilter<$PrismaModel = never> = { - equals?: $Enums.AttachmentStatus | Prisma.EnumAttachmentStatusFieldRefInput<$PrismaModel> - in?: $Enums.AttachmentStatus[] | Prisma.ListEnumAttachmentStatusFieldRefInput<$PrismaModel> - notIn?: $Enums.AttachmentStatus[] | Prisma.ListEnumAttachmentStatusFieldRefInput<$PrismaModel> - not?: Prisma.NestedEnumAttachmentStatusFilter<$PrismaModel> | $Enums.AttachmentStatus -} - -export type NestedEnumRetentionPolicyFilter<$PrismaModel = never> = { - equals?: $Enums.RetentionPolicy | Prisma.EnumRetentionPolicyFieldRefInput<$PrismaModel> - in?: $Enums.RetentionPolicy[] | Prisma.ListEnumRetentionPolicyFieldRefInput<$PrismaModel> - notIn?: $Enums.RetentionPolicy[] | Prisma.ListEnumRetentionPolicyFieldRefInput<$PrismaModel> - not?: Prisma.NestedEnumRetentionPolicyFilter<$PrismaModel> | $Enums.RetentionPolicy -} - -export type NestedEnumAttachmentStatusWithAggregatesFilter<$PrismaModel = never> = { - equals?: $Enums.AttachmentStatus | Prisma.EnumAttachmentStatusFieldRefInput<$PrismaModel> - in?: $Enums.AttachmentStatus[] | Prisma.ListEnumAttachmentStatusFieldRefInput<$PrismaModel> - notIn?: $Enums.AttachmentStatus[] | Prisma.ListEnumAttachmentStatusFieldRefInput<$PrismaModel> - not?: Prisma.NestedEnumAttachmentStatusWithAggregatesFilter<$PrismaModel> | $Enums.AttachmentStatus - _count?: Prisma.NestedIntFilter<$PrismaModel> - _min?: Prisma.NestedEnumAttachmentStatusFilter<$PrismaModel> - _max?: Prisma.NestedEnumAttachmentStatusFilter<$PrismaModel> -} - -export type NestedEnumRetentionPolicyWithAggregatesFilter<$PrismaModel = never> = { - equals?: $Enums.RetentionPolicy | Prisma.EnumRetentionPolicyFieldRefInput<$PrismaModel> - in?: $Enums.RetentionPolicy[] | Prisma.ListEnumRetentionPolicyFieldRefInput<$PrismaModel> - notIn?: $Enums.RetentionPolicy[] | Prisma.ListEnumRetentionPolicyFieldRefInput<$PrismaModel> - not?: Prisma.NestedEnumRetentionPolicyWithAggregatesFilter<$PrismaModel> | $Enums.RetentionPolicy - _count?: Prisma.NestedIntFilter<$PrismaModel> - _min?: Prisma.NestedEnumRetentionPolicyFilter<$PrismaModel> - _max?: Prisma.NestedEnumRetentionPolicyFilter<$PrismaModel> -} - export type NestedBoolNullableFilter<$PrismaModel = never> = { equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> | null not?: Prisma.NestedBoolNullableFilter<$PrismaModel> | boolean | null diff --git a/prisma/postgres/generated/prisma/client/postgres/internal/class.ts b/prisma/postgres/generated/prisma/client/postgres/internal/class.ts index 074b47b..eb335b9 100644 --- a/prisma/postgres/generated/prisma/client/postgres/internal/class.ts +++ b/prisma/postgres/generated/prisma/client/postgres/internal/class.ts @@ -22,7 +22,7 @@ const config: runtime.GetPrismaClientConfig = { "clientVersion": "7.3.0", "engineVersion": "9d6ad21cbbceab97458517b147a6a09ff43aa735", "activeProvider": "postgresql", - "inlineSchema": "generator client {\n provider = \"prisma-client\"\n output = \"generated/prisma/client/postgres\"\n previewFeatures = [\"views\"]\n}\n\ndatasource db {\n provider = \"postgresql\"\n}\n\nmodel Users {\n id String @id @default(dbgenerated(\"gen_random_uuid()\")) @db.Uuid\n first_name String\n last_name String\n email String @unique\n phone_number String\n residence String?\n role Roles @default(EMPLOYEE)\n employee Employees? @relation(\"UserEmployee\")\n oauth_sessions OAuthSessions[] @relation(\"UserOAuthSessions\")\n preferences Preferences? @relation(\"UserPreferences\")\n user_module_access userModuleAccess? @relation(\"UserModuleAccess\")\n\n @@map(\"users\")\n}\n\nmodel userModuleAccess {\n id Int @id @default(autoincrement())\n user_id String @unique @db.Uuid\n timesheets Boolean @default(true)\n timesheets_approval Boolean @default(false)\n employee_list Boolean @default(true)\n employee_management Boolean @default(false)\n personal_profile Boolean @default(true)\n dashboard Boolean @default(true)\n chatbot Boolean @default(false)\n user Users @relation(\"UserModuleAccess\", fields: [user_id], references: [id])\n\n @@map(\"user_module_access\")\n}\n\nmodel Employees {\n id Int @id @default(autoincrement())\n user_id String @unique @db.Uuid\n external_payroll_id Int\n company_code Int\n daily_expected_hours Int\n first_work_day DateTime @db.Date\n last_work_day DateTime? @db.Date\n supervisor_id Int?\n job_title String?\n is_supervisor Boolean @default(false)\n // banked_hour_limit Int @default(0) //will need to be implemented in the future\n schedule_preset_id Int?\n schedule_preset SchedulePresets? @relation(\"EmployeesSchedulePreset\", fields: [schedule_preset_id], references: [id])\n supervisor Employees? @relation(\"EmployeeSupervisor\", fields: [supervisor_id], references: [id])\n crew Employees[] @relation(\"EmployeeSupervisor\")\n user Users @relation(\"UserEmployee\", fields: [user_id], references: [id])\n leave_request LeaveRequests[] @relation(\"LeaveRequestEmployee\")\n timesheet Timesheets[] @relation(\"TimesheetEmployee\")\n paid_time_off PaidTimeOff? @relation(\"EmployeePaidTimeOff\")\n\n @@map(\"employees\")\n}\n\nmodel LeaveRequests {\n id Int @id @default(autoincrement())\n employee_id Int\n leave_type LeaveTypes\n comment String\n approval_status LeaveApprovalStatus @default(PENDING)\n bank_code_id Int\n payable_hours Decimal? @db.Decimal(5, 2)\n requested_hours Decimal? @db.Decimal(5, 2)\n dates DateTime[] @db.Date\n bank_code BankCodes @relation(\"LeaveRequestBankCodes\", fields: [bank_code_id], references: [id])\n employee Employees @relation(\"LeaveRequestEmployee\", fields: [employee_id], references: [id])\n archive LeaveRequestsArchive? @relation(\"LeaveRequestToArchive\")\n\n @@unique([employee_id, leave_type, dates], name: \"leave_per_employee_date\")\n @@index([employee_id, dates])\n @@map(\"leave_requests\")\n}\n\nmodel LeaveRequestsArchive {\n id Int @id @default(autoincrement())\n leave_request_id Int @unique\n archived_at DateTime @default(now())\n employee_id Int\n leave_type LeaveTypes\n comment String\n approval_status LeaveApprovalStatus\n date DateTime @db.Date\n payable_hours Decimal? @db.Decimal(5, 2)\n requested_hours Decimal? @db.Decimal(5, 2)\n leave_request LeaveRequests @relation(\"LeaveRequestToArchive\", fields: [leave_request_id], references: [id])\n\n @@index([employee_id, date])\n @@map(\"leave_requests_archive\")\n}\n\nmodel Timesheets {\n id Int @id @default(autoincrement())\n employee_id Int\n is_approved Boolean @default(false)\n start_date DateTime @db.Date\n // hours_to_bank Decimal? @db.Decimal(5, 2) //will need to be implemented in the future\n expense Expenses[] @relation(\"ExpensesTimesheet\")\n shift Shifts[] @relation(\"ShiftTimesheet\")\n employee Employees @relation(\"TimesheetEmployee\", fields: [employee_id], references: [id])\n archive TimesheetsArchive[] @relation(\"TimesheetsToArchive\")\n\n // @@unique([employee_id, start_date], name: \"employee_id_start_date\")\n @@map(\"timesheets\")\n}\n\nmodel TimesheetsArchive {\n id Int @id @default(autoincrement())\n timesheet_id Int\n archive_at DateTime @default(now())\n employee_id Int\n is_approved Boolean\n timesheet Timesheets @relation(\"TimesheetsToArchive\", fields: [timesheet_id], references: [id])\n\n @@map(\"timesheets_archive\")\n}\n\nmodel SchedulePresets {\n id Int @id @default(autoincrement())\n name String\n is_default Boolean @default(false)\n employees Employees[] @relation(\"EmployeesSchedulePreset\")\n shifts SchedulePresetShifts[] @relation(\"SchedulePresetShiftsSchedulePreset\")\n\n @@map(\"schedule_presets\")\n}\n\nmodel SchedulePresetShifts {\n id Int @id @default(autoincrement())\n preset_id Int\n bank_code_id Int\n\n start_time DateTime @db.Time(0)\n end_time DateTime @db.Time(0)\n is_remote Boolean @default(false)\n week_day Weekday\n bank_code BankCodes @relation(\"SchedulePresetShiftsBankCodes\", fields: [bank_code_id], references: [id])\n preset SchedulePresets @relation(\"SchedulePresetShiftsSchedulePreset\", fields: [preset_id], references: [id])\n\n @@index([preset_id, week_day])\n @@map(\"schedule_preset_shifts\")\n}\n\nmodel Shifts {\n id Int @id @default(autoincrement())\n timesheet_id Int\n date DateTime @db.Date\n start_time DateTime @db.Time(0)\n end_time DateTime @db.Time(0)\n bank_code_id Int\n is_approved Boolean @default(false)\n is_remote Boolean @default(false)\n comment String?\n bank_code BankCodes @relation(\"ShiftBankCodes\", fields: [bank_code_id], references: [id])\n timesheet Timesheets @relation(\"ShiftTimesheet\", fields: [timesheet_id], references: [id])\n archive ShiftsArchive[] @relation(\"ShiftsToArchive\")\n\n // @@unique([timesheet_id, date, start_time], name: \"unique_ts_id_date_start_time\")\n @@map(\"shifts\")\n}\n\nmodel ShiftsArchive {\n id Int @id @default(autoincrement())\n shift_id Int\n archive_at DateTime @default(now())\n timesheet_id Int\n date DateTime @db.Date\n start_time DateTime @db.Time(0)\n end_time DateTime @db.Time(0)\n bank_code_id Int\n comment String?\n shift Shifts @relation(\"ShiftsToArchive\", fields: [shift_id], references: [id])\n\n @@map(\"shifts_archive\")\n}\n\nmodel BankCodes {\n id Int @id @default(autoincrement())\n type String\n categorie String\n modifier Float\n bank_code String\n expenses Expenses[] @relation(\"ExpenseBankCodes\")\n leaveRequests LeaveRequests[] @relation(\"LeaveRequestBankCodes\")\n SchedulePresetShifts SchedulePresetShifts[] @relation(\"SchedulePresetShiftsBankCodes\")\n shifts Shifts[] @relation(\"ShiftBankCodes\")\n\n @@map(\"bank_codes\")\n}\n\nmodel Expenses {\n id Int @id @default(autoincrement())\n timesheet_id Int\n date DateTime @db.Date\n amount Decimal? @db.Decimal(12, 2)\n is_approved Boolean @default(false)\n supervisor_comment String?\n bank_code_id Int\n comment String\n attachment Int?\n mileage Decimal? @db.Decimal(12, 2)\n attachment_record Attachments? @relation(\"ExpenseAttachment\", fields: [attachment], references: [id])\n bank_code BankCodes @relation(\"ExpenseBankCodes\", fields: [bank_code_id], references: [id])\n timesheet Timesheets @relation(\"ExpensesTimesheet\", fields: [timesheet_id], references: [id])\n archive ExpensesArchive[] @relation(\"ExpensesToArchive\")\n\n @@unique([timesheet_id, date, amount, mileage], name: \"unique_ts_id_date_amount_mileage\")\n @@map(\"expenses\")\n}\n\nmodel ExpensesArchive {\n id Int @id @default(autoincrement())\n expense_id Int\n timesheet_id Int\n archived_at DateTime @default(now())\n date DateTime @db.Date\n amount Decimal? @db.Decimal(12, 2)\n is_approved Boolean\n supervisor_comment String?\n bank_code_id Int\n comment String?\n attachment Int?\n mileage Decimal? @db.Decimal(12, 2)\n attachment_record Attachments? @relation(\"ExpenseArchiveAttachment\", fields: [attachment], references: [id])\n expense Expenses @relation(\"ExpensesToArchive\", fields: [expense_id], references: [id])\n\n @@map(\"expenses_archive\")\n}\n\nmodel OAuthSessions {\n id String @id @default(cuid())\n user_id String @db.Uuid\n application String\n access_token String @unique\n refresh_token String @unique\n access_token_expiry DateTime\n refresh_token_expiry DateTime?\n is_revoked Boolean @default(false)\n scopes Json @default(\"[]\")\n created_at DateTime @default(now())\n updated_at DateTime?\n sid String @unique\n user Users @relation(\"UserOAuthSessions\", fields: [user_id], references: [id])\n\n @@map(\"oauth_sessions\")\n}\n\nmodel Sessions {\n id String @id\n sid String @unique\n data String\n expiresAt DateTime\n\n @@map(\"sessions\")\n}\n\nmodel Blobs {\n sha256 String @id @db.Char(64)\n size Int\n mime String\n storage_path String\n refcount Int @default(0)\n created_at DateTime @default(now())\n attachments Attachments[] @relation(\"AttachmnentBlob\")\n\n @@map(\"blobs\")\n}\n\nmodel Attachments {\n id Int @id @default(autoincrement())\n sha256 String @db.Char(64)\n owner_type String\n owner_id String\n status AttachmentStatus @default(ACTIVE)\n created_by String\n created_at DateTime @default(now())\n original_name String\n retention_policy RetentionPolicy\n AttachmentVariants AttachmentVariants[] @relation(\"attachmentVariantAttachment\")\n blob Blobs @relation(\"AttachmnentBlob\", fields: [sha256], references: [sha256])\n expenses Expenses[] @relation(\"ExpenseAttachment\")\n expenses_archive ExpensesArchive[] @relation(\"ExpenseArchiveAttachment\")\n\n @@index([owner_type, owner_id, created_at])\n @@index([sha256])\n @@map(\"attachments\")\n}\n\nmodel AttachmentVariants {\n id Int @id @default(autoincrement())\n attachment_id Int\n variant String\n bytes Int\n width Int?\n height Int?\n created_at DateTime @default(now())\n path String\n attachment Attachments @relation(\"attachmentVariantAttachment\", fields: [attachment_id], references: [id], onDelete: Cascade)\n\n @@unique([attachment_id, variant])\n @@map(\"attachment_variants\")\n}\n\nmodel Preferences {\n user_id String @unique @db.Uuid\n id Int @id @default(autoincrement())\n display_language String @default(\"fr-FR\")\n is_dark_mode Boolean? @default(false)\n is_employee_list_grid Boolean @default(true)\n is_lefty_mode Boolean @default(false)\n is_timesheet_approval_grid Boolean @default(true)\n notifications Boolean @default(true)\n user Users @relation(\"UserPreferences\", fields: [user_id], references: [id])\n\n @@map(\"preferences\")\n}\n\nmodel PaidTimeOff {\n id Int @id @default(autoincrement())\n employee_id Int @unique\n vacation_hours Decimal @default(0) @db.Decimal(12, 2)\n banked_hours Decimal @default(0) @db.Decimal(12, 2)\n sick_hours Decimal @default(0) @db.Decimal(12, 2)\n last_updated DateTime? @db.Date\n\n employee Employees @relation(\"EmployeePaidTimeOff\", fields: [employee_id], references: [id])\n\n @@map(\"paid_time_off\")\n}\n\nview PayPeriods {\n pay_year Int\n pay_period_no Int\n period_start DateTime @db.Date\n period_end DateTime @db.Date\n payday DateTime @db.Date\n label String\n\n @@map(\"pay_period\")\n}\n\nenum AttachmentStatus {\n ACTIVE\n DELETED\n}\n\nenum RetentionPolicy {\n EXPENSE_7Y\n TICKET_2Y\n PROFILE_KEEP_LAST3\n}\n\nenum Roles {\n ADMIN\n SUPERVISOR\n HR\n ACCOUNTING\n EMPLOYEE\n DEALER\n CUSTOMER\n GUEST\n\n @@map(\"roles\")\n}\n\nenum Modules {\n timesheets\n timesheets_approval\n employee_list\n employee_management\n personal_profile\n dashboard\n chatbot\n\n @@map(\"modules\")\n}\n\nenum LeaveTypes {\n SICK\n VACATION\n UNPAID\n BEREAVEMENT\n PARENTAL\n LEGAL\n WEDDING\n HOLIDAY\n\n @@map(\"leave_types\")\n}\n\nenum LeaveApprovalStatus {\n PENDING\n APPROVED\n DENIED\n CANCELLED\n ESCALATED\n\n @@map(\"leave_approval_status\")\n}\n\nenum Weekday {\n SUN\n MON\n TUE\n WED\n THU\n FRI\n SAT\n}\n", + "inlineSchema": "generator client {\n provider = \"prisma-client\"\n output = \"generated/prisma/client/postgres\"\n previewFeatures = [\"views\"]\n}\n\ndatasource db {\n provider = \"postgresql\"\n}\n\nmodel Users {\n id String @id @default(dbgenerated(\"gen_random_uuid()\")) @db.Uuid\n first_name String\n last_name String\n email String @unique\n phone_number String\n residence String?\n role Roles @default(EMPLOYEE)\n employee Employees? @relation(\"UserEmployee\")\n oauth_sessions OAuthSessions[] @relation(\"UserOAuthSessions\")\n preferences Preferences? @relation(\"UserPreferences\")\n user_module_access userModuleAccess? @relation(\"UserModuleAccess\")\n\n @@map(\"users\")\n}\n\nmodel userModuleAccess {\n id Int @id @default(autoincrement())\n user_id String @unique @db.Uuid\n timesheets Boolean @default(true)\n timesheets_approval Boolean @default(false)\n employee_list Boolean @default(true)\n employee_management Boolean @default(false)\n personal_profile Boolean @default(true)\n dashboard Boolean @default(true)\n chatbot Boolean @default(false)\n user Users @relation(\"UserModuleAccess\", fields: [user_id], references: [id])\n\n @@map(\"user_module_access\")\n}\n\nmodel Employees {\n id Int @id @default(autoincrement())\n user_id String @unique @db.Uuid\n external_payroll_id Int\n company_code Int\n daily_expected_hours Int\n first_work_day DateTime @db.Date\n last_work_day DateTime? @db.Date\n supervisor_id Int?\n job_title String?\n is_supervisor Boolean @default(false)\n // banked_hour_limit Int @default(0) //will need to be implemented in the future\n schedule_preset_id Int?\n schedule_preset SchedulePresets? @relation(\"EmployeesSchedulePreset\", fields: [schedule_preset_id], references: [id])\n supervisor Employees? @relation(\"EmployeeSupervisor\", fields: [supervisor_id], references: [id])\n crew Employees[] @relation(\"EmployeeSupervisor\")\n user Users @relation(\"UserEmployee\", fields: [user_id], references: [id])\n leave_request LeaveRequests[] @relation(\"LeaveRequestEmployee\")\n timesheet Timesheets[] @relation(\"TimesheetEmployee\")\n paid_time_off PaidTimeOff? @relation(\"EmployeePaidTimeOff\")\n\n @@map(\"employees\")\n}\n\nmodel LeaveRequests {\n id Int @id @default(autoincrement())\n employee_id Int\n leave_type LeaveTypes\n comment String\n approval_status LeaveApprovalStatus @default(PENDING)\n bank_code_id Int\n payable_hours Decimal? @db.Decimal(5, 2)\n requested_hours Decimal? @db.Decimal(5, 2)\n dates DateTime[] @db.Date\n bank_code BankCodes @relation(\"LeaveRequestBankCodes\", fields: [bank_code_id], references: [id])\n employee Employees @relation(\"LeaveRequestEmployee\", fields: [employee_id], references: [id])\n archive LeaveRequestsArchive? @relation(\"LeaveRequestToArchive\")\n\n @@unique([employee_id, leave_type, dates], name: \"leave_per_employee_date\")\n @@index([employee_id, dates])\n @@map(\"leave_requests\")\n}\n\nmodel LeaveRequestsArchive {\n id Int @id @default(autoincrement())\n leave_request_id Int @unique\n archived_at DateTime @default(now())\n employee_id Int\n leave_type LeaveTypes\n comment String\n approval_status LeaveApprovalStatus\n date DateTime @db.Date\n payable_hours Decimal? @db.Decimal(5, 2)\n requested_hours Decimal? @db.Decimal(5, 2)\n leave_request LeaveRequests @relation(\"LeaveRequestToArchive\", fields: [leave_request_id], references: [id])\n\n @@index([employee_id, date])\n @@map(\"leave_requests_archive\")\n}\n\nmodel Timesheets {\n id Int @id @default(autoincrement())\n employee_id Int\n is_approved Boolean @default(false)\n start_date DateTime @db.Date\n // hours_to_bank Decimal? @db.Decimal(5, 2) //will need to be implemented in the future\n expense Expenses[] @relation(\"ExpensesTimesheet\")\n shift Shifts[] @relation(\"ShiftTimesheet\")\n employee Employees @relation(\"TimesheetEmployee\", fields: [employee_id], references: [id])\n archive TimesheetsArchive[] @relation(\"TimesheetsToArchive\")\n\n // @@unique([employee_id, start_date], name: \"employee_id_start_date\")\n @@map(\"timesheets\")\n}\n\nmodel TimesheetsArchive {\n id Int @id @default(autoincrement())\n timesheet_id Int\n archive_at DateTime @default(now())\n employee_id Int\n is_approved Boolean\n timesheet Timesheets @relation(\"TimesheetsToArchive\", fields: [timesheet_id], references: [id])\n\n @@map(\"timesheets_archive\")\n}\n\nmodel SchedulePresets {\n id Int @id @default(autoincrement())\n name String\n is_default Boolean @default(false)\n employees Employees[] @relation(\"EmployeesSchedulePreset\")\n shifts SchedulePresetShifts[] @relation(\"SchedulePresetShiftsSchedulePreset\")\n\n @@map(\"schedule_presets\")\n}\n\nmodel SchedulePresetShifts {\n id Int @id @default(autoincrement())\n preset_id Int\n bank_code_id Int\n\n start_time DateTime @db.Time(0)\n end_time DateTime @db.Time(0)\n is_remote Boolean @default(false)\n week_day Weekday\n bank_code BankCodes @relation(\"SchedulePresetShiftsBankCodes\", fields: [bank_code_id], references: [id])\n preset SchedulePresets @relation(\"SchedulePresetShiftsSchedulePreset\", fields: [preset_id], references: [id])\n\n @@index([preset_id, week_day])\n @@map(\"schedule_preset_shifts\")\n}\n\nmodel Shifts {\n id Int @id @default(autoincrement())\n timesheet_id Int\n date DateTime @db.Date\n start_time DateTime @db.Time(0)\n end_time DateTime @db.Time(0)\n bank_code_id Int\n is_approved Boolean @default(false)\n is_remote Boolean @default(false)\n comment String?\n bank_code BankCodes @relation(\"ShiftBankCodes\", fields: [bank_code_id], references: [id])\n timesheet Timesheets @relation(\"ShiftTimesheet\", fields: [timesheet_id], references: [id])\n archive ShiftsArchive[] @relation(\"ShiftsToArchive\")\n\n // @@unique([timesheet_id, date, start_time], name: \"unique_ts_id_date_start_time\")\n @@map(\"shifts\")\n}\n\nmodel ShiftsArchive {\n id Int @id @default(autoincrement())\n shift_id Int\n archive_at DateTime @default(now())\n timesheet_id Int\n date DateTime @db.Date\n start_time DateTime @db.Time(0)\n end_time DateTime @db.Time(0)\n bank_code_id Int\n comment String?\n shift Shifts @relation(\"ShiftsToArchive\", fields: [shift_id], references: [id])\n\n @@map(\"shifts_archive\")\n}\n\nmodel BankCodes {\n id Int @id @default(autoincrement())\n type String\n categorie String\n modifier Float\n bank_code String\n expenses Expenses[] @relation(\"ExpenseBankCodes\")\n leaveRequests LeaveRequests[] @relation(\"LeaveRequestBankCodes\")\n SchedulePresetShifts SchedulePresetShifts[] @relation(\"SchedulePresetShiftsBankCodes\")\n shifts Shifts[] @relation(\"ShiftBankCodes\")\n\n @@map(\"bank_codes\")\n}\n\nmodel Expenses {\n id Int @id @default(autoincrement())\n timesheet_id Int\n date DateTime @db.Date\n amount Decimal? @db.Decimal(12, 2)\n is_approved Boolean @default(false)\n supervisor_comment String?\n bank_code_id Int\n comment String\n attachment_key String?\n attachment_name String?\n mileage Decimal? @db.Decimal(12, 2)\n bank_code BankCodes @relation(\"ExpenseBankCodes\", fields: [bank_code_id], references: [id])\n timesheet Timesheets @relation(\"ExpensesTimesheet\", fields: [timesheet_id], references: [id])\n archive ExpensesArchive[] @relation(\"ExpensesToArchive\")\n\n @@unique([timesheet_id, date, amount, mileage], name: \"unique_ts_id_date_amount_mileage\")\n @@map(\"expenses\")\n}\n\nmodel ExpensesArchive {\n id Int @id @default(autoincrement())\n expense_id Int\n timesheet_id Int\n archived_at DateTime @default(now())\n date DateTime @db.Date\n amount Decimal? @db.Decimal(12, 2)\n is_approved Boolean\n supervisor_comment String?\n bank_code_id Int\n comment String?\n mileage Decimal? @db.Decimal(12, 2)\n expense Expenses @relation(\"ExpensesToArchive\", fields: [expense_id], references: [id])\n\n @@map(\"expenses_archive\")\n}\n\nmodel OAuthSessions {\n id String @id @default(cuid())\n user_id String @db.Uuid\n application String\n access_token String @unique\n refresh_token String @unique\n access_token_expiry DateTime\n refresh_token_expiry DateTime?\n is_revoked Boolean @default(false)\n scopes Json @default(\"[]\")\n created_at DateTime @default(now())\n updated_at DateTime?\n sid String @unique\n user Users @relation(\"UserOAuthSessions\", fields: [user_id], references: [id])\n\n @@map(\"oauth_sessions\")\n}\n\nmodel Sessions {\n id String @id\n sid String @unique\n data String\n expiresAt DateTime\n\n @@map(\"sessions\")\n}\n\nmodel Preferences {\n user_id String @unique @db.Uuid\n id Int @id @default(autoincrement())\n display_language String @default(\"fr-FR\")\n is_dark_mode Boolean? @default(false)\n is_employee_list_grid Boolean @default(true)\n is_lefty_mode Boolean @default(false)\n is_timesheet_approval_grid Boolean @default(true)\n notifications Boolean @default(true)\n user Users @relation(\"UserPreferences\", fields: [user_id], references: [id])\n\n @@map(\"preferences\")\n}\n\nmodel PaidTimeOff {\n id Int @id @default(autoincrement())\n employee_id Int @unique\n vacation_hours Decimal @default(0) @db.Decimal(12, 2)\n banked_hours Decimal @default(0) @db.Decimal(12, 2)\n sick_hours Decimal @default(0) @db.Decimal(12, 2)\n last_updated DateTime? @db.Date\n\n employee Employees @relation(\"EmployeePaidTimeOff\", fields: [employee_id], references: [id])\n\n @@map(\"paid_time_off\")\n}\n\nview PayPeriods {\n pay_year Int\n pay_period_no Int\n period_start DateTime @db.Date\n period_end DateTime @db.Date\n payday DateTime @db.Date\n label String\n\n @@map(\"pay_period\")\n}\n\nenum AttachmentStatus {\n ACTIVE\n DELETED\n}\n\nenum RetentionPolicy {\n EXPENSE_7Y\n TICKET_2Y\n PROFILE_KEEP_LAST3\n}\n\nenum Roles {\n ADMIN\n SUPERVISOR\n HR\n ACCOUNTING\n EMPLOYEE\n DEALER\n CUSTOMER\n GUEST\n\n @@map(\"roles\")\n}\n\nenum Modules {\n timesheets\n timesheets_approval\n employee_list\n employee_management\n personal_profile\n dashboard\n chatbot\n\n @@map(\"modules\")\n}\n\nenum LeaveTypes {\n SICK\n VACATION\n UNPAID\n BEREAVEMENT\n PARENTAL\n LEGAL\n WEDDING\n HOLIDAY\n\n @@map(\"leave_types\")\n}\n\nenum LeaveApprovalStatus {\n PENDING\n APPROVED\n DENIED\n CANCELLED\n ESCALATED\n\n @@map(\"leave_approval_status\")\n}\n\nenum Weekday {\n SUN\n MON\n TUE\n WED\n THU\n FRI\n SAT\n}\n", "runtimeDataModel": { "models": {}, "enums": {}, @@ -30,7 +30,7 @@ const config: runtime.GetPrismaClientConfig = { } } -config.runtimeDataModel = JSON.parse("{\"models\":{\"Users\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"first_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"last_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"email\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"phone_number\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"residence\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"role\",\"kind\":\"enum\",\"type\":\"Roles\"},{\"name\":\"employee\",\"kind\":\"object\",\"type\":\"Employees\",\"relationName\":\"UserEmployee\"},{\"name\":\"oauth_sessions\",\"kind\":\"object\",\"type\":\"OAuthSessions\",\"relationName\":\"UserOAuthSessions\"},{\"name\":\"preferences\",\"kind\":\"object\",\"type\":\"Preferences\",\"relationName\":\"UserPreferences\"},{\"name\":\"user_module_access\",\"kind\":\"object\",\"type\":\"userModuleAccess\",\"relationName\":\"UserModuleAccess\"}],\"dbName\":\"users\"},\"userModuleAccess\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"user_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"timesheets\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"timesheets_approval\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"employee_list\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"employee_management\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"personal_profile\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"dashboard\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"chatbot\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"Users\",\"relationName\":\"UserModuleAccess\"}],\"dbName\":\"user_module_access\"},\"Employees\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"user_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"external_payroll_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"company_code\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"daily_expected_hours\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"first_work_day\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"last_work_day\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"supervisor_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"job_title\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"is_supervisor\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"schedule_preset_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"schedule_preset\",\"kind\":\"object\",\"type\":\"SchedulePresets\",\"relationName\":\"EmployeesSchedulePreset\"},{\"name\":\"supervisor\",\"kind\":\"object\",\"type\":\"Employees\",\"relationName\":\"EmployeeSupervisor\"},{\"name\":\"crew\",\"kind\":\"object\",\"type\":\"Employees\",\"relationName\":\"EmployeeSupervisor\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"Users\",\"relationName\":\"UserEmployee\"},{\"name\":\"leave_request\",\"kind\":\"object\",\"type\":\"LeaveRequests\",\"relationName\":\"LeaveRequestEmployee\"},{\"name\":\"timesheet\",\"kind\":\"object\",\"type\":\"Timesheets\",\"relationName\":\"TimesheetEmployee\"},{\"name\":\"paid_time_off\",\"kind\":\"object\",\"type\":\"PaidTimeOff\",\"relationName\":\"EmployeePaidTimeOff\"}],\"dbName\":\"employees\"},\"LeaveRequests\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"employee_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"leave_type\",\"kind\":\"enum\",\"type\":\"LeaveTypes\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"approval_status\",\"kind\":\"enum\",\"type\":\"LeaveApprovalStatus\"},{\"name\":\"bank_code_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"payable_hours\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"requested_hours\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"dates\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"bank_code\",\"kind\":\"object\",\"type\":\"BankCodes\",\"relationName\":\"LeaveRequestBankCodes\"},{\"name\":\"employee\",\"kind\":\"object\",\"type\":\"Employees\",\"relationName\":\"LeaveRequestEmployee\"},{\"name\":\"archive\",\"kind\":\"object\",\"type\":\"LeaveRequestsArchive\",\"relationName\":\"LeaveRequestToArchive\"}],\"dbName\":\"leave_requests\"},\"LeaveRequestsArchive\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"leave_request_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"archived_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"employee_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"leave_type\",\"kind\":\"enum\",\"type\":\"LeaveTypes\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"approval_status\",\"kind\":\"enum\",\"type\":\"LeaveApprovalStatus\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"payable_hours\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"requested_hours\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"leave_request\",\"kind\":\"object\",\"type\":\"LeaveRequests\",\"relationName\":\"LeaveRequestToArchive\"}],\"dbName\":\"leave_requests_archive\"},\"Timesheets\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"employee_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"is_approved\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"start_date\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"expense\",\"kind\":\"object\",\"type\":\"Expenses\",\"relationName\":\"ExpensesTimesheet\"},{\"name\":\"shift\",\"kind\":\"object\",\"type\":\"Shifts\",\"relationName\":\"ShiftTimesheet\"},{\"name\":\"employee\",\"kind\":\"object\",\"type\":\"Employees\",\"relationName\":\"TimesheetEmployee\"},{\"name\":\"archive\",\"kind\":\"object\",\"type\":\"TimesheetsArchive\",\"relationName\":\"TimesheetsToArchive\"}],\"dbName\":\"timesheets\"},\"TimesheetsArchive\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"timesheet_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"archive_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"employee_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"is_approved\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"timesheet\",\"kind\":\"object\",\"type\":\"Timesheets\",\"relationName\":\"TimesheetsToArchive\"}],\"dbName\":\"timesheets_archive\"},\"SchedulePresets\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"is_default\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"employees\",\"kind\":\"object\",\"type\":\"Employees\",\"relationName\":\"EmployeesSchedulePreset\"},{\"name\":\"shifts\",\"kind\":\"object\",\"type\":\"SchedulePresetShifts\",\"relationName\":\"SchedulePresetShiftsSchedulePreset\"}],\"dbName\":\"schedule_presets\"},\"SchedulePresetShifts\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"preset_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"bank_code_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"start_time\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"end_time\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"is_remote\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"week_day\",\"kind\":\"enum\",\"type\":\"Weekday\"},{\"name\":\"bank_code\",\"kind\":\"object\",\"type\":\"BankCodes\",\"relationName\":\"SchedulePresetShiftsBankCodes\"},{\"name\":\"preset\",\"kind\":\"object\",\"type\":\"SchedulePresets\",\"relationName\":\"SchedulePresetShiftsSchedulePreset\"}],\"dbName\":\"schedule_preset_shifts\"},\"Shifts\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"timesheet_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"start_time\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"end_time\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"bank_code_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"is_approved\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"is_remote\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"bank_code\",\"kind\":\"object\",\"type\":\"BankCodes\",\"relationName\":\"ShiftBankCodes\"},{\"name\":\"timesheet\",\"kind\":\"object\",\"type\":\"Timesheets\",\"relationName\":\"ShiftTimesheet\"},{\"name\":\"archive\",\"kind\":\"object\",\"type\":\"ShiftsArchive\",\"relationName\":\"ShiftsToArchive\"}],\"dbName\":\"shifts\"},\"ShiftsArchive\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"shift_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"archive_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"timesheet_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"start_time\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"end_time\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"bank_code_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"shift\",\"kind\":\"object\",\"type\":\"Shifts\",\"relationName\":\"ShiftsToArchive\"}],\"dbName\":\"shifts_archive\"},\"BankCodes\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"type\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"categorie\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"modifier\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"bank_code\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"expenses\",\"kind\":\"object\",\"type\":\"Expenses\",\"relationName\":\"ExpenseBankCodes\"},{\"name\":\"leaveRequests\",\"kind\":\"object\",\"type\":\"LeaveRequests\",\"relationName\":\"LeaveRequestBankCodes\"},{\"name\":\"SchedulePresetShifts\",\"kind\":\"object\",\"type\":\"SchedulePresetShifts\",\"relationName\":\"SchedulePresetShiftsBankCodes\"},{\"name\":\"shifts\",\"kind\":\"object\",\"type\":\"Shifts\",\"relationName\":\"ShiftBankCodes\"}],\"dbName\":\"bank_codes\"},\"Expenses\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"timesheet_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"amount\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"is_approved\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"supervisor_comment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"bank_code_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"attachment\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"mileage\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"attachment_record\",\"kind\":\"object\",\"type\":\"Attachments\",\"relationName\":\"ExpenseAttachment\"},{\"name\":\"bank_code\",\"kind\":\"object\",\"type\":\"BankCodes\",\"relationName\":\"ExpenseBankCodes\"},{\"name\":\"timesheet\",\"kind\":\"object\",\"type\":\"Timesheets\",\"relationName\":\"ExpensesTimesheet\"},{\"name\":\"archive\",\"kind\":\"object\",\"type\":\"ExpensesArchive\",\"relationName\":\"ExpensesToArchive\"}],\"dbName\":\"expenses\"},\"ExpensesArchive\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"expense_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"timesheet_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"archived_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"amount\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"is_approved\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"supervisor_comment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"bank_code_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"attachment\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"mileage\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"attachment_record\",\"kind\":\"object\",\"type\":\"Attachments\",\"relationName\":\"ExpenseArchiveAttachment\"},{\"name\":\"expense\",\"kind\":\"object\",\"type\":\"Expenses\",\"relationName\":\"ExpensesToArchive\"}],\"dbName\":\"expenses_archive\"},\"OAuthSessions\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"user_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"application\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"access_token\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"refresh_token\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"access_token_expiry\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"refresh_token_expiry\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"is_revoked\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"scopes\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"created_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updated_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"sid\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"Users\",\"relationName\":\"UserOAuthSessions\"}],\"dbName\":\"oauth_sessions\"},\"Sessions\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"sid\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"data\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"expiresAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":\"sessions\"},\"Blobs\":{\"fields\":[{\"name\":\"sha256\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"size\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"mime\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"storage_path\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"refcount\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"created_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"attachments\",\"kind\":\"object\",\"type\":\"Attachments\",\"relationName\":\"AttachmnentBlob\"}],\"dbName\":\"blobs\"},\"Attachments\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"sha256\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"owner_type\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"owner_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"status\",\"kind\":\"enum\",\"type\":\"AttachmentStatus\"},{\"name\":\"created_by\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"created_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"original_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"retention_policy\",\"kind\":\"enum\",\"type\":\"RetentionPolicy\"},{\"name\":\"AttachmentVariants\",\"kind\":\"object\",\"type\":\"AttachmentVariants\",\"relationName\":\"attachmentVariantAttachment\"},{\"name\":\"blob\",\"kind\":\"object\",\"type\":\"Blobs\",\"relationName\":\"AttachmnentBlob\"},{\"name\":\"expenses\",\"kind\":\"object\",\"type\":\"Expenses\",\"relationName\":\"ExpenseAttachment\"},{\"name\":\"expenses_archive\",\"kind\":\"object\",\"type\":\"ExpensesArchive\",\"relationName\":\"ExpenseArchiveAttachment\"}],\"dbName\":\"attachments\"},\"AttachmentVariants\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"attachment_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"variant\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"bytes\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"width\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"height\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"created_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"path\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"attachment\",\"kind\":\"object\",\"type\":\"Attachments\",\"relationName\":\"attachmentVariantAttachment\"}],\"dbName\":\"attachment_variants\"},\"Preferences\":{\"fields\":[{\"name\":\"user_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"display_language\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"is_dark_mode\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"is_employee_list_grid\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"is_lefty_mode\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"is_timesheet_approval_grid\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"notifications\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"Users\",\"relationName\":\"UserPreferences\"}],\"dbName\":\"preferences\"},\"PaidTimeOff\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"employee_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"vacation_hours\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"banked_hours\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"sick_hours\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"last_updated\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"employee\",\"kind\":\"object\",\"type\":\"Employees\",\"relationName\":\"EmployeePaidTimeOff\"}],\"dbName\":\"paid_time_off\"},\"PayPeriods\":{\"fields\":[{\"name\":\"pay_year\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"pay_period_no\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"period_start\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"period_end\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"payday\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"label\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":\"pay_period\"}},\"enums\":{},\"types\":{}}") +config.runtimeDataModel = JSON.parse("{\"models\":{\"Users\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"first_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"last_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"email\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"phone_number\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"residence\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"role\",\"kind\":\"enum\",\"type\":\"Roles\"},{\"name\":\"employee\",\"kind\":\"object\",\"type\":\"Employees\",\"relationName\":\"UserEmployee\"},{\"name\":\"oauth_sessions\",\"kind\":\"object\",\"type\":\"OAuthSessions\",\"relationName\":\"UserOAuthSessions\"},{\"name\":\"preferences\",\"kind\":\"object\",\"type\":\"Preferences\",\"relationName\":\"UserPreferences\"},{\"name\":\"user_module_access\",\"kind\":\"object\",\"type\":\"userModuleAccess\",\"relationName\":\"UserModuleAccess\"}],\"dbName\":\"users\"},\"userModuleAccess\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"user_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"timesheets\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"timesheets_approval\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"employee_list\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"employee_management\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"personal_profile\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"dashboard\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"chatbot\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"Users\",\"relationName\":\"UserModuleAccess\"}],\"dbName\":\"user_module_access\"},\"Employees\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"user_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"external_payroll_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"company_code\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"daily_expected_hours\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"first_work_day\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"last_work_day\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"supervisor_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"job_title\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"is_supervisor\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"schedule_preset_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"schedule_preset\",\"kind\":\"object\",\"type\":\"SchedulePresets\",\"relationName\":\"EmployeesSchedulePreset\"},{\"name\":\"supervisor\",\"kind\":\"object\",\"type\":\"Employees\",\"relationName\":\"EmployeeSupervisor\"},{\"name\":\"crew\",\"kind\":\"object\",\"type\":\"Employees\",\"relationName\":\"EmployeeSupervisor\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"Users\",\"relationName\":\"UserEmployee\"},{\"name\":\"leave_request\",\"kind\":\"object\",\"type\":\"LeaveRequests\",\"relationName\":\"LeaveRequestEmployee\"},{\"name\":\"timesheet\",\"kind\":\"object\",\"type\":\"Timesheets\",\"relationName\":\"TimesheetEmployee\"},{\"name\":\"paid_time_off\",\"kind\":\"object\",\"type\":\"PaidTimeOff\",\"relationName\":\"EmployeePaidTimeOff\"}],\"dbName\":\"employees\"},\"LeaveRequests\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"employee_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"leave_type\",\"kind\":\"enum\",\"type\":\"LeaveTypes\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"approval_status\",\"kind\":\"enum\",\"type\":\"LeaveApprovalStatus\"},{\"name\":\"bank_code_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"payable_hours\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"requested_hours\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"dates\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"bank_code\",\"kind\":\"object\",\"type\":\"BankCodes\",\"relationName\":\"LeaveRequestBankCodes\"},{\"name\":\"employee\",\"kind\":\"object\",\"type\":\"Employees\",\"relationName\":\"LeaveRequestEmployee\"},{\"name\":\"archive\",\"kind\":\"object\",\"type\":\"LeaveRequestsArchive\",\"relationName\":\"LeaveRequestToArchive\"}],\"dbName\":\"leave_requests\"},\"LeaveRequestsArchive\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"leave_request_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"archived_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"employee_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"leave_type\",\"kind\":\"enum\",\"type\":\"LeaveTypes\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"approval_status\",\"kind\":\"enum\",\"type\":\"LeaveApprovalStatus\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"payable_hours\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"requested_hours\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"leave_request\",\"kind\":\"object\",\"type\":\"LeaveRequests\",\"relationName\":\"LeaveRequestToArchive\"}],\"dbName\":\"leave_requests_archive\"},\"Timesheets\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"employee_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"is_approved\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"start_date\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"expense\",\"kind\":\"object\",\"type\":\"Expenses\",\"relationName\":\"ExpensesTimesheet\"},{\"name\":\"shift\",\"kind\":\"object\",\"type\":\"Shifts\",\"relationName\":\"ShiftTimesheet\"},{\"name\":\"employee\",\"kind\":\"object\",\"type\":\"Employees\",\"relationName\":\"TimesheetEmployee\"},{\"name\":\"archive\",\"kind\":\"object\",\"type\":\"TimesheetsArchive\",\"relationName\":\"TimesheetsToArchive\"}],\"dbName\":\"timesheets\"},\"TimesheetsArchive\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"timesheet_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"archive_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"employee_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"is_approved\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"timesheet\",\"kind\":\"object\",\"type\":\"Timesheets\",\"relationName\":\"TimesheetsToArchive\"}],\"dbName\":\"timesheets_archive\"},\"SchedulePresets\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"is_default\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"employees\",\"kind\":\"object\",\"type\":\"Employees\",\"relationName\":\"EmployeesSchedulePreset\"},{\"name\":\"shifts\",\"kind\":\"object\",\"type\":\"SchedulePresetShifts\",\"relationName\":\"SchedulePresetShiftsSchedulePreset\"}],\"dbName\":\"schedule_presets\"},\"SchedulePresetShifts\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"preset_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"bank_code_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"start_time\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"end_time\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"is_remote\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"week_day\",\"kind\":\"enum\",\"type\":\"Weekday\"},{\"name\":\"bank_code\",\"kind\":\"object\",\"type\":\"BankCodes\",\"relationName\":\"SchedulePresetShiftsBankCodes\"},{\"name\":\"preset\",\"kind\":\"object\",\"type\":\"SchedulePresets\",\"relationName\":\"SchedulePresetShiftsSchedulePreset\"}],\"dbName\":\"schedule_preset_shifts\"},\"Shifts\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"timesheet_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"start_time\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"end_time\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"bank_code_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"is_approved\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"is_remote\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"bank_code\",\"kind\":\"object\",\"type\":\"BankCodes\",\"relationName\":\"ShiftBankCodes\"},{\"name\":\"timesheet\",\"kind\":\"object\",\"type\":\"Timesheets\",\"relationName\":\"ShiftTimesheet\"},{\"name\":\"archive\",\"kind\":\"object\",\"type\":\"ShiftsArchive\",\"relationName\":\"ShiftsToArchive\"}],\"dbName\":\"shifts\"},\"ShiftsArchive\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"shift_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"archive_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"timesheet_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"start_time\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"end_time\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"bank_code_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"shift\",\"kind\":\"object\",\"type\":\"Shifts\",\"relationName\":\"ShiftsToArchive\"}],\"dbName\":\"shifts_archive\"},\"BankCodes\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"type\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"categorie\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"modifier\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"bank_code\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"expenses\",\"kind\":\"object\",\"type\":\"Expenses\",\"relationName\":\"ExpenseBankCodes\"},{\"name\":\"leaveRequests\",\"kind\":\"object\",\"type\":\"LeaveRequests\",\"relationName\":\"LeaveRequestBankCodes\"},{\"name\":\"SchedulePresetShifts\",\"kind\":\"object\",\"type\":\"SchedulePresetShifts\",\"relationName\":\"SchedulePresetShiftsBankCodes\"},{\"name\":\"shifts\",\"kind\":\"object\",\"type\":\"Shifts\",\"relationName\":\"ShiftBankCodes\"}],\"dbName\":\"bank_codes\"},\"Expenses\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"timesheet_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"amount\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"is_approved\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"supervisor_comment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"bank_code_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"attachment_key\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"attachment_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"mileage\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"bank_code\",\"kind\":\"object\",\"type\":\"BankCodes\",\"relationName\":\"ExpenseBankCodes\"},{\"name\":\"timesheet\",\"kind\":\"object\",\"type\":\"Timesheets\",\"relationName\":\"ExpensesTimesheet\"},{\"name\":\"archive\",\"kind\":\"object\",\"type\":\"ExpensesArchive\",\"relationName\":\"ExpensesToArchive\"}],\"dbName\":\"expenses\"},\"ExpensesArchive\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"expense_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"timesheet_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"archived_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"amount\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"is_approved\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"supervisor_comment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"bank_code_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"comment\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"mileage\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"expense\",\"kind\":\"object\",\"type\":\"Expenses\",\"relationName\":\"ExpensesToArchive\"}],\"dbName\":\"expenses_archive\"},\"OAuthSessions\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"user_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"application\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"access_token\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"refresh_token\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"access_token_expiry\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"refresh_token_expiry\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"is_revoked\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"scopes\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"created_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updated_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"sid\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"Users\",\"relationName\":\"UserOAuthSessions\"}],\"dbName\":\"oauth_sessions\"},\"Sessions\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"sid\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"data\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"expiresAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":\"sessions\"},\"Preferences\":{\"fields\":[{\"name\":\"user_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"display_language\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"is_dark_mode\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"is_employee_list_grid\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"is_lefty_mode\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"is_timesheet_approval_grid\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"notifications\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"Users\",\"relationName\":\"UserPreferences\"}],\"dbName\":\"preferences\"},\"PaidTimeOff\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"employee_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"vacation_hours\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"banked_hours\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"sick_hours\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"last_updated\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"employee\",\"kind\":\"object\",\"type\":\"Employees\",\"relationName\":\"EmployeePaidTimeOff\"}],\"dbName\":\"paid_time_off\"},\"PayPeriods\":{\"fields\":[{\"name\":\"pay_year\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"pay_period_no\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"period_start\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"period_end\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"payday\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"label\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":\"pay_period\"}},\"enums\":{},\"types\":{}}") async function decodeBase64AsWasm(wasmBase64: string): Promise { const { Buffer } = await import('node:buffer') @@ -338,36 +338,6 @@ export interface PrismaClient< */ get sessions(): Prisma.SessionsDelegate; - /** - * `prisma.blobs`: Exposes CRUD operations for the **Blobs** model. - * Example usage: - * ```ts - * // Fetch zero or more Blobs - * const blobs = await prisma.blobs.findMany() - * ``` - */ - get blobs(): Prisma.BlobsDelegate; - - /** - * `prisma.attachments`: Exposes CRUD operations for the **Attachments** model. - * Example usage: - * ```ts - * // Fetch zero or more Attachments - * const attachments = await prisma.attachments.findMany() - * ``` - */ - get attachments(): Prisma.AttachmentsDelegate; - - /** - * `prisma.attachmentVariants`: Exposes CRUD operations for the **AttachmentVariants** model. - * Example usage: - * ```ts - * // Fetch zero or more AttachmentVariants - * const attachmentVariants = await prisma.attachmentVariants.findMany() - * ``` - */ - get attachmentVariants(): Prisma.AttachmentVariantsDelegate; - /** * `prisma.preferences`: Exposes CRUD operations for the **Preferences** model. * Example usage: diff --git a/prisma/postgres/generated/prisma/client/postgres/internal/prismaNamespace.ts b/prisma/postgres/generated/prisma/client/postgres/internal/prismaNamespace.ts index 1687a90..7ef3864 100644 --- a/prisma/postgres/generated/prisma/client/postgres/internal/prismaNamespace.ts +++ b/prisma/postgres/generated/prisma/client/postgres/internal/prismaNamespace.ts @@ -400,9 +400,6 @@ export const ModelName = { ExpensesArchive: 'ExpensesArchive', OAuthSessions: 'OAuthSessions', Sessions: 'Sessions', - Blobs: 'Blobs', - Attachments: 'Attachments', - AttachmentVariants: 'AttachmentVariants', Preferences: 'Preferences', PaidTimeOff: 'PaidTimeOff', PayPeriods: 'PayPeriods' @@ -421,7 +418,7 @@ export type TypeMap - fields: Prisma.BlobsFieldRefs - operations: { - findUnique: { - args: Prisma.BlobsFindUniqueArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.BlobsFindUniqueOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findFirst: { - args: Prisma.BlobsFindFirstArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.BlobsFindFirstOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findMany: { - args: Prisma.BlobsFindManyArgs - result: runtime.Types.Utils.PayloadToResult[] - } - create: { - args: Prisma.BlobsCreateArgs - result: runtime.Types.Utils.PayloadToResult - } - createMany: { - args: Prisma.BlobsCreateManyArgs - result: BatchPayload - } - createManyAndReturn: { - args: Prisma.BlobsCreateManyAndReturnArgs - result: runtime.Types.Utils.PayloadToResult[] - } - delete: { - args: Prisma.BlobsDeleteArgs - result: runtime.Types.Utils.PayloadToResult - } - update: { - args: Prisma.BlobsUpdateArgs - result: runtime.Types.Utils.PayloadToResult - } - deleteMany: { - args: Prisma.BlobsDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.BlobsUpdateManyArgs - result: BatchPayload - } - updateManyAndReturn: { - args: Prisma.BlobsUpdateManyAndReturnArgs - result: runtime.Types.Utils.PayloadToResult[] - } - upsert: { - args: Prisma.BlobsUpsertArgs - result: runtime.Types.Utils.PayloadToResult - } - aggregate: { - args: Prisma.BlobsAggregateArgs - result: runtime.Types.Utils.Optional - } - groupBy: { - args: Prisma.BlobsGroupByArgs - result: runtime.Types.Utils.Optional[] - } - count: { - args: Prisma.BlobsCountArgs - result: runtime.Types.Utils.Optional | number - } - } - } - Attachments: { - payload: Prisma.$AttachmentsPayload - fields: Prisma.AttachmentsFieldRefs - operations: { - findUnique: { - args: Prisma.AttachmentsFindUniqueArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.AttachmentsFindUniqueOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findFirst: { - args: Prisma.AttachmentsFindFirstArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.AttachmentsFindFirstOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findMany: { - args: Prisma.AttachmentsFindManyArgs - result: runtime.Types.Utils.PayloadToResult[] - } - create: { - args: Prisma.AttachmentsCreateArgs - result: runtime.Types.Utils.PayloadToResult - } - createMany: { - args: Prisma.AttachmentsCreateManyArgs - result: BatchPayload - } - createManyAndReturn: { - args: Prisma.AttachmentsCreateManyAndReturnArgs - result: runtime.Types.Utils.PayloadToResult[] - } - delete: { - args: Prisma.AttachmentsDeleteArgs - result: runtime.Types.Utils.PayloadToResult - } - update: { - args: Prisma.AttachmentsUpdateArgs - result: runtime.Types.Utils.PayloadToResult - } - deleteMany: { - args: Prisma.AttachmentsDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.AttachmentsUpdateManyArgs - result: BatchPayload - } - updateManyAndReturn: { - args: Prisma.AttachmentsUpdateManyAndReturnArgs - result: runtime.Types.Utils.PayloadToResult[] - } - upsert: { - args: Prisma.AttachmentsUpsertArgs - result: runtime.Types.Utils.PayloadToResult - } - aggregate: { - args: Prisma.AttachmentsAggregateArgs - result: runtime.Types.Utils.Optional - } - groupBy: { - args: Prisma.AttachmentsGroupByArgs - result: runtime.Types.Utils.Optional[] - } - count: { - args: Prisma.AttachmentsCountArgs - result: runtime.Types.Utils.Optional | number - } - } - } - AttachmentVariants: { - payload: Prisma.$AttachmentVariantsPayload - fields: Prisma.AttachmentVariantsFieldRefs - operations: { - findUnique: { - args: Prisma.AttachmentVariantsFindUniqueArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.AttachmentVariantsFindUniqueOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findFirst: { - args: Prisma.AttachmentVariantsFindFirstArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.AttachmentVariantsFindFirstOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findMany: { - args: Prisma.AttachmentVariantsFindManyArgs - result: runtime.Types.Utils.PayloadToResult[] - } - create: { - args: Prisma.AttachmentVariantsCreateArgs - result: runtime.Types.Utils.PayloadToResult - } - createMany: { - args: Prisma.AttachmentVariantsCreateManyArgs - result: BatchPayload - } - createManyAndReturn: { - args: Prisma.AttachmentVariantsCreateManyAndReturnArgs - result: runtime.Types.Utils.PayloadToResult[] - } - delete: { - args: Prisma.AttachmentVariantsDeleteArgs - result: runtime.Types.Utils.PayloadToResult - } - update: { - args: Prisma.AttachmentVariantsUpdateArgs - result: runtime.Types.Utils.PayloadToResult - } - deleteMany: { - args: Prisma.AttachmentVariantsDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.AttachmentVariantsUpdateManyArgs - result: BatchPayload - } - updateManyAndReturn: { - args: Prisma.AttachmentVariantsUpdateManyAndReturnArgs - result: runtime.Types.Utils.PayloadToResult[] - } - upsert: { - args: Prisma.AttachmentVariantsUpsertArgs - result: runtime.Types.Utils.PayloadToResult - } - aggregate: { - args: Prisma.AttachmentVariantsAggregateArgs - result: runtime.Types.Utils.Optional - } - groupBy: { - args: Prisma.AttachmentVariantsGroupByArgs - result: runtime.Types.Utils.Optional[] - } - count: { - args: Prisma.AttachmentVariantsCountArgs - result: runtime.Types.Utils.Optional | number - } - } - } Preferences: { payload: Prisma.$PreferencesPayload fields: Prisma.PreferencesFieldRefs @@ -2217,7 +1992,8 @@ export const ExpensesScalarFieldEnum = { supervisor_comment: 'supervisor_comment', bank_code_id: 'bank_code_id', comment: 'comment', - attachment: 'attachment', + attachment_key: 'attachment_key', + attachment_name: 'attachment_name', mileage: 'mileage' } as const @@ -2235,7 +2011,6 @@ export const ExpensesArchiveScalarFieldEnum = { supervisor_comment: 'supervisor_comment', bank_code_id: 'bank_code_id', comment: 'comment', - attachment: 'attachment', mileage: 'mileage' } as const @@ -2270,47 +2045,6 @@ export const SessionsScalarFieldEnum = { export type SessionsScalarFieldEnum = (typeof SessionsScalarFieldEnum)[keyof typeof SessionsScalarFieldEnum] -export const BlobsScalarFieldEnum = { - sha256: 'sha256', - size: 'size', - mime: 'mime', - storage_path: 'storage_path', - refcount: 'refcount', - created_at: 'created_at' -} as const - -export type BlobsScalarFieldEnum = (typeof BlobsScalarFieldEnum)[keyof typeof BlobsScalarFieldEnum] - - -export const AttachmentsScalarFieldEnum = { - id: 'id', - sha256: 'sha256', - owner_type: 'owner_type', - owner_id: 'owner_id', - status: 'status', - created_by: 'created_by', - created_at: 'created_at', - original_name: 'original_name', - retention_policy: 'retention_policy' -} as const - -export type AttachmentsScalarFieldEnum = (typeof AttachmentsScalarFieldEnum)[keyof typeof AttachmentsScalarFieldEnum] - - -export const AttachmentVariantsScalarFieldEnum = { - id: 'id', - attachment_id: 'attachment_id', - variant: 'variant', - bytes: 'bytes', - width: 'width', - height: 'height', - created_at: 'created_at', - path: 'path' -} as const - -export type AttachmentVariantsScalarFieldEnum = (typeof AttachmentVariantsScalarFieldEnum)[keyof typeof AttachmentVariantsScalarFieldEnum] - - export const PreferencesScalarFieldEnum = { user_id: 'user_id', id: 'id', @@ -2541,34 +2275,6 @@ export type JsonFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'J export type EnumQueryModeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'QueryMode'> - -/** - * Reference to a field of type 'AttachmentStatus' - */ -export type EnumAttachmentStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'AttachmentStatus'> - - - -/** - * Reference to a field of type 'AttachmentStatus[]' - */ -export type ListEnumAttachmentStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'AttachmentStatus[]'> - - - -/** - * Reference to a field of type 'RetentionPolicy' - */ -export type EnumRetentionPolicyFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'RetentionPolicy'> - - - -/** - * Reference to a field of type 'RetentionPolicy[]' - */ -export type ListEnumRetentionPolicyFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'RetentionPolicy[]'> - - /** * Batch Payload for updateMany & deleteMany & createMany */ @@ -2680,9 +2386,6 @@ export type GlobalOmitConfig = { expensesArchive?: Prisma.ExpensesArchiveOmit oAuthSessions?: Prisma.OAuthSessionsOmit sessions?: Prisma.SessionsOmit - blobs?: Prisma.BlobsOmit - attachments?: Prisma.AttachmentsOmit - attachmentVariants?: Prisma.AttachmentVariantsOmit preferences?: Prisma.PreferencesOmit paidTimeOff?: Prisma.PaidTimeOffOmit payPeriods?: Prisma.PayPeriodsOmit diff --git a/prisma/postgres/generated/prisma/client/postgres/internal/prismaNamespaceBrowser.ts b/prisma/postgres/generated/prisma/client/postgres/internal/prismaNamespaceBrowser.ts index 3c9d91a..aa1adf4 100644 --- a/prisma/postgres/generated/prisma/client/postgres/internal/prismaNamespaceBrowser.ts +++ b/prisma/postgres/generated/prisma/client/postgres/internal/prismaNamespaceBrowser.ts @@ -67,9 +67,6 @@ export const ModelName = { ExpensesArchive: 'ExpensesArchive', OAuthSessions: 'OAuthSessions', Sessions: 'Sessions', - Blobs: 'Blobs', - Attachments: 'Attachments', - AttachmentVariants: 'AttachmentVariants', Preferences: 'Preferences', PaidTimeOff: 'PaidTimeOff', PayPeriods: 'PayPeriods' @@ -260,7 +257,8 @@ export const ExpensesScalarFieldEnum = { supervisor_comment: 'supervisor_comment', bank_code_id: 'bank_code_id', comment: 'comment', - attachment: 'attachment', + attachment_key: 'attachment_key', + attachment_name: 'attachment_name', mileage: 'mileage' } as const @@ -278,7 +276,6 @@ export const ExpensesArchiveScalarFieldEnum = { supervisor_comment: 'supervisor_comment', bank_code_id: 'bank_code_id', comment: 'comment', - attachment: 'attachment', mileage: 'mileage' } as const @@ -313,47 +310,6 @@ export const SessionsScalarFieldEnum = { export type SessionsScalarFieldEnum = (typeof SessionsScalarFieldEnum)[keyof typeof SessionsScalarFieldEnum] -export const BlobsScalarFieldEnum = { - sha256: 'sha256', - size: 'size', - mime: 'mime', - storage_path: 'storage_path', - refcount: 'refcount', - created_at: 'created_at' -} as const - -export type BlobsScalarFieldEnum = (typeof BlobsScalarFieldEnum)[keyof typeof BlobsScalarFieldEnum] - - -export const AttachmentsScalarFieldEnum = { - id: 'id', - sha256: 'sha256', - owner_type: 'owner_type', - owner_id: 'owner_id', - status: 'status', - created_by: 'created_by', - created_at: 'created_at', - original_name: 'original_name', - retention_policy: 'retention_policy' -} as const - -export type AttachmentsScalarFieldEnum = (typeof AttachmentsScalarFieldEnum)[keyof typeof AttachmentsScalarFieldEnum] - - -export const AttachmentVariantsScalarFieldEnum = { - id: 'id', - attachment_id: 'attachment_id', - variant: 'variant', - bytes: 'bytes', - width: 'width', - height: 'height', - created_at: 'created_at', - path: 'path' -} as const - -export type AttachmentVariantsScalarFieldEnum = (typeof AttachmentVariantsScalarFieldEnum)[keyof typeof AttachmentVariantsScalarFieldEnum] - - export const PreferencesScalarFieldEnum = { user_id: 'user_id', id: 'id', diff --git a/prisma/postgres/generated/prisma/client/postgres/models.ts b/prisma/postgres/generated/prisma/client/postgres/models.ts index 102d733..3a7bc48 100644 --- a/prisma/postgres/generated/prisma/client/postgres/models.ts +++ b/prisma/postgres/generated/prisma/client/postgres/models.ts @@ -24,9 +24,6 @@ export type * from './models/Expenses' export type * from './models/ExpensesArchive' export type * from './models/OAuthSessions' export type * from './models/Sessions' -export type * from './models/Blobs' -export type * from './models/Attachments' -export type * from './models/AttachmentVariants' export type * from './models/Preferences' export type * from './models/PaidTimeOff' export type * from './models/PayPeriods' diff --git a/prisma/postgres/generated/prisma/client/postgres/models/AttachmentVariants.ts b/prisma/postgres/generated/prisma/client/postgres/models/AttachmentVariants.ts deleted file mode 100644 index 704cde5..0000000 --- a/prisma/postgres/generated/prisma/client/postgres/models/AttachmentVariants.ts +++ /dev/null @@ -1,1514 +0,0 @@ - -/* !!! This is code generated by Prisma. Do not edit directly. !!! */ -/* eslint-disable */ -// biome-ignore-all lint: generated file -// @ts-nocheck -/* - * This file exports the `AttachmentVariants` model and its related types. - * - * 🟢 You can import this file directly. - */ -import type * as runtime from "@prisma/client/runtime/client" -import type * as $Enums from "../enums" -import type * as Prisma from "../internal/prismaNamespace" - -/** - * Model AttachmentVariants - * - */ -export type AttachmentVariantsModel = runtime.Types.Result.DefaultSelection - -export type AggregateAttachmentVariants = { - _count: AttachmentVariantsCountAggregateOutputType | null - _avg: AttachmentVariantsAvgAggregateOutputType | null - _sum: AttachmentVariantsSumAggregateOutputType | null - _min: AttachmentVariantsMinAggregateOutputType | null - _max: AttachmentVariantsMaxAggregateOutputType | null -} - -export type AttachmentVariantsAvgAggregateOutputType = { - id: number | null - attachment_id: number | null - bytes: number | null - width: number | null - height: number | null -} - -export type AttachmentVariantsSumAggregateOutputType = { - id: number | null - attachment_id: number | null - bytes: number | null - width: number | null - height: number | null -} - -export type AttachmentVariantsMinAggregateOutputType = { - id: number | null - attachment_id: number | null - variant: string | null - bytes: number | null - width: number | null - height: number | null - created_at: Date | null - path: string | null -} - -export type AttachmentVariantsMaxAggregateOutputType = { - id: number | null - attachment_id: number | null - variant: string | null - bytes: number | null - width: number | null - height: number | null - created_at: Date | null - path: string | null -} - -export type AttachmentVariantsCountAggregateOutputType = { - id: number - attachment_id: number - variant: number - bytes: number - width: number - height: number - created_at: number - path: number - _all: number -} - - -export type AttachmentVariantsAvgAggregateInputType = { - id?: true - attachment_id?: true - bytes?: true - width?: true - height?: true -} - -export type AttachmentVariantsSumAggregateInputType = { - id?: true - attachment_id?: true - bytes?: true - width?: true - height?: true -} - -export type AttachmentVariantsMinAggregateInputType = { - id?: true - attachment_id?: true - variant?: true - bytes?: true - width?: true - height?: true - created_at?: true - path?: true -} - -export type AttachmentVariantsMaxAggregateInputType = { - id?: true - attachment_id?: true - variant?: true - bytes?: true - width?: true - height?: true - created_at?: true - path?: true -} - -export type AttachmentVariantsCountAggregateInputType = { - id?: true - attachment_id?: true - variant?: true - bytes?: true - width?: true - height?: true - created_at?: true - path?: true - _all?: true -} - -export type AttachmentVariantsAggregateArgs = { - /** - * Filter which AttachmentVariants to aggregate. - */ - where?: Prisma.AttachmentVariantsWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of AttachmentVariants to fetch. - */ - orderBy?: Prisma.AttachmentVariantsOrderByWithRelationInput | Prisma.AttachmentVariantsOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: Prisma.AttachmentVariantsWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` AttachmentVariants from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` AttachmentVariants. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned AttachmentVariants - **/ - _count?: true | AttachmentVariantsCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: AttachmentVariantsAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: AttachmentVariantsSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: AttachmentVariantsMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: AttachmentVariantsMaxAggregateInputType -} - -export type GetAttachmentVariantsAggregateType = { - [P in keyof T & keyof AggregateAttachmentVariants]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType -} - - - - -export type AttachmentVariantsGroupByArgs = { - where?: Prisma.AttachmentVariantsWhereInput - orderBy?: Prisma.AttachmentVariantsOrderByWithAggregationInput | Prisma.AttachmentVariantsOrderByWithAggregationInput[] - by: Prisma.AttachmentVariantsScalarFieldEnum[] | Prisma.AttachmentVariantsScalarFieldEnum - having?: Prisma.AttachmentVariantsScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: AttachmentVariantsCountAggregateInputType | true - _avg?: AttachmentVariantsAvgAggregateInputType - _sum?: AttachmentVariantsSumAggregateInputType - _min?: AttachmentVariantsMinAggregateInputType - _max?: AttachmentVariantsMaxAggregateInputType -} - -export type AttachmentVariantsGroupByOutputType = { - id: number - attachment_id: number - variant: string - bytes: number - width: number | null - height: number | null - created_at: Date - path: string - _count: AttachmentVariantsCountAggregateOutputType | null - _avg: AttachmentVariantsAvgAggregateOutputType | null - _sum: AttachmentVariantsSumAggregateOutputType | null - _min: AttachmentVariantsMinAggregateOutputType | null - _max: AttachmentVariantsMaxAggregateOutputType | null -} - -type GetAttachmentVariantsGroupByPayload = Prisma.PrismaPromise< - Array< - Prisma.PickEnumerable & - { - [P in ((keyof T) & (keyof AttachmentVariantsGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType - } - > - > - - - -export type AttachmentVariantsWhereInput = { - AND?: Prisma.AttachmentVariantsWhereInput | Prisma.AttachmentVariantsWhereInput[] - OR?: Prisma.AttachmentVariantsWhereInput[] - NOT?: Prisma.AttachmentVariantsWhereInput | Prisma.AttachmentVariantsWhereInput[] - id?: Prisma.IntFilter<"AttachmentVariants"> | number - attachment_id?: Prisma.IntFilter<"AttachmentVariants"> | number - variant?: Prisma.StringFilter<"AttachmentVariants"> | string - bytes?: Prisma.IntFilter<"AttachmentVariants"> | number - width?: Prisma.IntNullableFilter<"AttachmentVariants"> | number | null - height?: Prisma.IntNullableFilter<"AttachmentVariants"> | number | null - created_at?: Prisma.DateTimeFilter<"AttachmentVariants"> | Date | string - path?: Prisma.StringFilter<"AttachmentVariants"> | string - attachment?: Prisma.XOR -} - -export type AttachmentVariantsOrderByWithRelationInput = { - id?: Prisma.SortOrder - attachment_id?: Prisma.SortOrder - variant?: Prisma.SortOrder - bytes?: Prisma.SortOrder - width?: Prisma.SortOrderInput | Prisma.SortOrder - height?: Prisma.SortOrderInput | Prisma.SortOrder - created_at?: Prisma.SortOrder - path?: Prisma.SortOrder - attachment?: Prisma.AttachmentsOrderByWithRelationInput -} - -export type AttachmentVariantsWhereUniqueInput = Prisma.AtLeast<{ - id?: number - attachment_id_variant?: Prisma.AttachmentVariantsAttachment_idVariantCompoundUniqueInput - AND?: Prisma.AttachmentVariantsWhereInput | Prisma.AttachmentVariantsWhereInput[] - OR?: Prisma.AttachmentVariantsWhereInput[] - NOT?: Prisma.AttachmentVariantsWhereInput | Prisma.AttachmentVariantsWhereInput[] - attachment_id?: Prisma.IntFilter<"AttachmentVariants"> | number - variant?: Prisma.StringFilter<"AttachmentVariants"> | string - bytes?: Prisma.IntFilter<"AttachmentVariants"> | number - width?: Prisma.IntNullableFilter<"AttachmentVariants"> | number | null - height?: Prisma.IntNullableFilter<"AttachmentVariants"> | number | null - created_at?: Prisma.DateTimeFilter<"AttachmentVariants"> | Date | string - path?: Prisma.StringFilter<"AttachmentVariants"> | string - attachment?: Prisma.XOR -}, "id" | "attachment_id_variant"> - -export type AttachmentVariantsOrderByWithAggregationInput = { - id?: Prisma.SortOrder - attachment_id?: Prisma.SortOrder - variant?: Prisma.SortOrder - bytes?: Prisma.SortOrder - width?: Prisma.SortOrderInput | Prisma.SortOrder - height?: Prisma.SortOrderInput | Prisma.SortOrder - created_at?: Prisma.SortOrder - path?: Prisma.SortOrder - _count?: Prisma.AttachmentVariantsCountOrderByAggregateInput - _avg?: Prisma.AttachmentVariantsAvgOrderByAggregateInput - _max?: Prisma.AttachmentVariantsMaxOrderByAggregateInput - _min?: Prisma.AttachmentVariantsMinOrderByAggregateInput - _sum?: Prisma.AttachmentVariantsSumOrderByAggregateInput -} - -export type AttachmentVariantsScalarWhereWithAggregatesInput = { - AND?: Prisma.AttachmentVariantsScalarWhereWithAggregatesInput | Prisma.AttachmentVariantsScalarWhereWithAggregatesInput[] - OR?: Prisma.AttachmentVariantsScalarWhereWithAggregatesInput[] - NOT?: Prisma.AttachmentVariantsScalarWhereWithAggregatesInput | Prisma.AttachmentVariantsScalarWhereWithAggregatesInput[] - id?: Prisma.IntWithAggregatesFilter<"AttachmentVariants"> | number - attachment_id?: Prisma.IntWithAggregatesFilter<"AttachmentVariants"> | number - variant?: Prisma.StringWithAggregatesFilter<"AttachmentVariants"> | string - bytes?: Prisma.IntWithAggregatesFilter<"AttachmentVariants"> | number - width?: Prisma.IntNullableWithAggregatesFilter<"AttachmentVariants"> | number | null - height?: Prisma.IntNullableWithAggregatesFilter<"AttachmentVariants"> | number | null - created_at?: Prisma.DateTimeWithAggregatesFilter<"AttachmentVariants"> | Date | string - path?: Prisma.StringWithAggregatesFilter<"AttachmentVariants"> | string -} - -export type AttachmentVariantsCreateInput = { - variant: string - bytes: number - width?: number | null - height?: number | null - created_at?: Date | string - path: string - attachment: Prisma.AttachmentsCreateNestedOneWithoutAttachmentVariantsInput -} - -export type AttachmentVariantsUncheckedCreateInput = { - id?: number - attachment_id: number - variant: string - bytes: number - width?: number | null - height?: number | null - created_at?: Date | string - path: string -} - -export type AttachmentVariantsUpdateInput = { - variant?: Prisma.StringFieldUpdateOperationsInput | string - bytes?: Prisma.IntFieldUpdateOperationsInput | number - width?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - height?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - path?: Prisma.StringFieldUpdateOperationsInput | string - attachment?: Prisma.AttachmentsUpdateOneRequiredWithoutAttachmentVariantsNestedInput -} - -export type AttachmentVariantsUncheckedUpdateInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - attachment_id?: Prisma.IntFieldUpdateOperationsInput | number - variant?: Prisma.StringFieldUpdateOperationsInput | string - bytes?: Prisma.IntFieldUpdateOperationsInput | number - width?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - height?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - path?: Prisma.StringFieldUpdateOperationsInput | string -} - -export type AttachmentVariantsCreateManyInput = { - id?: number - attachment_id: number - variant: string - bytes: number - width?: number | null - height?: number | null - created_at?: Date | string - path: string -} - -export type AttachmentVariantsUpdateManyMutationInput = { - variant?: Prisma.StringFieldUpdateOperationsInput | string - bytes?: Prisma.IntFieldUpdateOperationsInput | number - width?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - height?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - path?: Prisma.StringFieldUpdateOperationsInput | string -} - -export type AttachmentVariantsUncheckedUpdateManyInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - attachment_id?: Prisma.IntFieldUpdateOperationsInput | number - variant?: Prisma.StringFieldUpdateOperationsInput | string - bytes?: Prisma.IntFieldUpdateOperationsInput | number - width?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - height?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - path?: Prisma.StringFieldUpdateOperationsInput | string -} - -export type AttachmentVariantsListRelationFilter = { - every?: Prisma.AttachmentVariantsWhereInput - some?: Prisma.AttachmentVariantsWhereInput - none?: Prisma.AttachmentVariantsWhereInput -} - -export type AttachmentVariantsOrderByRelationAggregateInput = { - _count?: Prisma.SortOrder -} - -export type AttachmentVariantsAttachment_idVariantCompoundUniqueInput = { - attachment_id: number - variant: string -} - -export type AttachmentVariantsCountOrderByAggregateInput = { - id?: Prisma.SortOrder - attachment_id?: Prisma.SortOrder - variant?: Prisma.SortOrder - bytes?: Prisma.SortOrder - width?: Prisma.SortOrder - height?: Prisma.SortOrder - created_at?: Prisma.SortOrder - path?: Prisma.SortOrder -} - -export type AttachmentVariantsAvgOrderByAggregateInput = { - id?: Prisma.SortOrder - attachment_id?: Prisma.SortOrder - bytes?: Prisma.SortOrder - width?: Prisma.SortOrder - height?: Prisma.SortOrder -} - -export type AttachmentVariantsMaxOrderByAggregateInput = { - id?: Prisma.SortOrder - attachment_id?: Prisma.SortOrder - variant?: Prisma.SortOrder - bytes?: Prisma.SortOrder - width?: Prisma.SortOrder - height?: Prisma.SortOrder - created_at?: Prisma.SortOrder - path?: Prisma.SortOrder -} - -export type AttachmentVariantsMinOrderByAggregateInput = { - id?: Prisma.SortOrder - attachment_id?: Prisma.SortOrder - variant?: Prisma.SortOrder - bytes?: Prisma.SortOrder - width?: Prisma.SortOrder - height?: Prisma.SortOrder - created_at?: Prisma.SortOrder - path?: Prisma.SortOrder -} - -export type AttachmentVariantsSumOrderByAggregateInput = { - id?: Prisma.SortOrder - attachment_id?: Prisma.SortOrder - bytes?: Prisma.SortOrder - width?: Prisma.SortOrder - height?: Prisma.SortOrder -} - -export type AttachmentVariantsCreateNestedManyWithoutAttachmentInput = { - create?: Prisma.XOR | Prisma.AttachmentVariantsCreateWithoutAttachmentInput[] | Prisma.AttachmentVariantsUncheckedCreateWithoutAttachmentInput[] - connectOrCreate?: Prisma.AttachmentVariantsCreateOrConnectWithoutAttachmentInput | Prisma.AttachmentVariantsCreateOrConnectWithoutAttachmentInput[] - createMany?: Prisma.AttachmentVariantsCreateManyAttachmentInputEnvelope - connect?: Prisma.AttachmentVariantsWhereUniqueInput | Prisma.AttachmentVariantsWhereUniqueInput[] -} - -export type AttachmentVariantsUncheckedCreateNestedManyWithoutAttachmentInput = { - create?: Prisma.XOR | Prisma.AttachmentVariantsCreateWithoutAttachmentInput[] | Prisma.AttachmentVariantsUncheckedCreateWithoutAttachmentInput[] - connectOrCreate?: Prisma.AttachmentVariantsCreateOrConnectWithoutAttachmentInput | Prisma.AttachmentVariantsCreateOrConnectWithoutAttachmentInput[] - createMany?: Prisma.AttachmentVariantsCreateManyAttachmentInputEnvelope - connect?: Prisma.AttachmentVariantsWhereUniqueInput | Prisma.AttachmentVariantsWhereUniqueInput[] -} - -export type AttachmentVariantsUpdateManyWithoutAttachmentNestedInput = { - create?: Prisma.XOR | Prisma.AttachmentVariantsCreateWithoutAttachmentInput[] | Prisma.AttachmentVariantsUncheckedCreateWithoutAttachmentInput[] - connectOrCreate?: Prisma.AttachmentVariantsCreateOrConnectWithoutAttachmentInput | Prisma.AttachmentVariantsCreateOrConnectWithoutAttachmentInput[] - upsert?: Prisma.AttachmentVariantsUpsertWithWhereUniqueWithoutAttachmentInput | Prisma.AttachmentVariantsUpsertWithWhereUniqueWithoutAttachmentInput[] - createMany?: Prisma.AttachmentVariantsCreateManyAttachmentInputEnvelope - set?: Prisma.AttachmentVariantsWhereUniqueInput | Prisma.AttachmentVariantsWhereUniqueInput[] - disconnect?: Prisma.AttachmentVariantsWhereUniqueInput | Prisma.AttachmentVariantsWhereUniqueInput[] - delete?: Prisma.AttachmentVariantsWhereUniqueInput | Prisma.AttachmentVariantsWhereUniqueInput[] - connect?: Prisma.AttachmentVariantsWhereUniqueInput | Prisma.AttachmentVariantsWhereUniqueInput[] - update?: Prisma.AttachmentVariantsUpdateWithWhereUniqueWithoutAttachmentInput | Prisma.AttachmentVariantsUpdateWithWhereUniqueWithoutAttachmentInput[] - updateMany?: Prisma.AttachmentVariantsUpdateManyWithWhereWithoutAttachmentInput | Prisma.AttachmentVariantsUpdateManyWithWhereWithoutAttachmentInput[] - deleteMany?: Prisma.AttachmentVariantsScalarWhereInput | Prisma.AttachmentVariantsScalarWhereInput[] -} - -export type AttachmentVariantsUncheckedUpdateManyWithoutAttachmentNestedInput = { - create?: Prisma.XOR | Prisma.AttachmentVariantsCreateWithoutAttachmentInput[] | Prisma.AttachmentVariantsUncheckedCreateWithoutAttachmentInput[] - connectOrCreate?: Prisma.AttachmentVariantsCreateOrConnectWithoutAttachmentInput | Prisma.AttachmentVariantsCreateOrConnectWithoutAttachmentInput[] - upsert?: Prisma.AttachmentVariantsUpsertWithWhereUniqueWithoutAttachmentInput | Prisma.AttachmentVariantsUpsertWithWhereUniqueWithoutAttachmentInput[] - createMany?: Prisma.AttachmentVariantsCreateManyAttachmentInputEnvelope - set?: Prisma.AttachmentVariantsWhereUniqueInput | Prisma.AttachmentVariantsWhereUniqueInput[] - disconnect?: Prisma.AttachmentVariantsWhereUniqueInput | Prisma.AttachmentVariantsWhereUniqueInput[] - delete?: Prisma.AttachmentVariantsWhereUniqueInput | Prisma.AttachmentVariantsWhereUniqueInput[] - connect?: Prisma.AttachmentVariantsWhereUniqueInput | Prisma.AttachmentVariantsWhereUniqueInput[] - update?: Prisma.AttachmentVariantsUpdateWithWhereUniqueWithoutAttachmentInput | Prisma.AttachmentVariantsUpdateWithWhereUniqueWithoutAttachmentInput[] - updateMany?: Prisma.AttachmentVariantsUpdateManyWithWhereWithoutAttachmentInput | Prisma.AttachmentVariantsUpdateManyWithWhereWithoutAttachmentInput[] - deleteMany?: Prisma.AttachmentVariantsScalarWhereInput | Prisma.AttachmentVariantsScalarWhereInput[] -} - -export type AttachmentVariantsCreateWithoutAttachmentInput = { - variant: string - bytes: number - width?: number | null - height?: number | null - created_at?: Date | string - path: string -} - -export type AttachmentVariantsUncheckedCreateWithoutAttachmentInput = { - id?: number - variant: string - bytes: number - width?: number | null - height?: number | null - created_at?: Date | string - path: string -} - -export type AttachmentVariantsCreateOrConnectWithoutAttachmentInput = { - where: Prisma.AttachmentVariantsWhereUniqueInput - create: Prisma.XOR -} - -export type AttachmentVariantsCreateManyAttachmentInputEnvelope = { - data: Prisma.AttachmentVariantsCreateManyAttachmentInput | Prisma.AttachmentVariantsCreateManyAttachmentInput[] - skipDuplicates?: boolean -} - -export type AttachmentVariantsUpsertWithWhereUniqueWithoutAttachmentInput = { - where: Prisma.AttachmentVariantsWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type AttachmentVariantsUpdateWithWhereUniqueWithoutAttachmentInput = { - where: Prisma.AttachmentVariantsWhereUniqueInput - data: Prisma.XOR -} - -export type AttachmentVariantsUpdateManyWithWhereWithoutAttachmentInput = { - where: Prisma.AttachmentVariantsScalarWhereInput - data: Prisma.XOR -} - -export type AttachmentVariantsScalarWhereInput = { - AND?: Prisma.AttachmentVariantsScalarWhereInput | Prisma.AttachmentVariantsScalarWhereInput[] - OR?: Prisma.AttachmentVariantsScalarWhereInput[] - NOT?: Prisma.AttachmentVariantsScalarWhereInput | Prisma.AttachmentVariantsScalarWhereInput[] - id?: Prisma.IntFilter<"AttachmentVariants"> | number - attachment_id?: Prisma.IntFilter<"AttachmentVariants"> | number - variant?: Prisma.StringFilter<"AttachmentVariants"> | string - bytes?: Prisma.IntFilter<"AttachmentVariants"> | number - width?: Prisma.IntNullableFilter<"AttachmentVariants"> | number | null - height?: Prisma.IntNullableFilter<"AttachmentVariants"> | number | null - created_at?: Prisma.DateTimeFilter<"AttachmentVariants"> | Date | string - path?: Prisma.StringFilter<"AttachmentVariants"> | string -} - -export type AttachmentVariantsCreateManyAttachmentInput = { - id?: number - variant: string - bytes: number - width?: number | null - height?: number | null - created_at?: Date | string - path: string -} - -export type AttachmentVariantsUpdateWithoutAttachmentInput = { - variant?: Prisma.StringFieldUpdateOperationsInput | string - bytes?: Prisma.IntFieldUpdateOperationsInput | number - width?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - height?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - path?: Prisma.StringFieldUpdateOperationsInput | string -} - -export type AttachmentVariantsUncheckedUpdateWithoutAttachmentInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - variant?: Prisma.StringFieldUpdateOperationsInput | string - bytes?: Prisma.IntFieldUpdateOperationsInput | number - width?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - height?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - path?: Prisma.StringFieldUpdateOperationsInput | string -} - -export type AttachmentVariantsUncheckedUpdateManyWithoutAttachmentInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - variant?: Prisma.StringFieldUpdateOperationsInput | string - bytes?: Prisma.IntFieldUpdateOperationsInput | number - width?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - height?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - path?: Prisma.StringFieldUpdateOperationsInput | string -} - - - -export type AttachmentVariantsSelect = runtime.Types.Extensions.GetSelect<{ - id?: boolean - attachment_id?: boolean - variant?: boolean - bytes?: boolean - width?: boolean - height?: boolean - created_at?: boolean - path?: boolean - attachment?: boolean | Prisma.AttachmentsDefaultArgs -}, ExtArgs["result"]["attachmentVariants"]> - -export type AttachmentVariantsSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ - id?: boolean - attachment_id?: boolean - variant?: boolean - bytes?: boolean - width?: boolean - height?: boolean - created_at?: boolean - path?: boolean - attachment?: boolean | Prisma.AttachmentsDefaultArgs -}, ExtArgs["result"]["attachmentVariants"]> - -export type AttachmentVariantsSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ - id?: boolean - attachment_id?: boolean - variant?: boolean - bytes?: boolean - width?: boolean - height?: boolean - created_at?: boolean - path?: boolean - attachment?: boolean | Prisma.AttachmentsDefaultArgs -}, ExtArgs["result"]["attachmentVariants"]> - -export type AttachmentVariantsSelectScalar = { - id?: boolean - attachment_id?: boolean - variant?: boolean - bytes?: boolean - width?: boolean - height?: boolean - created_at?: boolean - path?: boolean -} - -export type AttachmentVariantsOmit = runtime.Types.Extensions.GetOmit<"id" | "attachment_id" | "variant" | "bytes" | "width" | "height" | "created_at" | "path", ExtArgs["result"]["attachmentVariants"]> -export type AttachmentVariantsInclude = { - attachment?: boolean | Prisma.AttachmentsDefaultArgs -} -export type AttachmentVariantsIncludeCreateManyAndReturn = { - attachment?: boolean | Prisma.AttachmentsDefaultArgs -} -export type AttachmentVariantsIncludeUpdateManyAndReturn = { - attachment?: boolean | Prisma.AttachmentsDefaultArgs -} - -export type $AttachmentVariantsPayload = { - name: "AttachmentVariants" - objects: { - attachment: Prisma.$AttachmentsPayload - } - scalars: runtime.Types.Extensions.GetPayloadResult<{ - id: number - attachment_id: number - variant: string - bytes: number - width: number | null - height: number | null - created_at: Date - path: string - }, ExtArgs["result"]["attachmentVariants"]> - composites: {} -} - -export type AttachmentVariantsGetPayload = runtime.Types.Result.GetResult - -export type AttachmentVariantsCountArgs = - Omit & { - select?: AttachmentVariantsCountAggregateInputType | true - } - -export interface AttachmentVariantsDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['AttachmentVariants'], meta: { name: 'AttachmentVariants' } } - /** - * Find zero or one AttachmentVariants that matches the filter. - * @param {AttachmentVariantsFindUniqueArgs} args - Arguments to find a AttachmentVariants - * @example - * // Get one AttachmentVariants - * const attachmentVariants = await prisma.attachmentVariants.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__AttachmentVariantsClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one AttachmentVariants that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {AttachmentVariantsFindUniqueOrThrowArgs} args - Arguments to find a AttachmentVariants - * @example - * // Get one AttachmentVariants - * const attachmentVariants = await prisma.attachmentVariants.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__AttachmentVariantsClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first AttachmentVariants that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AttachmentVariantsFindFirstArgs} args - Arguments to find a AttachmentVariants - * @example - * // Get one AttachmentVariants - * const attachmentVariants = await prisma.attachmentVariants.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__AttachmentVariantsClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first AttachmentVariants that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AttachmentVariantsFindFirstOrThrowArgs} args - Arguments to find a AttachmentVariants - * @example - * // Get one AttachmentVariants - * const attachmentVariants = await prisma.attachmentVariants.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__AttachmentVariantsClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more AttachmentVariants that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AttachmentVariantsFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all AttachmentVariants - * const attachmentVariants = await prisma.attachmentVariants.findMany() - * - * // Get first 10 AttachmentVariants - * const attachmentVariants = await prisma.attachmentVariants.findMany({ take: 10 }) - * - * // Only select the `id` - * const attachmentVariantsWithIdOnly = await prisma.attachmentVariants.findMany({ select: { id: true } }) - * - */ - findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> - - /** - * Create a AttachmentVariants. - * @param {AttachmentVariantsCreateArgs} args - Arguments to create a AttachmentVariants. - * @example - * // Create one AttachmentVariants - * const AttachmentVariants = await prisma.attachmentVariants.create({ - * data: { - * // ... data to create a AttachmentVariants - * } - * }) - * - */ - create(args: Prisma.SelectSubset>): Prisma.Prisma__AttachmentVariantsClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many AttachmentVariants. - * @param {AttachmentVariantsCreateManyArgs} args - Arguments to create many AttachmentVariants. - * @example - * // Create many AttachmentVariants - * const attachmentVariants = await prisma.attachmentVariants.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Create many AttachmentVariants and returns the data saved in the database. - * @param {AttachmentVariantsCreateManyAndReturnArgs} args - Arguments to create many AttachmentVariants. - * @example - * // Create many AttachmentVariants - * const attachmentVariants = await prisma.attachmentVariants.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many AttachmentVariants and only return the `id` - * const attachmentVariantsWithIdOnly = await prisma.attachmentVariants.createManyAndReturn({ - * select: { id: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "createManyAndReturn", GlobalOmitOptions>> - - /** - * Delete a AttachmentVariants. - * @param {AttachmentVariantsDeleteArgs} args - Arguments to delete one AttachmentVariants. - * @example - * // Delete one AttachmentVariants - * const AttachmentVariants = await prisma.attachmentVariants.delete({ - * where: { - * // ... filter to delete one AttachmentVariants - * } - * }) - * - */ - delete(args: Prisma.SelectSubset>): Prisma.Prisma__AttachmentVariantsClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one AttachmentVariants. - * @param {AttachmentVariantsUpdateArgs} args - Arguments to update one AttachmentVariants. - * @example - * // Update one AttachmentVariants - * const attachmentVariants = await prisma.attachmentVariants.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: Prisma.SelectSubset>): Prisma.Prisma__AttachmentVariantsClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more AttachmentVariants. - * @param {AttachmentVariantsDeleteManyArgs} args - Arguments to filter AttachmentVariants to delete. - * @example - * // Delete a few AttachmentVariants - * const { count } = await prisma.attachmentVariants.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more AttachmentVariants. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AttachmentVariantsUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many AttachmentVariants - * const attachmentVariants = await prisma.attachmentVariants.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more AttachmentVariants and returns the data updated in the database. - * @param {AttachmentVariantsUpdateManyAndReturnArgs} args - Arguments to update many AttachmentVariants. - * @example - * // Update many AttachmentVariants - * const attachmentVariants = await prisma.attachmentVariants.updateManyAndReturn({ - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * - * // Update zero or more AttachmentVariants and only return the `id` - * const attachmentVariantsWithIdOnly = await prisma.attachmentVariants.updateManyAndReturn({ - * select: { id: true }, - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - updateManyAndReturn(args: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "updateManyAndReturn", GlobalOmitOptions>> - - /** - * Create or update one AttachmentVariants. - * @param {AttachmentVariantsUpsertArgs} args - Arguments to update or create a AttachmentVariants. - * @example - * // Update or create a AttachmentVariants - * const attachmentVariants = await prisma.attachmentVariants.upsert({ - * create: { - * // ... data to create a AttachmentVariants - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the AttachmentVariants we want to update - * } - * }) - */ - upsert(args: Prisma.SelectSubset>): Prisma.Prisma__AttachmentVariantsClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of AttachmentVariants. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AttachmentVariantsCountArgs} args - Arguments to filter AttachmentVariants to count. - * @example - * // Count the number of AttachmentVariants - * const count = await prisma.attachmentVariants.count({ - * where: { - * // ... the filter for the AttachmentVariants we want to count - * } - * }) - **/ - count( - args?: Prisma.Subset, - ): Prisma.PrismaPromise< - T extends runtime.Types.Utils.Record<'select', any> - ? T['select'] extends true - ? number - : Prisma.GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a AttachmentVariants. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AttachmentVariantsAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Prisma.Subset): Prisma.PrismaPromise> - - /** - * Group by AttachmentVariants. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AttachmentVariantsGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends AttachmentVariantsGroupByArgs, - HasSelectOrTake extends Prisma.Or< - Prisma.Extends<'skip', Prisma.Keys>, - Prisma.Extends<'take', Prisma.Keys> - >, - OrderByArg extends Prisma.True extends HasSelectOrTake - ? { orderBy: AttachmentVariantsGroupByArgs['orderBy'] } - : { orderBy?: AttachmentVariantsGroupByArgs['orderBy'] }, - OrderFields extends Prisma.ExcludeUnderscoreKeys>>, - ByFields extends Prisma.MaybeTupleToUnion, - ByValid extends Prisma.Has, - HavingFields extends Prisma.GetHavingFields, - HavingValid extends Prisma.Has, - ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, - InputErrors extends ByEmpty extends Prisma.True - ? `Error: "by" must not be empty.` - : HavingValid extends Prisma.False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetAttachmentVariantsGroupByPayload : Prisma.PrismaPromise -/** - * Fields of the AttachmentVariants model - */ -readonly fields: AttachmentVariantsFieldRefs; -} - -/** - * The delegate class that acts as a "Promise-like" for AttachmentVariants. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ -export interface Prisma__AttachmentVariantsClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - attachment = {}>(args?: Prisma.Subset>): Prisma.Prisma__AttachmentsClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise -} - - - - -/** - * Fields of the AttachmentVariants model - */ -export interface AttachmentVariantsFieldRefs { - readonly id: Prisma.FieldRef<"AttachmentVariants", 'Int'> - readonly attachment_id: Prisma.FieldRef<"AttachmentVariants", 'Int'> - readonly variant: Prisma.FieldRef<"AttachmentVariants", 'String'> - readonly bytes: Prisma.FieldRef<"AttachmentVariants", 'Int'> - readonly width: Prisma.FieldRef<"AttachmentVariants", 'Int'> - readonly height: Prisma.FieldRef<"AttachmentVariants", 'Int'> - readonly created_at: Prisma.FieldRef<"AttachmentVariants", 'DateTime'> - readonly path: Prisma.FieldRef<"AttachmentVariants", 'String'> -} - - -// Custom InputTypes -/** - * AttachmentVariants findUnique - */ -export type AttachmentVariantsFindUniqueArgs = { - /** - * Select specific fields to fetch from the AttachmentVariants - */ - select?: Prisma.AttachmentVariantsSelect | null - /** - * Omit specific fields from the AttachmentVariants - */ - omit?: Prisma.AttachmentVariantsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.AttachmentVariantsInclude | null - /** - * Filter, which AttachmentVariants to fetch. - */ - where: Prisma.AttachmentVariantsWhereUniqueInput -} - -/** - * AttachmentVariants findUniqueOrThrow - */ -export type AttachmentVariantsFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the AttachmentVariants - */ - select?: Prisma.AttachmentVariantsSelect | null - /** - * Omit specific fields from the AttachmentVariants - */ - omit?: Prisma.AttachmentVariantsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.AttachmentVariantsInclude | null - /** - * Filter, which AttachmentVariants to fetch. - */ - where: Prisma.AttachmentVariantsWhereUniqueInput -} - -/** - * AttachmentVariants findFirst - */ -export type AttachmentVariantsFindFirstArgs = { - /** - * Select specific fields to fetch from the AttachmentVariants - */ - select?: Prisma.AttachmentVariantsSelect | null - /** - * Omit specific fields from the AttachmentVariants - */ - omit?: Prisma.AttachmentVariantsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.AttachmentVariantsInclude | null - /** - * Filter, which AttachmentVariants to fetch. - */ - where?: Prisma.AttachmentVariantsWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of AttachmentVariants to fetch. - */ - orderBy?: Prisma.AttachmentVariantsOrderByWithRelationInput | Prisma.AttachmentVariantsOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for AttachmentVariants. - */ - cursor?: Prisma.AttachmentVariantsWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` AttachmentVariants from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` AttachmentVariants. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of AttachmentVariants. - */ - distinct?: Prisma.AttachmentVariantsScalarFieldEnum | Prisma.AttachmentVariantsScalarFieldEnum[] -} - -/** - * AttachmentVariants findFirstOrThrow - */ -export type AttachmentVariantsFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the AttachmentVariants - */ - select?: Prisma.AttachmentVariantsSelect | null - /** - * Omit specific fields from the AttachmentVariants - */ - omit?: Prisma.AttachmentVariantsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.AttachmentVariantsInclude | null - /** - * Filter, which AttachmentVariants to fetch. - */ - where?: Prisma.AttachmentVariantsWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of AttachmentVariants to fetch. - */ - orderBy?: Prisma.AttachmentVariantsOrderByWithRelationInput | Prisma.AttachmentVariantsOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for AttachmentVariants. - */ - cursor?: Prisma.AttachmentVariantsWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` AttachmentVariants from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` AttachmentVariants. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of AttachmentVariants. - */ - distinct?: Prisma.AttachmentVariantsScalarFieldEnum | Prisma.AttachmentVariantsScalarFieldEnum[] -} - -/** - * AttachmentVariants findMany - */ -export type AttachmentVariantsFindManyArgs = { - /** - * Select specific fields to fetch from the AttachmentVariants - */ - select?: Prisma.AttachmentVariantsSelect | null - /** - * Omit specific fields from the AttachmentVariants - */ - omit?: Prisma.AttachmentVariantsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.AttachmentVariantsInclude | null - /** - * Filter, which AttachmentVariants to fetch. - */ - where?: Prisma.AttachmentVariantsWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of AttachmentVariants to fetch. - */ - orderBy?: Prisma.AttachmentVariantsOrderByWithRelationInput | Prisma.AttachmentVariantsOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing AttachmentVariants. - */ - cursor?: Prisma.AttachmentVariantsWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` AttachmentVariants from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` AttachmentVariants. - */ - skip?: number - distinct?: Prisma.AttachmentVariantsScalarFieldEnum | Prisma.AttachmentVariantsScalarFieldEnum[] -} - -/** - * AttachmentVariants create - */ -export type AttachmentVariantsCreateArgs = { - /** - * Select specific fields to fetch from the AttachmentVariants - */ - select?: Prisma.AttachmentVariantsSelect | null - /** - * Omit specific fields from the AttachmentVariants - */ - omit?: Prisma.AttachmentVariantsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.AttachmentVariantsInclude | null - /** - * The data needed to create a AttachmentVariants. - */ - data: Prisma.XOR -} - -/** - * AttachmentVariants createMany - */ -export type AttachmentVariantsCreateManyArgs = { - /** - * The data used to create many AttachmentVariants. - */ - data: Prisma.AttachmentVariantsCreateManyInput | Prisma.AttachmentVariantsCreateManyInput[] - skipDuplicates?: boolean -} - -/** - * AttachmentVariants createManyAndReturn - */ -export type AttachmentVariantsCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the AttachmentVariants - */ - select?: Prisma.AttachmentVariantsSelectCreateManyAndReturn | null - /** - * Omit specific fields from the AttachmentVariants - */ - omit?: Prisma.AttachmentVariantsOmit | null - /** - * The data used to create many AttachmentVariants. - */ - data: Prisma.AttachmentVariantsCreateManyInput | Prisma.AttachmentVariantsCreateManyInput[] - skipDuplicates?: boolean - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.AttachmentVariantsIncludeCreateManyAndReturn | null -} - -/** - * AttachmentVariants update - */ -export type AttachmentVariantsUpdateArgs = { - /** - * Select specific fields to fetch from the AttachmentVariants - */ - select?: Prisma.AttachmentVariantsSelect | null - /** - * Omit specific fields from the AttachmentVariants - */ - omit?: Prisma.AttachmentVariantsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.AttachmentVariantsInclude | null - /** - * The data needed to update a AttachmentVariants. - */ - data: Prisma.XOR - /** - * Choose, which AttachmentVariants to update. - */ - where: Prisma.AttachmentVariantsWhereUniqueInput -} - -/** - * AttachmentVariants updateMany - */ -export type AttachmentVariantsUpdateManyArgs = { - /** - * The data used to update AttachmentVariants. - */ - data: Prisma.XOR - /** - * Filter which AttachmentVariants to update - */ - where?: Prisma.AttachmentVariantsWhereInput - /** - * Limit how many AttachmentVariants to update. - */ - limit?: number -} - -/** - * AttachmentVariants updateManyAndReturn - */ -export type AttachmentVariantsUpdateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the AttachmentVariants - */ - select?: Prisma.AttachmentVariantsSelectUpdateManyAndReturn | null - /** - * Omit specific fields from the AttachmentVariants - */ - omit?: Prisma.AttachmentVariantsOmit | null - /** - * The data used to update AttachmentVariants. - */ - data: Prisma.XOR - /** - * Filter which AttachmentVariants to update - */ - where?: Prisma.AttachmentVariantsWhereInput - /** - * Limit how many AttachmentVariants to update. - */ - limit?: number - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.AttachmentVariantsIncludeUpdateManyAndReturn | null -} - -/** - * AttachmentVariants upsert - */ -export type AttachmentVariantsUpsertArgs = { - /** - * Select specific fields to fetch from the AttachmentVariants - */ - select?: Prisma.AttachmentVariantsSelect | null - /** - * Omit specific fields from the AttachmentVariants - */ - omit?: Prisma.AttachmentVariantsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.AttachmentVariantsInclude | null - /** - * The filter to search for the AttachmentVariants to update in case it exists. - */ - where: Prisma.AttachmentVariantsWhereUniqueInput - /** - * In case the AttachmentVariants found by the `where` argument doesn't exist, create a new AttachmentVariants with this data. - */ - create: Prisma.XOR - /** - * In case the AttachmentVariants was found with the provided `where` argument, update it with this data. - */ - update: Prisma.XOR -} - -/** - * AttachmentVariants delete - */ -export type AttachmentVariantsDeleteArgs = { - /** - * Select specific fields to fetch from the AttachmentVariants - */ - select?: Prisma.AttachmentVariantsSelect | null - /** - * Omit specific fields from the AttachmentVariants - */ - omit?: Prisma.AttachmentVariantsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.AttachmentVariantsInclude | null - /** - * Filter which AttachmentVariants to delete. - */ - where: Prisma.AttachmentVariantsWhereUniqueInput -} - -/** - * AttachmentVariants deleteMany - */ -export type AttachmentVariantsDeleteManyArgs = { - /** - * Filter which AttachmentVariants to delete - */ - where?: Prisma.AttachmentVariantsWhereInput - /** - * Limit how many AttachmentVariants to delete. - */ - limit?: number -} - -/** - * AttachmentVariants without action - */ -export type AttachmentVariantsDefaultArgs = { - /** - * Select specific fields to fetch from the AttachmentVariants - */ - select?: Prisma.AttachmentVariantsSelect | null - /** - * Omit specific fields from the AttachmentVariants - */ - omit?: Prisma.AttachmentVariantsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.AttachmentVariantsInclude | null -} diff --git a/prisma/postgres/generated/prisma/client/postgres/models/Attachments.ts b/prisma/postgres/generated/prisma/client/postgres/models/Attachments.ts deleted file mode 100644 index 07e9a90..0000000 --- a/prisma/postgres/generated/prisma/client/postgres/models/Attachments.ts +++ /dev/null @@ -1,1959 +0,0 @@ - -/* !!! This is code generated by Prisma. Do not edit directly. !!! */ -/* eslint-disable */ -// biome-ignore-all lint: generated file -// @ts-nocheck -/* - * This file exports the `Attachments` model and its related types. - * - * 🟢 You can import this file directly. - */ -import type * as runtime from "@prisma/client/runtime/client" -import type * as $Enums from "../enums" -import type * as Prisma from "../internal/prismaNamespace" - -/** - * Model Attachments - * - */ -export type AttachmentsModel = runtime.Types.Result.DefaultSelection - -export type AggregateAttachments = { - _count: AttachmentsCountAggregateOutputType | null - _avg: AttachmentsAvgAggregateOutputType | null - _sum: AttachmentsSumAggregateOutputType | null - _min: AttachmentsMinAggregateOutputType | null - _max: AttachmentsMaxAggregateOutputType | null -} - -export type AttachmentsAvgAggregateOutputType = { - id: number | null -} - -export type AttachmentsSumAggregateOutputType = { - id: number | null -} - -export type AttachmentsMinAggregateOutputType = { - id: number | null - sha256: string | null - owner_type: string | null - owner_id: string | null - status: $Enums.AttachmentStatus | null - created_by: string | null - created_at: Date | null - original_name: string | null - retention_policy: $Enums.RetentionPolicy | null -} - -export type AttachmentsMaxAggregateOutputType = { - id: number | null - sha256: string | null - owner_type: string | null - owner_id: string | null - status: $Enums.AttachmentStatus | null - created_by: string | null - created_at: Date | null - original_name: string | null - retention_policy: $Enums.RetentionPolicy | null -} - -export type AttachmentsCountAggregateOutputType = { - id: number - sha256: number - owner_type: number - owner_id: number - status: number - created_by: number - created_at: number - original_name: number - retention_policy: number - _all: number -} - - -export type AttachmentsAvgAggregateInputType = { - id?: true -} - -export type AttachmentsSumAggregateInputType = { - id?: true -} - -export type AttachmentsMinAggregateInputType = { - id?: true - sha256?: true - owner_type?: true - owner_id?: true - status?: true - created_by?: true - created_at?: true - original_name?: true - retention_policy?: true -} - -export type AttachmentsMaxAggregateInputType = { - id?: true - sha256?: true - owner_type?: true - owner_id?: true - status?: true - created_by?: true - created_at?: true - original_name?: true - retention_policy?: true -} - -export type AttachmentsCountAggregateInputType = { - id?: true - sha256?: true - owner_type?: true - owner_id?: true - status?: true - created_by?: true - created_at?: true - original_name?: true - retention_policy?: true - _all?: true -} - -export type AttachmentsAggregateArgs = { - /** - * Filter which Attachments to aggregate. - */ - where?: Prisma.AttachmentsWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Attachments to fetch. - */ - orderBy?: Prisma.AttachmentsOrderByWithRelationInput | Prisma.AttachmentsOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: Prisma.AttachmentsWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Attachments from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Attachments. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned Attachments - **/ - _count?: true | AttachmentsCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: AttachmentsAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: AttachmentsSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: AttachmentsMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: AttachmentsMaxAggregateInputType -} - -export type GetAttachmentsAggregateType = { - [P in keyof T & keyof AggregateAttachments]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType -} - - - - -export type AttachmentsGroupByArgs = { - where?: Prisma.AttachmentsWhereInput - orderBy?: Prisma.AttachmentsOrderByWithAggregationInput | Prisma.AttachmentsOrderByWithAggregationInput[] - by: Prisma.AttachmentsScalarFieldEnum[] | Prisma.AttachmentsScalarFieldEnum - having?: Prisma.AttachmentsScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: AttachmentsCountAggregateInputType | true - _avg?: AttachmentsAvgAggregateInputType - _sum?: AttachmentsSumAggregateInputType - _min?: AttachmentsMinAggregateInputType - _max?: AttachmentsMaxAggregateInputType -} - -export type AttachmentsGroupByOutputType = { - id: number - sha256: string - owner_type: string - owner_id: string - status: $Enums.AttachmentStatus - created_by: string - created_at: Date - original_name: string - retention_policy: $Enums.RetentionPolicy - _count: AttachmentsCountAggregateOutputType | null - _avg: AttachmentsAvgAggregateOutputType | null - _sum: AttachmentsSumAggregateOutputType | null - _min: AttachmentsMinAggregateOutputType | null - _max: AttachmentsMaxAggregateOutputType | null -} - -type GetAttachmentsGroupByPayload = Prisma.PrismaPromise< - Array< - Prisma.PickEnumerable & - { - [P in ((keyof T) & (keyof AttachmentsGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType - } - > - > - - - -export type AttachmentsWhereInput = { - AND?: Prisma.AttachmentsWhereInput | Prisma.AttachmentsWhereInput[] - OR?: Prisma.AttachmentsWhereInput[] - NOT?: Prisma.AttachmentsWhereInput | Prisma.AttachmentsWhereInput[] - id?: Prisma.IntFilter<"Attachments"> | number - sha256?: Prisma.StringFilter<"Attachments"> | string - owner_type?: Prisma.StringFilter<"Attachments"> | string - owner_id?: Prisma.StringFilter<"Attachments"> | string - status?: Prisma.EnumAttachmentStatusFilter<"Attachments"> | $Enums.AttachmentStatus - created_by?: Prisma.StringFilter<"Attachments"> | string - created_at?: Prisma.DateTimeFilter<"Attachments"> | Date | string - original_name?: Prisma.StringFilter<"Attachments"> | string - retention_policy?: Prisma.EnumRetentionPolicyFilter<"Attachments"> | $Enums.RetentionPolicy - AttachmentVariants?: Prisma.AttachmentVariantsListRelationFilter - blob?: Prisma.XOR - expenses?: Prisma.ExpensesListRelationFilter - expenses_archive?: Prisma.ExpensesArchiveListRelationFilter -} - -export type AttachmentsOrderByWithRelationInput = { - id?: Prisma.SortOrder - sha256?: Prisma.SortOrder - owner_type?: Prisma.SortOrder - owner_id?: Prisma.SortOrder - status?: Prisma.SortOrder - created_by?: Prisma.SortOrder - created_at?: Prisma.SortOrder - original_name?: Prisma.SortOrder - retention_policy?: Prisma.SortOrder - AttachmentVariants?: Prisma.AttachmentVariantsOrderByRelationAggregateInput - blob?: Prisma.BlobsOrderByWithRelationInput - expenses?: Prisma.ExpensesOrderByRelationAggregateInput - expenses_archive?: Prisma.ExpensesArchiveOrderByRelationAggregateInput -} - -export type AttachmentsWhereUniqueInput = Prisma.AtLeast<{ - id?: number - AND?: Prisma.AttachmentsWhereInput | Prisma.AttachmentsWhereInput[] - OR?: Prisma.AttachmentsWhereInput[] - NOT?: Prisma.AttachmentsWhereInput | Prisma.AttachmentsWhereInput[] - sha256?: Prisma.StringFilter<"Attachments"> | string - owner_type?: Prisma.StringFilter<"Attachments"> | string - owner_id?: Prisma.StringFilter<"Attachments"> | string - status?: Prisma.EnumAttachmentStatusFilter<"Attachments"> | $Enums.AttachmentStatus - created_by?: Prisma.StringFilter<"Attachments"> | string - created_at?: Prisma.DateTimeFilter<"Attachments"> | Date | string - original_name?: Prisma.StringFilter<"Attachments"> | string - retention_policy?: Prisma.EnumRetentionPolicyFilter<"Attachments"> | $Enums.RetentionPolicy - AttachmentVariants?: Prisma.AttachmentVariantsListRelationFilter - blob?: Prisma.XOR - expenses?: Prisma.ExpensesListRelationFilter - expenses_archive?: Prisma.ExpensesArchiveListRelationFilter -}, "id"> - -export type AttachmentsOrderByWithAggregationInput = { - id?: Prisma.SortOrder - sha256?: Prisma.SortOrder - owner_type?: Prisma.SortOrder - owner_id?: Prisma.SortOrder - status?: Prisma.SortOrder - created_by?: Prisma.SortOrder - created_at?: Prisma.SortOrder - original_name?: Prisma.SortOrder - retention_policy?: Prisma.SortOrder - _count?: Prisma.AttachmentsCountOrderByAggregateInput - _avg?: Prisma.AttachmentsAvgOrderByAggregateInput - _max?: Prisma.AttachmentsMaxOrderByAggregateInput - _min?: Prisma.AttachmentsMinOrderByAggregateInput - _sum?: Prisma.AttachmentsSumOrderByAggregateInput -} - -export type AttachmentsScalarWhereWithAggregatesInput = { - AND?: Prisma.AttachmentsScalarWhereWithAggregatesInput | Prisma.AttachmentsScalarWhereWithAggregatesInput[] - OR?: Prisma.AttachmentsScalarWhereWithAggregatesInput[] - NOT?: Prisma.AttachmentsScalarWhereWithAggregatesInput | Prisma.AttachmentsScalarWhereWithAggregatesInput[] - id?: Prisma.IntWithAggregatesFilter<"Attachments"> | number - sha256?: Prisma.StringWithAggregatesFilter<"Attachments"> | string - owner_type?: Prisma.StringWithAggregatesFilter<"Attachments"> | string - owner_id?: Prisma.StringWithAggregatesFilter<"Attachments"> | string - status?: Prisma.EnumAttachmentStatusWithAggregatesFilter<"Attachments"> | $Enums.AttachmentStatus - created_by?: Prisma.StringWithAggregatesFilter<"Attachments"> | string - created_at?: Prisma.DateTimeWithAggregatesFilter<"Attachments"> | Date | string - original_name?: Prisma.StringWithAggregatesFilter<"Attachments"> | string - retention_policy?: Prisma.EnumRetentionPolicyWithAggregatesFilter<"Attachments"> | $Enums.RetentionPolicy -} - -export type AttachmentsCreateInput = { - owner_type: string - owner_id: string - status?: $Enums.AttachmentStatus - created_by: string - created_at?: Date | string - original_name: string - retention_policy: $Enums.RetentionPolicy - AttachmentVariants?: Prisma.AttachmentVariantsCreateNestedManyWithoutAttachmentInput - blob: Prisma.BlobsCreateNestedOneWithoutAttachmentsInput - expenses?: Prisma.ExpensesCreateNestedManyWithoutAttachment_recordInput - expenses_archive?: Prisma.ExpensesArchiveCreateNestedManyWithoutAttachment_recordInput -} - -export type AttachmentsUncheckedCreateInput = { - id?: number - sha256: string - owner_type: string - owner_id: string - status?: $Enums.AttachmentStatus - created_by: string - created_at?: Date | string - original_name: string - retention_policy: $Enums.RetentionPolicy - AttachmentVariants?: Prisma.AttachmentVariantsUncheckedCreateNestedManyWithoutAttachmentInput - expenses?: Prisma.ExpensesUncheckedCreateNestedManyWithoutAttachment_recordInput - expenses_archive?: Prisma.ExpensesArchiveUncheckedCreateNestedManyWithoutAttachment_recordInput -} - -export type AttachmentsUpdateInput = { - owner_type?: Prisma.StringFieldUpdateOperationsInput | string - owner_id?: Prisma.StringFieldUpdateOperationsInput | string - status?: Prisma.EnumAttachmentStatusFieldUpdateOperationsInput | $Enums.AttachmentStatus - created_by?: Prisma.StringFieldUpdateOperationsInput | string - created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - original_name?: Prisma.StringFieldUpdateOperationsInput | string - retention_policy?: Prisma.EnumRetentionPolicyFieldUpdateOperationsInput | $Enums.RetentionPolicy - AttachmentVariants?: Prisma.AttachmentVariantsUpdateManyWithoutAttachmentNestedInput - blob?: Prisma.BlobsUpdateOneRequiredWithoutAttachmentsNestedInput - expenses?: Prisma.ExpensesUpdateManyWithoutAttachment_recordNestedInput - expenses_archive?: Prisma.ExpensesArchiveUpdateManyWithoutAttachment_recordNestedInput -} - -export type AttachmentsUncheckedUpdateInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - sha256?: Prisma.StringFieldUpdateOperationsInput | string - owner_type?: Prisma.StringFieldUpdateOperationsInput | string - owner_id?: Prisma.StringFieldUpdateOperationsInput | string - status?: Prisma.EnumAttachmentStatusFieldUpdateOperationsInput | $Enums.AttachmentStatus - created_by?: Prisma.StringFieldUpdateOperationsInput | string - created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - original_name?: Prisma.StringFieldUpdateOperationsInput | string - retention_policy?: Prisma.EnumRetentionPolicyFieldUpdateOperationsInput | $Enums.RetentionPolicy - AttachmentVariants?: Prisma.AttachmentVariantsUncheckedUpdateManyWithoutAttachmentNestedInput - expenses?: Prisma.ExpensesUncheckedUpdateManyWithoutAttachment_recordNestedInput - expenses_archive?: Prisma.ExpensesArchiveUncheckedUpdateManyWithoutAttachment_recordNestedInput -} - -export type AttachmentsCreateManyInput = { - id?: number - sha256: string - owner_type: string - owner_id: string - status?: $Enums.AttachmentStatus - created_by: string - created_at?: Date | string - original_name: string - retention_policy: $Enums.RetentionPolicy -} - -export type AttachmentsUpdateManyMutationInput = { - owner_type?: Prisma.StringFieldUpdateOperationsInput | string - owner_id?: Prisma.StringFieldUpdateOperationsInput | string - status?: Prisma.EnumAttachmentStatusFieldUpdateOperationsInput | $Enums.AttachmentStatus - created_by?: Prisma.StringFieldUpdateOperationsInput | string - created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - original_name?: Prisma.StringFieldUpdateOperationsInput | string - retention_policy?: Prisma.EnumRetentionPolicyFieldUpdateOperationsInput | $Enums.RetentionPolicy -} - -export type AttachmentsUncheckedUpdateManyInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - sha256?: Prisma.StringFieldUpdateOperationsInput | string - owner_type?: Prisma.StringFieldUpdateOperationsInput | string - owner_id?: Prisma.StringFieldUpdateOperationsInput | string - status?: Prisma.EnumAttachmentStatusFieldUpdateOperationsInput | $Enums.AttachmentStatus - created_by?: Prisma.StringFieldUpdateOperationsInput | string - created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - original_name?: Prisma.StringFieldUpdateOperationsInput | string - retention_policy?: Prisma.EnumRetentionPolicyFieldUpdateOperationsInput | $Enums.RetentionPolicy -} - -export type AttachmentsNullableScalarRelationFilter = { - is?: Prisma.AttachmentsWhereInput | null - isNot?: Prisma.AttachmentsWhereInput | null -} - -export type AttachmentsListRelationFilter = { - every?: Prisma.AttachmentsWhereInput - some?: Prisma.AttachmentsWhereInput - none?: Prisma.AttachmentsWhereInput -} - -export type AttachmentsOrderByRelationAggregateInput = { - _count?: Prisma.SortOrder -} - -export type AttachmentsCountOrderByAggregateInput = { - id?: Prisma.SortOrder - sha256?: Prisma.SortOrder - owner_type?: Prisma.SortOrder - owner_id?: Prisma.SortOrder - status?: Prisma.SortOrder - created_by?: Prisma.SortOrder - created_at?: Prisma.SortOrder - original_name?: Prisma.SortOrder - retention_policy?: Prisma.SortOrder -} - -export type AttachmentsAvgOrderByAggregateInput = { - id?: Prisma.SortOrder -} - -export type AttachmentsMaxOrderByAggregateInput = { - id?: Prisma.SortOrder - sha256?: Prisma.SortOrder - owner_type?: Prisma.SortOrder - owner_id?: Prisma.SortOrder - status?: Prisma.SortOrder - created_by?: Prisma.SortOrder - created_at?: Prisma.SortOrder - original_name?: Prisma.SortOrder - retention_policy?: Prisma.SortOrder -} - -export type AttachmentsMinOrderByAggregateInput = { - id?: Prisma.SortOrder - sha256?: Prisma.SortOrder - owner_type?: Prisma.SortOrder - owner_id?: Prisma.SortOrder - status?: Prisma.SortOrder - created_by?: Prisma.SortOrder - created_at?: Prisma.SortOrder - original_name?: Prisma.SortOrder - retention_policy?: Prisma.SortOrder -} - -export type AttachmentsSumOrderByAggregateInput = { - id?: Prisma.SortOrder -} - -export type AttachmentsScalarRelationFilter = { - is?: Prisma.AttachmentsWhereInput - isNot?: Prisma.AttachmentsWhereInput -} - -export type AttachmentsCreateNestedOneWithoutExpensesInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.AttachmentsCreateOrConnectWithoutExpensesInput - connect?: Prisma.AttachmentsWhereUniqueInput -} - -export type AttachmentsUpdateOneWithoutExpensesNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.AttachmentsCreateOrConnectWithoutExpensesInput - upsert?: Prisma.AttachmentsUpsertWithoutExpensesInput - disconnect?: Prisma.AttachmentsWhereInput | boolean - delete?: Prisma.AttachmentsWhereInput | boolean - connect?: Prisma.AttachmentsWhereUniqueInput - update?: Prisma.XOR, Prisma.AttachmentsUncheckedUpdateWithoutExpensesInput> -} - -export type AttachmentsCreateNestedOneWithoutExpenses_archiveInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.AttachmentsCreateOrConnectWithoutExpenses_archiveInput - connect?: Prisma.AttachmentsWhereUniqueInput -} - -export type AttachmentsUpdateOneWithoutExpenses_archiveNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.AttachmentsCreateOrConnectWithoutExpenses_archiveInput - upsert?: Prisma.AttachmentsUpsertWithoutExpenses_archiveInput - disconnect?: Prisma.AttachmentsWhereInput | boolean - delete?: Prisma.AttachmentsWhereInput | boolean - connect?: Prisma.AttachmentsWhereUniqueInput - update?: Prisma.XOR, Prisma.AttachmentsUncheckedUpdateWithoutExpenses_archiveInput> -} - -export type AttachmentsCreateNestedManyWithoutBlobInput = { - create?: Prisma.XOR | Prisma.AttachmentsCreateWithoutBlobInput[] | Prisma.AttachmentsUncheckedCreateWithoutBlobInput[] - connectOrCreate?: Prisma.AttachmentsCreateOrConnectWithoutBlobInput | Prisma.AttachmentsCreateOrConnectWithoutBlobInput[] - createMany?: Prisma.AttachmentsCreateManyBlobInputEnvelope - connect?: Prisma.AttachmentsWhereUniqueInput | Prisma.AttachmentsWhereUniqueInput[] -} - -export type AttachmentsUncheckedCreateNestedManyWithoutBlobInput = { - create?: Prisma.XOR | Prisma.AttachmentsCreateWithoutBlobInput[] | Prisma.AttachmentsUncheckedCreateWithoutBlobInput[] - connectOrCreate?: Prisma.AttachmentsCreateOrConnectWithoutBlobInput | Prisma.AttachmentsCreateOrConnectWithoutBlobInput[] - createMany?: Prisma.AttachmentsCreateManyBlobInputEnvelope - connect?: Prisma.AttachmentsWhereUniqueInput | Prisma.AttachmentsWhereUniqueInput[] -} - -export type AttachmentsUpdateManyWithoutBlobNestedInput = { - create?: Prisma.XOR | Prisma.AttachmentsCreateWithoutBlobInput[] | Prisma.AttachmentsUncheckedCreateWithoutBlobInput[] - connectOrCreate?: Prisma.AttachmentsCreateOrConnectWithoutBlobInput | Prisma.AttachmentsCreateOrConnectWithoutBlobInput[] - upsert?: Prisma.AttachmentsUpsertWithWhereUniqueWithoutBlobInput | Prisma.AttachmentsUpsertWithWhereUniqueWithoutBlobInput[] - createMany?: Prisma.AttachmentsCreateManyBlobInputEnvelope - set?: Prisma.AttachmentsWhereUniqueInput | Prisma.AttachmentsWhereUniqueInput[] - disconnect?: Prisma.AttachmentsWhereUniqueInput | Prisma.AttachmentsWhereUniqueInput[] - delete?: Prisma.AttachmentsWhereUniqueInput | Prisma.AttachmentsWhereUniqueInput[] - connect?: Prisma.AttachmentsWhereUniqueInput | Prisma.AttachmentsWhereUniqueInput[] - update?: Prisma.AttachmentsUpdateWithWhereUniqueWithoutBlobInput | Prisma.AttachmentsUpdateWithWhereUniqueWithoutBlobInput[] - updateMany?: Prisma.AttachmentsUpdateManyWithWhereWithoutBlobInput | Prisma.AttachmentsUpdateManyWithWhereWithoutBlobInput[] - deleteMany?: Prisma.AttachmentsScalarWhereInput | Prisma.AttachmentsScalarWhereInput[] -} - -export type AttachmentsUncheckedUpdateManyWithoutBlobNestedInput = { - create?: Prisma.XOR | Prisma.AttachmentsCreateWithoutBlobInput[] | Prisma.AttachmentsUncheckedCreateWithoutBlobInput[] - connectOrCreate?: Prisma.AttachmentsCreateOrConnectWithoutBlobInput | Prisma.AttachmentsCreateOrConnectWithoutBlobInput[] - upsert?: Prisma.AttachmentsUpsertWithWhereUniqueWithoutBlobInput | Prisma.AttachmentsUpsertWithWhereUniqueWithoutBlobInput[] - createMany?: Prisma.AttachmentsCreateManyBlobInputEnvelope - set?: Prisma.AttachmentsWhereUniqueInput | Prisma.AttachmentsWhereUniqueInput[] - disconnect?: Prisma.AttachmentsWhereUniqueInput | Prisma.AttachmentsWhereUniqueInput[] - delete?: Prisma.AttachmentsWhereUniqueInput | Prisma.AttachmentsWhereUniqueInput[] - connect?: Prisma.AttachmentsWhereUniqueInput | Prisma.AttachmentsWhereUniqueInput[] - update?: Prisma.AttachmentsUpdateWithWhereUniqueWithoutBlobInput | Prisma.AttachmentsUpdateWithWhereUniqueWithoutBlobInput[] - updateMany?: Prisma.AttachmentsUpdateManyWithWhereWithoutBlobInput | Prisma.AttachmentsUpdateManyWithWhereWithoutBlobInput[] - deleteMany?: Prisma.AttachmentsScalarWhereInput | Prisma.AttachmentsScalarWhereInput[] -} - -export type EnumAttachmentStatusFieldUpdateOperationsInput = { - set?: $Enums.AttachmentStatus -} - -export type EnumRetentionPolicyFieldUpdateOperationsInput = { - set?: $Enums.RetentionPolicy -} - -export type AttachmentsCreateNestedOneWithoutAttachmentVariantsInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.AttachmentsCreateOrConnectWithoutAttachmentVariantsInput - connect?: Prisma.AttachmentsWhereUniqueInput -} - -export type AttachmentsUpdateOneRequiredWithoutAttachmentVariantsNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.AttachmentsCreateOrConnectWithoutAttachmentVariantsInput - upsert?: Prisma.AttachmentsUpsertWithoutAttachmentVariantsInput - connect?: Prisma.AttachmentsWhereUniqueInput - update?: Prisma.XOR, Prisma.AttachmentsUncheckedUpdateWithoutAttachmentVariantsInput> -} - -export type AttachmentsCreateWithoutExpensesInput = { - owner_type: string - owner_id: string - status?: $Enums.AttachmentStatus - created_by: string - created_at?: Date | string - original_name: string - retention_policy: $Enums.RetentionPolicy - AttachmentVariants?: Prisma.AttachmentVariantsCreateNestedManyWithoutAttachmentInput - blob: Prisma.BlobsCreateNestedOneWithoutAttachmentsInput - expenses_archive?: Prisma.ExpensesArchiveCreateNestedManyWithoutAttachment_recordInput -} - -export type AttachmentsUncheckedCreateWithoutExpensesInput = { - id?: number - sha256: string - owner_type: string - owner_id: string - status?: $Enums.AttachmentStatus - created_by: string - created_at?: Date | string - original_name: string - retention_policy: $Enums.RetentionPolicy - AttachmentVariants?: Prisma.AttachmentVariantsUncheckedCreateNestedManyWithoutAttachmentInput - expenses_archive?: Prisma.ExpensesArchiveUncheckedCreateNestedManyWithoutAttachment_recordInput -} - -export type AttachmentsCreateOrConnectWithoutExpensesInput = { - where: Prisma.AttachmentsWhereUniqueInput - create: Prisma.XOR -} - -export type AttachmentsUpsertWithoutExpensesInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.AttachmentsWhereInput -} - -export type AttachmentsUpdateToOneWithWhereWithoutExpensesInput = { - where?: Prisma.AttachmentsWhereInput - data: Prisma.XOR -} - -export type AttachmentsUpdateWithoutExpensesInput = { - owner_type?: Prisma.StringFieldUpdateOperationsInput | string - owner_id?: Prisma.StringFieldUpdateOperationsInput | string - status?: Prisma.EnumAttachmentStatusFieldUpdateOperationsInput | $Enums.AttachmentStatus - created_by?: Prisma.StringFieldUpdateOperationsInput | string - created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - original_name?: Prisma.StringFieldUpdateOperationsInput | string - retention_policy?: Prisma.EnumRetentionPolicyFieldUpdateOperationsInput | $Enums.RetentionPolicy - AttachmentVariants?: Prisma.AttachmentVariantsUpdateManyWithoutAttachmentNestedInput - blob?: Prisma.BlobsUpdateOneRequiredWithoutAttachmentsNestedInput - expenses_archive?: Prisma.ExpensesArchiveUpdateManyWithoutAttachment_recordNestedInput -} - -export type AttachmentsUncheckedUpdateWithoutExpensesInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - sha256?: Prisma.StringFieldUpdateOperationsInput | string - owner_type?: Prisma.StringFieldUpdateOperationsInput | string - owner_id?: Prisma.StringFieldUpdateOperationsInput | string - status?: Prisma.EnumAttachmentStatusFieldUpdateOperationsInput | $Enums.AttachmentStatus - created_by?: Prisma.StringFieldUpdateOperationsInput | string - created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - original_name?: Prisma.StringFieldUpdateOperationsInput | string - retention_policy?: Prisma.EnumRetentionPolicyFieldUpdateOperationsInput | $Enums.RetentionPolicy - AttachmentVariants?: Prisma.AttachmentVariantsUncheckedUpdateManyWithoutAttachmentNestedInput - expenses_archive?: Prisma.ExpensesArchiveUncheckedUpdateManyWithoutAttachment_recordNestedInput -} - -export type AttachmentsCreateWithoutExpenses_archiveInput = { - owner_type: string - owner_id: string - status?: $Enums.AttachmentStatus - created_by: string - created_at?: Date | string - original_name: string - retention_policy: $Enums.RetentionPolicy - AttachmentVariants?: Prisma.AttachmentVariantsCreateNestedManyWithoutAttachmentInput - blob: Prisma.BlobsCreateNestedOneWithoutAttachmentsInput - expenses?: Prisma.ExpensesCreateNestedManyWithoutAttachment_recordInput -} - -export type AttachmentsUncheckedCreateWithoutExpenses_archiveInput = { - id?: number - sha256: string - owner_type: string - owner_id: string - status?: $Enums.AttachmentStatus - created_by: string - created_at?: Date | string - original_name: string - retention_policy: $Enums.RetentionPolicy - AttachmentVariants?: Prisma.AttachmentVariantsUncheckedCreateNestedManyWithoutAttachmentInput - expenses?: Prisma.ExpensesUncheckedCreateNestedManyWithoutAttachment_recordInput -} - -export type AttachmentsCreateOrConnectWithoutExpenses_archiveInput = { - where: Prisma.AttachmentsWhereUniqueInput - create: Prisma.XOR -} - -export type AttachmentsUpsertWithoutExpenses_archiveInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.AttachmentsWhereInput -} - -export type AttachmentsUpdateToOneWithWhereWithoutExpenses_archiveInput = { - where?: Prisma.AttachmentsWhereInput - data: Prisma.XOR -} - -export type AttachmentsUpdateWithoutExpenses_archiveInput = { - owner_type?: Prisma.StringFieldUpdateOperationsInput | string - owner_id?: Prisma.StringFieldUpdateOperationsInput | string - status?: Prisma.EnumAttachmentStatusFieldUpdateOperationsInput | $Enums.AttachmentStatus - created_by?: Prisma.StringFieldUpdateOperationsInput | string - created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - original_name?: Prisma.StringFieldUpdateOperationsInput | string - retention_policy?: Prisma.EnumRetentionPolicyFieldUpdateOperationsInput | $Enums.RetentionPolicy - AttachmentVariants?: Prisma.AttachmentVariantsUpdateManyWithoutAttachmentNestedInput - blob?: Prisma.BlobsUpdateOneRequiredWithoutAttachmentsNestedInput - expenses?: Prisma.ExpensesUpdateManyWithoutAttachment_recordNestedInput -} - -export type AttachmentsUncheckedUpdateWithoutExpenses_archiveInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - sha256?: Prisma.StringFieldUpdateOperationsInput | string - owner_type?: Prisma.StringFieldUpdateOperationsInput | string - owner_id?: Prisma.StringFieldUpdateOperationsInput | string - status?: Prisma.EnumAttachmentStatusFieldUpdateOperationsInput | $Enums.AttachmentStatus - created_by?: Prisma.StringFieldUpdateOperationsInput | string - created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - original_name?: Prisma.StringFieldUpdateOperationsInput | string - retention_policy?: Prisma.EnumRetentionPolicyFieldUpdateOperationsInput | $Enums.RetentionPolicy - AttachmentVariants?: Prisma.AttachmentVariantsUncheckedUpdateManyWithoutAttachmentNestedInput - expenses?: Prisma.ExpensesUncheckedUpdateManyWithoutAttachment_recordNestedInput -} - -export type AttachmentsCreateWithoutBlobInput = { - owner_type: string - owner_id: string - status?: $Enums.AttachmentStatus - created_by: string - created_at?: Date | string - original_name: string - retention_policy: $Enums.RetentionPolicy - AttachmentVariants?: Prisma.AttachmentVariantsCreateNestedManyWithoutAttachmentInput - expenses?: Prisma.ExpensesCreateNestedManyWithoutAttachment_recordInput - expenses_archive?: Prisma.ExpensesArchiveCreateNestedManyWithoutAttachment_recordInput -} - -export type AttachmentsUncheckedCreateWithoutBlobInput = { - id?: number - owner_type: string - owner_id: string - status?: $Enums.AttachmentStatus - created_by: string - created_at?: Date | string - original_name: string - retention_policy: $Enums.RetentionPolicy - AttachmentVariants?: Prisma.AttachmentVariantsUncheckedCreateNestedManyWithoutAttachmentInput - expenses?: Prisma.ExpensesUncheckedCreateNestedManyWithoutAttachment_recordInput - expenses_archive?: Prisma.ExpensesArchiveUncheckedCreateNestedManyWithoutAttachment_recordInput -} - -export type AttachmentsCreateOrConnectWithoutBlobInput = { - where: Prisma.AttachmentsWhereUniqueInput - create: Prisma.XOR -} - -export type AttachmentsCreateManyBlobInputEnvelope = { - data: Prisma.AttachmentsCreateManyBlobInput | Prisma.AttachmentsCreateManyBlobInput[] - skipDuplicates?: boolean -} - -export type AttachmentsUpsertWithWhereUniqueWithoutBlobInput = { - where: Prisma.AttachmentsWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type AttachmentsUpdateWithWhereUniqueWithoutBlobInput = { - where: Prisma.AttachmentsWhereUniqueInput - data: Prisma.XOR -} - -export type AttachmentsUpdateManyWithWhereWithoutBlobInput = { - where: Prisma.AttachmentsScalarWhereInput - data: Prisma.XOR -} - -export type AttachmentsScalarWhereInput = { - AND?: Prisma.AttachmentsScalarWhereInput | Prisma.AttachmentsScalarWhereInput[] - OR?: Prisma.AttachmentsScalarWhereInput[] - NOT?: Prisma.AttachmentsScalarWhereInput | Prisma.AttachmentsScalarWhereInput[] - id?: Prisma.IntFilter<"Attachments"> | number - sha256?: Prisma.StringFilter<"Attachments"> | string - owner_type?: Prisma.StringFilter<"Attachments"> | string - owner_id?: Prisma.StringFilter<"Attachments"> | string - status?: Prisma.EnumAttachmentStatusFilter<"Attachments"> | $Enums.AttachmentStatus - created_by?: Prisma.StringFilter<"Attachments"> | string - created_at?: Prisma.DateTimeFilter<"Attachments"> | Date | string - original_name?: Prisma.StringFilter<"Attachments"> | string - retention_policy?: Prisma.EnumRetentionPolicyFilter<"Attachments"> | $Enums.RetentionPolicy -} - -export type AttachmentsCreateWithoutAttachmentVariantsInput = { - owner_type: string - owner_id: string - status?: $Enums.AttachmentStatus - created_by: string - created_at?: Date | string - original_name: string - retention_policy: $Enums.RetentionPolicy - blob: Prisma.BlobsCreateNestedOneWithoutAttachmentsInput - expenses?: Prisma.ExpensesCreateNestedManyWithoutAttachment_recordInput - expenses_archive?: Prisma.ExpensesArchiveCreateNestedManyWithoutAttachment_recordInput -} - -export type AttachmentsUncheckedCreateWithoutAttachmentVariantsInput = { - id?: number - sha256: string - owner_type: string - owner_id: string - status?: $Enums.AttachmentStatus - created_by: string - created_at?: Date | string - original_name: string - retention_policy: $Enums.RetentionPolicy - expenses?: Prisma.ExpensesUncheckedCreateNestedManyWithoutAttachment_recordInput - expenses_archive?: Prisma.ExpensesArchiveUncheckedCreateNestedManyWithoutAttachment_recordInput -} - -export type AttachmentsCreateOrConnectWithoutAttachmentVariantsInput = { - where: Prisma.AttachmentsWhereUniqueInput - create: Prisma.XOR -} - -export type AttachmentsUpsertWithoutAttachmentVariantsInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.AttachmentsWhereInput -} - -export type AttachmentsUpdateToOneWithWhereWithoutAttachmentVariantsInput = { - where?: Prisma.AttachmentsWhereInput - data: Prisma.XOR -} - -export type AttachmentsUpdateWithoutAttachmentVariantsInput = { - owner_type?: Prisma.StringFieldUpdateOperationsInput | string - owner_id?: Prisma.StringFieldUpdateOperationsInput | string - status?: Prisma.EnumAttachmentStatusFieldUpdateOperationsInput | $Enums.AttachmentStatus - created_by?: Prisma.StringFieldUpdateOperationsInput | string - created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - original_name?: Prisma.StringFieldUpdateOperationsInput | string - retention_policy?: Prisma.EnumRetentionPolicyFieldUpdateOperationsInput | $Enums.RetentionPolicy - blob?: Prisma.BlobsUpdateOneRequiredWithoutAttachmentsNestedInput - expenses?: Prisma.ExpensesUpdateManyWithoutAttachment_recordNestedInput - expenses_archive?: Prisma.ExpensesArchiveUpdateManyWithoutAttachment_recordNestedInput -} - -export type AttachmentsUncheckedUpdateWithoutAttachmentVariantsInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - sha256?: Prisma.StringFieldUpdateOperationsInput | string - owner_type?: Prisma.StringFieldUpdateOperationsInput | string - owner_id?: Prisma.StringFieldUpdateOperationsInput | string - status?: Prisma.EnumAttachmentStatusFieldUpdateOperationsInput | $Enums.AttachmentStatus - created_by?: Prisma.StringFieldUpdateOperationsInput | string - created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - original_name?: Prisma.StringFieldUpdateOperationsInput | string - retention_policy?: Prisma.EnumRetentionPolicyFieldUpdateOperationsInput | $Enums.RetentionPolicy - expenses?: Prisma.ExpensesUncheckedUpdateManyWithoutAttachment_recordNestedInput - expenses_archive?: Prisma.ExpensesArchiveUncheckedUpdateManyWithoutAttachment_recordNestedInput -} - -export type AttachmentsCreateManyBlobInput = { - id?: number - owner_type: string - owner_id: string - status?: $Enums.AttachmentStatus - created_by: string - created_at?: Date | string - original_name: string - retention_policy: $Enums.RetentionPolicy -} - -export type AttachmentsUpdateWithoutBlobInput = { - owner_type?: Prisma.StringFieldUpdateOperationsInput | string - owner_id?: Prisma.StringFieldUpdateOperationsInput | string - status?: Prisma.EnumAttachmentStatusFieldUpdateOperationsInput | $Enums.AttachmentStatus - created_by?: Prisma.StringFieldUpdateOperationsInput | string - created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - original_name?: Prisma.StringFieldUpdateOperationsInput | string - retention_policy?: Prisma.EnumRetentionPolicyFieldUpdateOperationsInput | $Enums.RetentionPolicy - AttachmentVariants?: Prisma.AttachmentVariantsUpdateManyWithoutAttachmentNestedInput - expenses?: Prisma.ExpensesUpdateManyWithoutAttachment_recordNestedInput - expenses_archive?: Prisma.ExpensesArchiveUpdateManyWithoutAttachment_recordNestedInput -} - -export type AttachmentsUncheckedUpdateWithoutBlobInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - owner_type?: Prisma.StringFieldUpdateOperationsInput | string - owner_id?: Prisma.StringFieldUpdateOperationsInput | string - status?: Prisma.EnumAttachmentStatusFieldUpdateOperationsInput | $Enums.AttachmentStatus - created_by?: Prisma.StringFieldUpdateOperationsInput | string - created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - original_name?: Prisma.StringFieldUpdateOperationsInput | string - retention_policy?: Prisma.EnumRetentionPolicyFieldUpdateOperationsInput | $Enums.RetentionPolicy - AttachmentVariants?: Prisma.AttachmentVariantsUncheckedUpdateManyWithoutAttachmentNestedInput - expenses?: Prisma.ExpensesUncheckedUpdateManyWithoutAttachment_recordNestedInput - expenses_archive?: Prisma.ExpensesArchiveUncheckedUpdateManyWithoutAttachment_recordNestedInput -} - -export type AttachmentsUncheckedUpdateManyWithoutBlobInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - owner_type?: Prisma.StringFieldUpdateOperationsInput | string - owner_id?: Prisma.StringFieldUpdateOperationsInput | string - status?: Prisma.EnumAttachmentStatusFieldUpdateOperationsInput | $Enums.AttachmentStatus - created_by?: Prisma.StringFieldUpdateOperationsInput | string - created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - original_name?: Prisma.StringFieldUpdateOperationsInput | string - retention_policy?: Prisma.EnumRetentionPolicyFieldUpdateOperationsInput | $Enums.RetentionPolicy -} - - -/** - * Count Type AttachmentsCountOutputType - */ - -export type AttachmentsCountOutputType = { - AttachmentVariants: number - expenses: number - expenses_archive: number -} - -export type AttachmentsCountOutputTypeSelect = { - AttachmentVariants?: boolean | AttachmentsCountOutputTypeCountAttachmentVariantsArgs - expenses?: boolean | AttachmentsCountOutputTypeCountExpensesArgs - expenses_archive?: boolean | AttachmentsCountOutputTypeCountExpenses_archiveArgs -} - -/** - * AttachmentsCountOutputType without action - */ -export type AttachmentsCountOutputTypeDefaultArgs = { - /** - * Select specific fields to fetch from the AttachmentsCountOutputType - */ - select?: Prisma.AttachmentsCountOutputTypeSelect | null -} - -/** - * AttachmentsCountOutputType without action - */ -export type AttachmentsCountOutputTypeCountAttachmentVariantsArgs = { - where?: Prisma.AttachmentVariantsWhereInput -} - -/** - * AttachmentsCountOutputType without action - */ -export type AttachmentsCountOutputTypeCountExpensesArgs = { - where?: Prisma.ExpensesWhereInput -} - -/** - * AttachmentsCountOutputType without action - */ -export type AttachmentsCountOutputTypeCountExpenses_archiveArgs = { - where?: Prisma.ExpensesArchiveWhereInput -} - - -export type AttachmentsSelect = runtime.Types.Extensions.GetSelect<{ - id?: boolean - sha256?: boolean - owner_type?: boolean - owner_id?: boolean - status?: boolean - created_by?: boolean - created_at?: boolean - original_name?: boolean - retention_policy?: boolean - AttachmentVariants?: boolean | Prisma.Attachments$AttachmentVariantsArgs - blob?: boolean | Prisma.BlobsDefaultArgs - expenses?: boolean | Prisma.Attachments$expensesArgs - expenses_archive?: boolean | Prisma.Attachments$expenses_archiveArgs - _count?: boolean | Prisma.AttachmentsCountOutputTypeDefaultArgs -}, ExtArgs["result"]["attachments"]> - -export type AttachmentsSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ - id?: boolean - sha256?: boolean - owner_type?: boolean - owner_id?: boolean - status?: boolean - created_by?: boolean - created_at?: boolean - original_name?: boolean - retention_policy?: boolean - blob?: boolean | Prisma.BlobsDefaultArgs -}, ExtArgs["result"]["attachments"]> - -export type AttachmentsSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ - id?: boolean - sha256?: boolean - owner_type?: boolean - owner_id?: boolean - status?: boolean - created_by?: boolean - created_at?: boolean - original_name?: boolean - retention_policy?: boolean - blob?: boolean | Prisma.BlobsDefaultArgs -}, ExtArgs["result"]["attachments"]> - -export type AttachmentsSelectScalar = { - id?: boolean - sha256?: boolean - owner_type?: boolean - owner_id?: boolean - status?: boolean - created_by?: boolean - created_at?: boolean - original_name?: boolean - retention_policy?: boolean -} - -export type AttachmentsOmit = runtime.Types.Extensions.GetOmit<"id" | "sha256" | "owner_type" | "owner_id" | "status" | "created_by" | "created_at" | "original_name" | "retention_policy", ExtArgs["result"]["attachments"]> -export type AttachmentsInclude = { - AttachmentVariants?: boolean | Prisma.Attachments$AttachmentVariantsArgs - blob?: boolean | Prisma.BlobsDefaultArgs - expenses?: boolean | Prisma.Attachments$expensesArgs - expenses_archive?: boolean | Prisma.Attachments$expenses_archiveArgs - _count?: boolean | Prisma.AttachmentsCountOutputTypeDefaultArgs -} -export type AttachmentsIncludeCreateManyAndReturn = { - blob?: boolean | Prisma.BlobsDefaultArgs -} -export type AttachmentsIncludeUpdateManyAndReturn = { - blob?: boolean | Prisma.BlobsDefaultArgs -} - -export type $AttachmentsPayload = { - name: "Attachments" - objects: { - AttachmentVariants: Prisma.$AttachmentVariantsPayload[] - blob: Prisma.$BlobsPayload - expenses: Prisma.$ExpensesPayload[] - expenses_archive: Prisma.$ExpensesArchivePayload[] - } - scalars: runtime.Types.Extensions.GetPayloadResult<{ - id: number - sha256: string - owner_type: string - owner_id: string - status: $Enums.AttachmentStatus - created_by: string - created_at: Date - original_name: string - retention_policy: $Enums.RetentionPolicy - }, ExtArgs["result"]["attachments"]> - composites: {} -} - -export type AttachmentsGetPayload = runtime.Types.Result.GetResult - -export type AttachmentsCountArgs = - Omit & { - select?: AttachmentsCountAggregateInputType | true - } - -export interface AttachmentsDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['Attachments'], meta: { name: 'Attachments' } } - /** - * Find zero or one Attachments that matches the filter. - * @param {AttachmentsFindUniqueArgs} args - Arguments to find a Attachments - * @example - * // Get one Attachments - * const attachments = await prisma.attachments.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__AttachmentsClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one Attachments that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {AttachmentsFindUniqueOrThrowArgs} args - Arguments to find a Attachments - * @example - * // Get one Attachments - * const attachments = await prisma.attachments.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__AttachmentsClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first Attachments that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AttachmentsFindFirstArgs} args - Arguments to find a Attachments - * @example - * // Get one Attachments - * const attachments = await prisma.attachments.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__AttachmentsClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first Attachments that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AttachmentsFindFirstOrThrowArgs} args - Arguments to find a Attachments - * @example - * // Get one Attachments - * const attachments = await prisma.attachments.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__AttachmentsClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more Attachments that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AttachmentsFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all Attachments - * const attachments = await prisma.attachments.findMany() - * - * // Get first 10 Attachments - * const attachments = await prisma.attachments.findMany({ take: 10 }) - * - * // Only select the `id` - * const attachmentsWithIdOnly = await prisma.attachments.findMany({ select: { id: true } }) - * - */ - findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> - - /** - * Create a Attachments. - * @param {AttachmentsCreateArgs} args - Arguments to create a Attachments. - * @example - * // Create one Attachments - * const Attachments = await prisma.attachments.create({ - * data: { - * // ... data to create a Attachments - * } - * }) - * - */ - create(args: Prisma.SelectSubset>): Prisma.Prisma__AttachmentsClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many Attachments. - * @param {AttachmentsCreateManyArgs} args - Arguments to create many Attachments. - * @example - * // Create many Attachments - * const attachments = await prisma.attachments.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Create many Attachments and returns the data saved in the database. - * @param {AttachmentsCreateManyAndReturnArgs} args - Arguments to create many Attachments. - * @example - * // Create many Attachments - * const attachments = await prisma.attachments.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many Attachments and only return the `id` - * const attachmentsWithIdOnly = await prisma.attachments.createManyAndReturn({ - * select: { id: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "createManyAndReturn", GlobalOmitOptions>> - - /** - * Delete a Attachments. - * @param {AttachmentsDeleteArgs} args - Arguments to delete one Attachments. - * @example - * // Delete one Attachments - * const Attachments = await prisma.attachments.delete({ - * where: { - * // ... filter to delete one Attachments - * } - * }) - * - */ - delete(args: Prisma.SelectSubset>): Prisma.Prisma__AttachmentsClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one Attachments. - * @param {AttachmentsUpdateArgs} args - Arguments to update one Attachments. - * @example - * // Update one Attachments - * const attachments = await prisma.attachments.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: Prisma.SelectSubset>): Prisma.Prisma__AttachmentsClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more Attachments. - * @param {AttachmentsDeleteManyArgs} args - Arguments to filter Attachments to delete. - * @example - * // Delete a few Attachments - * const { count } = await prisma.attachments.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more Attachments. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AttachmentsUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Attachments - * const attachments = await prisma.attachments.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more Attachments and returns the data updated in the database. - * @param {AttachmentsUpdateManyAndReturnArgs} args - Arguments to update many Attachments. - * @example - * // Update many Attachments - * const attachments = await prisma.attachments.updateManyAndReturn({ - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * - * // Update zero or more Attachments and only return the `id` - * const attachmentsWithIdOnly = await prisma.attachments.updateManyAndReturn({ - * select: { id: true }, - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - updateManyAndReturn(args: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "updateManyAndReturn", GlobalOmitOptions>> - - /** - * Create or update one Attachments. - * @param {AttachmentsUpsertArgs} args - Arguments to update or create a Attachments. - * @example - * // Update or create a Attachments - * const attachments = await prisma.attachments.upsert({ - * create: { - * // ... data to create a Attachments - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Attachments we want to update - * } - * }) - */ - upsert(args: Prisma.SelectSubset>): Prisma.Prisma__AttachmentsClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of Attachments. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AttachmentsCountArgs} args - Arguments to filter Attachments to count. - * @example - * // Count the number of Attachments - * const count = await prisma.attachments.count({ - * where: { - * // ... the filter for the Attachments we want to count - * } - * }) - **/ - count( - args?: Prisma.Subset, - ): Prisma.PrismaPromise< - T extends runtime.Types.Utils.Record<'select', any> - ? T['select'] extends true - ? number - : Prisma.GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a Attachments. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AttachmentsAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Prisma.Subset): Prisma.PrismaPromise> - - /** - * Group by Attachments. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {AttachmentsGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends AttachmentsGroupByArgs, - HasSelectOrTake extends Prisma.Or< - Prisma.Extends<'skip', Prisma.Keys>, - Prisma.Extends<'take', Prisma.Keys> - >, - OrderByArg extends Prisma.True extends HasSelectOrTake - ? { orderBy: AttachmentsGroupByArgs['orderBy'] } - : { orderBy?: AttachmentsGroupByArgs['orderBy'] }, - OrderFields extends Prisma.ExcludeUnderscoreKeys>>, - ByFields extends Prisma.MaybeTupleToUnion, - ByValid extends Prisma.Has, - HavingFields extends Prisma.GetHavingFields, - HavingValid extends Prisma.Has, - ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, - InputErrors extends ByEmpty extends Prisma.True - ? `Error: "by" must not be empty.` - : HavingValid extends Prisma.False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetAttachmentsGroupByPayload : Prisma.PrismaPromise -/** - * Fields of the Attachments model - */ -readonly fields: AttachmentsFieldRefs; -} - -/** - * The delegate class that acts as a "Promise-like" for Attachments. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ -export interface Prisma__AttachmentsClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - AttachmentVariants = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - blob = {}>(args?: Prisma.Subset>): Prisma.Prisma__BlobsClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - expenses = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - expenses_archive = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise -} - - - - -/** - * Fields of the Attachments model - */ -export interface AttachmentsFieldRefs { - readonly id: Prisma.FieldRef<"Attachments", 'Int'> - readonly sha256: Prisma.FieldRef<"Attachments", 'String'> - readonly owner_type: Prisma.FieldRef<"Attachments", 'String'> - readonly owner_id: Prisma.FieldRef<"Attachments", 'String'> - readonly status: Prisma.FieldRef<"Attachments", 'AttachmentStatus'> - readonly created_by: Prisma.FieldRef<"Attachments", 'String'> - readonly created_at: Prisma.FieldRef<"Attachments", 'DateTime'> - readonly original_name: Prisma.FieldRef<"Attachments", 'String'> - readonly retention_policy: Prisma.FieldRef<"Attachments", 'RetentionPolicy'> -} - - -// Custom InputTypes -/** - * Attachments findUnique - */ -export type AttachmentsFindUniqueArgs = { - /** - * Select specific fields to fetch from the Attachments - */ - select?: Prisma.AttachmentsSelect | null - /** - * Omit specific fields from the Attachments - */ - omit?: Prisma.AttachmentsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.AttachmentsInclude | null - /** - * Filter, which Attachments to fetch. - */ - where: Prisma.AttachmentsWhereUniqueInput -} - -/** - * Attachments findUniqueOrThrow - */ -export type AttachmentsFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the Attachments - */ - select?: Prisma.AttachmentsSelect | null - /** - * Omit specific fields from the Attachments - */ - omit?: Prisma.AttachmentsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.AttachmentsInclude | null - /** - * Filter, which Attachments to fetch. - */ - where: Prisma.AttachmentsWhereUniqueInput -} - -/** - * Attachments findFirst - */ -export type AttachmentsFindFirstArgs = { - /** - * Select specific fields to fetch from the Attachments - */ - select?: Prisma.AttachmentsSelect | null - /** - * Omit specific fields from the Attachments - */ - omit?: Prisma.AttachmentsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.AttachmentsInclude | null - /** - * Filter, which Attachments to fetch. - */ - where?: Prisma.AttachmentsWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Attachments to fetch. - */ - orderBy?: Prisma.AttachmentsOrderByWithRelationInput | Prisma.AttachmentsOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Attachments. - */ - cursor?: Prisma.AttachmentsWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Attachments from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Attachments. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Attachments. - */ - distinct?: Prisma.AttachmentsScalarFieldEnum | Prisma.AttachmentsScalarFieldEnum[] -} - -/** - * Attachments findFirstOrThrow - */ -export type AttachmentsFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the Attachments - */ - select?: Prisma.AttachmentsSelect | null - /** - * Omit specific fields from the Attachments - */ - omit?: Prisma.AttachmentsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.AttachmentsInclude | null - /** - * Filter, which Attachments to fetch. - */ - where?: Prisma.AttachmentsWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Attachments to fetch. - */ - orderBy?: Prisma.AttachmentsOrderByWithRelationInput | Prisma.AttachmentsOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Attachments. - */ - cursor?: Prisma.AttachmentsWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Attachments from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Attachments. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Attachments. - */ - distinct?: Prisma.AttachmentsScalarFieldEnum | Prisma.AttachmentsScalarFieldEnum[] -} - -/** - * Attachments findMany - */ -export type AttachmentsFindManyArgs = { - /** - * Select specific fields to fetch from the Attachments - */ - select?: Prisma.AttachmentsSelect | null - /** - * Omit specific fields from the Attachments - */ - omit?: Prisma.AttachmentsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.AttachmentsInclude | null - /** - * Filter, which Attachments to fetch. - */ - where?: Prisma.AttachmentsWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Attachments to fetch. - */ - orderBy?: Prisma.AttachmentsOrderByWithRelationInput | Prisma.AttachmentsOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing Attachments. - */ - cursor?: Prisma.AttachmentsWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Attachments from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Attachments. - */ - skip?: number - distinct?: Prisma.AttachmentsScalarFieldEnum | Prisma.AttachmentsScalarFieldEnum[] -} - -/** - * Attachments create - */ -export type AttachmentsCreateArgs = { - /** - * Select specific fields to fetch from the Attachments - */ - select?: Prisma.AttachmentsSelect | null - /** - * Omit specific fields from the Attachments - */ - omit?: Prisma.AttachmentsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.AttachmentsInclude | null - /** - * The data needed to create a Attachments. - */ - data: Prisma.XOR -} - -/** - * Attachments createMany - */ -export type AttachmentsCreateManyArgs = { - /** - * The data used to create many Attachments. - */ - data: Prisma.AttachmentsCreateManyInput | Prisma.AttachmentsCreateManyInput[] - skipDuplicates?: boolean -} - -/** - * Attachments createManyAndReturn - */ -export type AttachmentsCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the Attachments - */ - select?: Prisma.AttachmentsSelectCreateManyAndReturn | null - /** - * Omit specific fields from the Attachments - */ - omit?: Prisma.AttachmentsOmit | null - /** - * The data used to create many Attachments. - */ - data: Prisma.AttachmentsCreateManyInput | Prisma.AttachmentsCreateManyInput[] - skipDuplicates?: boolean - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.AttachmentsIncludeCreateManyAndReturn | null -} - -/** - * Attachments update - */ -export type AttachmentsUpdateArgs = { - /** - * Select specific fields to fetch from the Attachments - */ - select?: Prisma.AttachmentsSelect | null - /** - * Omit specific fields from the Attachments - */ - omit?: Prisma.AttachmentsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.AttachmentsInclude | null - /** - * The data needed to update a Attachments. - */ - data: Prisma.XOR - /** - * Choose, which Attachments to update. - */ - where: Prisma.AttachmentsWhereUniqueInput -} - -/** - * Attachments updateMany - */ -export type AttachmentsUpdateManyArgs = { - /** - * The data used to update Attachments. - */ - data: Prisma.XOR - /** - * Filter which Attachments to update - */ - where?: Prisma.AttachmentsWhereInput - /** - * Limit how many Attachments to update. - */ - limit?: number -} - -/** - * Attachments updateManyAndReturn - */ -export type AttachmentsUpdateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the Attachments - */ - select?: Prisma.AttachmentsSelectUpdateManyAndReturn | null - /** - * Omit specific fields from the Attachments - */ - omit?: Prisma.AttachmentsOmit | null - /** - * The data used to update Attachments. - */ - data: Prisma.XOR - /** - * Filter which Attachments to update - */ - where?: Prisma.AttachmentsWhereInput - /** - * Limit how many Attachments to update. - */ - limit?: number - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.AttachmentsIncludeUpdateManyAndReturn | null -} - -/** - * Attachments upsert - */ -export type AttachmentsUpsertArgs = { - /** - * Select specific fields to fetch from the Attachments - */ - select?: Prisma.AttachmentsSelect | null - /** - * Omit specific fields from the Attachments - */ - omit?: Prisma.AttachmentsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.AttachmentsInclude | null - /** - * The filter to search for the Attachments to update in case it exists. - */ - where: Prisma.AttachmentsWhereUniqueInput - /** - * In case the Attachments found by the `where` argument doesn't exist, create a new Attachments with this data. - */ - create: Prisma.XOR - /** - * In case the Attachments was found with the provided `where` argument, update it with this data. - */ - update: Prisma.XOR -} - -/** - * Attachments delete - */ -export type AttachmentsDeleteArgs = { - /** - * Select specific fields to fetch from the Attachments - */ - select?: Prisma.AttachmentsSelect | null - /** - * Omit specific fields from the Attachments - */ - omit?: Prisma.AttachmentsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.AttachmentsInclude | null - /** - * Filter which Attachments to delete. - */ - where: Prisma.AttachmentsWhereUniqueInput -} - -/** - * Attachments deleteMany - */ -export type AttachmentsDeleteManyArgs = { - /** - * Filter which Attachments to delete - */ - where?: Prisma.AttachmentsWhereInput - /** - * Limit how many Attachments to delete. - */ - limit?: number -} - -/** - * Attachments.AttachmentVariants - */ -export type Attachments$AttachmentVariantsArgs = { - /** - * Select specific fields to fetch from the AttachmentVariants - */ - select?: Prisma.AttachmentVariantsSelect | null - /** - * Omit specific fields from the AttachmentVariants - */ - omit?: Prisma.AttachmentVariantsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.AttachmentVariantsInclude | null - where?: Prisma.AttachmentVariantsWhereInput - orderBy?: Prisma.AttachmentVariantsOrderByWithRelationInput | Prisma.AttachmentVariantsOrderByWithRelationInput[] - cursor?: Prisma.AttachmentVariantsWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.AttachmentVariantsScalarFieldEnum | Prisma.AttachmentVariantsScalarFieldEnum[] -} - -/** - * Attachments.expenses - */ -export type Attachments$expensesArgs = { - /** - * Select specific fields to fetch from the Expenses - */ - select?: Prisma.ExpensesSelect | null - /** - * Omit specific fields from the Expenses - */ - omit?: Prisma.ExpensesOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ExpensesInclude | null - where?: Prisma.ExpensesWhereInput - orderBy?: Prisma.ExpensesOrderByWithRelationInput | Prisma.ExpensesOrderByWithRelationInput[] - cursor?: Prisma.ExpensesWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.ExpensesScalarFieldEnum | Prisma.ExpensesScalarFieldEnum[] -} - -/** - * Attachments.expenses_archive - */ -export type Attachments$expenses_archiveArgs = { - /** - * Select specific fields to fetch from the ExpensesArchive - */ - select?: Prisma.ExpensesArchiveSelect | null - /** - * Omit specific fields from the ExpensesArchive - */ - omit?: Prisma.ExpensesArchiveOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ExpensesArchiveInclude | null - where?: Prisma.ExpensesArchiveWhereInput - orderBy?: Prisma.ExpensesArchiveOrderByWithRelationInput | Prisma.ExpensesArchiveOrderByWithRelationInput[] - cursor?: Prisma.ExpensesArchiveWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.ExpensesArchiveScalarFieldEnum | Prisma.ExpensesArchiveScalarFieldEnum[] -} - -/** - * Attachments without action - */ -export type AttachmentsDefaultArgs = { - /** - * Select specific fields to fetch from the Attachments - */ - select?: Prisma.AttachmentsSelect | null - /** - * Omit specific fields from the Attachments - */ - omit?: Prisma.AttachmentsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.AttachmentsInclude | null -} diff --git a/prisma/postgres/generated/prisma/client/postgres/models/Blobs.ts b/prisma/postgres/generated/prisma/client/postgres/models/Blobs.ts deleted file mode 100644 index 88a415b..0000000 --- a/prisma/postgres/generated/prisma/client/postgres/models/Blobs.ts +++ /dev/null @@ -1,1404 +0,0 @@ - -/* !!! This is code generated by Prisma. Do not edit directly. !!! */ -/* eslint-disable */ -// biome-ignore-all lint: generated file -// @ts-nocheck -/* - * This file exports the `Blobs` model and its related types. - * - * 🟢 You can import this file directly. - */ -import type * as runtime from "@prisma/client/runtime/client" -import type * as $Enums from "../enums" -import type * as Prisma from "../internal/prismaNamespace" - -/** - * Model Blobs - * - */ -export type BlobsModel = runtime.Types.Result.DefaultSelection - -export type AggregateBlobs = { - _count: BlobsCountAggregateOutputType | null - _avg: BlobsAvgAggregateOutputType | null - _sum: BlobsSumAggregateOutputType | null - _min: BlobsMinAggregateOutputType | null - _max: BlobsMaxAggregateOutputType | null -} - -export type BlobsAvgAggregateOutputType = { - size: number | null - refcount: number | null -} - -export type BlobsSumAggregateOutputType = { - size: number | null - refcount: number | null -} - -export type BlobsMinAggregateOutputType = { - sha256: string | null - size: number | null - mime: string | null - storage_path: string | null - refcount: number | null - created_at: Date | null -} - -export type BlobsMaxAggregateOutputType = { - sha256: string | null - size: number | null - mime: string | null - storage_path: string | null - refcount: number | null - created_at: Date | null -} - -export type BlobsCountAggregateOutputType = { - sha256: number - size: number - mime: number - storage_path: number - refcount: number - created_at: number - _all: number -} - - -export type BlobsAvgAggregateInputType = { - size?: true - refcount?: true -} - -export type BlobsSumAggregateInputType = { - size?: true - refcount?: true -} - -export type BlobsMinAggregateInputType = { - sha256?: true - size?: true - mime?: true - storage_path?: true - refcount?: true - created_at?: true -} - -export type BlobsMaxAggregateInputType = { - sha256?: true - size?: true - mime?: true - storage_path?: true - refcount?: true - created_at?: true -} - -export type BlobsCountAggregateInputType = { - sha256?: true - size?: true - mime?: true - storage_path?: true - refcount?: true - created_at?: true - _all?: true -} - -export type BlobsAggregateArgs = { - /** - * Filter which Blobs to aggregate. - */ - where?: Prisma.BlobsWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Blobs to fetch. - */ - orderBy?: Prisma.BlobsOrderByWithRelationInput | Prisma.BlobsOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: Prisma.BlobsWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Blobs from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Blobs. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned Blobs - **/ - _count?: true | BlobsCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: BlobsAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: BlobsSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: BlobsMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: BlobsMaxAggregateInputType -} - -export type GetBlobsAggregateType = { - [P in keyof T & keyof AggregateBlobs]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType -} - - - - -export type BlobsGroupByArgs = { - where?: Prisma.BlobsWhereInput - orderBy?: Prisma.BlobsOrderByWithAggregationInput | Prisma.BlobsOrderByWithAggregationInput[] - by: Prisma.BlobsScalarFieldEnum[] | Prisma.BlobsScalarFieldEnum - having?: Prisma.BlobsScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: BlobsCountAggregateInputType | true - _avg?: BlobsAvgAggregateInputType - _sum?: BlobsSumAggregateInputType - _min?: BlobsMinAggregateInputType - _max?: BlobsMaxAggregateInputType -} - -export type BlobsGroupByOutputType = { - sha256: string - size: number - mime: string - storage_path: string - refcount: number - created_at: Date - _count: BlobsCountAggregateOutputType | null - _avg: BlobsAvgAggregateOutputType | null - _sum: BlobsSumAggregateOutputType | null - _min: BlobsMinAggregateOutputType | null - _max: BlobsMaxAggregateOutputType | null -} - -type GetBlobsGroupByPayload = Prisma.PrismaPromise< - Array< - Prisma.PickEnumerable & - { - [P in ((keyof T) & (keyof BlobsGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType - } - > - > - - - -export type BlobsWhereInput = { - AND?: Prisma.BlobsWhereInput | Prisma.BlobsWhereInput[] - OR?: Prisma.BlobsWhereInput[] - NOT?: Prisma.BlobsWhereInput | Prisma.BlobsWhereInput[] - sha256?: Prisma.StringFilter<"Blobs"> | string - size?: Prisma.IntFilter<"Blobs"> | number - mime?: Prisma.StringFilter<"Blobs"> | string - storage_path?: Prisma.StringFilter<"Blobs"> | string - refcount?: Prisma.IntFilter<"Blobs"> | number - created_at?: Prisma.DateTimeFilter<"Blobs"> | Date | string - attachments?: Prisma.AttachmentsListRelationFilter -} - -export type BlobsOrderByWithRelationInput = { - sha256?: Prisma.SortOrder - size?: Prisma.SortOrder - mime?: Prisma.SortOrder - storage_path?: Prisma.SortOrder - refcount?: Prisma.SortOrder - created_at?: Prisma.SortOrder - attachments?: Prisma.AttachmentsOrderByRelationAggregateInput -} - -export type BlobsWhereUniqueInput = Prisma.AtLeast<{ - sha256?: string - AND?: Prisma.BlobsWhereInput | Prisma.BlobsWhereInput[] - OR?: Prisma.BlobsWhereInput[] - NOT?: Prisma.BlobsWhereInput | Prisma.BlobsWhereInput[] - size?: Prisma.IntFilter<"Blobs"> | number - mime?: Prisma.StringFilter<"Blobs"> | string - storage_path?: Prisma.StringFilter<"Blobs"> | string - refcount?: Prisma.IntFilter<"Blobs"> | number - created_at?: Prisma.DateTimeFilter<"Blobs"> | Date | string - attachments?: Prisma.AttachmentsListRelationFilter -}, "sha256"> - -export type BlobsOrderByWithAggregationInput = { - sha256?: Prisma.SortOrder - size?: Prisma.SortOrder - mime?: Prisma.SortOrder - storage_path?: Prisma.SortOrder - refcount?: Prisma.SortOrder - created_at?: Prisma.SortOrder - _count?: Prisma.BlobsCountOrderByAggregateInput - _avg?: Prisma.BlobsAvgOrderByAggregateInput - _max?: Prisma.BlobsMaxOrderByAggregateInput - _min?: Prisma.BlobsMinOrderByAggregateInput - _sum?: Prisma.BlobsSumOrderByAggregateInput -} - -export type BlobsScalarWhereWithAggregatesInput = { - AND?: Prisma.BlobsScalarWhereWithAggregatesInput | Prisma.BlobsScalarWhereWithAggregatesInput[] - OR?: Prisma.BlobsScalarWhereWithAggregatesInput[] - NOT?: Prisma.BlobsScalarWhereWithAggregatesInput | Prisma.BlobsScalarWhereWithAggregatesInput[] - sha256?: Prisma.StringWithAggregatesFilter<"Blobs"> | string - size?: Prisma.IntWithAggregatesFilter<"Blobs"> | number - mime?: Prisma.StringWithAggregatesFilter<"Blobs"> | string - storage_path?: Prisma.StringWithAggregatesFilter<"Blobs"> | string - refcount?: Prisma.IntWithAggregatesFilter<"Blobs"> | number - created_at?: Prisma.DateTimeWithAggregatesFilter<"Blobs"> | Date | string -} - -export type BlobsCreateInput = { - sha256: string - size: number - mime: string - storage_path: string - refcount?: number - created_at?: Date | string - attachments?: Prisma.AttachmentsCreateNestedManyWithoutBlobInput -} - -export type BlobsUncheckedCreateInput = { - sha256: string - size: number - mime: string - storage_path: string - refcount?: number - created_at?: Date | string - attachments?: Prisma.AttachmentsUncheckedCreateNestedManyWithoutBlobInput -} - -export type BlobsUpdateInput = { - sha256?: Prisma.StringFieldUpdateOperationsInput | string - size?: Prisma.IntFieldUpdateOperationsInput | number - mime?: Prisma.StringFieldUpdateOperationsInput | string - storage_path?: Prisma.StringFieldUpdateOperationsInput | string - refcount?: Prisma.IntFieldUpdateOperationsInput | number - created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - attachments?: Prisma.AttachmentsUpdateManyWithoutBlobNestedInput -} - -export type BlobsUncheckedUpdateInput = { - sha256?: Prisma.StringFieldUpdateOperationsInput | string - size?: Prisma.IntFieldUpdateOperationsInput | number - mime?: Prisma.StringFieldUpdateOperationsInput | string - storage_path?: Prisma.StringFieldUpdateOperationsInput | string - refcount?: Prisma.IntFieldUpdateOperationsInput | number - created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - attachments?: Prisma.AttachmentsUncheckedUpdateManyWithoutBlobNestedInput -} - -export type BlobsCreateManyInput = { - sha256: string - size: number - mime: string - storage_path: string - refcount?: number - created_at?: Date | string -} - -export type BlobsUpdateManyMutationInput = { - sha256?: Prisma.StringFieldUpdateOperationsInput | string - size?: Prisma.IntFieldUpdateOperationsInput | number - mime?: Prisma.StringFieldUpdateOperationsInput | string - storage_path?: Prisma.StringFieldUpdateOperationsInput | string - refcount?: Prisma.IntFieldUpdateOperationsInput | number - created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - -export type BlobsUncheckedUpdateManyInput = { - sha256?: Prisma.StringFieldUpdateOperationsInput | string - size?: Prisma.IntFieldUpdateOperationsInput | number - mime?: Prisma.StringFieldUpdateOperationsInput | string - storage_path?: Prisma.StringFieldUpdateOperationsInput | string - refcount?: Prisma.IntFieldUpdateOperationsInput | number - created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - -export type BlobsCountOrderByAggregateInput = { - sha256?: Prisma.SortOrder - size?: Prisma.SortOrder - mime?: Prisma.SortOrder - storage_path?: Prisma.SortOrder - refcount?: Prisma.SortOrder - created_at?: Prisma.SortOrder -} - -export type BlobsAvgOrderByAggregateInput = { - size?: Prisma.SortOrder - refcount?: Prisma.SortOrder -} - -export type BlobsMaxOrderByAggregateInput = { - sha256?: Prisma.SortOrder - size?: Prisma.SortOrder - mime?: Prisma.SortOrder - storage_path?: Prisma.SortOrder - refcount?: Prisma.SortOrder - created_at?: Prisma.SortOrder -} - -export type BlobsMinOrderByAggregateInput = { - sha256?: Prisma.SortOrder - size?: Prisma.SortOrder - mime?: Prisma.SortOrder - storage_path?: Prisma.SortOrder - refcount?: Prisma.SortOrder - created_at?: Prisma.SortOrder -} - -export type BlobsSumOrderByAggregateInput = { - size?: Prisma.SortOrder - refcount?: Prisma.SortOrder -} - -export type BlobsScalarRelationFilter = { - is?: Prisma.BlobsWhereInput - isNot?: Prisma.BlobsWhereInput -} - -export type BlobsCreateNestedOneWithoutAttachmentsInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.BlobsCreateOrConnectWithoutAttachmentsInput - connect?: Prisma.BlobsWhereUniqueInput -} - -export type BlobsUpdateOneRequiredWithoutAttachmentsNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.BlobsCreateOrConnectWithoutAttachmentsInput - upsert?: Prisma.BlobsUpsertWithoutAttachmentsInput - connect?: Prisma.BlobsWhereUniqueInput - update?: Prisma.XOR, Prisma.BlobsUncheckedUpdateWithoutAttachmentsInput> -} - -export type BlobsCreateWithoutAttachmentsInput = { - sha256: string - size: number - mime: string - storage_path: string - refcount?: number - created_at?: Date | string -} - -export type BlobsUncheckedCreateWithoutAttachmentsInput = { - sha256: string - size: number - mime: string - storage_path: string - refcount?: number - created_at?: Date | string -} - -export type BlobsCreateOrConnectWithoutAttachmentsInput = { - where: Prisma.BlobsWhereUniqueInput - create: Prisma.XOR -} - -export type BlobsUpsertWithoutAttachmentsInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.BlobsWhereInput -} - -export type BlobsUpdateToOneWithWhereWithoutAttachmentsInput = { - where?: Prisma.BlobsWhereInput - data: Prisma.XOR -} - -export type BlobsUpdateWithoutAttachmentsInput = { - sha256?: Prisma.StringFieldUpdateOperationsInput | string - size?: Prisma.IntFieldUpdateOperationsInput | number - mime?: Prisma.StringFieldUpdateOperationsInput | string - storage_path?: Prisma.StringFieldUpdateOperationsInput | string - refcount?: Prisma.IntFieldUpdateOperationsInput | number - created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - -export type BlobsUncheckedUpdateWithoutAttachmentsInput = { - sha256?: Prisma.StringFieldUpdateOperationsInput | string - size?: Prisma.IntFieldUpdateOperationsInput | number - mime?: Prisma.StringFieldUpdateOperationsInput | string - storage_path?: Prisma.StringFieldUpdateOperationsInput | string - refcount?: Prisma.IntFieldUpdateOperationsInput | number - created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - - -/** - * Count Type BlobsCountOutputType - */ - -export type BlobsCountOutputType = { - attachments: number -} - -export type BlobsCountOutputTypeSelect = { - attachments?: boolean | BlobsCountOutputTypeCountAttachmentsArgs -} - -/** - * BlobsCountOutputType without action - */ -export type BlobsCountOutputTypeDefaultArgs = { - /** - * Select specific fields to fetch from the BlobsCountOutputType - */ - select?: Prisma.BlobsCountOutputTypeSelect | null -} - -/** - * BlobsCountOutputType without action - */ -export type BlobsCountOutputTypeCountAttachmentsArgs = { - where?: Prisma.AttachmentsWhereInput -} - - -export type BlobsSelect = runtime.Types.Extensions.GetSelect<{ - sha256?: boolean - size?: boolean - mime?: boolean - storage_path?: boolean - refcount?: boolean - created_at?: boolean - attachments?: boolean | Prisma.Blobs$attachmentsArgs - _count?: boolean | Prisma.BlobsCountOutputTypeDefaultArgs -}, ExtArgs["result"]["blobs"]> - -export type BlobsSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ - sha256?: boolean - size?: boolean - mime?: boolean - storage_path?: boolean - refcount?: boolean - created_at?: boolean -}, ExtArgs["result"]["blobs"]> - -export type BlobsSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ - sha256?: boolean - size?: boolean - mime?: boolean - storage_path?: boolean - refcount?: boolean - created_at?: boolean -}, ExtArgs["result"]["blobs"]> - -export type BlobsSelectScalar = { - sha256?: boolean - size?: boolean - mime?: boolean - storage_path?: boolean - refcount?: boolean - created_at?: boolean -} - -export type BlobsOmit = runtime.Types.Extensions.GetOmit<"sha256" | "size" | "mime" | "storage_path" | "refcount" | "created_at", ExtArgs["result"]["blobs"]> -export type BlobsInclude = { - attachments?: boolean | Prisma.Blobs$attachmentsArgs - _count?: boolean | Prisma.BlobsCountOutputTypeDefaultArgs -} -export type BlobsIncludeCreateManyAndReturn = {} -export type BlobsIncludeUpdateManyAndReturn = {} - -export type $BlobsPayload = { - name: "Blobs" - objects: { - attachments: Prisma.$AttachmentsPayload[] - } - scalars: runtime.Types.Extensions.GetPayloadResult<{ - sha256: string - size: number - mime: string - storage_path: string - refcount: number - created_at: Date - }, ExtArgs["result"]["blobs"]> - composites: {} -} - -export type BlobsGetPayload = runtime.Types.Result.GetResult - -export type BlobsCountArgs = - Omit & { - select?: BlobsCountAggregateInputType | true - } - -export interface BlobsDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['Blobs'], meta: { name: 'Blobs' } } - /** - * Find zero or one Blobs that matches the filter. - * @param {BlobsFindUniqueArgs} args - Arguments to find a Blobs - * @example - * // Get one Blobs - * const blobs = await prisma.blobs.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__BlobsClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one Blobs that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {BlobsFindUniqueOrThrowArgs} args - Arguments to find a Blobs - * @example - * // Get one Blobs - * const blobs = await prisma.blobs.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__BlobsClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first Blobs that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {BlobsFindFirstArgs} args - Arguments to find a Blobs - * @example - * // Get one Blobs - * const blobs = await prisma.blobs.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__BlobsClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first Blobs that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {BlobsFindFirstOrThrowArgs} args - Arguments to find a Blobs - * @example - * // Get one Blobs - * const blobs = await prisma.blobs.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__BlobsClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more Blobs that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {BlobsFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all Blobs - * const blobs = await prisma.blobs.findMany() - * - * // Get first 10 Blobs - * const blobs = await prisma.blobs.findMany({ take: 10 }) - * - * // Only select the `sha256` - * const blobsWithSha256Only = await prisma.blobs.findMany({ select: { sha256: true } }) - * - */ - findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> - - /** - * Create a Blobs. - * @param {BlobsCreateArgs} args - Arguments to create a Blobs. - * @example - * // Create one Blobs - * const Blobs = await prisma.blobs.create({ - * data: { - * // ... data to create a Blobs - * } - * }) - * - */ - create(args: Prisma.SelectSubset>): Prisma.Prisma__BlobsClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many Blobs. - * @param {BlobsCreateManyArgs} args - Arguments to create many Blobs. - * @example - * // Create many Blobs - * const blobs = await prisma.blobs.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Create many Blobs and returns the data saved in the database. - * @param {BlobsCreateManyAndReturnArgs} args - Arguments to create many Blobs. - * @example - * // Create many Blobs - * const blobs = await prisma.blobs.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many Blobs and only return the `sha256` - * const blobsWithSha256Only = await prisma.blobs.createManyAndReturn({ - * select: { sha256: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "createManyAndReturn", GlobalOmitOptions>> - - /** - * Delete a Blobs. - * @param {BlobsDeleteArgs} args - Arguments to delete one Blobs. - * @example - * // Delete one Blobs - * const Blobs = await prisma.blobs.delete({ - * where: { - * // ... filter to delete one Blobs - * } - * }) - * - */ - delete(args: Prisma.SelectSubset>): Prisma.Prisma__BlobsClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one Blobs. - * @param {BlobsUpdateArgs} args - Arguments to update one Blobs. - * @example - * // Update one Blobs - * const blobs = await prisma.blobs.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: Prisma.SelectSubset>): Prisma.Prisma__BlobsClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more Blobs. - * @param {BlobsDeleteManyArgs} args - Arguments to filter Blobs to delete. - * @example - * // Delete a few Blobs - * const { count } = await prisma.blobs.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more Blobs. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {BlobsUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Blobs - * const blobs = await prisma.blobs.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more Blobs and returns the data updated in the database. - * @param {BlobsUpdateManyAndReturnArgs} args - Arguments to update many Blobs. - * @example - * // Update many Blobs - * const blobs = await prisma.blobs.updateManyAndReturn({ - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * - * // Update zero or more Blobs and only return the `sha256` - * const blobsWithSha256Only = await prisma.blobs.updateManyAndReturn({ - * select: { sha256: true }, - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - updateManyAndReturn(args: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "updateManyAndReturn", GlobalOmitOptions>> - - /** - * Create or update one Blobs. - * @param {BlobsUpsertArgs} args - Arguments to update or create a Blobs. - * @example - * // Update or create a Blobs - * const blobs = await prisma.blobs.upsert({ - * create: { - * // ... data to create a Blobs - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Blobs we want to update - * } - * }) - */ - upsert(args: Prisma.SelectSubset>): Prisma.Prisma__BlobsClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of Blobs. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {BlobsCountArgs} args - Arguments to filter Blobs to count. - * @example - * // Count the number of Blobs - * const count = await prisma.blobs.count({ - * where: { - * // ... the filter for the Blobs we want to count - * } - * }) - **/ - count( - args?: Prisma.Subset, - ): Prisma.PrismaPromise< - T extends runtime.Types.Utils.Record<'select', any> - ? T['select'] extends true - ? number - : Prisma.GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a Blobs. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {BlobsAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Prisma.Subset): Prisma.PrismaPromise> - - /** - * Group by Blobs. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {BlobsGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends BlobsGroupByArgs, - HasSelectOrTake extends Prisma.Or< - Prisma.Extends<'skip', Prisma.Keys>, - Prisma.Extends<'take', Prisma.Keys> - >, - OrderByArg extends Prisma.True extends HasSelectOrTake - ? { orderBy: BlobsGroupByArgs['orderBy'] } - : { orderBy?: BlobsGroupByArgs['orderBy'] }, - OrderFields extends Prisma.ExcludeUnderscoreKeys>>, - ByFields extends Prisma.MaybeTupleToUnion, - ByValid extends Prisma.Has, - HavingFields extends Prisma.GetHavingFields, - HavingValid extends Prisma.Has, - ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, - InputErrors extends ByEmpty extends Prisma.True - ? `Error: "by" must not be empty.` - : HavingValid extends Prisma.False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetBlobsGroupByPayload : Prisma.PrismaPromise -/** - * Fields of the Blobs model - */ -readonly fields: BlobsFieldRefs; -} - -/** - * The delegate class that acts as a "Promise-like" for Blobs. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ -export interface Prisma__BlobsClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - attachments = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise -} - - - - -/** - * Fields of the Blobs model - */ -export interface BlobsFieldRefs { - readonly sha256: Prisma.FieldRef<"Blobs", 'String'> - readonly size: Prisma.FieldRef<"Blobs", 'Int'> - readonly mime: Prisma.FieldRef<"Blobs", 'String'> - readonly storage_path: Prisma.FieldRef<"Blobs", 'String'> - readonly refcount: Prisma.FieldRef<"Blobs", 'Int'> - readonly created_at: Prisma.FieldRef<"Blobs", 'DateTime'> -} - - -// Custom InputTypes -/** - * Blobs findUnique - */ -export type BlobsFindUniqueArgs = { - /** - * Select specific fields to fetch from the Blobs - */ - select?: Prisma.BlobsSelect | null - /** - * Omit specific fields from the Blobs - */ - omit?: Prisma.BlobsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BlobsInclude | null - /** - * Filter, which Blobs to fetch. - */ - where: Prisma.BlobsWhereUniqueInput -} - -/** - * Blobs findUniqueOrThrow - */ -export type BlobsFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the Blobs - */ - select?: Prisma.BlobsSelect | null - /** - * Omit specific fields from the Blobs - */ - omit?: Prisma.BlobsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BlobsInclude | null - /** - * Filter, which Blobs to fetch. - */ - where: Prisma.BlobsWhereUniqueInput -} - -/** - * Blobs findFirst - */ -export type BlobsFindFirstArgs = { - /** - * Select specific fields to fetch from the Blobs - */ - select?: Prisma.BlobsSelect | null - /** - * Omit specific fields from the Blobs - */ - omit?: Prisma.BlobsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BlobsInclude | null - /** - * Filter, which Blobs to fetch. - */ - where?: Prisma.BlobsWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Blobs to fetch. - */ - orderBy?: Prisma.BlobsOrderByWithRelationInput | Prisma.BlobsOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Blobs. - */ - cursor?: Prisma.BlobsWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Blobs from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Blobs. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Blobs. - */ - distinct?: Prisma.BlobsScalarFieldEnum | Prisma.BlobsScalarFieldEnum[] -} - -/** - * Blobs findFirstOrThrow - */ -export type BlobsFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the Blobs - */ - select?: Prisma.BlobsSelect | null - /** - * Omit specific fields from the Blobs - */ - omit?: Prisma.BlobsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BlobsInclude | null - /** - * Filter, which Blobs to fetch. - */ - where?: Prisma.BlobsWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Blobs to fetch. - */ - orderBy?: Prisma.BlobsOrderByWithRelationInput | Prisma.BlobsOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Blobs. - */ - cursor?: Prisma.BlobsWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Blobs from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Blobs. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Blobs. - */ - distinct?: Prisma.BlobsScalarFieldEnum | Prisma.BlobsScalarFieldEnum[] -} - -/** - * Blobs findMany - */ -export type BlobsFindManyArgs = { - /** - * Select specific fields to fetch from the Blobs - */ - select?: Prisma.BlobsSelect | null - /** - * Omit specific fields from the Blobs - */ - omit?: Prisma.BlobsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BlobsInclude | null - /** - * Filter, which Blobs to fetch. - */ - where?: Prisma.BlobsWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Blobs to fetch. - */ - orderBy?: Prisma.BlobsOrderByWithRelationInput | Prisma.BlobsOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing Blobs. - */ - cursor?: Prisma.BlobsWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Blobs from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Blobs. - */ - skip?: number - distinct?: Prisma.BlobsScalarFieldEnum | Prisma.BlobsScalarFieldEnum[] -} - -/** - * Blobs create - */ -export type BlobsCreateArgs = { - /** - * Select specific fields to fetch from the Blobs - */ - select?: Prisma.BlobsSelect | null - /** - * Omit specific fields from the Blobs - */ - omit?: Prisma.BlobsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BlobsInclude | null - /** - * The data needed to create a Blobs. - */ - data: Prisma.XOR -} - -/** - * Blobs createMany - */ -export type BlobsCreateManyArgs = { - /** - * The data used to create many Blobs. - */ - data: Prisma.BlobsCreateManyInput | Prisma.BlobsCreateManyInput[] - skipDuplicates?: boolean -} - -/** - * Blobs createManyAndReturn - */ -export type BlobsCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the Blobs - */ - select?: Prisma.BlobsSelectCreateManyAndReturn | null - /** - * Omit specific fields from the Blobs - */ - omit?: Prisma.BlobsOmit | null - /** - * The data used to create many Blobs. - */ - data: Prisma.BlobsCreateManyInput | Prisma.BlobsCreateManyInput[] - skipDuplicates?: boolean -} - -/** - * Blobs update - */ -export type BlobsUpdateArgs = { - /** - * Select specific fields to fetch from the Blobs - */ - select?: Prisma.BlobsSelect | null - /** - * Omit specific fields from the Blobs - */ - omit?: Prisma.BlobsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BlobsInclude | null - /** - * The data needed to update a Blobs. - */ - data: Prisma.XOR - /** - * Choose, which Blobs to update. - */ - where: Prisma.BlobsWhereUniqueInput -} - -/** - * Blobs updateMany - */ -export type BlobsUpdateManyArgs = { - /** - * The data used to update Blobs. - */ - data: Prisma.XOR - /** - * Filter which Blobs to update - */ - where?: Prisma.BlobsWhereInput - /** - * Limit how many Blobs to update. - */ - limit?: number -} - -/** - * Blobs updateManyAndReturn - */ -export type BlobsUpdateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the Blobs - */ - select?: Prisma.BlobsSelectUpdateManyAndReturn | null - /** - * Omit specific fields from the Blobs - */ - omit?: Prisma.BlobsOmit | null - /** - * The data used to update Blobs. - */ - data: Prisma.XOR - /** - * Filter which Blobs to update - */ - where?: Prisma.BlobsWhereInput - /** - * Limit how many Blobs to update. - */ - limit?: number -} - -/** - * Blobs upsert - */ -export type BlobsUpsertArgs = { - /** - * Select specific fields to fetch from the Blobs - */ - select?: Prisma.BlobsSelect | null - /** - * Omit specific fields from the Blobs - */ - omit?: Prisma.BlobsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BlobsInclude | null - /** - * The filter to search for the Blobs to update in case it exists. - */ - where: Prisma.BlobsWhereUniqueInput - /** - * In case the Blobs found by the `where` argument doesn't exist, create a new Blobs with this data. - */ - create: Prisma.XOR - /** - * In case the Blobs was found with the provided `where` argument, update it with this data. - */ - update: Prisma.XOR -} - -/** - * Blobs delete - */ -export type BlobsDeleteArgs = { - /** - * Select specific fields to fetch from the Blobs - */ - select?: Prisma.BlobsSelect | null - /** - * Omit specific fields from the Blobs - */ - omit?: Prisma.BlobsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BlobsInclude | null - /** - * Filter which Blobs to delete. - */ - where: Prisma.BlobsWhereUniqueInput -} - -/** - * Blobs deleteMany - */ -export type BlobsDeleteManyArgs = { - /** - * Filter which Blobs to delete - */ - where?: Prisma.BlobsWhereInput - /** - * Limit how many Blobs to delete. - */ - limit?: number -} - -/** - * Blobs.attachments - */ -export type Blobs$attachmentsArgs = { - /** - * Select specific fields to fetch from the Attachments - */ - select?: Prisma.AttachmentsSelect | null - /** - * Omit specific fields from the Attachments - */ - omit?: Prisma.AttachmentsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.AttachmentsInclude | null - where?: Prisma.AttachmentsWhereInput - orderBy?: Prisma.AttachmentsOrderByWithRelationInput | Prisma.AttachmentsOrderByWithRelationInput[] - cursor?: Prisma.AttachmentsWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.AttachmentsScalarFieldEnum | Prisma.AttachmentsScalarFieldEnum[] -} - -/** - * Blobs without action - */ -export type BlobsDefaultArgs = { - /** - * Select specific fields to fetch from the Blobs - */ - select?: Prisma.BlobsSelect | null - /** - * Omit specific fields from the Blobs - */ - omit?: Prisma.BlobsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BlobsInclude | null -} diff --git a/prisma/postgres/generated/prisma/client/postgres/models/Expenses.ts b/prisma/postgres/generated/prisma/client/postgres/models/Expenses.ts index bca4fad..3528380 100644 --- a/prisma/postgres/generated/prisma/client/postgres/models/Expenses.ts +++ b/prisma/postgres/generated/prisma/client/postgres/models/Expenses.ts @@ -31,7 +31,6 @@ export type ExpensesAvgAggregateOutputType = { timesheet_id: number | null amount: runtime.Decimal | null bank_code_id: number | null - attachment: number | null mileage: runtime.Decimal | null } @@ -40,7 +39,6 @@ export type ExpensesSumAggregateOutputType = { timesheet_id: number | null amount: runtime.Decimal | null bank_code_id: number | null - attachment: number | null mileage: runtime.Decimal | null } @@ -53,7 +51,8 @@ export type ExpensesMinAggregateOutputType = { supervisor_comment: string | null bank_code_id: number | null comment: string | null - attachment: number | null + attachment_key: string | null + attachment_name: string | null mileage: runtime.Decimal | null } @@ -66,7 +65,8 @@ export type ExpensesMaxAggregateOutputType = { supervisor_comment: string | null bank_code_id: number | null comment: string | null - attachment: number | null + attachment_key: string | null + attachment_name: string | null mileage: runtime.Decimal | null } @@ -79,7 +79,8 @@ export type ExpensesCountAggregateOutputType = { supervisor_comment: number bank_code_id: number comment: number - attachment: number + attachment_key: number + attachment_name: number mileage: number _all: number } @@ -90,7 +91,6 @@ export type ExpensesAvgAggregateInputType = { timesheet_id?: true amount?: true bank_code_id?: true - attachment?: true mileage?: true } @@ -99,7 +99,6 @@ export type ExpensesSumAggregateInputType = { timesheet_id?: true amount?: true bank_code_id?: true - attachment?: true mileage?: true } @@ -112,7 +111,8 @@ export type ExpensesMinAggregateInputType = { supervisor_comment?: true bank_code_id?: true comment?: true - attachment?: true + attachment_key?: true + attachment_name?: true mileage?: true } @@ -125,7 +125,8 @@ export type ExpensesMaxAggregateInputType = { supervisor_comment?: true bank_code_id?: true comment?: true - attachment?: true + attachment_key?: true + attachment_name?: true mileage?: true } @@ -138,7 +139,8 @@ export type ExpensesCountAggregateInputType = { supervisor_comment?: true bank_code_id?: true comment?: true - attachment?: true + attachment_key?: true + attachment_name?: true mileage?: true _all?: true } @@ -238,7 +240,8 @@ export type ExpensesGroupByOutputType = { supervisor_comment: string | null bank_code_id: number comment: string - attachment: number | null + attachment_key: string | null + attachment_name: string | null mileage: runtime.Decimal | null _count: ExpensesCountAggregateOutputType | null _avg: ExpensesAvgAggregateOutputType | null @@ -274,9 +277,9 @@ export type ExpensesWhereInput = { supervisor_comment?: Prisma.StringNullableFilter<"Expenses"> | string | null bank_code_id?: Prisma.IntFilter<"Expenses"> | number comment?: Prisma.StringFilter<"Expenses"> | string - attachment?: Prisma.IntNullableFilter<"Expenses"> | number | null + attachment_key?: Prisma.StringNullableFilter<"Expenses"> | string | null + attachment_name?: Prisma.StringNullableFilter<"Expenses"> | string | null mileage?: Prisma.DecimalNullableFilter<"Expenses"> | runtime.Decimal | runtime.DecimalJsLike | number | string | null - attachment_record?: Prisma.XOR | null bank_code?: Prisma.XOR timesheet?: Prisma.XOR archive?: Prisma.ExpensesArchiveListRelationFilter @@ -291,9 +294,9 @@ export type ExpensesOrderByWithRelationInput = { supervisor_comment?: Prisma.SortOrderInput | Prisma.SortOrder bank_code_id?: Prisma.SortOrder comment?: Prisma.SortOrder - attachment?: Prisma.SortOrderInput | Prisma.SortOrder + attachment_key?: Prisma.SortOrderInput | Prisma.SortOrder + attachment_name?: Prisma.SortOrderInput | Prisma.SortOrder mileage?: Prisma.SortOrderInput | Prisma.SortOrder - attachment_record?: Prisma.AttachmentsOrderByWithRelationInput bank_code?: Prisma.BankCodesOrderByWithRelationInput timesheet?: Prisma.TimesheetsOrderByWithRelationInput archive?: Prisma.ExpensesArchiveOrderByRelationAggregateInput @@ -312,9 +315,9 @@ export type ExpensesWhereUniqueInput = Prisma.AtLeast<{ supervisor_comment?: Prisma.StringNullableFilter<"Expenses"> | string | null bank_code_id?: Prisma.IntFilter<"Expenses"> | number comment?: Prisma.StringFilter<"Expenses"> | string - attachment?: Prisma.IntNullableFilter<"Expenses"> | number | null + attachment_key?: Prisma.StringNullableFilter<"Expenses"> | string | null + attachment_name?: Prisma.StringNullableFilter<"Expenses"> | string | null mileage?: Prisma.DecimalNullableFilter<"Expenses"> | runtime.Decimal | runtime.DecimalJsLike | number | string | null - attachment_record?: Prisma.XOR | null bank_code?: Prisma.XOR timesheet?: Prisma.XOR archive?: Prisma.ExpensesArchiveListRelationFilter @@ -329,7 +332,8 @@ export type ExpensesOrderByWithAggregationInput = { supervisor_comment?: Prisma.SortOrderInput | Prisma.SortOrder bank_code_id?: Prisma.SortOrder comment?: Prisma.SortOrder - attachment?: Prisma.SortOrderInput | Prisma.SortOrder + attachment_key?: Prisma.SortOrderInput | Prisma.SortOrder + attachment_name?: Prisma.SortOrderInput | Prisma.SortOrder mileage?: Prisma.SortOrderInput | Prisma.SortOrder _count?: Prisma.ExpensesCountOrderByAggregateInput _avg?: Prisma.ExpensesAvgOrderByAggregateInput @@ -350,7 +354,8 @@ export type ExpensesScalarWhereWithAggregatesInput = { supervisor_comment?: Prisma.StringNullableWithAggregatesFilter<"Expenses"> | string | null bank_code_id?: Prisma.IntWithAggregatesFilter<"Expenses"> | number comment?: Prisma.StringWithAggregatesFilter<"Expenses"> | string - attachment?: Prisma.IntNullableWithAggregatesFilter<"Expenses"> | number | null + attachment_key?: Prisma.StringNullableWithAggregatesFilter<"Expenses"> | string | null + attachment_name?: Prisma.StringNullableWithAggregatesFilter<"Expenses"> | string | null mileage?: Prisma.DecimalNullableWithAggregatesFilter<"Expenses"> | runtime.Decimal | runtime.DecimalJsLike | number | string | null } @@ -360,8 +365,9 @@ export type ExpensesCreateInput = { is_approved?: boolean supervisor_comment?: string | null comment: string + attachment_key?: string | null + attachment_name?: string | null mileage?: runtime.Decimal | runtime.DecimalJsLike | number | string | null - attachment_record?: Prisma.AttachmentsCreateNestedOneWithoutExpensesInput bank_code: Prisma.BankCodesCreateNestedOneWithoutExpensesInput timesheet: Prisma.TimesheetsCreateNestedOneWithoutExpenseInput archive?: Prisma.ExpensesArchiveCreateNestedManyWithoutExpenseInput @@ -376,7 +382,8 @@ export type ExpensesUncheckedCreateInput = { supervisor_comment?: string | null bank_code_id: number comment: string - attachment?: number | null + attachment_key?: string | null + attachment_name?: string | null mileage?: runtime.Decimal | runtime.DecimalJsLike | number | string | null archive?: Prisma.ExpensesArchiveUncheckedCreateNestedManyWithoutExpenseInput } @@ -387,8 +394,9 @@ export type ExpensesUpdateInput = { is_approved?: Prisma.BoolFieldUpdateOperationsInput | boolean supervisor_comment?: Prisma.NullableStringFieldUpdateOperationsInput | string | null comment?: Prisma.StringFieldUpdateOperationsInput | string + attachment_key?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + attachment_name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null mileage?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null - attachment_record?: Prisma.AttachmentsUpdateOneWithoutExpensesNestedInput bank_code?: Prisma.BankCodesUpdateOneRequiredWithoutExpensesNestedInput timesheet?: Prisma.TimesheetsUpdateOneRequiredWithoutExpenseNestedInput archive?: Prisma.ExpensesArchiveUpdateManyWithoutExpenseNestedInput @@ -403,7 +411,8 @@ export type ExpensesUncheckedUpdateInput = { supervisor_comment?: Prisma.NullableStringFieldUpdateOperationsInput | string | null bank_code_id?: Prisma.IntFieldUpdateOperationsInput | number comment?: Prisma.StringFieldUpdateOperationsInput | string - attachment?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + attachment_key?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + attachment_name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null mileage?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null archive?: Prisma.ExpensesArchiveUncheckedUpdateManyWithoutExpenseNestedInput } @@ -417,7 +426,8 @@ export type ExpensesCreateManyInput = { supervisor_comment?: string | null bank_code_id: number comment: string - attachment?: number | null + attachment_key?: string | null + attachment_name?: string | null mileage?: runtime.Decimal | runtime.DecimalJsLike | number | string | null } @@ -427,6 +437,8 @@ export type ExpensesUpdateManyMutationInput = { is_approved?: Prisma.BoolFieldUpdateOperationsInput | boolean supervisor_comment?: Prisma.NullableStringFieldUpdateOperationsInput | string | null comment?: Prisma.StringFieldUpdateOperationsInput | string + attachment_key?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + attachment_name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null mileage?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null } @@ -439,7 +451,8 @@ export type ExpensesUncheckedUpdateManyInput = { supervisor_comment?: Prisma.NullableStringFieldUpdateOperationsInput | string | null bank_code_id?: Prisma.IntFieldUpdateOperationsInput | number comment?: Prisma.StringFieldUpdateOperationsInput | string - attachment?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + attachment_key?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + attachment_name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null mileage?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null } @@ -469,7 +482,8 @@ export type ExpensesCountOrderByAggregateInput = { supervisor_comment?: Prisma.SortOrder bank_code_id?: Prisma.SortOrder comment?: Prisma.SortOrder - attachment?: Prisma.SortOrder + attachment_key?: Prisma.SortOrder + attachment_name?: Prisma.SortOrder mileage?: Prisma.SortOrder } @@ -478,7 +492,6 @@ export type ExpensesAvgOrderByAggregateInput = { timesheet_id?: Prisma.SortOrder amount?: Prisma.SortOrder bank_code_id?: Prisma.SortOrder - attachment?: Prisma.SortOrder mileage?: Prisma.SortOrder } @@ -491,7 +504,8 @@ export type ExpensesMaxOrderByAggregateInput = { supervisor_comment?: Prisma.SortOrder bank_code_id?: Prisma.SortOrder comment?: Prisma.SortOrder - attachment?: Prisma.SortOrder + attachment_key?: Prisma.SortOrder + attachment_name?: Prisma.SortOrder mileage?: Prisma.SortOrder } @@ -504,7 +518,8 @@ export type ExpensesMinOrderByAggregateInput = { supervisor_comment?: Prisma.SortOrder bank_code_id?: Prisma.SortOrder comment?: Prisma.SortOrder - attachment?: Prisma.SortOrder + attachment_key?: Prisma.SortOrder + attachment_name?: Prisma.SortOrder mileage?: Prisma.SortOrder } @@ -513,7 +528,6 @@ export type ExpensesSumOrderByAggregateInput = { timesheet_id?: Prisma.SortOrder amount?: Prisma.SortOrder bank_code_id?: Prisma.SortOrder - attachment?: Prisma.SortOrder mileage?: Prisma.SortOrder } @@ -620,56 +634,15 @@ export type ExpensesUpdateOneRequiredWithoutArchiveNestedInput = { update?: Prisma.XOR, Prisma.ExpensesUncheckedUpdateWithoutArchiveInput> } -export type ExpensesCreateNestedManyWithoutAttachment_recordInput = { - create?: Prisma.XOR | Prisma.ExpensesCreateWithoutAttachment_recordInput[] | Prisma.ExpensesUncheckedCreateWithoutAttachment_recordInput[] - connectOrCreate?: Prisma.ExpensesCreateOrConnectWithoutAttachment_recordInput | Prisma.ExpensesCreateOrConnectWithoutAttachment_recordInput[] - createMany?: Prisma.ExpensesCreateManyAttachment_recordInputEnvelope - connect?: Prisma.ExpensesWhereUniqueInput | Prisma.ExpensesWhereUniqueInput[] -} - -export type ExpensesUncheckedCreateNestedManyWithoutAttachment_recordInput = { - create?: Prisma.XOR | Prisma.ExpensesCreateWithoutAttachment_recordInput[] | Prisma.ExpensesUncheckedCreateWithoutAttachment_recordInput[] - connectOrCreate?: Prisma.ExpensesCreateOrConnectWithoutAttachment_recordInput | Prisma.ExpensesCreateOrConnectWithoutAttachment_recordInput[] - createMany?: Prisma.ExpensesCreateManyAttachment_recordInputEnvelope - connect?: Prisma.ExpensesWhereUniqueInput | Prisma.ExpensesWhereUniqueInput[] -} - -export type ExpensesUpdateManyWithoutAttachment_recordNestedInput = { - create?: Prisma.XOR | Prisma.ExpensesCreateWithoutAttachment_recordInput[] | Prisma.ExpensesUncheckedCreateWithoutAttachment_recordInput[] - connectOrCreate?: Prisma.ExpensesCreateOrConnectWithoutAttachment_recordInput | Prisma.ExpensesCreateOrConnectWithoutAttachment_recordInput[] - upsert?: Prisma.ExpensesUpsertWithWhereUniqueWithoutAttachment_recordInput | Prisma.ExpensesUpsertWithWhereUniqueWithoutAttachment_recordInput[] - createMany?: Prisma.ExpensesCreateManyAttachment_recordInputEnvelope - set?: Prisma.ExpensesWhereUniqueInput | Prisma.ExpensesWhereUniqueInput[] - disconnect?: Prisma.ExpensesWhereUniqueInput | Prisma.ExpensesWhereUniqueInput[] - delete?: Prisma.ExpensesWhereUniqueInput | Prisma.ExpensesWhereUniqueInput[] - connect?: Prisma.ExpensesWhereUniqueInput | Prisma.ExpensesWhereUniqueInput[] - update?: Prisma.ExpensesUpdateWithWhereUniqueWithoutAttachment_recordInput | Prisma.ExpensesUpdateWithWhereUniqueWithoutAttachment_recordInput[] - updateMany?: Prisma.ExpensesUpdateManyWithWhereWithoutAttachment_recordInput | Prisma.ExpensesUpdateManyWithWhereWithoutAttachment_recordInput[] - deleteMany?: Prisma.ExpensesScalarWhereInput | Prisma.ExpensesScalarWhereInput[] -} - -export type ExpensesUncheckedUpdateManyWithoutAttachment_recordNestedInput = { - create?: Prisma.XOR | Prisma.ExpensesCreateWithoutAttachment_recordInput[] | Prisma.ExpensesUncheckedCreateWithoutAttachment_recordInput[] - connectOrCreate?: Prisma.ExpensesCreateOrConnectWithoutAttachment_recordInput | Prisma.ExpensesCreateOrConnectWithoutAttachment_recordInput[] - upsert?: Prisma.ExpensesUpsertWithWhereUniqueWithoutAttachment_recordInput | Prisma.ExpensesUpsertWithWhereUniqueWithoutAttachment_recordInput[] - createMany?: Prisma.ExpensesCreateManyAttachment_recordInputEnvelope - set?: Prisma.ExpensesWhereUniqueInput | Prisma.ExpensesWhereUniqueInput[] - disconnect?: Prisma.ExpensesWhereUniqueInput | Prisma.ExpensesWhereUniqueInput[] - delete?: Prisma.ExpensesWhereUniqueInput | Prisma.ExpensesWhereUniqueInput[] - connect?: Prisma.ExpensesWhereUniqueInput | Prisma.ExpensesWhereUniqueInput[] - update?: Prisma.ExpensesUpdateWithWhereUniqueWithoutAttachment_recordInput | Prisma.ExpensesUpdateWithWhereUniqueWithoutAttachment_recordInput[] - updateMany?: Prisma.ExpensesUpdateManyWithWhereWithoutAttachment_recordInput | Prisma.ExpensesUpdateManyWithWhereWithoutAttachment_recordInput[] - deleteMany?: Prisma.ExpensesScalarWhereInput | Prisma.ExpensesScalarWhereInput[] -} - export type ExpensesCreateWithoutTimesheetInput = { date: Date | string amount?: runtime.Decimal | runtime.DecimalJsLike | number | string | null is_approved?: boolean supervisor_comment?: string | null comment: string + attachment_key?: string | null + attachment_name?: string | null mileage?: runtime.Decimal | runtime.DecimalJsLike | number | string | null - attachment_record?: Prisma.AttachmentsCreateNestedOneWithoutExpensesInput bank_code: Prisma.BankCodesCreateNestedOneWithoutExpensesInput archive?: Prisma.ExpensesArchiveCreateNestedManyWithoutExpenseInput } @@ -682,7 +655,8 @@ export type ExpensesUncheckedCreateWithoutTimesheetInput = { supervisor_comment?: string | null bank_code_id: number comment: string - attachment?: number | null + attachment_key?: string | null + attachment_name?: string | null mileage?: runtime.Decimal | runtime.DecimalJsLike | number | string | null archive?: Prisma.ExpensesArchiveUncheckedCreateNestedManyWithoutExpenseInput } @@ -725,7 +699,8 @@ export type ExpensesScalarWhereInput = { supervisor_comment?: Prisma.StringNullableFilter<"Expenses"> | string | null bank_code_id?: Prisma.IntFilter<"Expenses"> | number comment?: Prisma.StringFilter<"Expenses"> | string - attachment?: Prisma.IntNullableFilter<"Expenses"> | number | null + attachment_key?: Prisma.StringNullableFilter<"Expenses"> | string | null + attachment_name?: Prisma.StringNullableFilter<"Expenses"> | string | null mileage?: Prisma.DecimalNullableFilter<"Expenses"> | runtime.Decimal | runtime.DecimalJsLike | number | string | null } @@ -735,8 +710,9 @@ export type ExpensesCreateWithoutBank_codeInput = { is_approved?: boolean supervisor_comment?: string | null comment: string + attachment_key?: string | null + attachment_name?: string | null mileage?: runtime.Decimal | runtime.DecimalJsLike | number | string | null - attachment_record?: Prisma.AttachmentsCreateNestedOneWithoutExpensesInput timesheet: Prisma.TimesheetsCreateNestedOneWithoutExpenseInput archive?: Prisma.ExpensesArchiveCreateNestedManyWithoutExpenseInput } @@ -749,7 +725,8 @@ export type ExpensesUncheckedCreateWithoutBank_codeInput = { is_approved?: boolean supervisor_comment?: string | null comment: string - attachment?: number | null + attachment_key?: string | null + attachment_name?: string | null mileage?: runtime.Decimal | runtime.DecimalJsLike | number | string | null archive?: Prisma.ExpensesArchiveUncheckedCreateNestedManyWithoutExpenseInput } @@ -786,8 +763,9 @@ export type ExpensesCreateWithoutArchiveInput = { is_approved?: boolean supervisor_comment?: string | null comment: string + attachment_key?: string | null + attachment_name?: string | null mileage?: runtime.Decimal | runtime.DecimalJsLike | number | string | null - attachment_record?: Prisma.AttachmentsCreateNestedOneWithoutExpensesInput bank_code: Prisma.BankCodesCreateNestedOneWithoutExpensesInput timesheet: Prisma.TimesheetsCreateNestedOneWithoutExpenseInput } @@ -801,7 +779,8 @@ export type ExpensesUncheckedCreateWithoutArchiveInput = { supervisor_comment?: string | null bank_code_id: number comment: string - attachment?: number | null + attachment_key?: string | null + attachment_name?: string | null mileage?: runtime.Decimal | runtime.DecimalJsLike | number | string | null } @@ -827,8 +806,9 @@ export type ExpensesUpdateWithoutArchiveInput = { is_approved?: Prisma.BoolFieldUpdateOperationsInput | boolean supervisor_comment?: Prisma.NullableStringFieldUpdateOperationsInput | string | null comment?: Prisma.StringFieldUpdateOperationsInput | string + attachment_key?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + attachment_name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null mileage?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null - attachment_record?: Prisma.AttachmentsUpdateOneWithoutExpensesNestedInput bank_code?: Prisma.BankCodesUpdateOneRequiredWithoutExpensesNestedInput timesheet?: Prisma.TimesheetsUpdateOneRequiredWithoutExpenseNestedInput } @@ -842,61 +822,11 @@ export type ExpensesUncheckedUpdateWithoutArchiveInput = { supervisor_comment?: Prisma.NullableStringFieldUpdateOperationsInput | string | null bank_code_id?: Prisma.IntFieldUpdateOperationsInput | number comment?: Prisma.StringFieldUpdateOperationsInput | string - attachment?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + attachment_key?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + attachment_name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null mileage?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null } -export type ExpensesCreateWithoutAttachment_recordInput = { - date: Date | string - amount?: runtime.Decimal | runtime.DecimalJsLike | number | string | null - is_approved?: boolean - supervisor_comment?: string | null - comment: string - mileage?: runtime.Decimal | runtime.DecimalJsLike | number | string | null - bank_code: Prisma.BankCodesCreateNestedOneWithoutExpensesInput - timesheet: Prisma.TimesheetsCreateNestedOneWithoutExpenseInput - archive?: Prisma.ExpensesArchiveCreateNestedManyWithoutExpenseInput -} - -export type ExpensesUncheckedCreateWithoutAttachment_recordInput = { - id?: number - timesheet_id: number - date: Date | string - amount?: runtime.Decimal | runtime.DecimalJsLike | number | string | null - is_approved?: boolean - supervisor_comment?: string | null - bank_code_id: number - comment: string - mileage?: runtime.Decimal | runtime.DecimalJsLike | number | string | null - archive?: Prisma.ExpensesArchiveUncheckedCreateNestedManyWithoutExpenseInput -} - -export type ExpensesCreateOrConnectWithoutAttachment_recordInput = { - where: Prisma.ExpensesWhereUniqueInput - create: Prisma.XOR -} - -export type ExpensesCreateManyAttachment_recordInputEnvelope = { - data: Prisma.ExpensesCreateManyAttachment_recordInput | Prisma.ExpensesCreateManyAttachment_recordInput[] - skipDuplicates?: boolean -} - -export type ExpensesUpsertWithWhereUniqueWithoutAttachment_recordInput = { - where: Prisma.ExpensesWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type ExpensesUpdateWithWhereUniqueWithoutAttachment_recordInput = { - where: Prisma.ExpensesWhereUniqueInput - data: Prisma.XOR -} - -export type ExpensesUpdateManyWithWhereWithoutAttachment_recordInput = { - where: Prisma.ExpensesScalarWhereInput - data: Prisma.XOR -} - export type ExpensesCreateManyTimesheetInput = { id?: number date: Date | string @@ -905,7 +835,8 @@ export type ExpensesCreateManyTimesheetInput = { supervisor_comment?: string | null bank_code_id: number comment: string - attachment?: number | null + attachment_key?: string | null + attachment_name?: string | null mileage?: runtime.Decimal | runtime.DecimalJsLike | number | string | null } @@ -915,8 +846,9 @@ export type ExpensesUpdateWithoutTimesheetInput = { is_approved?: Prisma.BoolFieldUpdateOperationsInput | boolean supervisor_comment?: Prisma.NullableStringFieldUpdateOperationsInput | string | null comment?: Prisma.StringFieldUpdateOperationsInput | string + attachment_key?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + attachment_name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null mileage?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null - attachment_record?: Prisma.AttachmentsUpdateOneWithoutExpensesNestedInput bank_code?: Prisma.BankCodesUpdateOneRequiredWithoutExpensesNestedInput archive?: Prisma.ExpensesArchiveUpdateManyWithoutExpenseNestedInput } @@ -929,7 +861,8 @@ export type ExpensesUncheckedUpdateWithoutTimesheetInput = { supervisor_comment?: Prisma.NullableStringFieldUpdateOperationsInput | string | null bank_code_id?: Prisma.IntFieldUpdateOperationsInput | number comment?: Prisma.StringFieldUpdateOperationsInput | string - attachment?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + attachment_key?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + attachment_name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null mileage?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null archive?: Prisma.ExpensesArchiveUncheckedUpdateManyWithoutExpenseNestedInput } @@ -942,7 +875,8 @@ export type ExpensesUncheckedUpdateManyWithoutTimesheetInput = { supervisor_comment?: Prisma.NullableStringFieldUpdateOperationsInput | string | null bank_code_id?: Prisma.IntFieldUpdateOperationsInput | number comment?: Prisma.StringFieldUpdateOperationsInput | string - attachment?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + attachment_key?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + attachment_name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null mileage?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null } @@ -954,7 +888,8 @@ export type ExpensesCreateManyBank_codeInput = { is_approved?: boolean supervisor_comment?: string | null comment: string - attachment?: number | null + attachment_key?: string | null + attachment_name?: string | null mileage?: runtime.Decimal | runtime.DecimalJsLike | number | string | null } @@ -964,8 +899,9 @@ export type ExpensesUpdateWithoutBank_codeInput = { is_approved?: Prisma.BoolFieldUpdateOperationsInput | boolean supervisor_comment?: Prisma.NullableStringFieldUpdateOperationsInput | string | null comment?: Prisma.StringFieldUpdateOperationsInput | string + attachment_key?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + attachment_name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null mileage?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null - attachment_record?: Prisma.AttachmentsUpdateOneWithoutExpensesNestedInput timesheet?: Prisma.TimesheetsUpdateOneRequiredWithoutExpenseNestedInput archive?: Prisma.ExpensesArchiveUpdateManyWithoutExpenseNestedInput } @@ -978,7 +914,8 @@ export type ExpensesUncheckedUpdateWithoutBank_codeInput = { is_approved?: Prisma.BoolFieldUpdateOperationsInput | boolean supervisor_comment?: Prisma.NullableStringFieldUpdateOperationsInput | string | null comment?: Prisma.StringFieldUpdateOperationsInput | string - attachment?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + attachment_key?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + attachment_name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null mileage?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null archive?: Prisma.ExpensesArchiveUncheckedUpdateManyWithoutExpenseNestedInput } @@ -991,56 +928,8 @@ export type ExpensesUncheckedUpdateManyWithoutBank_codeInput = { is_approved?: Prisma.BoolFieldUpdateOperationsInput | boolean supervisor_comment?: Prisma.NullableStringFieldUpdateOperationsInput | string | null comment?: Prisma.StringFieldUpdateOperationsInput | string - attachment?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - mileage?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null -} - -export type ExpensesCreateManyAttachment_recordInput = { - id?: number - timesheet_id: number - date: Date | string - amount?: runtime.Decimal | runtime.DecimalJsLike | number | string | null - is_approved?: boolean - supervisor_comment?: string | null - bank_code_id: number - comment: string - mileage?: runtime.Decimal | runtime.DecimalJsLike | number | string | null -} - -export type ExpensesUpdateWithoutAttachment_recordInput = { - date?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - amount?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null - is_approved?: Prisma.BoolFieldUpdateOperationsInput | boolean - supervisor_comment?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - comment?: Prisma.StringFieldUpdateOperationsInput | string - mileage?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null - bank_code?: Prisma.BankCodesUpdateOneRequiredWithoutExpensesNestedInput - timesheet?: Prisma.TimesheetsUpdateOneRequiredWithoutExpenseNestedInput - archive?: Prisma.ExpensesArchiveUpdateManyWithoutExpenseNestedInput -} - -export type ExpensesUncheckedUpdateWithoutAttachment_recordInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - timesheet_id?: Prisma.IntFieldUpdateOperationsInput | number - date?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - amount?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null - is_approved?: Prisma.BoolFieldUpdateOperationsInput | boolean - supervisor_comment?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - bank_code_id?: Prisma.IntFieldUpdateOperationsInput | number - comment?: Prisma.StringFieldUpdateOperationsInput | string - mileage?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null - archive?: Prisma.ExpensesArchiveUncheckedUpdateManyWithoutExpenseNestedInput -} - -export type ExpensesUncheckedUpdateManyWithoutAttachment_recordInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - timesheet_id?: Prisma.IntFieldUpdateOperationsInput | number - date?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - amount?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null - is_approved?: Prisma.BoolFieldUpdateOperationsInput | boolean - supervisor_comment?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - bank_code_id?: Prisma.IntFieldUpdateOperationsInput | number - comment?: Prisma.StringFieldUpdateOperationsInput | string + attachment_key?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + attachment_name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null mileage?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null } @@ -1084,9 +973,9 @@ export type ExpensesSelect bank_code?: boolean | Prisma.BankCodesDefaultArgs timesheet?: boolean | Prisma.TimesheetsDefaultArgs archive?: boolean | Prisma.Expenses$archiveArgs @@ -1102,9 +991,9 @@ export type ExpensesSelectCreateManyAndReturn bank_code?: boolean | Prisma.BankCodesDefaultArgs timesheet?: boolean | Prisma.TimesheetsDefaultArgs }, ExtArgs["result"]["expenses"]> @@ -1118,9 +1007,9 @@ export type ExpensesSelectUpdateManyAndReturn bank_code?: boolean | Prisma.BankCodesDefaultArgs timesheet?: boolean | Prisma.TimesheetsDefaultArgs }, ExtArgs["result"]["expenses"]> @@ -1134,25 +1023,23 @@ export type ExpensesSelectScalar = { supervisor_comment?: boolean bank_code_id?: boolean comment?: boolean - attachment?: boolean + attachment_key?: boolean + attachment_name?: boolean mileage?: boolean } -export type ExpensesOmit = runtime.Types.Extensions.GetOmit<"id" | "timesheet_id" | "date" | "amount" | "is_approved" | "supervisor_comment" | "bank_code_id" | "comment" | "attachment" | "mileage", ExtArgs["result"]["expenses"]> +export type ExpensesOmit = runtime.Types.Extensions.GetOmit<"id" | "timesheet_id" | "date" | "amount" | "is_approved" | "supervisor_comment" | "bank_code_id" | "comment" | "attachment_key" | "attachment_name" | "mileage", ExtArgs["result"]["expenses"]> export type ExpensesInclude = { - attachment_record?: boolean | Prisma.Expenses$attachment_recordArgs bank_code?: boolean | Prisma.BankCodesDefaultArgs timesheet?: boolean | Prisma.TimesheetsDefaultArgs archive?: boolean | Prisma.Expenses$archiveArgs _count?: boolean | Prisma.ExpensesCountOutputTypeDefaultArgs } export type ExpensesIncludeCreateManyAndReturn = { - attachment_record?: boolean | Prisma.Expenses$attachment_recordArgs bank_code?: boolean | Prisma.BankCodesDefaultArgs timesheet?: boolean | Prisma.TimesheetsDefaultArgs } export type ExpensesIncludeUpdateManyAndReturn = { - attachment_record?: boolean | Prisma.Expenses$attachment_recordArgs bank_code?: boolean | Prisma.BankCodesDefaultArgs timesheet?: boolean | Prisma.TimesheetsDefaultArgs } @@ -1160,7 +1047,6 @@ export type ExpensesIncludeUpdateManyAndReturn = { name: "Expenses" objects: { - attachment_record: Prisma.$AttachmentsPayload | null bank_code: Prisma.$BankCodesPayload timesheet: Prisma.$TimesheetsPayload archive: Prisma.$ExpensesArchivePayload[] @@ -1174,7 +1060,8 @@ export type $ExpensesPayload composites: {} @@ -1570,7 +1457,6 @@ readonly fields: ExpensesFieldRefs; */ export interface Prisma__ExpensesClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" - attachment_record = {}>(args?: Prisma.Subset>): Prisma.Prisma__AttachmentsClient, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> bank_code = {}>(args?: Prisma.Subset>): Prisma.Prisma__BankCodesClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> timesheet = {}>(args?: Prisma.Subset>): Prisma.Prisma__TimesheetsClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> archive = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> @@ -1611,7 +1497,8 @@ export interface ExpensesFieldRefs { readonly supervisor_comment: Prisma.FieldRef<"Expenses", 'String'> readonly bank_code_id: Prisma.FieldRef<"Expenses", 'Int'> readonly comment: Prisma.FieldRef<"Expenses", 'String'> - readonly attachment: Prisma.FieldRef<"Expenses", 'Int'> + readonly attachment_key: Prisma.FieldRef<"Expenses", 'String'> + readonly attachment_name: Prisma.FieldRef<"Expenses", 'String'> readonly mileage: Prisma.FieldRef<"Expenses", 'Decimal'> } @@ -2008,25 +1895,6 @@ export type ExpensesDeleteManyArgs = { - /** - * Select specific fields to fetch from the Attachments - */ - select?: Prisma.AttachmentsSelect | null - /** - * Omit specific fields from the Attachments - */ - omit?: Prisma.AttachmentsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.AttachmentsInclude | null - where?: Prisma.AttachmentsWhereInput -} - /** * Expenses.archive */ diff --git a/prisma/postgres/generated/prisma/client/postgres/models/ExpensesArchive.ts b/prisma/postgres/generated/prisma/client/postgres/models/ExpensesArchive.ts index 214fd85..bf56b4c 100644 --- a/prisma/postgres/generated/prisma/client/postgres/models/ExpensesArchive.ts +++ b/prisma/postgres/generated/prisma/client/postgres/models/ExpensesArchive.ts @@ -32,7 +32,6 @@ export type ExpensesArchiveAvgAggregateOutputType = { timesheet_id: number | null amount: runtime.Decimal | null bank_code_id: number | null - attachment: number | null mileage: runtime.Decimal | null } @@ -42,7 +41,6 @@ export type ExpensesArchiveSumAggregateOutputType = { timesheet_id: number | null amount: runtime.Decimal | null bank_code_id: number | null - attachment: number | null mileage: runtime.Decimal | null } @@ -57,7 +55,6 @@ export type ExpensesArchiveMinAggregateOutputType = { supervisor_comment: string | null bank_code_id: number | null comment: string | null - attachment: number | null mileage: runtime.Decimal | null } @@ -72,7 +69,6 @@ export type ExpensesArchiveMaxAggregateOutputType = { supervisor_comment: string | null bank_code_id: number | null comment: string | null - attachment: number | null mileage: runtime.Decimal | null } @@ -87,7 +83,6 @@ export type ExpensesArchiveCountAggregateOutputType = { supervisor_comment: number bank_code_id: number comment: number - attachment: number mileage: number _all: number } @@ -99,7 +94,6 @@ export type ExpensesArchiveAvgAggregateInputType = { timesheet_id?: true amount?: true bank_code_id?: true - attachment?: true mileage?: true } @@ -109,7 +103,6 @@ export type ExpensesArchiveSumAggregateInputType = { timesheet_id?: true amount?: true bank_code_id?: true - attachment?: true mileage?: true } @@ -124,7 +117,6 @@ export type ExpensesArchiveMinAggregateInputType = { supervisor_comment?: true bank_code_id?: true comment?: true - attachment?: true mileage?: true } @@ -139,7 +131,6 @@ export type ExpensesArchiveMaxAggregateInputType = { supervisor_comment?: true bank_code_id?: true comment?: true - attachment?: true mileage?: true } @@ -154,7 +145,6 @@ export type ExpensesArchiveCountAggregateInputType = { supervisor_comment?: true bank_code_id?: true comment?: true - attachment?: true mileage?: true _all?: true } @@ -256,7 +246,6 @@ export type ExpensesArchiveGroupByOutputType = { supervisor_comment: string | null bank_code_id: number comment: string | null - attachment: number | null mileage: runtime.Decimal | null _count: ExpensesArchiveCountAggregateOutputType | null _avg: ExpensesArchiveAvgAggregateOutputType | null @@ -294,9 +283,7 @@ export type ExpensesArchiveWhereInput = { supervisor_comment?: Prisma.StringNullableFilter<"ExpensesArchive"> | string | null bank_code_id?: Prisma.IntFilter<"ExpensesArchive"> | number comment?: Prisma.StringNullableFilter<"ExpensesArchive"> | string | null - attachment?: Prisma.IntNullableFilter<"ExpensesArchive"> | number | null mileage?: Prisma.DecimalNullableFilter<"ExpensesArchive"> | runtime.Decimal | runtime.DecimalJsLike | number | string | null - attachment_record?: Prisma.XOR | null expense?: Prisma.XOR } @@ -311,9 +298,7 @@ export type ExpensesArchiveOrderByWithRelationInput = { supervisor_comment?: Prisma.SortOrderInput | Prisma.SortOrder bank_code_id?: Prisma.SortOrder comment?: Prisma.SortOrderInput | Prisma.SortOrder - attachment?: Prisma.SortOrderInput | Prisma.SortOrder mileage?: Prisma.SortOrderInput | Prisma.SortOrder - attachment_record?: Prisma.AttachmentsOrderByWithRelationInput expense?: Prisma.ExpensesOrderByWithRelationInput } @@ -331,9 +316,7 @@ export type ExpensesArchiveWhereUniqueInput = Prisma.AtLeast<{ supervisor_comment?: Prisma.StringNullableFilter<"ExpensesArchive"> | string | null bank_code_id?: Prisma.IntFilter<"ExpensesArchive"> | number comment?: Prisma.StringNullableFilter<"ExpensesArchive"> | string | null - attachment?: Prisma.IntNullableFilter<"ExpensesArchive"> | number | null mileage?: Prisma.DecimalNullableFilter<"ExpensesArchive"> | runtime.Decimal | runtime.DecimalJsLike | number | string | null - attachment_record?: Prisma.XOR | null expense?: Prisma.XOR }, "id"> @@ -348,7 +331,6 @@ export type ExpensesArchiveOrderByWithAggregationInput = { supervisor_comment?: Prisma.SortOrderInput | Prisma.SortOrder bank_code_id?: Prisma.SortOrder comment?: Prisma.SortOrderInput | Prisma.SortOrder - attachment?: Prisma.SortOrderInput | Prisma.SortOrder mileage?: Prisma.SortOrderInput | Prisma.SortOrder _count?: Prisma.ExpensesArchiveCountOrderByAggregateInput _avg?: Prisma.ExpensesArchiveAvgOrderByAggregateInput @@ -371,7 +353,6 @@ export type ExpensesArchiveScalarWhereWithAggregatesInput = { supervisor_comment?: Prisma.StringNullableWithAggregatesFilter<"ExpensesArchive"> | string | null bank_code_id?: Prisma.IntWithAggregatesFilter<"ExpensesArchive"> | number comment?: Prisma.StringNullableWithAggregatesFilter<"ExpensesArchive"> | string | null - attachment?: Prisma.IntNullableWithAggregatesFilter<"ExpensesArchive"> | number | null mileage?: Prisma.DecimalNullableWithAggregatesFilter<"ExpensesArchive"> | runtime.Decimal | runtime.DecimalJsLike | number | string | null } @@ -385,7 +366,6 @@ export type ExpensesArchiveCreateInput = { bank_code_id: number comment?: string | null mileage?: runtime.Decimal | runtime.DecimalJsLike | number | string | null - attachment_record?: Prisma.AttachmentsCreateNestedOneWithoutExpenses_archiveInput expense: Prisma.ExpensesCreateNestedOneWithoutArchiveInput } @@ -400,7 +380,6 @@ export type ExpensesArchiveUncheckedCreateInput = { supervisor_comment?: string | null bank_code_id: number comment?: string | null - attachment?: number | null mileage?: runtime.Decimal | runtime.DecimalJsLike | number | string | null } @@ -414,7 +393,6 @@ export type ExpensesArchiveUpdateInput = { bank_code_id?: Prisma.IntFieldUpdateOperationsInput | number comment?: Prisma.NullableStringFieldUpdateOperationsInput | string | null mileage?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null - attachment_record?: Prisma.AttachmentsUpdateOneWithoutExpenses_archiveNestedInput expense?: Prisma.ExpensesUpdateOneRequiredWithoutArchiveNestedInput } @@ -429,7 +407,6 @@ export type ExpensesArchiveUncheckedUpdateInput = { supervisor_comment?: Prisma.NullableStringFieldUpdateOperationsInput | string | null bank_code_id?: Prisma.IntFieldUpdateOperationsInput | number comment?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - attachment?: Prisma.NullableIntFieldUpdateOperationsInput | number | null mileage?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null } @@ -444,7 +421,6 @@ export type ExpensesArchiveCreateManyInput = { supervisor_comment?: string | null bank_code_id: number comment?: string | null - attachment?: number | null mileage?: runtime.Decimal | runtime.DecimalJsLike | number | string | null } @@ -471,7 +447,6 @@ export type ExpensesArchiveUncheckedUpdateManyInput = { supervisor_comment?: Prisma.NullableStringFieldUpdateOperationsInput | string | null bank_code_id?: Prisma.IntFieldUpdateOperationsInput | number comment?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - attachment?: Prisma.NullableIntFieldUpdateOperationsInput | number | null mileage?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null } @@ -496,7 +471,6 @@ export type ExpensesArchiveCountOrderByAggregateInput = { supervisor_comment?: Prisma.SortOrder bank_code_id?: Prisma.SortOrder comment?: Prisma.SortOrder - attachment?: Prisma.SortOrder mileage?: Prisma.SortOrder } @@ -506,7 +480,6 @@ export type ExpensesArchiveAvgOrderByAggregateInput = { timesheet_id?: Prisma.SortOrder amount?: Prisma.SortOrder bank_code_id?: Prisma.SortOrder - attachment?: Prisma.SortOrder mileage?: Prisma.SortOrder } @@ -521,7 +494,6 @@ export type ExpensesArchiveMaxOrderByAggregateInput = { supervisor_comment?: Prisma.SortOrder bank_code_id?: Prisma.SortOrder comment?: Prisma.SortOrder - attachment?: Prisma.SortOrder mileage?: Prisma.SortOrder } @@ -536,7 +508,6 @@ export type ExpensesArchiveMinOrderByAggregateInput = { supervisor_comment?: Prisma.SortOrder bank_code_id?: Prisma.SortOrder comment?: Prisma.SortOrder - attachment?: Prisma.SortOrder mileage?: Prisma.SortOrder } @@ -546,7 +517,6 @@ export type ExpensesArchiveSumOrderByAggregateInput = { timesheet_id?: Prisma.SortOrder amount?: Prisma.SortOrder bank_code_id?: Prisma.SortOrder - attachment?: Prisma.SortOrder mileage?: Prisma.SortOrder } @@ -592,48 +562,6 @@ export type ExpensesArchiveUncheckedUpdateManyWithoutExpenseNestedInput = { deleteMany?: Prisma.ExpensesArchiveScalarWhereInput | Prisma.ExpensesArchiveScalarWhereInput[] } -export type ExpensesArchiveCreateNestedManyWithoutAttachment_recordInput = { - create?: Prisma.XOR | Prisma.ExpensesArchiveCreateWithoutAttachment_recordInput[] | Prisma.ExpensesArchiveUncheckedCreateWithoutAttachment_recordInput[] - connectOrCreate?: Prisma.ExpensesArchiveCreateOrConnectWithoutAttachment_recordInput | Prisma.ExpensesArchiveCreateOrConnectWithoutAttachment_recordInput[] - createMany?: Prisma.ExpensesArchiveCreateManyAttachment_recordInputEnvelope - connect?: Prisma.ExpensesArchiveWhereUniqueInput | Prisma.ExpensesArchiveWhereUniqueInput[] -} - -export type ExpensesArchiveUncheckedCreateNestedManyWithoutAttachment_recordInput = { - create?: Prisma.XOR | Prisma.ExpensesArchiveCreateWithoutAttachment_recordInput[] | Prisma.ExpensesArchiveUncheckedCreateWithoutAttachment_recordInput[] - connectOrCreate?: Prisma.ExpensesArchiveCreateOrConnectWithoutAttachment_recordInput | Prisma.ExpensesArchiveCreateOrConnectWithoutAttachment_recordInput[] - createMany?: Prisma.ExpensesArchiveCreateManyAttachment_recordInputEnvelope - connect?: Prisma.ExpensesArchiveWhereUniqueInput | Prisma.ExpensesArchiveWhereUniqueInput[] -} - -export type ExpensesArchiveUpdateManyWithoutAttachment_recordNestedInput = { - create?: Prisma.XOR | Prisma.ExpensesArchiveCreateWithoutAttachment_recordInput[] | Prisma.ExpensesArchiveUncheckedCreateWithoutAttachment_recordInput[] - connectOrCreate?: Prisma.ExpensesArchiveCreateOrConnectWithoutAttachment_recordInput | Prisma.ExpensesArchiveCreateOrConnectWithoutAttachment_recordInput[] - upsert?: Prisma.ExpensesArchiveUpsertWithWhereUniqueWithoutAttachment_recordInput | Prisma.ExpensesArchiveUpsertWithWhereUniqueWithoutAttachment_recordInput[] - createMany?: Prisma.ExpensesArchiveCreateManyAttachment_recordInputEnvelope - set?: Prisma.ExpensesArchiveWhereUniqueInput | Prisma.ExpensesArchiveWhereUniqueInput[] - disconnect?: Prisma.ExpensesArchiveWhereUniqueInput | Prisma.ExpensesArchiveWhereUniqueInput[] - delete?: Prisma.ExpensesArchiveWhereUniqueInput | Prisma.ExpensesArchiveWhereUniqueInput[] - connect?: Prisma.ExpensesArchiveWhereUniqueInput | Prisma.ExpensesArchiveWhereUniqueInput[] - update?: Prisma.ExpensesArchiveUpdateWithWhereUniqueWithoutAttachment_recordInput | Prisma.ExpensesArchiveUpdateWithWhereUniqueWithoutAttachment_recordInput[] - updateMany?: Prisma.ExpensesArchiveUpdateManyWithWhereWithoutAttachment_recordInput | Prisma.ExpensesArchiveUpdateManyWithWhereWithoutAttachment_recordInput[] - deleteMany?: Prisma.ExpensesArchiveScalarWhereInput | Prisma.ExpensesArchiveScalarWhereInput[] -} - -export type ExpensesArchiveUncheckedUpdateManyWithoutAttachment_recordNestedInput = { - create?: Prisma.XOR | Prisma.ExpensesArchiveCreateWithoutAttachment_recordInput[] | Prisma.ExpensesArchiveUncheckedCreateWithoutAttachment_recordInput[] - connectOrCreate?: Prisma.ExpensesArchiveCreateOrConnectWithoutAttachment_recordInput | Prisma.ExpensesArchiveCreateOrConnectWithoutAttachment_recordInput[] - upsert?: Prisma.ExpensesArchiveUpsertWithWhereUniqueWithoutAttachment_recordInput | Prisma.ExpensesArchiveUpsertWithWhereUniqueWithoutAttachment_recordInput[] - createMany?: Prisma.ExpensesArchiveCreateManyAttachment_recordInputEnvelope - set?: Prisma.ExpensesArchiveWhereUniqueInput | Prisma.ExpensesArchiveWhereUniqueInput[] - disconnect?: Prisma.ExpensesArchiveWhereUniqueInput | Prisma.ExpensesArchiveWhereUniqueInput[] - delete?: Prisma.ExpensesArchiveWhereUniqueInput | Prisma.ExpensesArchiveWhereUniqueInput[] - connect?: Prisma.ExpensesArchiveWhereUniqueInput | Prisma.ExpensesArchiveWhereUniqueInput[] - update?: Prisma.ExpensesArchiveUpdateWithWhereUniqueWithoutAttachment_recordInput | Prisma.ExpensesArchiveUpdateWithWhereUniqueWithoutAttachment_recordInput[] - updateMany?: Prisma.ExpensesArchiveUpdateManyWithWhereWithoutAttachment_recordInput | Prisma.ExpensesArchiveUpdateManyWithWhereWithoutAttachment_recordInput[] - deleteMany?: Prisma.ExpensesArchiveScalarWhereInput | Prisma.ExpensesArchiveScalarWhereInput[] -} - export type ExpensesArchiveCreateWithoutExpenseInput = { timesheet_id: number archived_at?: Date | string @@ -644,7 +572,6 @@ export type ExpensesArchiveCreateWithoutExpenseInput = { bank_code_id: number comment?: string | null mileage?: runtime.Decimal | runtime.DecimalJsLike | number | string | null - attachment_record?: Prisma.AttachmentsCreateNestedOneWithoutExpenses_archiveInput } export type ExpensesArchiveUncheckedCreateWithoutExpenseInput = { @@ -657,7 +584,6 @@ export type ExpensesArchiveUncheckedCreateWithoutExpenseInput = { supervisor_comment?: string | null bank_code_id: number comment?: string | null - attachment?: number | null mileage?: runtime.Decimal | runtime.DecimalJsLike | number | string | null } @@ -701,63 +627,9 @@ export type ExpensesArchiveScalarWhereInput = { supervisor_comment?: Prisma.StringNullableFilter<"ExpensesArchive"> | string | null bank_code_id?: Prisma.IntFilter<"ExpensesArchive"> | number comment?: Prisma.StringNullableFilter<"ExpensesArchive"> | string | null - attachment?: Prisma.IntNullableFilter<"ExpensesArchive"> | number | null mileage?: Prisma.DecimalNullableFilter<"ExpensesArchive"> | runtime.Decimal | runtime.DecimalJsLike | number | string | null } -export type ExpensesArchiveCreateWithoutAttachment_recordInput = { - timesheet_id: number - archived_at?: Date | string - date: Date | string - amount?: runtime.Decimal | runtime.DecimalJsLike | number | string | null - is_approved: boolean - supervisor_comment?: string | null - bank_code_id: number - comment?: string | null - mileage?: runtime.Decimal | runtime.DecimalJsLike | number | string | null - expense: Prisma.ExpensesCreateNestedOneWithoutArchiveInput -} - -export type ExpensesArchiveUncheckedCreateWithoutAttachment_recordInput = { - id?: number - expense_id: number - timesheet_id: number - archived_at?: Date | string - date: Date | string - amount?: runtime.Decimal | runtime.DecimalJsLike | number | string | null - is_approved: boolean - supervisor_comment?: string | null - bank_code_id: number - comment?: string | null - mileage?: runtime.Decimal | runtime.DecimalJsLike | number | string | null -} - -export type ExpensesArchiveCreateOrConnectWithoutAttachment_recordInput = { - where: Prisma.ExpensesArchiveWhereUniqueInput - create: Prisma.XOR -} - -export type ExpensesArchiveCreateManyAttachment_recordInputEnvelope = { - data: Prisma.ExpensesArchiveCreateManyAttachment_recordInput | Prisma.ExpensesArchiveCreateManyAttachment_recordInput[] - skipDuplicates?: boolean -} - -export type ExpensesArchiveUpsertWithWhereUniqueWithoutAttachment_recordInput = { - where: Prisma.ExpensesArchiveWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type ExpensesArchiveUpdateWithWhereUniqueWithoutAttachment_recordInput = { - where: Prisma.ExpensesArchiveWhereUniqueInput - data: Prisma.XOR -} - -export type ExpensesArchiveUpdateManyWithWhereWithoutAttachment_recordInput = { - where: Prisma.ExpensesArchiveScalarWhereInput - data: Prisma.XOR -} - export type ExpensesArchiveCreateManyExpenseInput = { id?: number timesheet_id: number @@ -768,7 +640,6 @@ export type ExpensesArchiveCreateManyExpenseInput = { supervisor_comment?: string | null bank_code_id: number comment?: string | null - attachment?: number | null mileage?: runtime.Decimal | runtime.DecimalJsLike | number | string | null } @@ -782,7 +653,6 @@ export type ExpensesArchiveUpdateWithoutExpenseInput = { bank_code_id?: Prisma.IntFieldUpdateOperationsInput | number comment?: Prisma.NullableStringFieldUpdateOperationsInput | string | null mileage?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null - attachment_record?: Prisma.AttachmentsUpdateOneWithoutExpenses_archiveNestedInput } export type ExpensesArchiveUncheckedUpdateWithoutExpenseInput = { @@ -795,7 +665,6 @@ export type ExpensesArchiveUncheckedUpdateWithoutExpenseInput = { supervisor_comment?: Prisma.NullableStringFieldUpdateOperationsInput | string | null bank_code_id?: Prisma.IntFieldUpdateOperationsInput | number comment?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - attachment?: Prisma.NullableIntFieldUpdateOperationsInput | number | null mileage?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null } @@ -809,62 +678,6 @@ export type ExpensesArchiveUncheckedUpdateManyWithoutExpenseInput = { supervisor_comment?: Prisma.NullableStringFieldUpdateOperationsInput | string | null bank_code_id?: Prisma.IntFieldUpdateOperationsInput | number comment?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - attachment?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - mileage?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null -} - -export type ExpensesArchiveCreateManyAttachment_recordInput = { - id?: number - expense_id: number - timesheet_id: number - archived_at?: Date | string - date: Date | string - amount?: runtime.Decimal | runtime.DecimalJsLike | number | string | null - is_approved: boolean - supervisor_comment?: string | null - bank_code_id: number - comment?: string | null - mileage?: runtime.Decimal | runtime.DecimalJsLike | number | string | null -} - -export type ExpensesArchiveUpdateWithoutAttachment_recordInput = { - timesheet_id?: Prisma.IntFieldUpdateOperationsInput | number - archived_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - date?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - amount?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null - is_approved?: Prisma.BoolFieldUpdateOperationsInput | boolean - supervisor_comment?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - bank_code_id?: Prisma.IntFieldUpdateOperationsInput | number - comment?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - mileage?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null - expense?: Prisma.ExpensesUpdateOneRequiredWithoutArchiveNestedInput -} - -export type ExpensesArchiveUncheckedUpdateWithoutAttachment_recordInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - expense_id?: Prisma.IntFieldUpdateOperationsInput | number - timesheet_id?: Prisma.IntFieldUpdateOperationsInput | number - archived_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - date?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - amount?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null - is_approved?: Prisma.BoolFieldUpdateOperationsInput | boolean - supervisor_comment?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - bank_code_id?: Prisma.IntFieldUpdateOperationsInput | number - comment?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - mileage?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null -} - -export type ExpensesArchiveUncheckedUpdateManyWithoutAttachment_recordInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - expense_id?: Prisma.IntFieldUpdateOperationsInput | number - timesheet_id?: Prisma.IntFieldUpdateOperationsInput | number - archived_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - date?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - amount?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null - is_approved?: Prisma.BoolFieldUpdateOperationsInput | boolean - supervisor_comment?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - bank_code_id?: Prisma.IntFieldUpdateOperationsInput | number - comment?: Prisma.NullableStringFieldUpdateOperationsInput | string | null mileage?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null } @@ -881,9 +694,7 @@ export type ExpensesArchiveSelect expense?: boolean | Prisma.ExpensesDefaultArgs }, ExtArgs["result"]["expensesArchive"]> @@ -898,9 +709,7 @@ export type ExpensesArchiveSelectCreateManyAndReturn expense?: boolean | Prisma.ExpensesDefaultArgs }, ExtArgs["result"]["expensesArchive"]> @@ -915,9 +724,7 @@ export type ExpensesArchiveSelectUpdateManyAndReturn expense?: boolean | Prisma.ExpensesDefaultArgs }, ExtArgs["result"]["expensesArchive"]> @@ -932,28 +739,23 @@ export type ExpensesArchiveSelectScalar = { supervisor_comment?: boolean bank_code_id?: boolean comment?: boolean - attachment?: boolean mileage?: boolean } -export type ExpensesArchiveOmit = runtime.Types.Extensions.GetOmit<"id" | "expense_id" | "timesheet_id" | "archived_at" | "date" | "amount" | "is_approved" | "supervisor_comment" | "bank_code_id" | "comment" | "attachment" | "mileage", ExtArgs["result"]["expensesArchive"]> +export type ExpensesArchiveOmit = runtime.Types.Extensions.GetOmit<"id" | "expense_id" | "timesheet_id" | "archived_at" | "date" | "amount" | "is_approved" | "supervisor_comment" | "bank_code_id" | "comment" | "mileage", ExtArgs["result"]["expensesArchive"]> export type ExpensesArchiveInclude = { - attachment_record?: boolean | Prisma.ExpensesArchive$attachment_recordArgs expense?: boolean | Prisma.ExpensesDefaultArgs } export type ExpensesArchiveIncludeCreateManyAndReturn = { - attachment_record?: boolean | Prisma.ExpensesArchive$attachment_recordArgs expense?: boolean | Prisma.ExpensesDefaultArgs } export type ExpensesArchiveIncludeUpdateManyAndReturn = { - attachment_record?: boolean | Prisma.ExpensesArchive$attachment_recordArgs expense?: boolean | Prisma.ExpensesDefaultArgs } export type $ExpensesArchivePayload = { name: "ExpensesArchive" objects: { - attachment_record: Prisma.$AttachmentsPayload | null expense: Prisma.$ExpensesPayload } scalars: runtime.Types.Extensions.GetPayloadResult<{ @@ -967,7 +769,6 @@ export type $ExpensesArchivePayload composites: {} @@ -1363,7 +1164,6 @@ readonly fields: ExpensesArchiveFieldRefs; */ export interface Prisma__ExpensesArchiveClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" - attachment_record = {}>(args?: Prisma.Subset>): Prisma.Prisma__AttachmentsClient, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> expense = {}>(args?: Prisma.Subset>): Prisma.Prisma__ExpensesClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> /** * Attaches callbacks for the resolution and/or rejection of the Promise. @@ -1404,7 +1204,6 @@ export interface ExpensesArchiveFieldRefs { readonly supervisor_comment: Prisma.FieldRef<"ExpensesArchive", 'String'> readonly bank_code_id: Prisma.FieldRef<"ExpensesArchive", 'Int'> readonly comment: Prisma.FieldRef<"ExpensesArchive", 'String'> - readonly attachment: Prisma.FieldRef<"ExpensesArchive", 'Int'> readonly mileage: Prisma.FieldRef<"ExpensesArchive", 'Decimal'> } @@ -1801,25 +1600,6 @@ export type ExpensesArchiveDeleteManyArgs = { - /** - * Select specific fields to fetch from the Attachments - */ - select?: Prisma.AttachmentsSelect | null - /** - * Omit specific fields from the Attachments - */ - omit?: Prisma.AttachmentsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.AttachmentsInclude | null - where?: Prisma.AttachmentsWhereInput -} - /** * ExpensesArchive without action */ diff --git a/prisma/postgres/schema.prisma b/prisma/postgres/schema.prisma index 5944452..59ec36d 100644 --- a/prisma/postgres/schema.prisma +++ b/prisma/postgres/schema.prisma @@ -207,9 +207,9 @@ model Expenses { supervisor_comment String? bank_code_id Int comment String - attachment Int? + attachment_key String? + attachment_name String? mileage Decimal? @db.Decimal(12, 2) - attachment_record Attachments? @relation("ExpenseAttachment", fields: [attachment], references: [id]) bank_code BankCodes @relation("ExpenseBankCodes", fields: [bank_code_id], references: [id]) timesheet Timesheets @relation("ExpensesTimesheet", fields: [timesheet_id], references: [id]) archive ExpensesArchive[] @relation("ExpensesToArchive") @@ -219,20 +219,18 @@ model Expenses { } model ExpensesArchive { - id Int @id @default(autoincrement()) + id Int @id @default(autoincrement()) expense_id Int timesheet_id Int - archived_at DateTime @default(now()) - date DateTime @db.Date - amount Decimal? @db.Decimal(12, 2) + archived_at DateTime @default(now()) + date DateTime @db.Date + amount Decimal? @db.Decimal(12, 2) is_approved Boolean supervisor_comment String? bank_code_id Int comment String? - attachment Int? - mileage Decimal? @db.Decimal(12, 2) - attachment_record Attachments? @relation("ExpenseArchiveAttachment", fields: [attachment], references: [id]) - expense Expenses @relation("ExpensesToArchive", fields: [expense_id], references: [id]) + mileage Decimal? @db.Decimal(12, 2) + expense Expenses @relation("ExpensesToArchive", fields: [expense_id], references: [id]) @@map("expenses_archive") } @@ -264,53 +262,6 @@ model Sessions { @@map("sessions") } -model Blobs { - sha256 String @id @db.Char(64) - size Int - mime String - storage_path String - refcount Int @default(0) - created_at DateTime @default(now()) - attachments Attachments[] @relation("AttachmnentBlob") - - @@map("blobs") -} - -model Attachments { - id Int @id @default(autoincrement()) - sha256 String @db.Char(64) - owner_type String - owner_id String - status AttachmentStatus @default(ACTIVE) - created_by String - created_at DateTime @default(now()) - original_name String - retention_policy RetentionPolicy - AttachmentVariants AttachmentVariants[] @relation("attachmentVariantAttachment") - blob Blobs @relation("AttachmnentBlob", fields: [sha256], references: [sha256]) - expenses Expenses[] @relation("ExpenseAttachment") - expenses_archive ExpensesArchive[] @relation("ExpenseArchiveAttachment") - - @@index([owner_type, owner_id, created_at]) - @@index([sha256]) - @@map("attachments") -} - -model AttachmentVariants { - id Int @id @default(autoincrement()) - attachment_id Int - variant String - bytes Int - width Int? - height Int? - created_at DateTime @default(now()) - path String - attachment Attachments @relation("attachmentVariantAttachment", fields: [attachment_id], references: [id], onDelete: Cascade) - - @@unique([attachment_id, variant]) - @@map("attachment_variants") -} - model Preferences { user_id String @unique @db.Uuid id Int @id @default(autoincrement())