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

export type AggregateFile = {
  _count: FileCountAggregateOutputType | null
  _avg: FileAvgAggregateOutputType | null
  _sum: FileSumAggregateOutputType | null
  _min: FileMinAggregateOutputType | null
  _max: FileMaxAggregateOutputType | null
}

export type FileAvgAggregateOutputType = {
  size: number | null
}

export type FileSumAggregateOutputType = {
  size: number | null
}

export type FileMinAggregateOutputType = {
  id: string | null
  filename: string | null
  originalName: string | null
  mimeType: string | null
  size: number | null
  path: string | null
  type: string | null
  courseId: string | null
  moduleId: string | null
  lessonId: string | null
  metadata: string | null
  createdAt: Date | null
  updatedAt: Date | null
}

export type FileMaxAggregateOutputType = {
  id: string | null
  filename: string | null
  originalName: string | null
  mimeType: string | null
  size: number | null
  path: string | null
  type: string | null
  courseId: string | null
  moduleId: string | null
  lessonId: string | null
  metadata: string | null
  createdAt: Date | null
  updatedAt: Date | null
}

export type FileCountAggregateOutputType = {
  id: number
  filename: number
  originalName: number
  mimeType: number
  size: number
  path: number
  type: number
  courseId: number
  moduleId: number
  lessonId: number
  metadata: number
  createdAt: number
  updatedAt: number
  _all: number
}


export type FileAvgAggregateInputType = {
  size?: true
}

export type FileSumAggregateInputType = {
  size?: true
}

export type FileMinAggregateInputType = {
  id?: true
  filename?: true
  originalName?: true
  mimeType?: true
  size?: true
  path?: true
  type?: true
  courseId?: true
  moduleId?: true
  lessonId?: true
  metadata?: true
  createdAt?: true
  updatedAt?: true
}

export type FileMaxAggregateInputType = {
  id?: true
  filename?: true
  originalName?: true
  mimeType?: true
  size?: true
  path?: true
  type?: true
  courseId?: true
  moduleId?: true
  lessonId?: true
  metadata?: true
  createdAt?: true
  updatedAt?: true
}

export type FileCountAggregateInputType = {
  id?: true
  filename?: true
  originalName?: true
  mimeType?: true
  size?: true
  path?: true
  type?: true
  courseId?: true
  moduleId?: true
  lessonId?: true
  metadata?: true
  createdAt?: true
  updatedAt?: true
  _all?: true
}

export type FileAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which File to aggregate.
   */
  where?: Prisma.FileWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of Files to fetch.
   */
  orderBy?: Prisma.FileOrderByWithRelationInput | Prisma.FileOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the start position
   */
  cursor?: Prisma.FileWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` Files 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` Files.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Count returned Files
  **/
  _count?: true | FileCountAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to average
  **/
  _avg?: FileAvgAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to sum
  **/
  _sum?: FileSumAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the minimum value
  **/
  _min?: FileMinAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the maximum value
  **/
  _max?: FileMaxAggregateInputType
}

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




export type FileGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.FileWhereInput
  orderBy?: Prisma.FileOrderByWithAggregationInput | Prisma.FileOrderByWithAggregationInput[]
  by: Prisma.FileScalarFieldEnum[] | Prisma.FileScalarFieldEnum
  having?: Prisma.FileScalarWhereWithAggregatesInput
  take?: number
  skip?: number
  _count?: FileCountAggregateInputType | true
  _avg?: FileAvgAggregateInputType
  _sum?: FileSumAggregateInputType
  _min?: FileMinAggregateInputType
  _max?: FileMaxAggregateInputType
}

export type FileGroupByOutputType = {
  id: string
  filename: string
  originalName: string
  mimeType: string
  size: number
  path: string
  type: string
  courseId: string | null
  moduleId: string | null
  lessonId: string | null
  metadata: string | null
  createdAt: Date
  updatedAt: Date
  _count: FileCountAggregateOutputType | null
  _avg: FileAvgAggregateOutputType | null
  _sum: FileSumAggregateOutputType | null
  _min: FileMinAggregateOutputType | null
  _max: FileMaxAggregateOutputType | null
}

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



export type FileWhereInput = {
  AND?: Prisma.FileWhereInput | Prisma.FileWhereInput[]
  OR?: Prisma.FileWhereInput[]
  NOT?: Prisma.FileWhereInput | Prisma.FileWhereInput[]
  id?: Prisma.StringFilter<"File"> | string
  filename?: Prisma.StringFilter<"File"> | string
  originalName?: Prisma.StringFilter<"File"> | string
  mimeType?: Prisma.StringFilter<"File"> | string
  size?: Prisma.IntFilter<"File"> | number
  path?: Prisma.StringFilter<"File"> | string
  type?: Prisma.StringFilter<"File"> | string
  courseId?: Prisma.StringNullableFilter<"File"> | string | null
  moduleId?: Prisma.StringNullableFilter<"File"> | string | null
  lessonId?: Prisma.StringNullableFilter<"File"> | string | null
  metadata?: Prisma.StringNullableFilter<"File"> | string | null
  createdAt?: Prisma.DateTimeFilter<"File"> | Date | string
  updatedAt?: Prisma.DateTimeFilter<"File"> | Date | string
}

export type FileOrderByWithRelationInput = {
  id?: Prisma.SortOrder
  filename?: Prisma.SortOrder
  originalName?: Prisma.SortOrder
  mimeType?: Prisma.SortOrder
  size?: Prisma.SortOrder
  path?: Prisma.SortOrder
  type?: Prisma.SortOrder
  courseId?: Prisma.SortOrderInput | Prisma.SortOrder
  moduleId?: Prisma.SortOrderInput | Prisma.SortOrder
  lessonId?: Prisma.SortOrderInput | Prisma.SortOrder
  metadata?: Prisma.SortOrderInput | Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
  _relevance?: Prisma.FileOrderByRelevanceInput
}

export type FileWhereUniqueInput = Prisma.AtLeast<{
  id?: string
  AND?: Prisma.FileWhereInput | Prisma.FileWhereInput[]
  OR?: Prisma.FileWhereInput[]
  NOT?: Prisma.FileWhereInput | Prisma.FileWhereInput[]
  filename?: Prisma.StringFilter<"File"> | string
  originalName?: Prisma.StringFilter<"File"> | string
  mimeType?: Prisma.StringFilter<"File"> | string
  size?: Prisma.IntFilter<"File"> | number
  path?: Prisma.StringFilter<"File"> | string
  type?: Prisma.StringFilter<"File"> | string
  courseId?: Prisma.StringNullableFilter<"File"> | string | null
  moduleId?: Prisma.StringNullableFilter<"File"> | string | null
  lessonId?: Prisma.StringNullableFilter<"File"> | string | null
  metadata?: Prisma.StringNullableFilter<"File"> | string | null
  createdAt?: Prisma.DateTimeFilter<"File"> | Date | string
  updatedAt?: Prisma.DateTimeFilter<"File"> | Date | string
}, "id">

export type FileOrderByWithAggregationInput = {
  id?: Prisma.SortOrder
  filename?: Prisma.SortOrder
  originalName?: Prisma.SortOrder
  mimeType?: Prisma.SortOrder
  size?: Prisma.SortOrder
  path?: Prisma.SortOrder
  type?: Prisma.SortOrder
  courseId?: Prisma.SortOrderInput | Prisma.SortOrder
  moduleId?: Prisma.SortOrderInput | Prisma.SortOrder
  lessonId?: Prisma.SortOrderInput | Prisma.SortOrder
  metadata?: Prisma.SortOrderInput | Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
  _count?: Prisma.FileCountOrderByAggregateInput
  _avg?: Prisma.FileAvgOrderByAggregateInput
  _max?: Prisma.FileMaxOrderByAggregateInput
  _min?: Prisma.FileMinOrderByAggregateInput
  _sum?: Prisma.FileSumOrderByAggregateInput
}

export type FileScalarWhereWithAggregatesInput = {
  AND?: Prisma.FileScalarWhereWithAggregatesInput | Prisma.FileScalarWhereWithAggregatesInput[]
  OR?: Prisma.FileScalarWhereWithAggregatesInput[]
  NOT?: Prisma.FileScalarWhereWithAggregatesInput | Prisma.FileScalarWhereWithAggregatesInput[]
  id?: Prisma.StringWithAggregatesFilter<"File"> | string
  filename?: Prisma.StringWithAggregatesFilter<"File"> | string
  originalName?: Prisma.StringWithAggregatesFilter<"File"> | string
  mimeType?: Prisma.StringWithAggregatesFilter<"File"> | string
  size?: Prisma.IntWithAggregatesFilter<"File"> | number
  path?: Prisma.StringWithAggregatesFilter<"File"> | string
  type?: Prisma.StringWithAggregatesFilter<"File"> | string
  courseId?: Prisma.StringNullableWithAggregatesFilter<"File"> | string | null
  moduleId?: Prisma.StringNullableWithAggregatesFilter<"File"> | string | null
  lessonId?: Prisma.StringNullableWithAggregatesFilter<"File"> | string | null
  metadata?: Prisma.StringNullableWithAggregatesFilter<"File"> | string | null
  createdAt?: Prisma.DateTimeWithAggregatesFilter<"File"> | Date | string
  updatedAt?: Prisma.DateTimeWithAggregatesFilter<"File"> | Date | string
}

export type FileCreateInput = {
  id?: string
  filename: string
  originalName: string
  mimeType: string
  size: number
  path: string
  type?: string
  courseId?: string | null
  moduleId?: string | null
  lessonId?: string | null
  metadata?: string | null
  createdAt?: Date | string
  updatedAt?: Date | string
}

export type FileUncheckedCreateInput = {
  id?: string
  filename: string
  originalName: string
  mimeType: string
  size: number
  path: string
  type?: string
  courseId?: string | null
  moduleId?: string | null
  lessonId?: string | null
  metadata?: string | null
  createdAt?: Date | string
  updatedAt?: Date | string
}

export type FileUpdateInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  filename?: Prisma.StringFieldUpdateOperationsInput | string
  originalName?: Prisma.StringFieldUpdateOperationsInput | string
  mimeType?: Prisma.StringFieldUpdateOperationsInput | string
  size?: Prisma.IntFieldUpdateOperationsInput | number
  path?: Prisma.StringFieldUpdateOperationsInput | string
  type?: Prisma.StringFieldUpdateOperationsInput | string
  courseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  moduleId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  lessonId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  metadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type FileUncheckedUpdateInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  filename?: Prisma.StringFieldUpdateOperationsInput | string
  originalName?: Prisma.StringFieldUpdateOperationsInput | string
  mimeType?: Prisma.StringFieldUpdateOperationsInput | string
  size?: Prisma.IntFieldUpdateOperationsInput | number
  path?: Prisma.StringFieldUpdateOperationsInput | string
  type?: Prisma.StringFieldUpdateOperationsInput | string
  courseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  moduleId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  lessonId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  metadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type FileCreateManyInput = {
  id?: string
  filename: string
  originalName: string
  mimeType: string
  size: number
  path: string
  type?: string
  courseId?: string | null
  moduleId?: string | null
  lessonId?: string | null
  metadata?: string | null
  createdAt?: Date | string
  updatedAt?: Date | string
}

export type FileUpdateManyMutationInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  filename?: Prisma.StringFieldUpdateOperationsInput | string
  originalName?: Prisma.StringFieldUpdateOperationsInput | string
  mimeType?: Prisma.StringFieldUpdateOperationsInput | string
  size?: Prisma.IntFieldUpdateOperationsInput | number
  path?: Prisma.StringFieldUpdateOperationsInput | string
  type?: Prisma.StringFieldUpdateOperationsInput | string
  courseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  moduleId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  lessonId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  metadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type FileUncheckedUpdateManyInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  filename?: Prisma.StringFieldUpdateOperationsInput | string
  originalName?: Prisma.StringFieldUpdateOperationsInput | string
  mimeType?: Prisma.StringFieldUpdateOperationsInput | string
  size?: Prisma.IntFieldUpdateOperationsInput | number
  path?: Prisma.StringFieldUpdateOperationsInput | string
  type?: Prisma.StringFieldUpdateOperationsInput | string
  courseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  moduleId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  lessonId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  metadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

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

export type FileCountOrderByAggregateInput = {
  id?: Prisma.SortOrder
  filename?: Prisma.SortOrder
  originalName?: Prisma.SortOrder
  mimeType?: Prisma.SortOrder
  size?: Prisma.SortOrder
  path?: Prisma.SortOrder
  type?: Prisma.SortOrder
  courseId?: Prisma.SortOrder
  moduleId?: Prisma.SortOrder
  lessonId?: Prisma.SortOrder
  metadata?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
}

export type FileAvgOrderByAggregateInput = {
  size?: Prisma.SortOrder
}

export type FileMaxOrderByAggregateInput = {
  id?: Prisma.SortOrder
  filename?: Prisma.SortOrder
  originalName?: Prisma.SortOrder
  mimeType?: Prisma.SortOrder
  size?: Prisma.SortOrder
  path?: Prisma.SortOrder
  type?: Prisma.SortOrder
  courseId?: Prisma.SortOrder
  moduleId?: Prisma.SortOrder
  lessonId?: Prisma.SortOrder
  metadata?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
}

export type FileMinOrderByAggregateInput = {
  id?: Prisma.SortOrder
  filename?: Prisma.SortOrder
  originalName?: Prisma.SortOrder
  mimeType?: Prisma.SortOrder
  size?: Prisma.SortOrder
  path?: Prisma.SortOrder
  type?: Prisma.SortOrder
  courseId?: Prisma.SortOrder
  moduleId?: Prisma.SortOrder
  lessonId?: Prisma.SortOrder
  metadata?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
}

export type FileSumOrderByAggregateInput = {
  size?: Prisma.SortOrder
}



export type FileSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  filename?: boolean
  originalName?: boolean
  mimeType?: boolean
  size?: boolean
  path?: boolean
  type?: boolean
  courseId?: boolean
  moduleId?: boolean
  lessonId?: boolean
  metadata?: boolean
  createdAt?: boolean
  updatedAt?: boolean
}, ExtArgs["result"]["file"]>



export type FileSelectScalar = {
  id?: boolean
  filename?: boolean
  originalName?: boolean
  mimeType?: boolean
  size?: boolean
  path?: boolean
  type?: boolean
  courseId?: boolean
  moduleId?: boolean
  lessonId?: boolean
  metadata?: boolean
  createdAt?: boolean
  updatedAt?: boolean
}

export type FileOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "filename" | "originalName" | "mimeType" | "size" | "path" | "type" | "courseId" | "moduleId" | "lessonId" | "metadata" | "createdAt" | "updatedAt", ExtArgs["result"]["file"]>

export type $FilePayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  name: "File"
  objects: {}
  scalars: runtime.Types.Extensions.GetPayloadResult<{
    id: string
    filename: string
    originalName: string
    mimeType: string
    size: number
    path: string
    type: string
    courseId: string | null
    moduleId: string | null
    lessonId: string | null
    metadata: string | null
    createdAt: Date
    updatedAt: Date
  }, ExtArgs["result"]["file"]>
  composites: {}
}

export type FileGetPayload<S extends boolean | null | undefined | FileDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$FilePayload, S>

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

/**
 * The delegate class that acts as a "Promise-like" for File.
 * 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__FileClient<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 File model
 */
export interface FileFieldRefs {
  readonly id: Prisma.FieldRef<"File", 'String'>
  readonly filename: Prisma.FieldRef<"File", 'String'>
  readonly originalName: Prisma.FieldRef<"File", 'String'>
  readonly mimeType: Prisma.FieldRef<"File", 'String'>
  readonly size: Prisma.FieldRef<"File", 'Int'>
  readonly path: Prisma.FieldRef<"File", 'String'>
  readonly type: Prisma.FieldRef<"File", 'String'>
  readonly courseId: Prisma.FieldRef<"File", 'String'>
  readonly moduleId: Prisma.FieldRef<"File", 'String'>
  readonly lessonId: Prisma.FieldRef<"File", 'String'>
  readonly metadata: Prisma.FieldRef<"File", 'String'>
  readonly createdAt: Prisma.FieldRef<"File", 'DateTime'>
  readonly updatedAt: Prisma.FieldRef<"File", 'DateTime'>
}
    

// Custom InputTypes
/**
 * File findUnique
 */
export type FileFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the File
   */
  select?: Prisma.FileSelect<ExtArgs> | null
  /**
   * Omit specific fields from the File
   */
  omit?: Prisma.FileOmit<ExtArgs> | null
  /**
   * Filter, which File to fetch.
   */
  where: Prisma.FileWhereUniqueInput
}

/**
 * File findUniqueOrThrow
 */
export type FileFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the File
   */
  select?: Prisma.FileSelect<ExtArgs> | null
  /**
   * Omit specific fields from the File
   */
  omit?: Prisma.FileOmit<ExtArgs> | null
  /**
   * Filter, which File to fetch.
   */
  where: Prisma.FileWhereUniqueInput
}

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

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

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

/**
 * File create
 */
export type FileCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the File
   */
  select?: Prisma.FileSelect<ExtArgs> | null
  /**
   * Omit specific fields from the File
   */
  omit?: Prisma.FileOmit<ExtArgs> | null
  /**
   * The data needed to create a File.
   */
  data: Prisma.XOR<Prisma.FileCreateInput, Prisma.FileUncheckedCreateInput>
}

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

/**
 * File update
 */
export type FileUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the File
   */
  select?: Prisma.FileSelect<ExtArgs> | null
  /**
   * Omit specific fields from the File
   */
  omit?: Prisma.FileOmit<ExtArgs> | null
  /**
   * The data needed to update a File.
   */
  data: Prisma.XOR<Prisma.FileUpdateInput, Prisma.FileUncheckedUpdateInput>
  /**
   * Choose, which File to update.
   */
  where: Prisma.FileWhereUniqueInput
}

/**
 * File updateMany
 */
export type FileUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * The data used to update Files.
   */
  data: Prisma.XOR<Prisma.FileUpdateManyMutationInput, Prisma.FileUncheckedUpdateManyInput>
  /**
   * Filter which Files to update
   */
  where?: Prisma.FileWhereInput
  /**
   * Limit how many Files to update.
   */
  limit?: number
}

/**
 * File upsert
 */
export type FileUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the File
   */
  select?: Prisma.FileSelect<ExtArgs> | null
  /**
   * Omit specific fields from the File
   */
  omit?: Prisma.FileOmit<ExtArgs> | null
  /**
   * The filter to search for the File to update in case it exists.
   */
  where: Prisma.FileWhereUniqueInput
  /**
   * In case the File found by the `where` argument doesn't exist, create a new File with this data.
   */
  create: Prisma.XOR<Prisma.FileCreateInput, Prisma.FileUncheckedCreateInput>
  /**
   * In case the File was found with the provided `where` argument, update it with this data.
   */
  update: Prisma.XOR<Prisma.FileUpdateInput, Prisma.FileUncheckedUpdateInput>
}

/**
 * File delete
 */
export type FileDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the File
   */
  select?: Prisma.FileSelect<ExtArgs> | null
  /**
   * Omit specific fields from the File
   */
  omit?: Prisma.FileOmit<ExtArgs> | null
  /**
   * Filter which File to delete.
   */
  where: Prisma.FileWhereUniqueInput
}

/**
 * File deleteMany
 */
export type FileDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which Files to delete
   */
  where?: Prisma.FileWhereInput
  /**
   * Limit how many Files to delete.
   */
  limit?: number
}

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