
/* !!! 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_template` 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_template
 * 
 */
export type ticket_templateModel = runtime.Types.Result.DefaultSelection<Prisma.$ticket_templatePayload>

export type AggregateTicket_template = {
  _count: Ticket_templateCountAggregateOutputType | null
  _avg: Ticket_templateAvgAggregateOutputType | null
  _sum: Ticket_templateSumAggregateOutputType | null
  _min: Ticket_templateMinAggregateOutputType | null
  _max: Ticket_templateMaxAggregateOutputType | null
}

export type Ticket_templateAvgAggregateOutputType = {
  id: number | null
}

export type Ticket_templateSumAggregateOutputType = {
  id: number | null
}

export type Ticket_templateMinAggregateOutputType = {
  id: number | null
  name: string | null
  template: string | null
}

export type Ticket_templateMaxAggregateOutputType = {
  id: number | null
  name: string | null
  template: string | null
}

export type Ticket_templateCountAggregateOutputType = {
  id: number
  name: number
  template: number
  _all: number
}


export type Ticket_templateAvgAggregateInputType = {
  id?: true
}

export type Ticket_templateSumAggregateInputType = {
  id?: true
}

export type Ticket_templateMinAggregateInputType = {
  id?: true
  name?: true
  template?: true
}

export type Ticket_templateMaxAggregateInputType = {
  id?: true
  name?: true
  template?: true
}

export type Ticket_templateCountAggregateInputType = {
  id?: true
  name?: true
  template?: true
  _all?: true
}

export type Ticket_templateAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which ticket_template to aggregate.
   */
  where?: Prisma.ticket_templateWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of ticket_templates to fetch.
   */
  orderBy?: Prisma.ticket_templateOrderByWithRelationInput | Prisma.ticket_templateOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the start position
   */
  cursor?: Prisma.ticket_templateWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` ticket_templates 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_templates.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Count returned ticket_templates
  **/
  _count?: true | Ticket_templateCountAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to average
  **/
  _avg?: Ticket_templateAvgAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to sum
  **/
  _sum?: Ticket_templateSumAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the minimum value
  **/
  _min?: Ticket_templateMinAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the maximum value
  **/
  _max?: Ticket_templateMaxAggregateInputType
}

export type GetTicket_templateAggregateType<T extends Ticket_templateAggregateArgs> = {
      [P in keyof T & keyof AggregateTicket_template]: P extends '_count' | 'count'
    ? T[P] extends true
      ? number
      : Prisma.GetScalarType<T[P], AggregateTicket_template[P]>
    : Prisma.GetScalarType<T[P], AggregateTicket_template[P]>
}




export type ticket_templateGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.ticket_templateWhereInput
  orderBy?: Prisma.ticket_templateOrderByWithAggregationInput | Prisma.ticket_templateOrderByWithAggregationInput[]
  by: Prisma.Ticket_templateScalarFieldEnum[] | Prisma.Ticket_templateScalarFieldEnum
  having?: Prisma.ticket_templateScalarWhereWithAggregatesInput
  take?: number
  skip?: number
  _count?: Ticket_templateCountAggregateInputType | true
  _avg?: Ticket_templateAvgAggregateInputType
  _sum?: Ticket_templateSumAggregateInputType
  _min?: Ticket_templateMinAggregateInputType
  _max?: Ticket_templateMaxAggregateInputType
}

export type Ticket_templateGroupByOutputType = {
  id: number
  name: string
  template: string
  _count: Ticket_templateCountAggregateOutputType | null
  _avg: Ticket_templateAvgAggregateOutputType | null
  _sum: Ticket_templateSumAggregateOutputType | null
  _min: Ticket_templateMinAggregateOutputType | null
  _max: Ticket_templateMaxAggregateOutputType | null
}

type GetTicket_templateGroupByPayload<T extends ticket_templateGroupByArgs> = Prisma.PrismaPromise<
  Array<
    Prisma.PickEnumerable<Ticket_templateGroupByOutputType, T['by']> &
      {
        [P in ((keyof T) & (keyof Ticket_templateGroupByOutputType))]: P extends '_count'
          ? T[P] extends boolean
            ? number
            : Prisma.GetScalarType<T[P], Ticket_templateGroupByOutputType[P]>
          : Prisma.GetScalarType<T[P], Ticket_templateGroupByOutputType[P]>
      }
    >
  >



export type ticket_templateWhereInput = {
  AND?: Prisma.ticket_templateWhereInput | Prisma.ticket_templateWhereInput[]
  OR?: Prisma.ticket_templateWhereInput[]
  NOT?: Prisma.ticket_templateWhereInput | Prisma.ticket_templateWhereInput[]
  id?: Prisma.IntFilter<"ticket_template"> | number
  name?: Prisma.StringFilter<"ticket_template"> | string
  template?: Prisma.StringFilter<"ticket_template"> | string
}

export type ticket_templateOrderByWithRelationInput = {
  id?: Prisma.SortOrder
  name?: Prisma.SortOrder
  template?: Prisma.SortOrder
  _relevance?: Prisma.ticket_templateOrderByRelevanceInput
}

export type ticket_templateWhereUniqueInput = Prisma.AtLeast<{
  id?: number
  AND?: Prisma.ticket_templateWhereInput | Prisma.ticket_templateWhereInput[]
  OR?: Prisma.ticket_templateWhereInput[]
  NOT?: Prisma.ticket_templateWhereInput | Prisma.ticket_templateWhereInput[]
  name?: Prisma.StringFilter<"ticket_template"> | string
  template?: Prisma.StringFilter<"ticket_template"> | string
}, "id">

export type ticket_templateOrderByWithAggregationInput = {
  id?: Prisma.SortOrder
  name?: Prisma.SortOrder
  template?: Prisma.SortOrder
  _count?: Prisma.ticket_templateCountOrderByAggregateInput
  _avg?: Prisma.ticket_templateAvgOrderByAggregateInput
  _max?: Prisma.ticket_templateMaxOrderByAggregateInput
  _min?: Prisma.ticket_templateMinOrderByAggregateInput
  _sum?: Prisma.ticket_templateSumOrderByAggregateInput
}

export type ticket_templateScalarWhereWithAggregatesInput = {
  AND?: Prisma.ticket_templateScalarWhereWithAggregatesInput | Prisma.ticket_templateScalarWhereWithAggregatesInput[]
  OR?: Prisma.ticket_templateScalarWhereWithAggregatesInput[]
  NOT?: Prisma.ticket_templateScalarWhereWithAggregatesInput | Prisma.ticket_templateScalarWhereWithAggregatesInput[]
  id?: Prisma.IntWithAggregatesFilter<"ticket_template"> | number
  name?: Prisma.StringWithAggregatesFilter<"ticket_template"> | string
  template?: Prisma.StringWithAggregatesFilter<"ticket_template"> | string
}

export type ticket_templateCreateInput = {
  name: string
  template: string
}

export type ticket_templateUncheckedCreateInput = {
  id?: number
  name: string
  template: string
}

export type ticket_templateUpdateInput = {
  name?: Prisma.StringFieldUpdateOperationsInput | string
  template?: Prisma.StringFieldUpdateOperationsInput | string
}

export type ticket_templateUncheckedUpdateInput = {
  id?: Prisma.IntFieldUpdateOperationsInput | number
  name?: Prisma.StringFieldUpdateOperationsInput | string
  template?: Prisma.StringFieldUpdateOperationsInput | string
}

export type ticket_templateCreateManyInput = {
  id?: number
  name: string
  template: string
}

export type ticket_templateUpdateManyMutationInput = {
  name?: Prisma.StringFieldUpdateOperationsInput | string
  template?: Prisma.StringFieldUpdateOperationsInput | string
}

export type ticket_templateUncheckedUpdateManyInput = {
  id?: Prisma.IntFieldUpdateOperationsInput | number
  name?: Prisma.StringFieldUpdateOperationsInput | string
  template?: Prisma.StringFieldUpdateOperationsInput | string
}

export type ticket_templateOrderByRelevanceInput = {
  fields: Prisma.ticket_templateOrderByRelevanceFieldEnum | Prisma.ticket_templateOrderByRelevanceFieldEnum[]
  sort: Prisma.SortOrder
  search: string
}

export type ticket_templateCountOrderByAggregateInput = {
  id?: Prisma.SortOrder
  name?: Prisma.SortOrder
  template?: Prisma.SortOrder
}

export type ticket_templateAvgOrderByAggregateInput = {
  id?: Prisma.SortOrder
}

export type ticket_templateMaxOrderByAggregateInput = {
  id?: Prisma.SortOrder
  name?: Prisma.SortOrder
  template?: Prisma.SortOrder
}

export type ticket_templateMinOrderByAggregateInput = {
  id?: Prisma.SortOrder
  name?: Prisma.SortOrder
  template?: Prisma.SortOrder
}

export type ticket_templateSumOrderByAggregateInput = {
  id?: Prisma.SortOrder
}



export type ticket_templateSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  name?: boolean
  template?: boolean
}, ExtArgs["result"]["ticket_template"]>



export type ticket_templateSelectScalar = {
  id?: boolean
  name?: boolean
  template?: boolean
}

export type ticket_templateOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "name" | "template", ExtArgs["result"]["ticket_template"]>

export type $ticket_templatePayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  name: "ticket_template"
  objects: {}
  scalars: runtime.Types.Extensions.GetPayloadResult<{
    id: number
    name: string
    template: string
  }, ExtArgs["result"]["ticket_template"]>
  composites: {}
}

export type ticket_templateGetPayload<S extends boolean | null | undefined | ticket_templateDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$ticket_templatePayload, S>

export type ticket_templateCountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> =
  Omit<ticket_templateFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
    select?: Ticket_templateCountAggregateInputType | true
  }

export interface ticket_templateDelegate<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> {
  [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['ticket_template'], meta: { name: 'ticket_template' } }
  /**
   * Find zero or one Ticket_template that matches the filter.
   * @param {ticket_templateFindUniqueArgs} args - Arguments to find a Ticket_template
   * @example
   * // Get one Ticket_template
   * const ticket_template = await prisma.ticket_template.findUnique({
   *   where: {
   *     // ... provide filter here
   *   }
   * })
   */
  findUnique<T extends ticket_templateFindUniqueArgs>(args: Prisma.SelectSubset<T, ticket_templateFindUniqueArgs<ExtArgs>>): Prisma.Prisma__ticket_templateClient<runtime.Types.Result.GetResult<Prisma.$ticket_templatePayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

  /**
   * Find one Ticket_template that matches the filter or throw an error with `error.code='P2025'`
   * if no matches were found.
   * @param {ticket_templateFindUniqueOrThrowArgs} args - Arguments to find a Ticket_template
   * @example
   * // Get one Ticket_template
   * const ticket_template = await prisma.ticket_template.findUniqueOrThrow({
   *   where: {
   *     // ... provide filter here
   *   }
   * })
   */
  findUniqueOrThrow<T extends ticket_templateFindUniqueOrThrowArgs>(args: Prisma.SelectSubset<T, ticket_templateFindUniqueOrThrowArgs<ExtArgs>>): Prisma.Prisma__ticket_templateClient<runtime.Types.Result.GetResult<Prisma.$ticket_templatePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

  /**
   * Find the first Ticket_template 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_templateFindFirstArgs} args - Arguments to find a Ticket_template
   * @example
   * // Get one Ticket_template
   * const ticket_template = await prisma.ticket_template.findFirst({
   *   where: {
   *     // ... provide filter here
   *   }
   * })
   */
  findFirst<T extends ticket_templateFindFirstArgs>(args?: Prisma.SelectSubset<T, ticket_templateFindFirstArgs<ExtArgs>>): Prisma.Prisma__ticket_templateClient<runtime.Types.Result.GetResult<Prisma.$ticket_templatePayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

  /**
   * Find the first Ticket_template 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_templateFindFirstOrThrowArgs} args - Arguments to find a Ticket_template
   * @example
   * // Get one Ticket_template
   * const ticket_template = await prisma.ticket_template.findFirstOrThrow({
   *   where: {
   *     // ... provide filter here
   *   }
   * })
   */
  findFirstOrThrow<T extends ticket_templateFindFirstOrThrowArgs>(args?: Prisma.SelectSubset<T, ticket_templateFindFirstOrThrowArgs<ExtArgs>>): Prisma.Prisma__ticket_templateClient<runtime.Types.Result.GetResult<Prisma.$ticket_templatePayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

  /**
   * Find zero or more Ticket_templates 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_templateFindManyArgs} args - Arguments to filter and select certain fields only.
   * @example
   * // Get all Ticket_templates
   * const ticket_templates = await prisma.ticket_template.findMany()
   * 
   * // Get first 10 Ticket_templates
   * const ticket_templates = await prisma.ticket_template.findMany({ take: 10 })
   * 
   * // Only select the `id`
   * const ticket_templateWithIdOnly = await prisma.ticket_template.findMany({ select: { id: true } })
   * 
   */
  findMany<T extends ticket_templateFindManyArgs>(args?: Prisma.SelectSubset<T, ticket_templateFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ticket_templatePayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

  /**
   * Create a Ticket_template.
   * @param {ticket_templateCreateArgs} args - Arguments to create a Ticket_template.
   * @example
   * // Create one Ticket_template
   * const Ticket_template = await prisma.ticket_template.create({
   *   data: {
   *     // ... data to create a Ticket_template
   *   }
   * })
   * 
   */
  create<T extends ticket_templateCreateArgs>(args: Prisma.SelectSubset<T, ticket_templateCreateArgs<ExtArgs>>): Prisma.Prisma__ticket_templateClient<runtime.Types.Result.GetResult<Prisma.$ticket_templatePayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

  /**
   * Create many Ticket_templates.
   * @param {ticket_templateCreateManyArgs} args - Arguments to create many Ticket_templates.
   * @example
   * // Create many Ticket_templates
   * const ticket_template = await prisma.ticket_template.createMany({
   *   data: [
   *     // ... provide data here
   *   ]
   * })
   *     
   */
  createMany<T extends ticket_templateCreateManyArgs>(args?: Prisma.SelectSubset<T, ticket_templateCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>

  /**
   * Delete a Ticket_template.
   * @param {ticket_templateDeleteArgs} args - Arguments to delete one Ticket_template.
   * @example
   * // Delete one Ticket_template
   * const Ticket_template = await prisma.ticket_template.delete({
   *   where: {
   *     // ... filter to delete one Ticket_template
   *   }
   * })
   * 
   */
  delete<T extends ticket_templateDeleteArgs>(args: Prisma.SelectSubset<T, ticket_templateDeleteArgs<ExtArgs>>): Prisma.Prisma__ticket_templateClient<runtime.Types.Result.GetResult<Prisma.$ticket_templatePayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

  /**
   * Update one Ticket_template.
   * @param {ticket_templateUpdateArgs} args - Arguments to update one Ticket_template.
   * @example
   * // Update one Ticket_template
   * const ticket_template = await prisma.ticket_template.update({
   *   where: {
   *     // ... provide filter here
   *   },
   *   data: {
   *     // ... provide data here
   *   }
   * })
   * 
   */
  update<T extends ticket_templateUpdateArgs>(args: Prisma.SelectSubset<T, ticket_templateUpdateArgs<ExtArgs>>): Prisma.Prisma__ticket_templateClient<runtime.Types.Result.GetResult<Prisma.$ticket_templatePayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

  /**
   * Delete zero or more Ticket_templates.
   * @param {ticket_templateDeleteManyArgs} args - Arguments to filter Ticket_templates to delete.
   * @example
   * // Delete a few Ticket_templates
   * const { count } = await prisma.ticket_template.deleteMany({
   *   where: {
   *     // ... provide filter here
   *   }
   * })
   * 
   */
  deleteMany<T extends ticket_templateDeleteManyArgs>(args?: Prisma.SelectSubset<T, ticket_templateDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>

  /**
   * Update zero or more Ticket_templates.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {ticket_templateUpdateManyArgs} args - Arguments to update one or more rows.
   * @example
   * // Update many Ticket_templates
   * const ticket_template = await prisma.ticket_template.updateMany({
   *   where: {
   *     // ... provide filter here
   *   },
   *   data: {
   *     // ... provide data here
   *   }
   * })
   * 
   */
  updateMany<T extends ticket_templateUpdateManyArgs>(args: Prisma.SelectSubset<T, ticket_templateUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>

  /**
   * Create or update one Ticket_template.
   * @param {ticket_templateUpsertArgs} args - Arguments to update or create a Ticket_template.
   * @example
   * // Update or create a Ticket_template
   * const ticket_template = await prisma.ticket_template.upsert({
   *   create: {
   *     // ... data to create a Ticket_template
   *   },
   *   update: {
   *     // ... in case it already exists, update
   *   },
   *   where: {
   *     // ... the filter for the Ticket_template we want to update
   *   }
   * })
   */
  upsert<T extends ticket_templateUpsertArgs>(args: Prisma.SelectSubset<T, ticket_templateUpsertArgs<ExtArgs>>): Prisma.Prisma__ticket_templateClient<runtime.Types.Result.GetResult<Prisma.$ticket_templatePayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


  /**
   * Count the number of Ticket_templates.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {ticket_templateCountArgs} args - Arguments to filter Ticket_templates to count.
   * @example
   * // Count the number of Ticket_templates
   * const count = await prisma.ticket_template.count({
   *   where: {
   *     // ... the filter for the Ticket_templates we want to count
   *   }
   * })
  **/
  count<T extends ticket_templateCountArgs>(
    args?: Prisma.Subset<T, ticket_templateCountArgs>,
  ): Prisma.PrismaPromise<
    T extends runtime.Types.Utils.Record<'select', any>
      ? T['select'] extends true
        ? number
        : Prisma.GetScalarType<T['select'], Ticket_templateCountAggregateOutputType>
      : number
  >

  /**
   * Allows you to perform aggregations operations on a Ticket_template.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {Ticket_templateAggregateArgs} 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<T extends Ticket_templateAggregateArgs>(args: Prisma.Subset<T, Ticket_templateAggregateArgs>): Prisma.PrismaPromise<GetTicket_templateAggregateType<T>>

  /**
   * Group by Ticket_template.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {ticket_templateGroupByArgs} 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_templateGroupByArgs,
    HasSelectOrTake extends Prisma.Or<
      Prisma.Extends<'skip', Prisma.Keys<T>>,
      Prisma.Extends<'take', Prisma.Keys<T>>
    >,
    OrderByArg extends Prisma.True extends HasSelectOrTake
      ? { orderBy: ticket_templateGroupByArgs['orderBy'] }
      : { orderBy?: ticket_templateGroupByArgs['orderBy'] },
    OrderFields extends Prisma.ExcludeUnderscoreKeys<Prisma.Keys<Prisma.MaybeTupleToUnion<T['orderBy']>>>,
    ByFields extends Prisma.MaybeTupleToUnion<T['by']>,
    ByValid extends Prisma.Has<ByFields, OrderFields>,
    HavingFields extends Prisma.GetHavingFields<T['having']>,
    HavingValid extends Prisma.Has<ByFields, HavingFields>,
    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<T>
    ? 'orderBy' extends Prisma.Keys<T>
      ? 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<T>
    ? 'orderBy' extends Prisma.Keys<T>
      ? 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<T, ticket_templateGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetTicket_templateGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
/**
 * Fields of the ticket_template model
 */
readonly fields: ticket_templateFieldRefs;
}

/**
 * The delegate class that acts as a "Promise-like" for ticket_template.
 * 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_templateClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
  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<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): runtime.Types.Utils.JsPromise<TResult1 | TResult2>
  /**
   * 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<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): runtime.Types.Utils.JsPromise<T | TResult>
  /**
   * 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<T>
}




/**
 * Fields of the ticket_template model
 */
export interface ticket_templateFieldRefs {
  readonly id: Prisma.FieldRef<"ticket_template", 'Int'>
  readonly name: Prisma.FieldRef<"ticket_template", 'String'>
  readonly template: Prisma.FieldRef<"ticket_template", 'String'>
}
    

// Custom InputTypes
/**
 * ticket_template findUnique
 */
export type ticket_templateFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the ticket_template
   */
  select?: Prisma.ticket_templateSelect<ExtArgs> | null
  /**
   * Omit specific fields from the ticket_template
   */
  omit?: Prisma.ticket_templateOmit<ExtArgs> | null
  /**
   * Filter, which ticket_template to fetch.
   */
  where: Prisma.ticket_templateWhereUniqueInput
}

/**
 * ticket_template findUniqueOrThrow
 */
export type ticket_templateFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the ticket_template
   */
  select?: Prisma.ticket_templateSelect<ExtArgs> | null
  /**
   * Omit specific fields from the ticket_template
   */
  omit?: Prisma.ticket_templateOmit<ExtArgs> | null
  /**
   * Filter, which ticket_template to fetch.
   */
  where: Prisma.ticket_templateWhereUniqueInput
}

/**
 * ticket_template findFirst
 */
export type ticket_templateFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the ticket_template
   */
  select?: Prisma.ticket_templateSelect<ExtArgs> | null
  /**
   * Omit specific fields from the ticket_template
   */
  omit?: Prisma.ticket_templateOmit<ExtArgs> | null
  /**
   * Filter, which ticket_template to fetch.
   */
  where?: Prisma.ticket_templateWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of ticket_templates to fetch.
   */
  orderBy?: Prisma.ticket_templateOrderByWithRelationInput | Prisma.ticket_templateOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the position for searching for ticket_templates.
   */
  cursor?: Prisma.ticket_templateWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` ticket_templates 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_templates.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
   * 
   * Filter by unique combinations of ticket_templates.
   */
  distinct?: Prisma.Ticket_templateScalarFieldEnum | Prisma.Ticket_templateScalarFieldEnum[]
}

/**
 * ticket_template findFirstOrThrow
 */
export type ticket_templateFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the ticket_template
   */
  select?: Prisma.ticket_templateSelect<ExtArgs> | null
  /**
   * Omit specific fields from the ticket_template
   */
  omit?: Prisma.ticket_templateOmit<ExtArgs> | null
  /**
   * Filter, which ticket_template to fetch.
   */
  where?: Prisma.ticket_templateWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of ticket_templates to fetch.
   */
  orderBy?: Prisma.ticket_templateOrderByWithRelationInput | Prisma.ticket_templateOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the position for searching for ticket_templates.
   */
  cursor?: Prisma.ticket_templateWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` ticket_templates 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_templates.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
   * 
   * Filter by unique combinations of ticket_templates.
   */
  distinct?: Prisma.Ticket_templateScalarFieldEnum | Prisma.Ticket_templateScalarFieldEnum[]
}

/**
 * ticket_template findMany
 */
export type ticket_templateFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the ticket_template
   */
  select?: Prisma.ticket_templateSelect<ExtArgs> | null
  /**
   * Omit specific fields from the ticket_template
   */
  omit?: Prisma.ticket_templateOmit<ExtArgs> | null
  /**
   * Filter, which ticket_templates to fetch.
   */
  where?: Prisma.ticket_templateWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of ticket_templates to fetch.
   */
  orderBy?: Prisma.ticket_templateOrderByWithRelationInput | Prisma.ticket_templateOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the position for listing ticket_templates.
   */
  cursor?: Prisma.ticket_templateWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` ticket_templates 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_templates.
   */
  skip?: number
  distinct?: Prisma.Ticket_templateScalarFieldEnum | Prisma.Ticket_templateScalarFieldEnum[]
}

/**
 * ticket_template create
 */
export type ticket_templateCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the ticket_template
   */
  select?: Prisma.ticket_templateSelect<ExtArgs> | null
  /**
   * Omit specific fields from the ticket_template
   */
  omit?: Prisma.ticket_templateOmit<ExtArgs> | null
  /**
   * The data needed to create a ticket_template.
   */
  data: Prisma.XOR<Prisma.ticket_templateCreateInput, Prisma.ticket_templateUncheckedCreateInput>
}

/**
 * ticket_template createMany
 */
export type ticket_templateCreateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * The data used to create many ticket_templates.
   */
  data: Prisma.ticket_templateCreateManyInput | Prisma.ticket_templateCreateManyInput[]
  skipDuplicates?: boolean
}

/**
 * ticket_template update
 */
export type ticket_templateUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the ticket_template
   */
  select?: Prisma.ticket_templateSelect<ExtArgs> | null
  /**
   * Omit specific fields from the ticket_template
   */
  omit?: Prisma.ticket_templateOmit<ExtArgs> | null
  /**
   * The data needed to update a ticket_template.
   */
  data: Prisma.XOR<Prisma.ticket_templateUpdateInput, Prisma.ticket_templateUncheckedUpdateInput>
  /**
   * Choose, which ticket_template to update.
   */
  where: Prisma.ticket_templateWhereUniqueInput
}

/**
 * ticket_template updateMany
 */
export type ticket_templateUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * The data used to update ticket_templates.
   */
  data: Prisma.XOR<Prisma.ticket_templateUpdateManyMutationInput, Prisma.ticket_templateUncheckedUpdateManyInput>
  /**
   * Filter which ticket_templates to update
   */
  where?: Prisma.ticket_templateWhereInput
  /**
   * Limit how many ticket_templates to update.
   */
  limit?: number
}

/**
 * ticket_template upsert
 */
export type ticket_templateUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the ticket_template
   */
  select?: Prisma.ticket_templateSelect<ExtArgs> | null
  /**
   * Omit specific fields from the ticket_template
   */
  omit?: Prisma.ticket_templateOmit<ExtArgs> | null
  /**
   * The filter to search for the ticket_template to update in case it exists.
   */
  where: Prisma.ticket_templateWhereUniqueInput
  /**
   * In case the ticket_template found by the `where` argument doesn't exist, create a new ticket_template with this data.
   */
  create: Prisma.XOR<Prisma.ticket_templateCreateInput, Prisma.ticket_templateUncheckedCreateInput>
  /**
   * In case the ticket_template was found with the provided `where` argument, update it with this data.
   */
  update: Prisma.XOR<Prisma.ticket_templateUpdateInput, Prisma.ticket_templateUncheckedUpdateInput>
}

/**
 * ticket_template delete
 */
export type ticket_templateDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the ticket_template
   */
  select?: Prisma.ticket_templateSelect<ExtArgs> | null
  /**
   * Omit specific fields from the ticket_template
   */
  omit?: Prisma.ticket_templateOmit<ExtArgs> | null
  /**
   * Filter which ticket_template to delete.
   */
  where: Prisma.ticket_templateWhereUniqueInput
}

/**
 * ticket_template deleteMany
 */
export type ticket_templateDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which ticket_templates to delete
   */
  where?: Prisma.ticket_templateWhereInput
  /**
   * Limit how many ticket_templates to delete.
   */
  limit?: number
}

/**
 * ticket_template without action
 */
export type ticket_templateDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the ticket_template
   */
  select?: Prisma.ticket_templateSelect<ExtArgs> | null
  /**
   * Omit specific fields from the ticket_template
   */
  omit?: Prisma.ticket_templateOmit<ExtArgs> | null
}
