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

export type AggregateCredit_code = {
  _count: Credit_codeCountAggregateOutputType | null
  _avg: Credit_codeAvgAggregateOutputType | null
  _sum: Credit_codeSumAggregateOutputType | null
  _min: Credit_codeMinAggregateOutputType | null
  _max: Credit_codeMaxAggregateOutputType | null
}

export type Credit_codeAvgAggregateOutputType = {
  id: number | null
}

export type Credit_codeSumAggregateOutputType = {
  id: number | null
}

export type Credit_codeMinAggregateOutputType = {
  id: number | null
  code: string | null
  desc: string | null
}

export type Credit_codeMaxAggregateOutputType = {
  id: number | null
  code: string | null
  desc: string | null
}

export type Credit_codeCountAggregateOutputType = {
  id: number
  code: number
  desc: number
  _all: number
}


export type Credit_codeAvgAggregateInputType = {
  id?: true
}

export type Credit_codeSumAggregateInputType = {
  id?: true
}

export type Credit_codeMinAggregateInputType = {
  id?: true
  code?: true
  desc?: true
}

export type Credit_codeMaxAggregateInputType = {
  id?: true
  code?: true
  desc?: true
}

export type Credit_codeCountAggregateInputType = {
  id?: true
  code?: true
  desc?: true
  _all?: true
}

export type Credit_codeAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which credit_code to aggregate.
   */
  where?: Prisma.credit_codeWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of credit_codes to fetch.
   */
  orderBy?: Prisma.credit_codeOrderByWithRelationInput | Prisma.credit_codeOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the start position
   */
  cursor?: Prisma.credit_codeWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` credit_codes 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` credit_codes.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Count returned credit_codes
  **/
  _count?: true | Credit_codeCountAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to average
  **/
  _avg?: Credit_codeAvgAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to sum
  **/
  _sum?: Credit_codeSumAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the minimum value
  **/
  _min?: Credit_codeMinAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the maximum value
  **/
  _max?: Credit_codeMaxAggregateInputType
}

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




export type credit_codeGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.credit_codeWhereInput
  orderBy?: Prisma.credit_codeOrderByWithAggregationInput | Prisma.credit_codeOrderByWithAggregationInput[]
  by: Prisma.Credit_codeScalarFieldEnum[] | Prisma.Credit_codeScalarFieldEnum
  having?: Prisma.credit_codeScalarWhereWithAggregatesInput
  take?: number
  skip?: number
  _count?: Credit_codeCountAggregateInputType | true
  _avg?: Credit_codeAvgAggregateInputType
  _sum?: Credit_codeSumAggregateInputType
  _min?: Credit_codeMinAggregateInputType
  _max?: Credit_codeMaxAggregateInputType
}

export type Credit_codeGroupByOutputType = {
  id: number
  code: string
  desc: string
  _count: Credit_codeCountAggregateOutputType | null
  _avg: Credit_codeAvgAggregateOutputType | null
  _sum: Credit_codeSumAggregateOutputType | null
  _min: Credit_codeMinAggregateOutputType | null
  _max: Credit_codeMaxAggregateOutputType | null
}

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



export type credit_codeWhereInput = {
  AND?: Prisma.credit_codeWhereInput | Prisma.credit_codeWhereInput[]
  OR?: Prisma.credit_codeWhereInput[]
  NOT?: Prisma.credit_codeWhereInput | Prisma.credit_codeWhereInput[]
  id?: Prisma.IntFilter<"credit_code"> | number
  code?: Prisma.StringFilter<"credit_code"> | string
  desc?: Prisma.StringFilter<"credit_code"> | string
}

export type credit_codeOrderByWithRelationInput = {
  id?: Prisma.SortOrder
  code?: Prisma.SortOrder
  desc?: Prisma.SortOrder
  _relevance?: Prisma.credit_codeOrderByRelevanceInput
}

export type credit_codeWhereUniqueInput = Prisma.AtLeast<{
  id?: number
  AND?: Prisma.credit_codeWhereInput | Prisma.credit_codeWhereInput[]
  OR?: Prisma.credit_codeWhereInput[]
  NOT?: Prisma.credit_codeWhereInput | Prisma.credit_codeWhereInput[]
  code?: Prisma.StringFilter<"credit_code"> | string
  desc?: Prisma.StringFilter<"credit_code"> | string
}, "id">

export type credit_codeOrderByWithAggregationInput = {
  id?: Prisma.SortOrder
  code?: Prisma.SortOrder
  desc?: Prisma.SortOrder
  _count?: Prisma.credit_codeCountOrderByAggregateInput
  _avg?: Prisma.credit_codeAvgOrderByAggregateInput
  _max?: Prisma.credit_codeMaxOrderByAggregateInput
  _min?: Prisma.credit_codeMinOrderByAggregateInput
  _sum?: Prisma.credit_codeSumOrderByAggregateInput
}

export type credit_codeScalarWhereWithAggregatesInput = {
  AND?: Prisma.credit_codeScalarWhereWithAggregatesInput | Prisma.credit_codeScalarWhereWithAggregatesInput[]
  OR?: Prisma.credit_codeScalarWhereWithAggregatesInput[]
  NOT?: Prisma.credit_codeScalarWhereWithAggregatesInput | Prisma.credit_codeScalarWhereWithAggregatesInput[]
  id?: Prisma.IntWithAggregatesFilter<"credit_code"> | number
  code?: Prisma.StringWithAggregatesFilter<"credit_code"> | string
  desc?: Prisma.StringWithAggregatesFilter<"credit_code"> | string
}

export type credit_codeCreateInput = {
  code: string
  desc: string
}

export type credit_codeUncheckedCreateInput = {
  id?: number
  code: string
  desc: string
}

export type credit_codeUpdateInput = {
  code?: Prisma.StringFieldUpdateOperationsInput | string
  desc?: Prisma.StringFieldUpdateOperationsInput | string
}

export type credit_codeUncheckedUpdateInput = {
  id?: Prisma.IntFieldUpdateOperationsInput | number
  code?: Prisma.StringFieldUpdateOperationsInput | string
  desc?: Prisma.StringFieldUpdateOperationsInput | string
}

export type credit_codeCreateManyInput = {
  id?: number
  code: string
  desc: string
}

export type credit_codeUpdateManyMutationInput = {
  code?: Prisma.StringFieldUpdateOperationsInput | string
  desc?: Prisma.StringFieldUpdateOperationsInput | string
}

export type credit_codeUncheckedUpdateManyInput = {
  id?: Prisma.IntFieldUpdateOperationsInput | number
  code?: Prisma.StringFieldUpdateOperationsInput | string
  desc?: Prisma.StringFieldUpdateOperationsInput | string
}

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

export type credit_codeCountOrderByAggregateInput = {
  id?: Prisma.SortOrder
  code?: Prisma.SortOrder
  desc?: Prisma.SortOrder
}

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

export type credit_codeMaxOrderByAggregateInput = {
  id?: Prisma.SortOrder
  code?: Prisma.SortOrder
  desc?: Prisma.SortOrder
}

export type credit_codeMinOrderByAggregateInput = {
  id?: Prisma.SortOrder
  code?: Prisma.SortOrder
  desc?: Prisma.SortOrder
}

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



export type credit_codeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  code?: boolean
  desc?: boolean
}, ExtArgs["result"]["credit_code"]>



export type credit_codeSelectScalar = {
  id?: boolean
  code?: boolean
  desc?: boolean
}

export type credit_codeOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "code" | "desc", ExtArgs["result"]["credit_code"]>

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

export type credit_codeGetPayload<S extends boolean | null | undefined | credit_codeDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$credit_codePayload, S>

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

/**
 * The delegate class that acts as a "Promise-like" for credit_code.
 * 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__credit_codeClient<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 credit_code model
 */
export interface credit_codeFieldRefs {
  readonly id: Prisma.FieldRef<"credit_code", 'Int'>
  readonly code: Prisma.FieldRef<"credit_code", 'String'>
  readonly desc: Prisma.FieldRef<"credit_code", 'String'>
}
    

// Custom InputTypes
/**
 * credit_code findUnique
 */
export type credit_codeFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the credit_code
   */
  select?: Prisma.credit_codeSelect<ExtArgs> | null
  /**
   * Omit specific fields from the credit_code
   */
  omit?: Prisma.credit_codeOmit<ExtArgs> | null
  /**
   * Filter, which credit_code to fetch.
   */
  where: Prisma.credit_codeWhereUniqueInput
}

/**
 * credit_code findUniqueOrThrow
 */
export type credit_codeFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the credit_code
   */
  select?: Prisma.credit_codeSelect<ExtArgs> | null
  /**
   * Omit specific fields from the credit_code
   */
  omit?: Prisma.credit_codeOmit<ExtArgs> | null
  /**
   * Filter, which credit_code to fetch.
   */
  where: Prisma.credit_codeWhereUniqueInput
}

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

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

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

/**
 * credit_code create
 */
export type credit_codeCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the credit_code
   */
  select?: Prisma.credit_codeSelect<ExtArgs> | null
  /**
   * Omit specific fields from the credit_code
   */
  omit?: Prisma.credit_codeOmit<ExtArgs> | null
  /**
   * The data needed to create a credit_code.
   */
  data: Prisma.XOR<Prisma.credit_codeCreateInput, Prisma.credit_codeUncheckedCreateInput>
}

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

/**
 * credit_code update
 */
export type credit_codeUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the credit_code
   */
  select?: Prisma.credit_codeSelect<ExtArgs> | null
  /**
   * Omit specific fields from the credit_code
   */
  omit?: Prisma.credit_codeOmit<ExtArgs> | null
  /**
   * The data needed to update a credit_code.
   */
  data: Prisma.XOR<Prisma.credit_codeUpdateInput, Prisma.credit_codeUncheckedUpdateInput>
  /**
   * Choose, which credit_code to update.
   */
  where: Prisma.credit_codeWhereUniqueInput
}

/**
 * credit_code updateMany
 */
export type credit_codeUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * The data used to update credit_codes.
   */
  data: Prisma.XOR<Prisma.credit_codeUpdateManyMutationInput, Prisma.credit_codeUncheckedUpdateManyInput>
  /**
   * Filter which credit_codes to update
   */
  where?: Prisma.credit_codeWhereInput
  /**
   * Limit how many credit_codes to update.
   */
  limit?: number
}

/**
 * credit_code upsert
 */
export type credit_codeUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the credit_code
   */
  select?: Prisma.credit_codeSelect<ExtArgs> | null
  /**
   * Omit specific fields from the credit_code
   */
  omit?: Prisma.credit_codeOmit<ExtArgs> | null
  /**
   * The filter to search for the credit_code to update in case it exists.
   */
  where: Prisma.credit_codeWhereUniqueInput
  /**
   * In case the credit_code found by the `where` argument doesn't exist, create a new credit_code with this data.
   */
  create: Prisma.XOR<Prisma.credit_codeCreateInput, Prisma.credit_codeUncheckedCreateInput>
  /**
   * In case the credit_code was found with the provided `where` argument, update it with this data.
   */
  update: Prisma.XOR<Prisma.credit_codeUpdateInput, Prisma.credit_codeUncheckedUpdateInput>
}

/**
 * credit_code delete
 */
export type credit_codeDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the credit_code
   */
  select?: Prisma.credit_codeSelect<ExtArgs> | null
  /**
   * Omit specific fields from the credit_code
   */
  omit?: Prisma.credit_codeOmit<ExtArgs> | null
  /**
   * Filter which credit_code to delete.
   */
  where: Prisma.credit_codeWhereUniqueInput
}

/**
 * credit_code deleteMany
 */
export type credit_codeDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which credit_codes to delete
   */
  where?: Prisma.credit_codeWhereInput
  /**
   * Limit how many credit_codes to delete.
   */
  limit?: number
}

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