The auto-import wipes the database, destroying the cronJobLog record created at the start of the job. Now duration is calculated from a local variable instead of querying the DB, and if the record is gone a fresh log entry is created in the restored database. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
26 lines
1.8 KiB
TypeScript
26 lines
1.8 KiB
TypeScript
import * as z from 'zod';
|
|
import type { Prisma } from '../../../generated/prisma';
|
|
import { SortOrderSchema } from '../enums/SortOrder.schema';
|
|
import { UserCountOrderByAggregateInputObjectSchema as UserCountOrderByAggregateInputObjectSchema } from './UserCountOrderByAggregateInput.schema';
|
|
import { UserAvgOrderByAggregateInputObjectSchema as UserAvgOrderByAggregateInputObjectSchema } from './UserAvgOrderByAggregateInput.schema';
|
|
import { UserMaxOrderByAggregateInputObjectSchema as UserMaxOrderByAggregateInputObjectSchema } from './UserMaxOrderByAggregateInput.schema';
|
|
import { UserMinOrderByAggregateInputObjectSchema as UserMinOrderByAggregateInputObjectSchema } from './UserMinOrderByAggregateInput.schema';
|
|
import { UserSumOrderByAggregateInputObjectSchema as UserSumOrderByAggregateInputObjectSchema } from './UserSumOrderByAggregateInput.schema'
|
|
|
|
const makeSchema = () => z.object({
|
|
id: SortOrderSchema.optional(),
|
|
username: SortOrderSchema.optional(),
|
|
password: SortOrderSchema.optional(),
|
|
autoBackupEnabled: SortOrderSchema.optional(),
|
|
autoBackupHour: SortOrderSchema.optional(),
|
|
usbBackupEnabled: SortOrderSchema.optional(),
|
|
usbBackupHour: SortOrderSchema.optional(),
|
|
_count: z.lazy(() => UserCountOrderByAggregateInputObjectSchema).optional(),
|
|
_avg: z.lazy(() => UserAvgOrderByAggregateInputObjectSchema).optional(),
|
|
_max: z.lazy(() => UserMaxOrderByAggregateInputObjectSchema).optional(),
|
|
_min: z.lazy(() => UserMinOrderByAggregateInputObjectSchema).optional(),
|
|
_sum: z.lazy(() => UserSumOrderByAggregateInputObjectSchema).optional()
|
|
}).strict();
|
|
export const UserOrderByWithAggregationInputObjectSchema: z.ZodType<Prisma.UserOrderByWithAggregationInput> = makeSchema() as unknown as z.ZodType<Prisma.UserOrderByWithAggregationInput>;
|
|
export const UserOrderByWithAggregationInputObjectZodSchema = makeSchema();
|