
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
/* eslint-disable */
// biome-ignore-all lint: generated file
// @ts-nocheck 
/*
 * This file exports the `licence` 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 licence
 * 
 */
export type licenceModel = runtime.Types.Result.DefaultSelection<Prisma.$licencePayload>

export type AggregateLicence = {
  _count: LicenceCountAggregateOutputType | null
  _avg: LicenceAvgAggregateOutputType | null
  _sum: LicenceSumAggregateOutputType | null
  _min: LicenceMinAggregateOutputType | null
  _max: LicenceMaxAggregateOutputType | null
}

export type LicenceAvgAggregateOutputType = {
  id: number | null
}

export type LicenceSumAggregateOutputType = {
  id: number | null
}

export type LicenceMinAggregateOutputType = {
  id: number | null
  nom: string | null
  date: string | null
  can_manage: string | null
  comment: string | null
}

export type LicenceMaxAggregateOutputType = {
  id: number | null
  nom: string | null
  date: string | null
  can_manage: string | null
  comment: string | null
}

export type LicenceCountAggregateOutputType = {
  id: number
  nom: number
  date: number
  can_manage: number
  comment: number
  _all: number
}


export type LicenceAvgAggregateInputType = {
  id?: true
}

export type LicenceSumAggregateInputType = {
  id?: true
}

export type LicenceMinAggregateInputType = {
  id?: true
  nom?: true
  date?: true
  can_manage?: true
  comment?: true
}

export type LicenceMaxAggregateInputType = {
  id?: true
  nom?: true
  date?: true
  can_manage?: true
  comment?: true
}

export type LicenceCountAggregateInputType = {
  id?: true
  nom?: true
  date?: true
  can_manage?: true
  comment?: true
  _all?: true
}

export type LicenceAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which licence to aggregate.
   */
  where?: Prisma.licenceWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of licences to fetch.
   */
  orderBy?: Prisma.licenceOrderByWithRelationInput | Prisma.licenceOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the start position
   */
  cursor?: Prisma.licenceWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` licences 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` licences.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Count returned licences
  **/
  _count?: true | LicenceCountAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to average
  **/
  _avg?: LicenceAvgAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to sum
  **/
  _sum?: LicenceSumAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the minimum value
  **/
  _min?: LicenceMinAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the maximum value
  **/
  _max?: LicenceMaxAggregateInputType
}

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




export type licenceGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.licenceWhereInput
  orderBy?: Prisma.licenceOrderByWithAggregationInput | Prisma.licenceOrderByWithAggregationInput[]
  by: Prisma.LicenceScalarFieldEnum[] | Prisma.LicenceScalarFieldEnum
  having?: Prisma.licenceScalarWhereWithAggregatesInput
  take?: number
  skip?: number
  _count?: LicenceCountAggregateInputType | true
  _avg?: LicenceAvgAggregateInputType
  _sum?: LicenceSumAggregateInputType
  _min?: LicenceMinAggregateInputType
  _max?: LicenceMaxAggregateInputType
}

export type LicenceGroupByOutputType = {
  id: number
  nom: string
  date: string
  can_manage: string
  comment: string | null
  _count: LicenceCountAggregateOutputType | null
  _avg: LicenceAvgAggregateOutputType | null
  _sum: LicenceSumAggregateOutputType | null
  _min: LicenceMinAggregateOutputType | null
  _max: LicenceMaxAggregateOutputType | null
}

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



export type licenceWhereInput = {
  AND?: Prisma.licenceWhereInput | Prisma.licenceWhereInput[]
  OR?: Prisma.licenceWhereInput[]
  NOT?: Prisma.licenceWhereInput | Prisma.licenceWhereInput[]
  id?: Prisma.IntFilter<"licence"> | number
  nom?: Prisma.StringFilter<"licence"> | string
  date?: Prisma.StringFilter<"licence"> | string
  can_manage?: Prisma.StringFilter<"licence"> | string
  comment?: Prisma.StringNullableFilter<"licence"> | string | null
}

export type licenceOrderByWithRelationInput = {
  id?: Prisma.SortOrder
  nom?: Prisma.SortOrder
  date?: Prisma.SortOrder
  can_manage?: Prisma.SortOrder
  comment?: Prisma.SortOrderInput | Prisma.SortOrder
  _relevance?: Prisma.licenceOrderByRelevanceInput
}

export type licenceWhereUniqueInput = Prisma.AtLeast<{
  id?: number
  AND?: Prisma.licenceWhereInput | Prisma.licenceWhereInput[]
  OR?: Prisma.licenceWhereInput[]
  NOT?: Prisma.licenceWhereInput | Prisma.licenceWhereInput[]
  nom?: Prisma.StringFilter<"licence"> | string
  date?: Prisma.StringFilter<"licence"> | string
  can_manage?: Prisma.StringFilter<"licence"> | string
  comment?: Prisma.StringNullableFilter<"licence"> | string | null
}, "id">

export type licenceOrderByWithAggregationInput = {
  id?: Prisma.SortOrder
  nom?: Prisma.SortOrder
  date?: Prisma.SortOrder
  can_manage?: Prisma.SortOrder
  comment?: Prisma.SortOrderInput | Prisma.SortOrder
  _count?: Prisma.licenceCountOrderByAggregateInput
  _avg?: Prisma.licenceAvgOrderByAggregateInput
  _max?: Prisma.licenceMaxOrderByAggregateInput
  _min?: Prisma.licenceMinOrderByAggregateInput
  _sum?: Prisma.licenceSumOrderByAggregateInput
}

export type licenceScalarWhereWithAggregatesInput = {
  AND?: Prisma.licenceScalarWhereWithAggregatesInput | Prisma.licenceScalarWhereWithAggregatesInput[]
  OR?: Prisma.licenceScalarWhereWithAggregatesInput[]
  NOT?: Prisma.licenceScalarWhereWithAggregatesInput | Prisma.licenceScalarWhereWithAggregatesInput[]
  id?: Prisma.IntWithAggregatesFilter<"licence"> | number
  nom?: Prisma.StringWithAggregatesFilter<"licence"> | string
  date?: Prisma.StringWithAggregatesFilter<"licence"> | string
  can_manage?: Prisma.StringWithAggregatesFilter<"licence"> | string
  comment?: Prisma.StringNullableWithAggregatesFilter<"licence"> | string | null
}

export type licenceCreateInput = {
  nom: string
  date: string
  can_manage: string
  comment?: string | null
}

export type licenceUncheckedCreateInput = {
  id?: number
  nom: string
  date: string
  can_manage: string
  comment?: string | null
}

export type licenceUpdateInput = {
  nom?: Prisma.StringFieldUpdateOperationsInput | string
  date?: Prisma.StringFieldUpdateOperationsInput | string
  can_manage?: Prisma.StringFieldUpdateOperationsInput | string
  comment?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
}

export type licenceUncheckedUpdateInput = {
  id?: Prisma.IntFieldUpdateOperationsInput | number
  nom?: Prisma.StringFieldUpdateOperationsInput | string
  date?: Prisma.StringFieldUpdateOperationsInput | string
  can_manage?: Prisma.StringFieldUpdateOperationsInput | string
  comment?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
}

export type licenceCreateManyInput = {
  id?: number
  nom: string
  date: string
  can_manage: string
  comment?: string | null
}

export type licenceUpdateManyMutationInput = {
  nom?: Prisma.StringFieldUpdateOperationsInput | string
  date?: Prisma.StringFieldUpdateOperationsInput | string
  can_manage?: Prisma.StringFieldUpdateOperationsInput | string
  comment?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
}

export type licenceUncheckedUpdateManyInput = {
  id?: Prisma.IntFieldUpdateOperationsInput | number
  nom?: Prisma.StringFieldUpdateOperationsInput | string
  date?: Prisma.StringFieldUpdateOperationsInput | string
  can_manage?: Prisma.StringFieldUpdateOperationsInput | string
  comment?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
}

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

export type licenceCountOrderByAggregateInput = {
  id?: Prisma.SortOrder
  nom?: Prisma.SortOrder
  date?: Prisma.SortOrder
  can_manage?: Prisma.SortOrder
  comment?: Prisma.SortOrder
}

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

export type licenceMaxOrderByAggregateInput = {
  id?: Prisma.SortOrder
  nom?: Prisma.SortOrder
  date?: Prisma.SortOrder
  can_manage?: Prisma.SortOrder
  comment?: Prisma.SortOrder
}

export type licenceMinOrderByAggregateInput = {
  id?: Prisma.SortOrder
  nom?: Prisma.SortOrder
  date?: Prisma.SortOrder
  can_manage?: Prisma.SortOrder
  comment?: Prisma.SortOrder
}

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



export type licenceSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  nom?: boolean
  date?: boolean
  can_manage?: boolean
  comment?: boolean
}, ExtArgs["result"]["licence"]>



export type licenceSelectScalar = {
  id?: boolean
  nom?: boolean
  date?: boolean
  can_manage?: boolean
  comment?: boolean
}

export type licenceOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "nom" | "date" | "can_manage" | "comment", ExtArgs["result"]["licence"]>

export type $licencePayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  name: "licence"
  objects: {}
  scalars: runtime.Types.Extensions.GetPayloadResult<{
    id: number
    nom: string
    date: string
    can_manage: string
    comment: string | null
  }, ExtArgs["result"]["licence"]>
  composites: {}
}

export type licenceGetPayload<S extends boolean | null | undefined | licenceDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$licencePayload, S>

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

  /**
   * Group by Licence.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {licenceGroupByArgs} 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 licenceGroupByArgs,
    HasSelectOrTake extends Prisma.Or<
      Prisma.Extends<'skip', Prisma.Keys<T>>,
      Prisma.Extends<'take', Prisma.Keys<T>>
    >,
    OrderByArg extends Prisma.True extends HasSelectOrTake
      ? { orderBy: licenceGroupByArgs['orderBy'] }
      : { orderBy?: licenceGroupByArgs['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, licenceGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetLicenceGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
/**
 * Fields of the licence model
 */
readonly fields: licenceFieldRefs;
}

/**
 * The delegate class that acts as a "Promise-like" for licence.
 * 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__licenceClient<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 licence model
 */
export interface licenceFieldRefs {
  readonly id: Prisma.FieldRef<"licence", 'Int'>
  readonly nom: Prisma.FieldRef<"licence", 'String'>
  readonly date: Prisma.FieldRef<"licence", 'String'>
  readonly can_manage: Prisma.FieldRef<"licence", 'String'>
  readonly comment: Prisma.FieldRef<"licence", 'String'>
}
    

// Custom InputTypes
/**
 * licence findUnique
 */
export type licenceFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the licence
   */
  select?: Prisma.licenceSelect<ExtArgs> | null
  /**
   * Omit specific fields from the licence
   */
  omit?: Prisma.licenceOmit<ExtArgs> | null
  /**
   * Filter, which licence to fetch.
   */
  where: Prisma.licenceWhereUniqueInput
}

/**
 * licence findUniqueOrThrow
 */
export type licenceFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the licence
   */
  select?: Prisma.licenceSelect<ExtArgs> | null
  /**
   * Omit specific fields from the licence
   */
  omit?: Prisma.licenceOmit<ExtArgs> | null
  /**
   * Filter, which licence to fetch.
   */
  where: Prisma.licenceWhereUniqueInput
}

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

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

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

/**
 * licence create
 */
export type licenceCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the licence
   */
  select?: Prisma.licenceSelect<ExtArgs> | null
  /**
   * Omit specific fields from the licence
   */
  omit?: Prisma.licenceOmit<ExtArgs> | null
  /**
   * The data needed to create a licence.
   */
  data: Prisma.XOR<Prisma.licenceCreateInput, Prisma.licenceUncheckedCreateInput>
}

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

/**
 * licence update
 */
export type licenceUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the licence
   */
  select?: Prisma.licenceSelect<ExtArgs> | null
  /**
   * Omit specific fields from the licence
   */
  omit?: Prisma.licenceOmit<ExtArgs> | null
  /**
   * The data needed to update a licence.
   */
  data: Prisma.XOR<Prisma.licenceUpdateInput, Prisma.licenceUncheckedUpdateInput>
  /**
   * Choose, which licence to update.
   */
  where: Prisma.licenceWhereUniqueInput
}

/**
 * licence updateMany
 */
export type licenceUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * The data used to update licences.
   */
  data: Prisma.XOR<Prisma.licenceUpdateManyMutationInput, Prisma.licenceUncheckedUpdateManyInput>
  /**
   * Filter which licences to update
   */
  where?: Prisma.licenceWhereInput
  /**
   * Limit how many licences to update.
   */
  limit?: number
}

/**
 * licence upsert
 */
export type licenceUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the licence
   */
  select?: Prisma.licenceSelect<ExtArgs> | null
  /**
   * Omit specific fields from the licence
   */
  omit?: Prisma.licenceOmit<ExtArgs> | null
  /**
   * The filter to search for the licence to update in case it exists.
   */
  where: Prisma.licenceWhereUniqueInput
  /**
   * In case the licence found by the `where` argument doesn't exist, create a new licence with this data.
   */
  create: Prisma.XOR<Prisma.licenceCreateInput, Prisma.licenceUncheckedCreateInput>
  /**
   * In case the licence was found with the provided `where` argument, update it with this data.
   */
  update: Prisma.XOR<Prisma.licenceUpdateInput, Prisma.licenceUncheckedUpdateInput>
}

/**
 * licence delete
 */
export type licenceDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the licence
   */
  select?: Prisma.licenceSelect<ExtArgs> | null
  /**
   * Omit specific fields from the licence
   */
  omit?: Prisma.licenceOmit<ExtArgs> | null
  /**
   * Filter which licence to delete.
   */
  where: Prisma.licenceWhereUniqueInput
}

/**
 * licence deleteMany
 */
export type licenceDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which licences to delete
   */
  where?: Prisma.licenceWhereInput
  /**
   * Limit how many licences to delete.
   */
  limit?: number
}

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