/* !!! This is code generated by Prisma. Do not edit directly. !!! */ /* eslint-disable */ // biome-ignore-all lint: generated file // @ts-nocheck /* * This file exports the `ticket_dept` 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 ticket_dept * */ export type ticket_deptModel = runtime.Types.Result.DefaultSelection export type AggregateTicket_dept = { _count: Ticket_deptCountAggregateOutputType | null _avg: Ticket_deptAvgAggregateOutputType | null _sum: Ticket_deptSumAggregateOutputType | null _min: Ticket_deptMinAggregateOutputType | null _max: Ticket_deptMaxAggregateOutputType | null } export type Ticket_deptAvgAggregateOutputType = { id: number | null parent: number | null hasChild: number | null manager_id: number | null default_staff: number | null } export type Ticket_deptSumAggregateOutputType = { id: number | null parent: number | null hasChild: number | null manager_id: number | null default_staff: number | null } export type Ticket_deptMinAggregateOutputType = { id: number | null parent: number | null name: string | null hasChild: number | null email: string | null manager_id: number | null member_only: boolean | null protected: boolean | null default_staff: number | null default_follow: string | null } export type Ticket_deptMaxAggregateOutputType = { id: number | null parent: number | null name: string | null hasChild: number | null email: string | null manager_id: number | null member_only: boolean | null protected: boolean | null default_staff: number | null default_follow: string | null } export type Ticket_deptCountAggregateOutputType = { id: number parent: number name: number hasChild: number email: number manager_id: number member_only: number protected: number default_staff: number default_follow: number _all: number } export type Ticket_deptAvgAggregateInputType = { id?: true parent?: true hasChild?: true manager_id?: true default_staff?: true } export type Ticket_deptSumAggregateInputType = { id?: true parent?: true hasChild?: true manager_id?: true default_staff?: true } export type Ticket_deptMinAggregateInputType = { id?: true parent?: true name?: true hasChild?: true email?: true manager_id?: true member_only?: true protected?: true default_staff?: true default_follow?: true } export type Ticket_deptMaxAggregateInputType = { id?: true parent?: true name?: true hasChild?: true email?: true manager_id?: true member_only?: true protected?: true default_staff?: true default_follow?: true } export type Ticket_deptCountAggregateInputType = { id?: true parent?: true name?: true hasChild?: true email?: true manager_id?: true member_only?: true protected?: true default_staff?: true default_follow?: true _all?: true } export type Ticket_deptAggregateArgs = { /** * Filter which ticket_dept to aggregate. */ where?: Prisma.ticket_deptWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of ticket_depts to fetch. */ orderBy?: Prisma.ticket_deptOrderByWithRelationInput | Prisma.ticket_deptOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: Prisma.ticket_deptWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` ticket_depts 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` ticket_depts. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned ticket_depts **/ _count?: true | Ticket_deptCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to average **/ _avg?: Ticket_deptAvgAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to sum **/ _sum?: Ticket_deptSumAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: Ticket_deptMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: Ticket_deptMaxAggregateInputType } export type GetTicket_deptAggregateType = { [P in keyof T & keyof AggregateTicket_dept]: P extends '_count' | 'count' ? T[P] extends true ? number : Prisma.GetScalarType : Prisma.GetScalarType } export type ticket_deptGroupByArgs = { where?: Prisma.ticket_deptWhereInput orderBy?: Prisma.ticket_deptOrderByWithAggregationInput | Prisma.ticket_deptOrderByWithAggregationInput[] by: Prisma.Ticket_deptScalarFieldEnum[] | Prisma.Ticket_deptScalarFieldEnum having?: Prisma.ticket_deptScalarWhereWithAggregatesInput take?: number skip?: number _count?: Ticket_deptCountAggregateInputType | true _avg?: Ticket_deptAvgAggregateInputType _sum?: Ticket_deptSumAggregateInputType _min?: Ticket_deptMinAggregateInputType _max?: Ticket_deptMaxAggregateInputType } export type Ticket_deptGroupByOutputType = { id: number parent: number name: string hasChild: number email: string manager_id: number member_only: boolean protected: boolean default_staff: number default_follow: string _count: Ticket_deptCountAggregateOutputType | null _avg: Ticket_deptAvgAggregateOutputType | null _sum: Ticket_deptSumAggregateOutputType | null _min: Ticket_deptMinAggregateOutputType | null _max: Ticket_deptMaxAggregateOutputType | null } type GetTicket_deptGroupByPayload = Prisma.PrismaPromise< Array< Prisma.PickEnumerable & { [P in ((keyof T) & (keyof Ticket_deptGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : Prisma.GetScalarType : Prisma.GetScalarType } > > export type ticket_deptWhereInput = { AND?: Prisma.ticket_deptWhereInput | Prisma.ticket_deptWhereInput[] OR?: Prisma.ticket_deptWhereInput[] NOT?: Prisma.ticket_deptWhereInput | Prisma.ticket_deptWhereInput[] id?: Prisma.IntFilter<"ticket_dept"> | number parent?: Prisma.IntFilter<"ticket_dept"> | number name?: Prisma.StringFilter<"ticket_dept"> | string hasChild?: Prisma.IntFilter<"ticket_dept"> | number email?: Prisma.StringFilter<"ticket_dept"> | string manager_id?: Prisma.IntFilter<"ticket_dept"> | number member_only?: Prisma.BoolFilter<"ticket_dept"> | boolean protected?: Prisma.BoolFilter<"ticket_dept"> | boolean default_staff?: Prisma.IntFilter<"ticket_dept"> | number default_follow?: Prisma.StringFilter<"ticket_dept"> | string } export type ticket_deptOrderByWithRelationInput = { id?: Prisma.SortOrder parent?: Prisma.SortOrder name?: Prisma.SortOrder hasChild?: Prisma.SortOrder email?: Prisma.SortOrder manager_id?: Prisma.SortOrder member_only?: Prisma.SortOrder protected?: Prisma.SortOrder default_staff?: Prisma.SortOrder default_follow?: Prisma.SortOrder _relevance?: Prisma.ticket_deptOrderByRelevanceInput } export type ticket_deptWhereUniqueInput = Prisma.AtLeast<{ id?: number name?: string AND?: Prisma.ticket_deptWhereInput | Prisma.ticket_deptWhereInput[] OR?: Prisma.ticket_deptWhereInput[] NOT?: Prisma.ticket_deptWhereInput | Prisma.ticket_deptWhereInput[] parent?: Prisma.IntFilter<"ticket_dept"> | number hasChild?: Prisma.IntFilter<"ticket_dept"> | number email?: Prisma.StringFilter<"ticket_dept"> | string manager_id?: Prisma.IntFilter<"ticket_dept"> | number member_only?: Prisma.BoolFilter<"ticket_dept"> | boolean protected?: Prisma.BoolFilter<"ticket_dept"> | boolean default_staff?: Prisma.IntFilter<"ticket_dept"> | number default_follow?: Prisma.StringFilter<"ticket_dept"> | string }, "id" | "name"> export type ticket_deptOrderByWithAggregationInput = { id?: Prisma.SortOrder parent?: Prisma.SortOrder name?: Prisma.SortOrder hasChild?: Prisma.SortOrder email?: Prisma.SortOrder manager_id?: Prisma.SortOrder member_only?: Prisma.SortOrder protected?: Prisma.SortOrder default_staff?: Prisma.SortOrder default_follow?: Prisma.SortOrder _count?: Prisma.ticket_deptCountOrderByAggregateInput _avg?: Prisma.ticket_deptAvgOrderByAggregateInput _max?: Prisma.ticket_deptMaxOrderByAggregateInput _min?: Prisma.ticket_deptMinOrderByAggregateInput _sum?: Prisma.ticket_deptSumOrderByAggregateInput } export type ticket_deptScalarWhereWithAggregatesInput = { AND?: Prisma.ticket_deptScalarWhereWithAggregatesInput | Prisma.ticket_deptScalarWhereWithAggregatesInput[] OR?: Prisma.ticket_deptScalarWhereWithAggregatesInput[] NOT?: Prisma.ticket_deptScalarWhereWithAggregatesInput | Prisma.ticket_deptScalarWhereWithAggregatesInput[] id?: Prisma.IntWithAggregatesFilter<"ticket_dept"> | number parent?: Prisma.IntWithAggregatesFilter<"ticket_dept"> | number name?: Prisma.StringWithAggregatesFilter<"ticket_dept"> | string hasChild?: Prisma.IntWithAggregatesFilter<"ticket_dept"> | number email?: Prisma.StringWithAggregatesFilter<"ticket_dept"> | string manager_id?: Prisma.IntWithAggregatesFilter<"ticket_dept"> | number member_only?: Prisma.BoolWithAggregatesFilter<"ticket_dept"> | boolean protected?: Prisma.BoolWithAggregatesFilter<"ticket_dept"> | boolean default_staff?: Prisma.IntWithAggregatesFilter<"ticket_dept"> | number default_follow?: Prisma.StringWithAggregatesFilter<"ticket_dept"> | string } export type ticket_deptCreateInput = { parent?: number name?: string hasChild?: number email: string manager_id?: number member_only?: boolean protected?: boolean default_staff?: number default_follow?: string } export type ticket_deptUncheckedCreateInput = { id?: number parent?: number name?: string hasChild?: number email: string manager_id?: number member_only?: boolean protected?: boolean default_staff?: number default_follow?: string } export type ticket_deptUpdateInput = { parent?: Prisma.IntFieldUpdateOperationsInput | number name?: Prisma.StringFieldUpdateOperationsInput | string hasChild?: Prisma.IntFieldUpdateOperationsInput | number email?: Prisma.StringFieldUpdateOperationsInput | string manager_id?: Prisma.IntFieldUpdateOperationsInput | number member_only?: Prisma.BoolFieldUpdateOperationsInput | boolean protected?: Prisma.BoolFieldUpdateOperationsInput | boolean default_staff?: Prisma.IntFieldUpdateOperationsInput | number default_follow?: Prisma.StringFieldUpdateOperationsInput | string } export type ticket_deptUncheckedUpdateInput = { id?: Prisma.IntFieldUpdateOperationsInput | number parent?: Prisma.IntFieldUpdateOperationsInput | number name?: Prisma.StringFieldUpdateOperationsInput | string hasChild?: Prisma.IntFieldUpdateOperationsInput | number email?: Prisma.StringFieldUpdateOperationsInput | string manager_id?: Prisma.IntFieldUpdateOperationsInput | number member_only?: Prisma.BoolFieldUpdateOperationsInput | boolean protected?: Prisma.BoolFieldUpdateOperationsInput | boolean default_staff?: Prisma.IntFieldUpdateOperationsInput | number default_follow?: Prisma.StringFieldUpdateOperationsInput | string } export type ticket_deptCreateManyInput = { id?: number parent?: number name?: string hasChild?: number email: string manager_id?: number member_only?: boolean protected?: boolean default_staff?: number default_follow?: string } export type ticket_deptUpdateManyMutationInput = { parent?: Prisma.IntFieldUpdateOperationsInput | number name?: Prisma.StringFieldUpdateOperationsInput | string hasChild?: Prisma.IntFieldUpdateOperationsInput | number email?: Prisma.StringFieldUpdateOperationsInput | string manager_id?: Prisma.IntFieldUpdateOperationsInput | number member_only?: Prisma.BoolFieldUpdateOperationsInput | boolean protected?: Prisma.BoolFieldUpdateOperationsInput | boolean default_staff?: Prisma.IntFieldUpdateOperationsInput | number default_follow?: Prisma.StringFieldUpdateOperationsInput | string } export type ticket_deptUncheckedUpdateManyInput = { id?: Prisma.IntFieldUpdateOperationsInput | number parent?: Prisma.IntFieldUpdateOperationsInput | number name?: Prisma.StringFieldUpdateOperationsInput | string hasChild?: Prisma.IntFieldUpdateOperationsInput | number email?: Prisma.StringFieldUpdateOperationsInput | string manager_id?: Prisma.IntFieldUpdateOperationsInput | number member_only?: Prisma.BoolFieldUpdateOperationsInput | boolean protected?: Prisma.BoolFieldUpdateOperationsInput | boolean default_staff?: Prisma.IntFieldUpdateOperationsInput | number default_follow?: Prisma.StringFieldUpdateOperationsInput | string } export type ticket_deptOrderByRelevanceInput = { fields: Prisma.ticket_deptOrderByRelevanceFieldEnum | Prisma.ticket_deptOrderByRelevanceFieldEnum[] sort: Prisma.SortOrder search: string } export type ticket_deptCountOrderByAggregateInput = { id?: Prisma.SortOrder parent?: Prisma.SortOrder name?: Prisma.SortOrder hasChild?: Prisma.SortOrder email?: Prisma.SortOrder manager_id?: Prisma.SortOrder member_only?: Prisma.SortOrder protected?: Prisma.SortOrder default_staff?: Prisma.SortOrder default_follow?: Prisma.SortOrder } export type ticket_deptAvgOrderByAggregateInput = { id?: Prisma.SortOrder parent?: Prisma.SortOrder hasChild?: Prisma.SortOrder manager_id?: Prisma.SortOrder default_staff?: Prisma.SortOrder } export type ticket_deptMaxOrderByAggregateInput = { id?: Prisma.SortOrder parent?: Prisma.SortOrder name?: Prisma.SortOrder hasChild?: Prisma.SortOrder email?: Prisma.SortOrder manager_id?: Prisma.SortOrder member_only?: Prisma.SortOrder protected?: Prisma.SortOrder default_staff?: Prisma.SortOrder default_follow?: Prisma.SortOrder } export type ticket_deptMinOrderByAggregateInput = { id?: Prisma.SortOrder parent?: Prisma.SortOrder name?: Prisma.SortOrder hasChild?: Prisma.SortOrder email?: Prisma.SortOrder manager_id?: Prisma.SortOrder member_only?: Prisma.SortOrder protected?: Prisma.SortOrder default_staff?: Prisma.SortOrder default_follow?: Prisma.SortOrder } export type ticket_deptSumOrderByAggregateInput = { id?: Prisma.SortOrder parent?: Prisma.SortOrder hasChild?: Prisma.SortOrder manager_id?: Prisma.SortOrder default_staff?: Prisma.SortOrder } export type ticket_deptSelect = runtime.Types.Extensions.GetSelect<{ id?: boolean parent?: boolean name?: boolean hasChild?: boolean email?: boolean manager_id?: boolean member_only?: boolean protected?: boolean default_staff?: boolean default_follow?: boolean }, ExtArgs["result"]["ticket_dept"]> export type ticket_deptSelectScalar = { id?: boolean parent?: boolean name?: boolean hasChild?: boolean email?: boolean manager_id?: boolean member_only?: boolean protected?: boolean default_staff?: boolean default_follow?: boolean } export type ticket_deptOmit = runtime.Types.Extensions.GetOmit<"id" | "parent" | "name" | "hasChild" | "email" | "manager_id" | "member_only" | "protected" | "default_staff" | "default_follow", ExtArgs["result"]["ticket_dept"]> export type $ticket_deptPayload = { name: "ticket_dept" objects: {} scalars: runtime.Types.Extensions.GetPayloadResult<{ id: number parent: number name: string hasChild: number email: string manager_id: number member_only: boolean protected: boolean default_staff: number default_follow: string }, ExtArgs["result"]["ticket_dept"]> composites: {} } export type ticket_deptGetPayload = runtime.Types.Result.GetResult export type ticket_deptCountArgs = Omit & { select?: Ticket_deptCountAggregateInputType | true } export interface ticket_deptDelegate { [K: symbol]: { types: Prisma.TypeMap['model']['ticket_dept'], meta: { name: 'ticket_dept' } } /** * Find zero or one Ticket_dept that matches the filter. * @param {ticket_deptFindUniqueArgs} args - Arguments to find a Ticket_dept * @example * // Get one Ticket_dept * const ticket_dept = await prisma.ticket_dept.findUnique({ * where: { * // ... provide filter here * } * }) */ findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__ticket_deptClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Find one Ticket_dept that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {ticket_deptFindUniqueOrThrowArgs} args - Arguments to find a Ticket_dept * @example * // Get one Ticket_dept * const ticket_dept = await prisma.ticket_dept.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) */ findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__ticket_deptClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Find the first Ticket_dept 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 {ticket_deptFindFirstArgs} args - Arguments to find a Ticket_dept * @example * // Get one Ticket_dept * const ticket_dept = await prisma.ticket_dept.findFirst({ * where: { * // ... provide filter here * } * }) */ findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__ticket_deptClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Find the first Ticket_dept 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 {ticket_deptFindFirstOrThrowArgs} args - Arguments to find a Ticket_dept * @example * // Get one Ticket_dept * const ticket_dept = await prisma.ticket_dept.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) */ findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__ticket_deptClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Find zero or more Ticket_depts 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 {ticket_deptFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all Ticket_depts * const ticket_depts = await prisma.ticket_dept.findMany() * * // Get first 10 Ticket_depts * const ticket_depts = await prisma.ticket_dept.findMany({ take: 10 }) * * // Only select the `id` * const ticket_deptWithIdOnly = await prisma.ticket_dept.findMany({ select: { id: true } }) * */ findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> /** * Create a Ticket_dept. * @param {ticket_deptCreateArgs} args - Arguments to create a Ticket_dept. * @example * // Create one Ticket_dept * const Ticket_dept = await prisma.ticket_dept.create({ * data: { * // ... data to create a Ticket_dept * } * }) * */ create(args: Prisma.SelectSubset>): Prisma.Prisma__ticket_deptClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Create many Ticket_depts. * @param {ticket_deptCreateManyArgs} args - Arguments to create many Ticket_depts. * @example * // Create many Ticket_depts * const ticket_dept = await prisma.ticket_dept.createMany({ * data: [ * // ... provide data here * ] * }) * */ createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Delete a Ticket_dept. * @param {ticket_deptDeleteArgs} args - Arguments to delete one Ticket_dept. * @example * // Delete one Ticket_dept * const Ticket_dept = await prisma.ticket_dept.delete({ * where: { * // ... filter to delete one Ticket_dept * } * }) * */ delete(args: Prisma.SelectSubset>): Prisma.Prisma__ticket_deptClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Update one Ticket_dept. * @param {ticket_deptUpdateArgs} args - Arguments to update one Ticket_dept. * @example * // Update one Ticket_dept * const ticket_dept = await prisma.ticket_dept.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ update(args: Prisma.SelectSubset>): Prisma.Prisma__ticket_deptClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Delete zero or more Ticket_depts. * @param {ticket_deptDeleteManyArgs} args - Arguments to filter Ticket_depts to delete. * @example * // Delete a few Ticket_depts * const { count } = await prisma.ticket_dept.deleteMany({ * where: { * // ... provide filter here * } * }) * */ deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Update zero or more Ticket_depts. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {ticket_deptUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many Ticket_depts * const ticket_dept = await prisma.ticket_dept.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Create or update one Ticket_dept. * @param {ticket_deptUpsertArgs} args - Arguments to update or create a Ticket_dept. * @example * // Update or create a Ticket_dept * const ticket_dept = await prisma.ticket_dept.upsert({ * create: { * // ... data to create a Ticket_dept * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the Ticket_dept we want to update * } * }) */ upsert(args: Prisma.SelectSubset>): Prisma.Prisma__ticket_deptClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Count the number of Ticket_depts. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {ticket_deptCountArgs} args - Arguments to filter Ticket_depts to count. * @example * // Count the number of Ticket_depts * const count = await prisma.ticket_dept.count({ * where: { * // ... the filter for the Ticket_depts 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 Ticket_dept. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {Ticket_deptAggregateArgs} 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 Ticket_dept. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {ticket_deptGroupByArgs} 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 ticket_deptGroupByArgs, HasSelectOrTake extends Prisma.Or< Prisma.Extends<'skip', Prisma.Keys>, Prisma.Extends<'take', Prisma.Keys> >, OrderByArg extends Prisma.True extends HasSelectOrTake ? { orderBy: ticket_deptGroupByArgs['orderBy'] } : { orderBy?: ticket_deptGroupByArgs['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 ? GetTicket_deptGroupByPayload : Prisma.PrismaPromise /** * Fields of the ticket_dept model */ readonly fields: ticket_deptFieldRefs; } /** * The delegate class that acts as a "Promise-like" for ticket_dept. * 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__ticket_deptClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" /** * 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 ticket_dept model */ export interface ticket_deptFieldRefs { readonly id: Prisma.FieldRef<"ticket_dept", 'Int'> readonly parent: Prisma.FieldRef<"ticket_dept", 'Int'> readonly name: Prisma.FieldRef<"ticket_dept", 'String'> readonly hasChild: Prisma.FieldRef<"ticket_dept", 'Int'> readonly email: Prisma.FieldRef<"ticket_dept", 'String'> readonly manager_id: Prisma.FieldRef<"ticket_dept", 'Int'> readonly member_only: Prisma.FieldRef<"ticket_dept", 'Boolean'> readonly protected: Prisma.FieldRef<"ticket_dept", 'Boolean'> readonly default_staff: Prisma.FieldRef<"ticket_dept", 'Int'> readonly default_follow: Prisma.FieldRef<"ticket_dept", 'String'> } // Custom InputTypes /** * ticket_dept findUnique */ export type ticket_deptFindUniqueArgs = { /** * Select specific fields to fetch from the ticket_dept */ select?: Prisma.ticket_deptSelect | null /** * Omit specific fields from the ticket_dept */ omit?: Prisma.ticket_deptOmit | null /** * Filter, which ticket_dept to fetch. */ where: Prisma.ticket_deptWhereUniqueInput } /** * ticket_dept findUniqueOrThrow */ export type ticket_deptFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the ticket_dept */ select?: Prisma.ticket_deptSelect | null /** * Omit specific fields from the ticket_dept */ omit?: Prisma.ticket_deptOmit | null /** * Filter, which ticket_dept to fetch. */ where: Prisma.ticket_deptWhereUniqueInput } /** * ticket_dept findFirst */ export type ticket_deptFindFirstArgs = { /** * Select specific fields to fetch from the ticket_dept */ select?: Prisma.ticket_deptSelect | null /** * Omit specific fields from the ticket_dept */ omit?: Prisma.ticket_deptOmit | null /** * Filter, which ticket_dept to fetch. */ where?: Prisma.ticket_deptWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of ticket_depts to fetch. */ orderBy?: Prisma.ticket_deptOrderByWithRelationInput | Prisma.ticket_deptOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for ticket_depts. */ cursor?: Prisma.ticket_deptWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` ticket_depts 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` ticket_depts. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of ticket_depts. */ distinct?: Prisma.Ticket_deptScalarFieldEnum | Prisma.Ticket_deptScalarFieldEnum[] } /** * ticket_dept findFirstOrThrow */ export type ticket_deptFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the ticket_dept */ select?: Prisma.ticket_deptSelect | null /** * Omit specific fields from the ticket_dept */ omit?: Prisma.ticket_deptOmit | null /** * Filter, which ticket_dept to fetch. */ where?: Prisma.ticket_deptWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of ticket_depts to fetch. */ orderBy?: Prisma.ticket_deptOrderByWithRelationInput | Prisma.ticket_deptOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for ticket_depts. */ cursor?: Prisma.ticket_deptWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` ticket_depts 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` ticket_depts. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of ticket_depts. */ distinct?: Prisma.Ticket_deptScalarFieldEnum | Prisma.Ticket_deptScalarFieldEnum[] } /** * ticket_dept findMany */ export type ticket_deptFindManyArgs = { /** * Select specific fields to fetch from the ticket_dept */ select?: Prisma.ticket_deptSelect | null /** * Omit specific fields from the ticket_dept */ omit?: Prisma.ticket_deptOmit | null /** * Filter, which ticket_depts to fetch. */ where?: Prisma.ticket_deptWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of ticket_depts to fetch. */ orderBy?: Prisma.ticket_deptOrderByWithRelationInput | Prisma.ticket_deptOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing ticket_depts. */ cursor?: Prisma.ticket_deptWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` ticket_depts 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` ticket_depts. */ skip?: number distinct?: Prisma.Ticket_deptScalarFieldEnum | Prisma.Ticket_deptScalarFieldEnum[] } /** * ticket_dept create */ export type ticket_deptCreateArgs = { /** * Select specific fields to fetch from the ticket_dept */ select?: Prisma.ticket_deptSelect | null /** * Omit specific fields from the ticket_dept */ omit?: Prisma.ticket_deptOmit | null /** * The data needed to create a ticket_dept. */ data: Prisma.XOR } /** * ticket_dept createMany */ export type ticket_deptCreateManyArgs = { /** * The data used to create many ticket_depts. */ data: Prisma.ticket_deptCreateManyInput | Prisma.ticket_deptCreateManyInput[] skipDuplicates?: boolean } /** * ticket_dept update */ export type ticket_deptUpdateArgs = { /** * Select specific fields to fetch from the ticket_dept */ select?: Prisma.ticket_deptSelect | null /** * Omit specific fields from the ticket_dept */ omit?: Prisma.ticket_deptOmit | null /** * The data needed to update a ticket_dept. */ data: Prisma.XOR /** * Choose, which ticket_dept to update. */ where: Prisma.ticket_deptWhereUniqueInput } /** * ticket_dept updateMany */ export type ticket_deptUpdateManyArgs = { /** * The data used to update ticket_depts. */ data: Prisma.XOR /** * Filter which ticket_depts to update */ where?: Prisma.ticket_deptWhereInput /** * Limit how many ticket_depts to update. */ limit?: number } /** * ticket_dept upsert */ export type ticket_deptUpsertArgs = { /** * Select specific fields to fetch from the ticket_dept */ select?: Prisma.ticket_deptSelect | null /** * Omit specific fields from the ticket_dept */ omit?: Prisma.ticket_deptOmit | null /** * The filter to search for the ticket_dept to update in case it exists. */ where: Prisma.ticket_deptWhereUniqueInput /** * In case the ticket_dept found by the `where` argument doesn't exist, create a new ticket_dept with this data. */ create: Prisma.XOR /** * In case the ticket_dept was found with the provided `where` argument, update it with this data. */ update: Prisma.XOR } /** * ticket_dept delete */ export type ticket_deptDeleteArgs = { /** * Select specific fields to fetch from the ticket_dept */ select?: Prisma.ticket_deptSelect | null /** * Omit specific fields from the ticket_dept */ omit?: Prisma.ticket_deptOmit | null /** * Filter which ticket_dept to delete. */ where: Prisma.ticket_deptWhereUniqueInput } /** * ticket_dept deleteMany */ export type ticket_deptDeleteManyArgs = { /** * Filter which ticket_depts to delete */ where?: Prisma.ticket_deptWhereInput /** * Limit how many ticket_depts to delete. */ limit?: number } /** * ticket_dept without action */ export type ticket_deptDefaultArgs = { /** * Select specific fields to fetch from the ticket_dept */ select?: Prisma.ticket_deptSelect | null /** * Omit specific fields from the ticket_dept */ omit?: Prisma.ticket_deptOmit | null }