Files
DentalManagement2025/packages/db/shared/schemas/groupByUser.schema.ts
2025-05-08 21:27:29 +05:30

20 lines
843 B
TypeScript

import { z } from 'zod';
import { UserWhereInputObjectSchema } from './objects/UserWhereInput.schema';
import { UserOrderByWithAggregationInputObjectSchema } from './objects/UserOrderByWithAggregationInput.schema';
import { UserScalarWhereWithAggregatesInputObjectSchema } from './objects/UserScalarWhereWithAggregatesInput.schema';
import { UserScalarFieldEnumSchema } from './enums/UserScalarFieldEnum.schema';
export const UserGroupBySchema = z.object({
where: UserWhereInputObjectSchema.optional(),
orderBy: z
.union([
UserOrderByWithAggregationInputObjectSchema,
UserOrderByWithAggregationInputObjectSchema.array(),
])
.optional(),
having: UserScalarWhereWithAggregatesInputObjectSchema.optional(),
take: z.number().optional(),
skip: z.number().optional(),
by: z.array(UserScalarFieldEnumSchema),
});