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

export type AggregateCategory = {
  _count: CategoryCountAggregateOutputType | null
  _min: CategoryMinAggregateOutputType | null
  _max: CategoryMaxAggregateOutputType | null
}

export type CategoryMinAggregateOutputType = {
  id: string | null
  name: string | null
  icon: string | null
  color: string | null
}

export type CategoryMaxAggregateOutputType = {
  id: string | null
  name: string | null
  icon: string | null
  color: string | null
}

export type CategoryCountAggregateOutputType = {
  id: number
  name: number
  icon: number
  color: number
  _all: number
}


export type CategoryMinAggregateInputType = {
  id?: true
  name?: true
  icon?: true
  color?: true
}

export type CategoryMaxAggregateInputType = {
  id?: true
  name?: true
  icon?: true
  color?: true
}

export type CategoryCountAggregateInputType = {
  id?: true
  name?: true
  icon?: true
  color?: true
  _all?: true
}

export type CategoryAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which Category to aggregate.
   */
  where?: Prisma.CategoryWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of Categories to fetch.
   */
  orderBy?: Prisma.CategoryOrderByWithRelationInput | Prisma.CategoryOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the start position
   */
  cursor?: Prisma.CategoryWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` Categories 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` Categories.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Count returned Categories
  **/
  _count?: true | CategoryCountAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the minimum value
  **/
  _min?: CategoryMinAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the maximum value
  **/
  _max?: CategoryMaxAggregateInputType
}

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




export type CategoryGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.CategoryWhereInput
  orderBy?: Prisma.CategoryOrderByWithAggregationInput | Prisma.CategoryOrderByWithAggregationInput[]
  by: Prisma.CategoryScalarFieldEnum[] | Prisma.CategoryScalarFieldEnum
  having?: Prisma.CategoryScalarWhereWithAggregatesInput
  take?: number
  skip?: number
  _count?: CategoryCountAggregateInputType | true
  _min?: CategoryMinAggregateInputType
  _max?: CategoryMaxAggregateInputType
}

export type CategoryGroupByOutputType = {
  id: string
  name: string
  icon: string
  color: string
  _count: CategoryCountAggregateOutputType | null
  _min: CategoryMinAggregateOutputType | null
  _max: CategoryMaxAggregateOutputType | null
}

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



export type CategoryWhereInput = {
  AND?: Prisma.CategoryWhereInput | Prisma.CategoryWhereInput[]
  OR?: Prisma.CategoryWhereInput[]
  NOT?: Prisma.CategoryWhereInput | Prisma.CategoryWhereInput[]
  id?: Prisma.StringFilter<"Category"> | string
  name?: Prisma.StringFilter<"Category"> | string
  icon?: Prisma.StringFilter<"Category"> | string
  color?: Prisma.StringFilter<"Category"> | string
  courses?: Prisma.CourseListRelationFilter
}

export type CategoryOrderByWithRelationInput = {
  id?: Prisma.SortOrder
  name?: Prisma.SortOrder
  icon?: Prisma.SortOrder
  color?: Prisma.SortOrder
  courses?: Prisma.CourseOrderByRelationAggregateInput
  _relevance?: Prisma.CategoryOrderByRelevanceInput
}

export type CategoryWhereUniqueInput = Prisma.AtLeast<{
  id?: string
  name?: string
  AND?: Prisma.CategoryWhereInput | Prisma.CategoryWhereInput[]
  OR?: Prisma.CategoryWhereInput[]
  NOT?: Prisma.CategoryWhereInput | Prisma.CategoryWhereInput[]
  icon?: Prisma.StringFilter<"Category"> | string
  color?: Prisma.StringFilter<"Category"> | string
  courses?: Prisma.CourseListRelationFilter
}, "id" | "name">

export type CategoryOrderByWithAggregationInput = {
  id?: Prisma.SortOrder
  name?: Prisma.SortOrder
  icon?: Prisma.SortOrder
  color?: Prisma.SortOrder
  _count?: Prisma.CategoryCountOrderByAggregateInput
  _max?: Prisma.CategoryMaxOrderByAggregateInput
  _min?: Prisma.CategoryMinOrderByAggregateInput
}

export type CategoryScalarWhereWithAggregatesInput = {
  AND?: Prisma.CategoryScalarWhereWithAggregatesInput | Prisma.CategoryScalarWhereWithAggregatesInput[]
  OR?: Prisma.CategoryScalarWhereWithAggregatesInput[]
  NOT?: Prisma.CategoryScalarWhereWithAggregatesInput | Prisma.CategoryScalarWhereWithAggregatesInput[]
  id?: Prisma.StringWithAggregatesFilter<"Category"> | string
  name?: Prisma.StringWithAggregatesFilter<"Category"> | string
  icon?: Prisma.StringWithAggregatesFilter<"Category"> | string
  color?: Prisma.StringWithAggregatesFilter<"Category"> | string
}

export type CategoryCreateInput = {
  id?: string
  name: string
  icon: string
  color: string
  courses?: Prisma.CourseCreateNestedManyWithoutCategoryInput
}

export type CategoryUncheckedCreateInput = {
  id?: string
  name: string
  icon: string
  color: string
  courses?: Prisma.CourseUncheckedCreateNestedManyWithoutCategoryInput
}

export type CategoryUpdateInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  icon?: Prisma.StringFieldUpdateOperationsInput | string
  color?: Prisma.StringFieldUpdateOperationsInput | string
  courses?: Prisma.CourseUpdateManyWithoutCategoryNestedInput
}

export type CategoryUncheckedUpdateInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  icon?: Prisma.StringFieldUpdateOperationsInput | string
  color?: Prisma.StringFieldUpdateOperationsInput | string
  courses?: Prisma.CourseUncheckedUpdateManyWithoutCategoryNestedInput
}

export type CategoryCreateManyInput = {
  id?: string
  name: string
  icon: string
  color: string
}

export type CategoryUpdateManyMutationInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  icon?: Prisma.StringFieldUpdateOperationsInput | string
  color?: Prisma.StringFieldUpdateOperationsInput | string
}

export type CategoryUncheckedUpdateManyInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  icon?: Prisma.StringFieldUpdateOperationsInput | string
  color?: Prisma.StringFieldUpdateOperationsInput | string
}

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

export type CategoryCountOrderByAggregateInput = {
  id?: Prisma.SortOrder
  name?: Prisma.SortOrder
  icon?: Prisma.SortOrder
  color?: Prisma.SortOrder
}

export type CategoryMaxOrderByAggregateInput = {
  id?: Prisma.SortOrder
  name?: Prisma.SortOrder
  icon?: Prisma.SortOrder
  color?: Prisma.SortOrder
}

export type CategoryMinOrderByAggregateInput = {
  id?: Prisma.SortOrder
  name?: Prisma.SortOrder
  icon?: Prisma.SortOrder
  color?: Prisma.SortOrder
}

export type CategoryScalarRelationFilter = {
  is?: Prisma.CategoryWhereInput
  isNot?: Prisma.CategoryWhereInput
}

export type CategoryCreateNestedOneWithoutCoursesInput = {
  create?: Prisma.XOR<Prisma.CategoryCreateWithoutCoursesInput, Prisma.CategoryUncheckedCreateWithoutCoursesInput>
  connectOrCreate?: Prisma.CategoryCreateOrConnectWithoutCoursesInput
  connect?: Prisma.CategoryWhereUniqueInput
}

export type CategoryUpdateOneRequiredWithoutCoursesNestedInput = {
  create?: Prisma.XOR<Prisma.CategoryCreateWithoutCoursesInput, Prisma.CategoryUncheckedCreateWithoutCoursesInput>
  connectOrCreate?: Prisma.CategoryCreateOrConnectWithoutCoursesInput
  upsert?: Prisma.CategoryUpsertWithoutCoursesInput
  connect?: Prisma.CategoryWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.CategoryUpdateToOneWithWhereWithoutCoursesInput, Prisma.CategoryUpdateWithoutCoursesInput>, Prisma.CategoryUncheckedUpdateWithoutCoursesInput>
}

export type CategoryCreateWithoutCoursesInput = {
  id?: string
  name: string
  icon: string
  color: string
}

export type CategoryUncheckedCreateWithoutCoursesInput = {
  id?: string
  name: string
  icon: string
  color: string
}

export type CategoryCreateOrConnectWithoutCoursesInput = {
  where: Prisma.CategoryWhereUniqueInput
  create: Prisma.XOR<Prisma.CategoryCreateWithoutCoursesInput, Prisma.CategoryUncheckedCreateWithoutCoursesInput>
}

export type CategoryUpsertWithoutCoursesInput = {
  update: Prisma.XOR<Prisma.CategoryUpdateWithoutCoursesInput, Prisma.CategoryUncheckedUpdateWithoutCoursesInput>
  create: Prisma.XOR<Prisma.CategoryCreateWithoutCoursesInput, Prisma.CategoryUncheckedCreateWithoutCoursesInput>
  where?: Prisma.CategoryWhereInput
}

export type CategoryUpdateToOneWithWhereWithoutCoursesInput = {
  where?: Prisma.CategoryWhereInput
  data: Prisma.XOR<Prisma.CategoryUpdateWithoutCoursesInput, Prisma.CategoryUncheckedUpdateWithoutCoursesInput>
}

export type CategoryUpdateWithoutCoursesInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  icon?: Prisma.StringFieldUpdateOperationsInput | string
  color?: Prisma.StringFieldUpdateOperationsInput | string
}

export type CategoryUncheckedUpdateWithoutCoursesInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  icon?: Prisma.StringFieldUpdateOperationsInput | string
  color?: Prisma.StringFieldUpdateOperationsInput | string
}


/**
 * Count Type CategoryCountOutputType
 */

export type CategoryCountOutputType = {
  courses: number
}

export type CategoryCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  courses?: boolean | CategoryCountOutputTypeCountCoursesArgs
}

/**
 * CategoryCountOutputType without action
 */
export type CategoryCountOutputTypeDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the CategoryCountOutputType
   */
  select?: Prisma.CategoryCountOutputTypeSelect<ExtArgs> | null
}

/**
 * CategoryCountOutputType without action
 */
export type CategoryCountOutputTypeCountCoursesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.CourseWhereInput
}


export type CategorySelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  name?: boolean
  icon?: boolean
  color?: boolean
  courses?: boolean | Prisma.Category$coursesArgs<ExtArgs>
  _count?: boolean | Prisma.CategoryCountOutputTypeDefaultArgs<ExtArgs>
}, ExtArgs["result"]["category"]>



export type CategorySelectScalar = {
  id?: boolean
  name?: boolean
  icon?: boolean
  color?: boolean
}

export type CategoryOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "name" | "icon" | "color", ExtArgs["result"]["category"]>
export type CategoryInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  courses?: boolean | Prisma.Category$coursesArgs<ExtArgs>
  _count?: boolean | Prisma.CategoryCountOutputTypeDefaultArgs<ExtArgs>
}

export type $CategoryPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  name: "Category"
  objects: {
    courses: Prisma.$CoursePayload<ExtArgs>[]
  }
  scalars: runtime.Types.Extensions.GetPayloadResult<{
    id: string
    name: string
    icon: string
    color: string
  }, ExtArgs["result"]["category"]>
  composites: {}
}

export type CategoryGetPayload<S extends boolean | null | undefined | CategoryDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$CategoryPayload, S>

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

/**
 * The delegate class that acts as a "Promise-like" for Category.
 * 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__CategoryClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
  readonly [Symbol.toStringTag]: "PrismaPromise"
  courses<T extends Prisma.Category$coursesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Category$coursesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$CoursePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
  /**
   * 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 Category model
 */
export interface CategoryFieldRefs {
  readonly id: Prisma.FieldRef<"Category", 'String'>
  readonly name: Prisma.FieldRef<"Category", 'String'>
  readonly icon: Prisma.FieldRef<"Category", 'String'>
  readonly color: Prisma.FieldRef<"Category", 'String'>
}
    

// Custom InputTypes
/**
 * Category findUnique
 */
export type CategoryFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Category
   */
  select?: Prisma.CategorySelect<ExtArgs> | null
  /**
   * Omit specific fields from the Category
   */
  omit?: Prisma.CategoryOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.CategoryInclude<ExtArgs> | null
  /**
   * Filter, which Category to fetch.
   */
  where: Prisma.CategoryWhereUniqueInput
}

/**
 * Category findUniqueOrThrow
 */
export type CategoryFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Category
   */
  select?: Prisma.CategorySelect<ExtArgs> | null
  /**
   * Omit specific fields from the Category
   */
  omit?: Prisma.CategoryOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.CategoryInclude<ExtArgs> | null
  /**
   * Filter, which Category to fetch.
   */
  where: Prisma.CategoryWhereUniqueInput
}

/**
 * Category findFirst
 */
export type CategoryFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Category
   */
  select?: Prisma.CategorySelect<ExtArgs> | null
  /**
   * Omit specific fields from the Category
   */
  omit?: Prisma.CategoryOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.CategoryInclude<ExtArgs> | null
  /**
   * Filter, which Category to fetch.
   */
  where?: Prisma.CategoryWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of Categories to fetch.
   */
  orderBy?: Prisma.CategoryOrderByWithRelationInput | Prisma.CategoryOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the position for searching for Categories.
   */
  cursor?: Prisma.CategoryWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` Categories 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` Categories.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
   * 
   * Filter by unique combinations of Categories.
   */
  distinct?: Prisma.CategoryScalarFieldEnum | Prisma.CategoryScalarFieldEnum[]
}

/**
 * Category findFirstOrThrow
 */
export type CategoryFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Category
   */
  select?: Prisma.CategorySelect<ExtArgs> | null
  /**
   * Omit specific fields from the Category
   */
  omit?: Prisma.CategoryOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.CategoryInclude<ExtArgs> | null
  /**
   * Filter, which Category to fetch.
   */
  where?: Prisma.CategoryWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of Categories to fetch.
   */
  orderBy?: Prisma.CategoryOrderByWithRelationInput | Prisma.CategoryOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the position for searching for Categories.
   */
  cursor?: Prisma.CategoryWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` Categories 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` Categories.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
   * 
   * Filter by unique combinations of Categories.
   */
  distinct?: Prisma.CategoryScalarFieldEnum | Prisma.CategoryScalarFieldEnum[]
}

/**
 * Category findMany
 */
export type CategoryFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Category
   */
  select?: Prisma.CategorySelect<ExtArgs> | null
  /**
   * Omit specific fields from the Category
   */
  omit?: Prisma.CategoryOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.CategoryInclude<ExtArgs> | null
  /**
   * Filter, which Categories to fetch.
   */
  where?: Prisma.CategoryWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of Categories to fetch.
   */
  orderBy?: Prisma.CategoryOrderByWithRelationInput | Prisma.CategoryOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the position for listing Categories.
   */
  cursor?: Prisma.CategoryWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` Categories 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` Categories.
   */
  skip?: number
  distinct?: Prisma.CategoryScalarFieldEnum | Prisma.CategoryScalarFieldEnum[]
}

/**
 * Category create
 */
export type CategoryCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Category
   */
  select?: Prisma.CategorySelect<ExtArgs> | null
  /**
   * Omit specific fields from the Category
   */
  omit?: Prisma.CategoryOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.CategoryInclude<ExtArgs> | null
  /**
   * The data needed to create a Category.
   */
  data: Prisma.XOR<Prisma.CategoryCreateInput, Prisma.CategoryUncheckedCreateInput>
}

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

/**
 * Category update
 */
export type CategoryUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Category
   */
  select?: Prisma.CategorySelect<ExtArgs> | null
  /**
   * Omit specific fields from the Category
   */
  omit?: Prisma.CategoryOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.CategoryInclude<ExtArgs> | null
  /**
   * The data needed to update a Category.
   */
  data: Prisma.XOR<Prisma.CategoryUpdateInput, Prisma.CategoryUncheckedUpdateInput>
  /**
   * Choose, which Category to update.
   */
  where: Prisma.CategoryWhereUniqueInput
}

/**
 * Category updateMany
 */
export type CategoryUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * The data used to update Categories.
   */
  data: Prisma.XOR<Prisma.CategoryUpdateManyMutationInput, Prisma.CategoryUncheckedUpdateManyInput>
  /**
   * Filter which Categories to update
   */
  where?: Prisma.CategoryWhereInput
  /**
   * Limit how many Categories to update.
   */
  limit?: number
}

/**
 * Category upsert
 */
export type CategoryUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Category
   */
  select?: Prisma.CategorySelect<ExtArgs> | null
  /**
   * Omit specific fields from the Category
   */
  omit?: Prisma.CategoryOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.CategoryInclude<ExtArgs> | null
  /**
   * The filter to search for the Category to update in case it exists.
   */
  where: Prisma.CategoryWhereUniqueInput
  /**
   * In case the Category found by the `where` argument doesn't exist, create a new Category with this data.
   */
  create: Prisma.XOR<Prisma.CategoryCreateInput, Prisma.CategoryUncheckedCreateInput>
  /**
   * In case the Category was found with the provided `where` argument, update it with this data.
   */
  update: Prisma.XOR<Prisma.CategoryUpdateInput, Prisma.CategoryUncheckedUpdateInput>
}

/**
 * Category delete
 */
export type CategoryDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Category
   */
  select?: Prisma.CategorySelect<ExtArgs> | null
  /**
   * Omit specific fields from the Category
   */
  omit?: Prisma.CategoryOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.CategoryInclude<ExtArgs> | null
  /**
   * Filter which Category to delete.
   */
  where: Prisma.CategoryWhereUniqueInput
}

/**
 * Category deleteMany
 */
export type CategoryDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which Categories to delete
   */
  where?: Prisma.CategoryWhereInput
  /**
   * Limit how many Categories to delete.
   */
  limit?: number
}

/**
 * Category.courses
 */
export type Category$coursesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Course
   */
  select?: Prisma.CourseSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Course
   */
  omit?: Prisma.CourseOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.CourseInclude<ExtArgs> | null
  where?: Prisma.CourseWhereInput
  orderBy?: Prisma.CourseOrderByWithRelationInput | Prisma.CourseOrderByWithRelationInput[]
  cursor?: Prisma.CourseWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.CourseScalarFieldEnum | Prisma.CourseScalarFieldEnum[]
}

/**
 * Category without action
 */
export type CategoryDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Category
   */
  select?: Prisma.CategorySelect<ExtArgs> | null
  /**
   * Omit specific fields from the Category
   */
  omit?: Prisma.CategoryOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.CategoryInclude<ExtArgs> | null
}
