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

export type AggregatePromo = {
  _count: PromoCountAggregateOutputType | null
  _avg: PromoAvgAggregateOutputType | null
  _sum: PromoSumAggregateOutputType | null
  _min: PromoMinAggregateOutputType | null
  _max: PromoMaxAggregateOutputType | null
}

export type PromoAvgAggregateOutputType = {
  id: number | null
  date_start: number | null
  date_end: number | null
  date_orig: number | null
  visible_until: number | null
  actif: number | null
}

export type PromoSumAggregateOutputType = {
  id: number | null
  date_start: bigint | null
  date_end: bigint | null
  date_orig: bigint | null
  visible_until: bigint | null
  actif: number | null
}

export type PromoMinAggregateOutputType = {
  id: number | null
  name: string | null
  desc: string | null
  date_start: bigint | null
  date_end: bigint | null
  date_orig: bigint | null
  visible_until: bigint | null
  actif: number | null
}

export type PromoMaxAggregateOutputType = {
  id: number | null
  name: string | null
  desc: string | null
  date_start: bigint | null
  date_end: bigint | null
  date_orig: bigint | null
  visible_until: bigint | null
  actif: number | null
}

export type PromoCountAggregateOutputType = {
  id: number
  name: number
  desc: number
  date_start: number
  date_end: number
  date_orig: number
  visible_until: number
  actif: number
  _all: number
}


export type PromoAvgAggregateInputType = {
  id?: true
  date_start?: true
  date_end?: true
  date_orig?: true
  visible_until?: true
  actif?: true
}

export type PromoSumAggregateInputType = {
  id?: true
  date_start?: true
  date_end?: true
  date_orig?: true
  visible_until?: true
  actif?: true
}

export type PromoMinAggregateInputType = {
  id?: true
  name?: true
  desc?: true
  date_start?: true
  date_end?: true
  date_orig?: true
  visible_until?: true
  actif?: true
}

export type PromoMaxAggregateInputType = {
  id?: true
  name?: true
  desc?: true
  date_start?: true
  date_end?: true
  date_orig?: true
  visible_until?: true
  actif?: true
}

export type PromoCountAggregateInputType = {
  id?: true
  name?: true
  desc?: true
  date_start?: true
  date_end?: true
  date_orig?: true
  visible_until?: true
  actif?: true
  _all?: true
}

export type PromoAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which promo to aggregate.
   */
  where?: Prisma.promoWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of promos to fetch.
   */
  orderBy?: Prisma.promoOrderByWithRelationInput | Prisma.promoOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the start position
   */
  cursor?: Prisma.promoWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` promos 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` promos.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Count returned promos
  **/
  _count?: true | PromoCountAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to average
  **/
  _avg?: PromoAvgAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to sum
  **/
  _sum?: PromoSumAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the minimum value
  **/
  _min?: PromoMinAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the maximum value
  **/
  _max?: PromoMaxAggregateInputType
}

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




export type promoGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.promoWhereInput
  orderBy?: Prisma.promoOrderByWithAggregationInput | Prisma.promoOrderByWithAggregationInput[]
  by: Prisma.PromoScalarFieldEnum[] | Prisma.PromoScalarFieldEnum
  having?: Prisma.promoScalarWhereWithAggregatesInput
  take?: number
  skip?: number
  _count?: PromoCountAggregateInputType | true
  _avg?: PromoAvgAggregateInputType
  _sum?: PromoSumAggregateInputType
  _min?: PromoMinAggregateInputType
  _max?: PromoMaxAggregateInputType
}

export type PromoGroupByOutputType = {
  id: number
  name: string | null
  desc: string | null
  date_start: bigint | null
  date_end: bigint | null
  date_orig: bigint | null
  visible_until: bigint | null
  actif: number
  _count: PromoCountAggregateOutputType | null
  _avg: PromoAvgAggregateOutputType | null
  _sum: PromoSumAggregateOutputType | null
  _min: PromoMinAggregateOutputType | null
  _max: PromoMaxAggregateOutputType | null
}

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



export type promoWhereInput = {
  AND?: Prisma.promoWhereInput | Prisma.promoWhereInput[]
  OR?: Prisma.promoWhereInput[]
  NOT?: Prisma.promoWhereInput | Prisma.promoWhereInput[]
  id?: Prisma.IntFilter<"promo"> | number
  name?: Prisma.StringNullableFilter<"promo"> | string | null
  desc?: Prisma.StringNullableFilter<"promo"> | string | null
  date_start?: Prisma.BigIntNullableFilter<"promo"> | bigint | number | null
  date_end?: Prisma.BigIntNullableFilter<"promo"> | bigint | number | null
  date_orig?: Prisma.BigIntNullableFilter<"promo"> | bigint | number | null
  visible_until?: Prisma.BigIntNullableFilter<"promo"> | bigint | number | null
  actif?: Prisma.IntFilter<"promo"> | number
}

export type promoOrderByWithRelationInput = {
  id?: Prisma.SortOrder
  name?: Prisma.SortOrderInput | Prisma.SortOrder
  desc?: Prisma.SortOrderInput | Prisma.SortOrder
  date_start?: Prisma.SortOrderInput | Prisma.SortOrder
  date_end?: Prisma.SortOrderInput | Prisma.SortOrder
  date_orig?: Prisma.SortOrderInput | Prisma.SortOrder
  visible_until?: Prisma.SortOrderInput | Prisma.SortOrder
  actif?: Prisma.SortOrder
  _relevance?: Prisma.promoOrderByRelevanceInput
}

export type promoWhereUniqueInput = Prisma.AtLeast<{
  id?: number
  AND?: Prisma.promoWhereInput | Prisma.promoWhereInput[]
  OR?: Prisma.promoWhereInput[]
  NOT?: Prisma.promoWhereInput | Prisma.promoWhereInput[]
  name?: Prisma.StringNullableFilter<"promo"> | string | null
  desc?: Prisma.StringNullableFilter<"promo"> | string | null
  date_start?: Prisma.BigIntNullableFilter<"promo"> | bigint | number | null
  date_end?: Prisma.BigIntNullableFilter<"promo"> | bigint | number | null
  date_orig?: Prisma.BigIntNullableFilter<"promo"> | bigint | number | null
  visible_until?: Prisma.BigIntNullableFilter<"promo"> | bigint | number | null
  actif?: Prisma.IntFilter<"promo"> | number
}, "id">

export type promoOrderByWithAggregationInput = {
  id?: Prisma.SortOrder
  name?: Prisma.SortOrderInput | Prisma.SortOrder
  desc?: Prisma.SortOrderInput | Prisma.SortOrder
  date_start?: Prisma.SortOrderInput | Prisma.SortOrder
  date_end?: Prisma.SortOrderInput | Prisma.SortOrder
  date_orig?: Prisma.SortOrderInput | Prisma.SortOrder
  visible_until?: Prisma.SortOrderInput | Prisma.SortOrder
  actif?: Prisma.SortOrder
  _count?: Prisma.promoCountOrderByAggregateInput
  _avg?: Prisma.promoAvgOrderByAggregateInput
  _max?: Prisma.promoMaxOrderByAggregateInput
  _min?: Prisma.promoMinOrderByAggregateInput
  _sum?: Prisma.promoSumOrderByAggregateInput
}

export type promoScalarWhereWithAggregatesInput = {
  AND?: Prisma.promoScalarWhereWithAggregatesInput | Prisma.promoScalarWhereWithAggregatesInput[]
  OR?: Prisma.promoScalarWhereWithAggregatesInput[]
  NOT?: Prisma.promoScalarWhereWithAggregatesInput | Prisma.promoScalarWhereWithAggregatesInput[]
  id?: Prisma.IntWithAggregatesFilter<"promo"> | number
  name?: Prisma.StringNullableWithAggregatesFilter<"promo"> | string | null
  desc?: Prisma.StringNullableWithAggregatesFilter<"promo"> | string | null
  date_start?: Prisma.BigIntNullableWithAggregatesFilter<"promo"> | bigint | number | null
  date_end?: Prisma.BigIntNullableWithAggregatesFilter<"promo"> | bigint | number | null
  date_orig?: Prisma.BigIntNullableWithAggregatesFilter<"promo"> | bigint | number | null
  visible_until?: Prisma.BigIntNullableWithAggregatesFilter<"promo"> | bigint | number | null
  actif?: Prisma.IntWithAggregatesFilter<"promo"> | number
}

export type promoCreateInput = {
  name?: string | null
  desc?: string | null
  date_start?: bigint | number | null
  date_end?: bigint | number | null
  date_orig?: bigint | number | null
  visible_until?: bigint | number | null
  actif?: number
}

export type promoUncheckedCreateInput = {
  id?: number
  name?: string | null
  desc?: string | null
  date_start?: bigint | number | null
  date_end?: bigint | number | null
  date_orig?: bigint | number | null
  visible_until?: bigint | number | null
  actif?: number
}

export type promoUpdateInput = {
  name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  desc?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  date_start?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  date_end?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  date_orig?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  visible_until?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  actif?: Prisma.IntFieldUpdateOperationsInput | number
}

export type promoUncheckedUpdateInput = {
  id?: Prisma.IntFieldUpdateOperationsInput | number
  name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  desc?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  date_start?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  date_end?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  date_orig?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  visible_until?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  actif?: Prisma.IntFieldUpdateOperationsInput | number
}

export type promoCreateManyInput = {
  id?: number
  name?: string | null
  desc?: string | null
  date_start?: bigint | number | null
  date_end?: bigint | number | null
  date_orig?: bigint | number | null
  visible_until?: bigint | number | null
  actif?: number
}

export type promoUpdateManyMutationInput = {
  name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  desc?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  date_start?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  date_end?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  date_orig?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  visible_until?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  actif?: Prisma.IntFieldUpdateOperationsInput | number
}

export type promoUncheckedUpdateManyInput = {
  id?: Prisma.IntFieldUpdateOperationsInput | number
  name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  desc?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  date_start?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  date_end?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  date_orig?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  visible_until?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null
  actif?: Prisma.IntFieldUpdateOperationsInput | number
}

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

export type promoCountOrderByAggregateInput = {
  id?: Prisma.SortOrder
  name?: Prisma.SortOrder
  desc?: Prisma.SortOrder
  date_start?: Prisma.SortOrder
  date_end?: Prisma.SortOrder
  date_orig?: Prisma.SortOrder
  visible_until?: Prisma.SortOrder
  actif?: Prisma.SortOrder
}

export type promoAvgOrderByAggregateInput = {
  id?: Prisma.SortOrder
  date_start?: Prisma.SortOrder
  date_end?: Prisma.SortOrder
  date_orig?: Prisma.SortOrder
  visible_until?: Prisma.SortOrder
  actif?: Prisma.SortOrder
}

export type promoMaxOrderByAggregateInput = {
  id?: Prisma.SortOrder
  name?: Prisma.SortOrder
  desc?: Prisma.SortOrder
  date_start?: Prisma.SortOrder
  date_end?: Prisma.SortOrder
  date_orig?: Prisma.SortOrder
  visible_until?: Prisma.SortOrder
  actif?: Prisma.SortOrder
}

export type promoMinOrderByAggregateInput = {
  id?: Prisma.SortOrder
  name?: Prisma.SortOrder
  desc?: Prisma.SortOrder
  date_start?: Prisma.SortOrder
  date_end?: Prisma.SortOrder
  date_orig?: Prisma.SortOrder
  visible_until?: Prisma.SortOrder
  actif?: Prisma.SortOrder
}

export type promoSumOrderByAggregateInput = {
  id?: Prisma.SortOrder
  date_start?: Prisma.SortOrder
  date_end?: Prisma.SortOrder
  date_orig?: Prisma.SortOrder
  visible_until?: Prisma.SortOrder
  actif?: Prisma.SortOrder
}



export type promoSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  name?: boolean
  desc?: boolean
  date_start?: boolean
  date_end?: boolean
  date_orig?: boolean
  visible_until?: boolean
  actif?: boolean
}, ExtArgs["result"]["promo"]>



export type promoSelectScalar = {
  id?: boolean
  name?: boolean
  desc?: boolean
  date_start?: boolean
  date_end?: boolean
  date_orig?: boolean
  visible_until?: boolean
  actif?: boolean
}

export type promoOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "name" | "desc" | "date_start" | "date_end" | "date_orig" | "visible_until" | "actif", ExtArgs["result"]["promo"]>

export type $promoPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  name: "promo"
  objects: {}
  scalars: runtime.Types.Extensions.GetPayloadResult<{
    id: number
    name: string | null
    desc: string | null
    date_start: bigint | null
    date_end: bigint | null
    date_orig: bigint | null
    visible_until: bigint | null
    actif: number
  }, ExtArgs["result"]["promo"]>
  composites: {}
}

export type promoGetPayload<S extends boolean | null | undefined | promoDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$promoPayload, S>

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

/**
 * The delegate class that acts as a "Promise-like" for promo.
 * 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__promoClient<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 promo model
 */
export interface promoFieldRefs {
  readonly id: Prisma.FieldRef<"promo", 'Int'>
  readonly name: Prisma.FieldRef<"promo", 'String'>
  readonly desc: Prisma.FieldRef<"promo", 'String'>
  readonly date_start: Prisma.FieldRef<"promo", 'BigInt'>
  readonly date_end: Prisma.FieldRef<"promo", 'BigInt'>
  readonly date_orig: Prisma.FieldRef<"promo", 'BigInt'>
  readonly visible_until: Prisma.FieldRef<"promo", 'BigInt'>
  readonly actif: Prisma.FieldRef<"promo", 'Int'>
}
    

// Custom InputTypes
/**
 * promo findUnique
 */
export type promoFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the promo
   */
  select?: Prisma.promoSelect<ExtArgs> | null
  /**
   * Omit specific fields from the promo
   */
  omit?: Prisma.promoOmit<ExtArgs> | null
  /**
   * Filter, which promo to fetch.
   */
  where: Prisma.promoWhereUniqueInput
}

/**
 * promo findUniqueOrThrow
 */
export type promoFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the promo
   */
  select?: Prisma.promoSelect<ExtArgs> | null
  /**
   * Omit specific fields from the promo
   */
  omit?: Prisma.promoOmit<ExtArgs> | null
  /**
   * Filter, which promo to fetch.
   */
  where: Prisma.promoWhereUniqueInput
}

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

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

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

/**
 * promo create
 */
export type promoCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the promo
   */
  select?: Prisma.promoSelect<ExtArgs> | null
  /**
   * Omit specific fields from the promo
   */
  omit?: Prisma.promoOmit<ExtArgs> | null
  /**
   * The data needed to create a promo.
   */
  data?: Prisma.XOR<Prisma.promoCreateInput, Prisma.promoUncheckedCreateInput>
}

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

/**
 * promo update
 */
export type promoUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the promo
   */
  select?: Prisma.promoSelect<ExtArgs> | null
  /**
   * Omit specific fields from the promo
   */
  omit?: Prisma.promoOmit<ExtArgs> | null
  /**
   * The data needed to update a promo.
   */
  data: Prisma.XOR<Prisma.promoUpdateInput, Prisma.promoUncheckedUpdateInput>
  /**
   * Choose, which promo to update.
   */
  where: Prisma.promoWhereUniqueInput
}

/**
 * promo updateMany
 */
export type promoUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * The data used to update promos.
   */
  data: Prisma.XOR<Prisma.promoUpdateManyMutationInput, Prisma.promoUncheckedUpdateManyInput>
  /**
   * Filter which promos to update
   */
  where?: Prisma.promoWhereInput
  /**
   * Limit how many promos to update.
   */
  limit?: number
}

/**
 * promo upsert
 */
export type promoUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the promo
   */
  select?: Prisma.promoSelect<ExtArgs> | null
  /**
   * Omit specific fields from the promo
   */
  omit?: Prisma.promoOmit<ExtArgs> | null
  /**
   * The filter to search for the promo to update in case it exists.
   */
  where: Prisma.promoWhereUniqueInput
  /**
   * In case the promo found by the `where` argument doesn't exist, create a new promo with this data.
   */
  create: Prisma.XOR<Prisma.promoCreateInput, Prisma.promoUncheckedCreateInput>
  /**
   * In case the promo was found with the provided `where` argument, update it with this data.
   */
  update: Prisma.XOR<Prisma.promoUpdateInput, Prisma.promoUncheckedUpdateInput>
}

/**
 * promo delete
 */
export type promoDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the promo
   */
  select?: Prisma.promoSelect<ExtArgs> | null
  /**
   * Omit specific fields from the promo
   */
  omit?: Prisma.promoOmit<ExtArgs> | null
  /**
   * Filter which promo to delete.
   */
  where: Prisma.promoWhereUniqueInput
}

/**
 * promo deleteMany
 */
export type promoDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which promos to delete
   */
  where?: Prisma.promoWhereInput
  /**
   * Limit how many promos to delete.
   */
  limit?: number
}

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