/* !!! This is code generated by Prisma. Do not edit directly. !!! */
/* eslint-disable */
// biome-ignore-all lint: generated file
// @ts-nocheck
/*
 * WARNING: This is an internal file that is subject to change!
 *
 * 🛑 Under no circumstances should you import this file directly! 🛑
 *
 * Please import the `PrismaClient` class from the `client.ts` file instead.
 */

import * as runtime from '@prisma/client/runtime/client'
import type * as Prisma from './prismaNamespace'

const config: runtime.GetPrismaClientConfig = {
  generator: {
    name: 'client',
    provider: {
      fromEnvVar: null,
      value: 'prisma-client',
    },
    output: {
      value:
        '/home/sebastiaan/Projects/course-material-javascript/examples/backend/backend_lecture6_example/src/generated/prisma',
      fromEnvVar: null,
    },
    config: {
      engineType: 'client',
    },
    binaryTargets: [
      {
        fromEnvVar: null,
        value: 'debian-openssl-3.0.x',
        native: true,
      },
    ],
    previewFeatures: ['typedSql'],
    sourceFilePath:
      '/home/sebastiaan/Projects/course-material-javascript/examples/backend/backend_lecture6_example/prisma/schema.prisma',
    isCustomOutput: true,
  },
  relativePath: '../../../prisma',
  clientVersion: '6.19.0',
  engineVersion: '2ba551f319ab1df4bc874a89965d8b3641056773',
  datasourceNames: ['db'],
  activeProvider: 'postgresql',
  postinstall: false,
  inlineDatasources: {
    db: {
      url: {
        fromEnvVar: 'DATABASE_URL',
        value: null,
      },
    },
  },
  inlineSchema:
    '// This is your Prisma schema file,\n// learn more about it in the docs: https://pris.ly/d/prisma-schema\n\n// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?\n// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init\n\ngenerator client {\n  provider        = "prisma-client"\n  engineType      = "client"\n  output          = "../src/generated/prisma"\n  previewFeatures = ["typedSql"]\n}\n\ndatasource db {\n  provider = "postgresql"\n  url      = env("DATABASE_URL")\n}\n\ngenerator json {\n  provider = "prisma-json-types-generator"\n}\n\nmodel Contact {\n  id          String    @id @default(uuid()) @db.Uuid\n  firstName   String    @db.VarChar(255)\n  lastName    String?   @db.VarChar(255)\n  description String?   @db.VarChar(255)\n  avatar      String    @default("/avatars/placeholder.png") @db.VarChar(255)\n  /// [ContactInfo]\n  contactInfo Json      @default("[{}]") @db.JsonB\n  favorite    Boolean   @default(false) @db.Boolean\n  meetings    Meeting[]\n  tags        Tag[]\n  userId      String    @db.Uuid\n  user        User      @relation(fields: [userId], references: [id], onDelete: Cascade)\n}\n\nmodel Meeting {\n  id          String   @id @default(uuid()) @db.Uuid\n  title       String\n  description String?\n  date        DateTime\n  // Komt overeen met CONTRAINT FK_Meeting_Contact FOREIGN KEY (contactId) REFERENCES Contact(id) ON DELETE CASCADE\n  contact     Contact  @relation(fields: [contactId], references: [id], onDelete: Cascade)\n  contactId   String   @db.Uuid\n  userId      String   @db.Uuid\n  user        User     @relation(fields: [userId], references: [id], onDelete: Cascade)\n}\n\nmodel Tag {\n  id          String    @id @default(uuid()) @db.Uuid\n  name        String\n  description String?\n  contacts    Contact[]\n  userId      String    @db.Uuid\n  user        User      @relation(fields: [userId], references: [id], onDelete: Cascade)\n}\n\nenum Role {\n  User\n  Admin\n}\n\nmodel User {\n  id       String    @id @unique @default(uuid()) @db.Uuid\n  email    String    @unique @db.VarChar(255)\n  password String\n  username String\n  role     Role      @default(User)\n  sessions Session[]\n  contacts Contact[]\n  meetings Meeting[]\n  tags     Tag[]\n}\n\nmodel Session {\n  id          String   @id @unique @default(uuid()) @db.Uuid\n  activeFrom  DateTime @default(now())\n  activeUntil DateTime\n  userId      String   @db.Uuid\n  user        User     @relation(fields: [userId], references: [id], onDelete: Cascade)\n}\n',
  inlineSchemaHash: '1ce84b6e0bab4af24815d28e972482aff607aaffbce24dcb032d052fc8fbc4dd',
  copyEngine: true,
  runtimeDataModel: {
    models: {},
    enums: {},
    types: {},
  },
  dirname: '',
}

config.runtimeDataModel = JSON.parse(
  '{"models":{"Contact":{"fields":[{"name":"id","kind":"scalar","type":"String"},{"name":"firstName","kind":"scalar","type":"String"},{"name":"lastName","kind":"scalar","type":"String"},{"name":"description","kind":"scalar","type":"String"},{"name":"avatar","kind":"scalar","type":"String"},{"name":"contactInfo","kind":"scalar","type":"Json"},{"name":"favorite","kind":"scalar","type":"Boolean"},{"name":"meetings","kind":"object","type":"Meeting","relationName":"ContactToMeeting"},{"name":"tags","kind":"object","type":"Tag","relationName":"ContactToTag"},{"name":"userId","kind":"scalar","type":"String"},{"name":"user","kind":"object","type":"User","relationName":"ContactToUser"}],"dbName":null},"Meeting":{"fields":[{"name":"id","kind":"scalar","type":"String"},{"name":"title","kind":"scalar","type":"String"},{"name":"description","kind":"scalar","type":"String"},{"name":"date","kind":"scalar","type":"DateTime"},{"name":"contact","kind":"object","type":"Contact","relationName":"ContactToMeeting"},{"name":"contactId","kind":"scalar","type":"String"},{"name":"userId","kind":"scalar","type":"String"},{"name":"user","kind":"object","type":"User","relationName":"MeetingToUser"}],"dbName":null},"Tag":{"fields":[{"name":"id","kind":"scalar","type":"String"},{"name":"name","kind":"scalar","type":"String"},{"name":"description","kind":"scalar","type":"String"},{"name":"contacts","kind":"object","type":"Contact","relationName":"ContactToTag"},{"name":"userId","kind":"scalar","type":"String"},{"name":"user","kind":"object","type":"User","relationName":"TagToUser"}],"dbName":null},"User":{"fields":[{"name":"id","kind":"scalar","type":"String"},{"name":"email","kind":"scalar","type":"String"},{"name":"password","kind":"scalar","type":"String"},{"name":"username","kind":"scalar","type":"String"},{"name":"role","kind":"enum","type":"Role"},{"name":"sessions","kind":"object","type":"Session","relationName":"SessionToUser"},{"name":"contacts","kind":"object","type":"Contact","relationName":"ContactToUser"},{"name":"meetings","kind":"object","type":"Meeting","relationName":"MeetingToUser"},{"name":"tags","kind":"object","type":"Tag","relationName":"TagToUser"}],"dbName":null},"Session":{"fields":[{"name":"id","kind":"scalar","type":"String"},{"name":"activeFrom","kind":"scalar","type":"DateTime"},{"name":"activeUntil","kind":"scalar","type":"DateTime"},{"name":"userId","kind":"scalar","type":"String"},{"name":"user","kind":"object","type":"User","relationName":"SessionToUser"}],"dbName":null}},"enums":{},"types":{}}',
)
config.engineWasm = undefined

async function decodeBase64AsWasm(wasmBase64: string): Promise<WebAssembly.Module> {
  const {Buffer} = await import('node:buffer')
  const wasmArray = Buffer.from(wasmBase64, 'base64')
  return new WebAssembly.Module(wasmArray)
}

config.compilerWasm = {
  getRuntime: async () => await import('@prisma/client/runtime/query_compiler_bg.postgresql.mjs'),

  getQueryCompilerWasmModule: async () => {
    const {wasm} = await import('@prisma/client/runtime/query_compiler_bg.postgresql.wasm-base64.mjs')
    return await decodeBase64AsWasm(wasm)
  },
}

export type LogOptions<ClientOptions extends Prisma.PrismaClientOptions> = 'log' extends keyof ClientOptions
  ? ClientOptions['log'] extends Array<Prisma.LogLevel | Prisma.LogDefinition>
    ? Prisma.GetEvents<ClientOptions['log']>
    : never
  : never

export interface PrismaClientConstructor {
  /**
   * ## Prisma Client
   *
   * Type-safe database client for TypeScript
   * @example
   * ```
   * const prisma = new PrismaClient()
   * // Fetch zero or more Contacts
   * const contacts = await prisma.contact.findMany()
   * ```
   *
   * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client).
   */

  new <
    Options extends Prisma.PrismaClientOptions = Prisma.PrismaClientOptions,
    LogOpts extends LogOptions<Options> = LogOptions<Options>,
    OmitOpts extends Prisma.PrismaClientOptions['omit'] = Options extends {omit: infer U}
      ? U
      : Prisma.PrismaClientOptions['omit'],
    ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
  >(
    options?: Prisma.Subset<Options, Prisma.PrismaClientOptions>,
  ): PrismaClient<LogOpts, OmitOpts, ExtArgs>
}

/**
 * ## Prisma Client
 *
 * Type-safe database client for TypeScript
 * @example
 * ```
 * const prisma = new PrismaClient()
 * // Fetch zero or more Contacts
 * const contacts = await prisma.contact.findMany()
 * ```
 *
 * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client).
 */

export interface PrismaClient<
  in LogOpts extends Prisma.LogLevel = never,
  in out OmitOpts extends Prisma.PrismaClientOptions['omit'] = Prisma.PrismaClientOptions['omit'],
  in out ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
> {
  [K: symbol]: {types: Prisma.TypeMap<ExtArgs>['other']}

  $on<V extends LogOpts>(
    eventType: V,
    callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void,
  ): PrismaClient

  /**
   * Connect with the database
   */
  $connect(): runtime.Types.Utils.JsPromise<void>

  /**
   * Disconnect from the database
   */
  $disconnect(): runtime.Types.Utils.JsPromise<void>

  /**
   * Executes a prepared raw query and returns the number of affected rows.
   * @example
   * ```
   * const result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`
   * ```
   *
   * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
   */
  $executeRaw<T = unknown>(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise<number>

  /**
   * Executes a raw query and returns the number of affected rows.
   * Susceptible to SQL injections, see documentation.
   * @example
   * ```
   * const result = await prisma.$executeRawUnsafe('UPDATE User SET cool = $1 WHERE email = $2 ;', true, 'user@email.com')
   * ```
   *
   * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
   */
  $executeRawUnsafe<T = unknown>(query: string, ...values: any[]): Prisma.PrismaPromise<number>

  /**
   * Performs a prepared raw query and returns the `SELECT` data.
   * @example
   * ```
   * const result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`
   * ```
   *
   * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
   */
  $queryRaw<T = unknown>(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise<T>

  /**
   * Performs a raw query and returns the `SELECT` data.
   * Susceptible to SQL injections, see documentation.
   * @example
   * ```
   * const result = await prisma.$queryRawUnsafe('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'user@email.com')
   * ```
   *
   * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
   */
  $queryRawUnsafe<T = unknown>(query: string, ...values: any[]): Prisma.PrismaPromise<T>

  /**
   * Executes a typed SQL query and returns a typed result
   * @example
   * ```
   * import { myQuery } from '@prisma/client/sql'
   *
   * const result = await prisma.$queryRawTyped(myQuery())
   * ```
   */
  $queryRawTyped<T>(typedSql: runtime.TypedSql<unknown[], T>): Prisma.PrismaPromise<T[]>

  /**
   * Allows the running of a sequence of read/write operations that are guaranteed to either succeed or fail as a whole.
   * @example
   * ```
   * const [george, bob, alice] = await prisma.$transaction([
   *   prisma.user.create({ data: { name: 'George' } }),
   *   prisma.user.create({ data: { name: 'Bob' } }),
   *   prisma.user.create({ data: { name: 'Alice' } }),
   * ])
   * ```
   *
   * Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client/transactions).
   */
  $transaction<P extends Prisma.PrismaPromise<any>[]>(
    arg: [...P],
    options?: {isolationLevel?: Prisma.TransactionIsolationLevel},
  ): runtime.Types.Utils.JsPromise<runtime.Types.Utils.UnwrapTuple<P>>

  $transaction<R>(
    fn: (prisma: Omit<PrismaClient, runtime.ITXClientDenyList>) => runtime.Types.Utils.JsPromise<R>,
    options?: {maxWait?: number; timeout?: number; isolationLevel?: Prisma.TransactionIsolationLevel},
  ): runtime.Types.Utils.JsPromise<R>

  $extends: runtime.Types.Extensions.ExtendsHook<
    'extends',
    Prisma.TypeMapCb<OmitOpts>,
    ExtArgs,
    runtime.Types.Utils.Call<
      Prisma.TypeMapCb<OmitOpts>,
      {
        extArgs: ExtArgs
      }
    >
  >

  /**
   * `prisma.contact`: Exposes CRUD operations for the **Contact** model.
   * Example usage:
   * ```ts
   * // Fetch zero or more Contacts
   * const contacts = await prisma.contact.findMany()
   * ```
   */
  get contact(): Prisma.ContactDelegate<ExtArgs, {omit: OmitOpts}>

  /**
   * `prisma.meeting`: Exposes CRUD operations for the **Meeting** model.
   * Example usage:
   * ```ts
   * // Fetch zero or more Meetings
   * const meetings = await prisma.meeting.findMany()
   * ```
   */
  get meeting(): Prisma.MeetingDelegate<ExtArgs, {omit: OmitOpts}>

  /**
   * `prisma.tag`: Exposes CRUD operations for the **Tag** model.
   * Example usage:
   * ```ts
   * // Fetch zero or more Tags
   * const tags = await prisma.tag.findMany()
   * ```
   */
  get tag(): Prisma.TagDelegate<ExtArgs, {omit: OmitOpts}>

  /**
   * `prisma.user`: Exposes CRUD operations for the **User** model.
   * Example usage:
   * ```ts
   * // Fetch zero or more Users
   * const users = await prisma.user.findMany()
   * ```
   */
  get user(): Prisma.UserDelegate<ExtArgs, {omit: OmitOpts}>

  /**
   * `prisma.session`: Exposes CRUD operations for the **Session** model.
   * Example usage:
   * ```ts
   * // Fetch zero or more Sessions
   * const sessions = await prisma.session.findMany()
   * ```
   */
  get session(): Prisma.SessionDelegate<ExtArgs, {omit: OmitOpts}>
}

export function getPrismaClientClass(dirname: string): PrismaClientConstructor {
  config.dirname = dirname
  return runtime.getPrismaClient(config) as unknown as PrismaClientConstructor
}
