9324 lines
332 KiB
TypeScript
9324 lines
332 KiB
TypeScript
|
|
/**
|
|
* Client
|
|
**/
|
|
|
|
import * as runtime from '@prisma/client/runtime/library.js';
|
|
import $Types = runtime.Types // general types
|
|
import $Public = runtime.Types.Public
|
|
import $Utils = runtime.Types.Utils
|
|
import $Extensions = runtime.Types.Extensions
|
|
import $Result = runtime.Types.Result
|
|
|
|
export type PrismaPromise<T> = $Public.PrismaPromise<T>
|
|
|
|
|
|
/**
|
|
* Model User
|
|
*
|
|
*/
|
|
export type User = $Result.DefaultSelection<Prisma.$UserPayload>
|
|
/**
|
|
* Model Question
|
|
*
|
|
*/
|
|
export type Question = $Result.DefaultSelection<Prisma.$QuestionPayload>
|
|
/**
|
|
* Model GameSession
|
|
*
|
|
*/
|
|
export type GameSession = $Result.DefaultSelection<Prisma.$GameSessionPayload>
|
|
/**
|
|
* Model UserAnswer
|
|
*
|
|
*/
|
|
export type UserAnswer = $Result.DefaultSelection<Prisma.$UserAnswerPayload>
|
|
/**
|
|
* Model LeaderboardEntry
|
|
*
|
|
*/
|
|
export type LeaderboardEntry = $Result.DefaultSelection<Prisma.$LeaderboardEntryPayload>
|
|
|
|
/**
|
|
* Enums
|
|
*/
|
|
export namespace $Enums {
|
|
export const Grade: {
|
|
G3: 'G3',
|
|
G6: 'G6',
|
|
G9: 'G9'
|
|
};
|
|
|
|
export type Grade = (typeof Grade)[keyof typeof Grade]
|
|
|
|
|
|
export const Subject: {
|
|
MATH: 'MATH',
|
|
READING: 'READING',
|
|
WRITING: 'WRITING'
|
|
};
|
|
|
|
export type Subject = (typeof Subject)[keyof typeof Subject]
|
|
|
|
|
|
export const Difficulty: {
|
|
EASY: 'EASY',
|
|
MEDIUM: 'MEDIUM',
|
|
HARD: 'HARD'
|
|
};
|
|
|
|
export type Difficulty = (typeof Difficulty)[keyof typeof Difficulty]
|
|
|
|
|
|
export const SessionStatus: {
|
|
IN_PROGRESS: 'IN_PROGRESS',
|
|
COMPLETED: 'COMPLETED',
|
|
ABANDONED: 'ABANDONED'
|
|
};
|
|
|
|
export type SessionStatus = (typeof SessionStatus)[keyof typeof SessionStatus]
|
|
|
|
}
|
|
|
|
export type Grade = $Enums.Grade
|
|
|
|
export const Grade: typeof $Enums.Grade
|
|
|
|
export type Subject = $Enums.Subject
|
|
|
|
export const Subject: typeof $Enums.Subject
|
|
|
|
export type Difficulty = $Enums.Difficulty
|
|
|
|
export const Difficulty: typeof $Enums.Difficulty
|
|
|
|
export type SessionStatus = $Enums.SessionStatus
|
|
|
|
export const SessionStatus: typeof $Enums.SessionStatus
|
|
|
|
/**
|
|
* ## Prisma Client ʲˢ
|
|
*
|
|
* Type-safe database client for TypeScript & Node.js
|
|
* @example
|
|
* ```
|
|
* const prisma = new PrismaClient()
|
|
* // Fetch zero or more Users
|
|
* const users = await prisma.user.findMany()
|
|
* ```
|
|
*
|
|
*
|
|
* Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client).
|
|
*/
|
|
export class PrismaClient<
|
|
ClientOptions extends Prisma.PrismaClientOptions = Prisma.PrismaClientOptions,
|
|
U = 'log' extends keyof ClientOptions ? ClientOptions['log'] extends Array<Prisma.LogLevel | Prisma.LogDefinition> ? Prisma.GetEvents<ClientOptions['log']> : never : never,
|
|
ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs
|
|
> {
|
|
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>['other'] }
|
|
|
|
/**
|
|
* ## Prisma Client ʲˢ
|
|
*
|
|
* Type-safe database client for TypeScript & Node.js
|
|
* @example
|
|
* ```
|
|
* const prisma = new PrismaClient()
|
|
* // Fetch zero or more Users
|
|
* const users = await prisma.user.findMany()
|
|
* ```
|
|
*
|
|
*
|
|
* Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client).
|
|
*/
|
|
|
|
constructor(optionsArg ?: Prisma.Subset<ClientOptions, Prisma.PrismaClientOptions>);
|
|
$on<V extends U>(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): void;
|
|
|
|
/**
|
|
* Connect with the database
|
|
*/
|
|
$connect(): $Utils.JsPromise<void>;
|
|
|
|
/**
|
|
* Disconnect from the database
|
|
*/
|
|
$disconnect(): $Utils.JsPromise<void>;
|
|
|
|
/**
|
|
* Add a middleware
|
|
* @deprecated since 4.16.0. For new code, prefer client extensions instead.
|
|
* @see https://pris.ly/d/extensions
|
|
*/
|
|
$use(cb: Prisma.Middleware): 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>;
|
|
|
|
|
|
/**
|
|
* 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 }): $Utils.JsPromise<runtime.Types.Utils.UnwrapTuple<P>>
|
|
|
|
$transaction<R>(fn: (prisma: Omit<PrismaClient, runtime.ITXClientDenyList>) => $Utils.JsPromise<R>, options?: { maxWait?: number, timeout?: number, isolationLevel?: Prisma.TransactionIsolationLevel }): $Utils.JsPromise<R>
|
|
|
|
|
|
$extends: $Extensions.ExtendsHook<"extends", Prisma.TypeMapCb, ExtArgs>
|
|
|
|
/**
|
|
* `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>;
|
|
|
|
/**
|
|
* `prisma.question`: Exposes CRUD operations for the **Question** model.
|
|
* Example usage:
|
|
* ```ts
|
|
* // Fetch zero or more Questions
|
|
* const questions = await prisma.question.findMany()
|
|
* ```
|
|
*/
|
|
get question(): Prisma.QuestionDelegate<ExtArgs>;
|
|
|
|
/**
|
|
* `prisma.gameSession`: Exposes CRUD operations for the **GameSession** model.
|
|
* Example usage:
|
|
* ```ts
|
|
* // Fetch zero or more GameSessions
|
|
* const gameSessions = await prisma.gameSession.findMany()
|
|
* ```
|
|
*/
|
|
get gameSession(): Prisma.GameSessionDelegate<ExtArgs>;
|
|
|
|
/**
|
|
* `prisma.userAnswer`: Exposes CRUD operations for the **UserAnswer** model.
|
|
* Example usage:
|
|
* ```ts
|
|
* // Fetch zero or more UserAnswers
|
|
* const userAnswers = await prisma.userAnswer.findMany()
|
|
* ```
|
|
*/
|
|
get userAnswer(): Prisma.UserAnswerDelegate<ExtArgs>;
|
|
|
|
/**
|
|
* `prisma.leaderboardEntry`: Exposes CRUD operations for the **LeaderboardEntry** model.
|
|
* Example usage:
|
|
* ```ts
|
|
* // Fetch zero or more LeaderboardEntries
|
|
* const leaderboardEntries = await prisma.leaderboardEntry.findMany()
|
|
* ```
|
|
*/
|
|
get leaderboardEntry(): Prisma.LeaderboardEntryDelegate<ExtArgs>;
|
|
}
|
|
|
|
export namespace Prisma {
|
|
export import DMMF = runtime.DMMF
|
|
|
|
export type PrismaPromise<T> = $Public.PrismaPromise<T>
|
|
|
|
/**
|
|
* Validator
|
|
*/
|
|
export import validator = runtime.Public.validator
|
|
|
|
/**
|
|
* Prisma Errors
|
|
*/
|
|
export import PrismaClientKnownRequestError = runtime.PrismaClientKnownRequestError
|
|
export import PrismaClientUnknownRequestError = runtime.PrismaClientUnknownRequestError
|
|
export import PrismaClientRustPanicError = runtime.PrismaClientRustPanicError
|
|
export import PrismaClientInitializationError = runtime.PrismaClientInitializationError
|
|
export import PrismaClientValidationError = runtime.PrismaClientValidationError
|
|
export import NotFoundError = runtime.NotFoundError
|
|
|
|
/**
|
|
* Re-export of sql-template-tag
|
|
*/
|
|
export import sql = runtime.sqltag
|
|
export import empty = runtime.empty
|
|
export import join = runtime.join
|
|
export import raw = runtime.raw
|
|
export import Sql = runtime.Sql
|
|
|
|
|
|
|
|
/**
|
|
* Decimal.js
|
|
*/
|
|
export import Decimal = runtime.Decimal
|
|
|
|
export type DecimalJsLike = runtime.DecimalJsLike
|
|
|
|
/**
|
|
* Metrics
|
|
*/
|
|
export type Metrics = runtime.Metrics
|
|
export type Metric<T> = runtime.Metric<T>
|
|
export type MetricHistogram = runtime.MetricHistogram
|
|
export type MetricHistogramBucket = runtime.MetricHistogramBucket
|
|
|
|
/**
|
|
* Extensions
|
|
*/
|
|
export import Extension = $Extensions.UserArgs
|
|
export import getExtensionContext = runtime.Extensions.getExtensionContext
|
|
export import Args = $Public.Args
|
|
export import Payload = $Public.Payload
|
|
export import Result = $Public.Result
|
|
export import Exact = $Public.Exact
|
|
|
|
/**
|
|
* Prisma Client JS version: 5.22.0
|
|
* Query Engine version: 605197351a3c8bdd595af2d2a9bc3025bca48ea2
|
|
*/
|
|
export type PrismaVersion = {
|
|
client: string
|
|
}
|
|
|
|
export const prismaVersion: PrismaVersion
|
|
|
|
/**
|
|
* Utility Types
|
|
*/
|
|
|
|
|
|
export import JsonObject = runtime.JsonObject
|
|
export import JsonArray = runtime.JsonArray
|
|
export import JsonValue = runtime.JsonValue
|
|
export import InputJsonObject = runtime.InputJsonObject
|
|
export import InputJsonArray = runtime.InputJsonArray
|
|
export import InputJsonValue = runtime.InputJsonValue
|
|
|
|
/**
|
|
* Types of the values used to represent different kinds of `null` values when working with JSON fields.
|
|
*
|
|
* @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
|
|
*/
|
|
namespace NullTypes {
|
|
/**
|
|
* Type of `Prisma.DbNull`.
|
|
*
|
|
* You cannot use other instances of this class. Please use the `Prisma.DbNull` value.
|
|
*
|
|
* @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
|
|
*/
|
|
class DbNull {
|
|
private DbNull: never
|
|
private constructor()
|
|
}
|
|
|
|
/**
|
|
* Type of `Prisma.JsonNull`.
|
|
*
|
|
* You cannot use other instances of this class. Please use the `Prisma.JsonNull` value.
|
|
*
|
|
* @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
|
|
*/
|
|
class JsonNull {
|
|
private JsonNull: never
|
|
private constructor()
|
|
}
|
|
|
|
/**
|
|
* Type of `Prisma.AnyNull`.
|
|
*
|
|
* You cannot use other instances of this class. Please use the `Prisma.AnyNull` value.
|
|
*
|
|
* @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
|
|
*/
|
|
class AnyNull {
|
|
private AnyNull: never
|
|
private constructor()
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Helper for filtering JSON entries that have `null` on the database (empty on the db)
|
|
*
|
|
* @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
|
|
*/
|
|
export const DbNull: NullTypes.DbNull
|
|
|
|
/**
|
|
* Helper for filtering JSON entries that have JSON `null` values (not empty on the db)
|
|
*
|
|
* @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
|
|
*/
|
|
export const JsonNull: NullTypes.JsonNull
|
|
|
|
/**
|
|
* Helper for filtering JSON entries that are `Prisma.DbNull` or `Prisma.JsonNull`
|
|
*
|
|
* @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
|
|
*/
|
|
export const AnyNull: NullTypes.AnyNull
|
|
|
|
type SelectAndInclude = {
|
|
select: any
|
|
include: any
|
|
}
|
|
|
|
type SelectAndOmit = {
|
|
select: any
|
|
omit: any
|
|
}
|
|
|
|
/**
|
|
* Get the type of the value, that the Promise holds.
|
|
*/
|
|
export type PromiseType<T extends PromiseLike<any>> = T extends PromiseLike<infer U> ? U : T;
|
|
|
|
/**
|
|
* Get the return type of a function which returns a Promise.
|
|
*/
|
|
export type PromiseReturnType<T extends (...args: any) => $Utils.JsPromise<any>> = PromiseType<ReturnType<T>>
|
|
|
|
/**
|
|
* From T, pick a set of properties whose keys are in the union K
|
|
*/
|
|
type Prisma__Pick<T, K extends keyof T> = {
|
|
[P in K]: T[P];
|
|
};
|
|
|
|
|
|
export type Enumerable<T> = T | Array<T>;
|
|
|
|
export type RequiredKeys<T> = {
|
|
[K in keyof T]-?: {} extends Prisma__Pick<T, K> ? never : K
|
|
}[keyof T]
|
|
|
|
export type TruthyKeys<T> = keyof {
|
|
[K in keyof T as T[K] extends false | undefined | null ? never : K]: K
|
|
}
|
|
|
|
export type TrueKeys<T> = TruthyKeys<Prisma__Pick<T, RequiredKeys<T>>>
|
|
|
|
/**
|
|
* Subset
|
|
* @desc From `T` pick properties that exist in `U`. Simple version of Intersection
|
|
*/
|
|
export type Subset<T, U> = {
|
|
[key in keyof T]: key extends keyof U ? T[key] : never;
|
|
};
|
|
|
|
/**
|
|
* SelectSubset
|
|
* @desc From `T` pick properties that exist in `U`. Simple version of Intersection.
|
|
* Additionally, it validates, if both select and include are present. If the case, it errors.
|
|
*/
|
|
export type SelectSubset<T, U> = {
|
|
[key in keyof T]: key extends keyof U ? T[key] : never
|
|
} &
|
|
(T extends SelectAndInclude
|
|
? 'Please either choose `select` or `include`.'
|
|
: T extends SelectAndOmit
|
|
? 'Please either choose `select` or `omit`.'
|
|
: {})
|
|
|
|
/**
|
|
* Subset + Intersection
|
|
* @desc From `T` pick properties that exist in `U` and intersect `K`
|
|
*/
|
|
export type SubsetIntersection<T, U, K> = {
|
|
[key in keyof T]: key extends keyof U ? T[key] : never
|
|
} &
|
|
K
|
|
|
|
type Without<T, U> = { [P in Exclude<keyof T, keyof U>]?: never };
|
|
|
|
/**
|
|
* XOR is needed to have a real mutually exclusive union type
|
|
* https://stackoverflow.com/questions/42123407/does-typescript-support-mutually-exclusive-types
|
|
*/
|
|
type XOR<T, U> =
|
|
T extends object ?
|
|
U extends object ?
|
|
(Without<T, U> & U) | (Without<U, T> & T)
|
|
: U : T
|
|
|
|
|
|
/**
|
|
* Is T a Record?
|
|
*/
|
|
type IsObject<T extends any> = T extends Array<any>
|
|
? False
|
|
: T extends Date
|
|
? False
|
|
: T extends Uint8Array
|
|
? False
|
|
: T extends BigInt
|
|
? False
|
|
: T extends object
|
|
? True
|
|
: False
|
|
|
|
|
|
/**
|
|
* If it's T[], return T
|
|
*/
|
|
export type UnEnumerate<T extends unknown> = T extends Array<infer U> ? U : T
|
|
|
|
/**
|
|
* From ts-toolbelt
|
|
*/
|
|
|
|
type __Either<O extends object, K extends Key> = Omit<O, K> &
|
|
{
|
|
// Merge all but K
|
|
[P in K]: Prisma__Pick<O, P & keyof O> // With K possibilities
|
|
}[K]
|
|
|
|
type EitherStrict<O extends object, K extends Key> = Strict<__Either<O, K>>
|
|
|
|
type EitherLoose<O extends object, K extends Key> = ComputeRaw<__Either<O, K>>
|
|
|
|
type _Either<
|
|
O extends object,
|
|
K extends Key,
|
|
strict extends Boolean
|
|
> = {
|
|
1: EitherStrict<O, K>
|
|
0: EitherLoose<O, K>
|
|
}[strict]
|
|
|
|
type Either<
|
|
O extends object,
|
|
K extends Key,
|
|
strict extends Boolean = 1
|
|
> = O extends unknown ? _Either<O, K, strict> : never
|
|
|
|
export type Union = any
|
|
|
|
type PatchUndefined<O extends object, O1 extends object> = {
|
|
[K in keyof O]: O[K] extends undefined ? At<O1, K> : O[K]
|
|
} & {}
|
|
|
|
/** Helper Types for "Merge" **/
|
|
export type IntersectOf<U extends Union> = (
|
|
U extends unknown ? (k: U) => void : never
|
|
) extends (k: infer I) => void
|
|
? I
|
|
: never
|
|
|
|
export type Overwrite<O extends object, O1 extends object> = {
|
|
[K in keyof O]: K extends keyof O1 ? O1[K] : O[K];
|
|
} & {};
|
|
|
|
type _Merge<U extends object> = IntersectOf<Overwrite<U, {
|
|
[K in keyof U]-?: At<U, K>;
|
|
}>>;
|
|
|
|
type Key = string | number | symbol;
|
|
type AtBasic<O extends object, K extends Key> = K extends keyof O ? O[K] : never;
|
|
type AtStrict<O extends object, K extends Key> = O[K & keyof O];
|
|
type AtLoose<O extends object, K extends Key> = O extends unknown ? AtStrict<O, K> : never;
|
|
export type At<O extends object, K extends Key, strict extends Boolean = 1> = {
|
|
1: AtStrict<O, K>;
|
|
0: AtLoose<O, K>;
|
|
}[strict];
|
|
|
|
export type ComputeRaw<A extends any> = A extends Function ? A : {
|
|
[K in keyof A]: A[K];
|
|
} & {};
|
|
|
|
export type OptionalFlat<O> = {
|
|
[K in keyof O]?: O[K];
|
|
} & {};
|
|
|
|
type _Record<K extends keyof any, T> = {
|
|
[P in K]: T;
|
|
};
|
|
|
|
// cause typescript not to expand types and preserve names
|
|
type NoExpand<T> = T extends unknown ? T : never;
|
|
|
|
// this type assumes the passed object is entirely optional
|
|
type AtLeast<O extends object, K extends string> = NoExpand<
|
|
O extends unknown
|
|
? | (K extends keyof O ? { [P in K]: O[P] } & O : O)
|
|
| {[P in keyof O as P extends K ? K : never]-?: O[P]} & O
|
|
: never>;
|
|
|
|
type _Strict<U, _U = U> = U extends unknown ? U & OptionalFlat<_Record<Exclude<Keys<_U>, keyof U>, never>> : never;
|
|
|
|
export type Strict<U extends object> = ComputeRaw<_Strict<U>>;
|
|
/** End Helper Types for "Merge" **/
|
|
|
|
export type Merge<U extends object> = ComputeRaw<_Merge<Strict<U>>>;
|
|
|
|
/**
|
|
A [[Boolean]]
|
|
*/
|
|
export type Boolean = True | False
|
|
|
|
// /**
|
|
// 1
|
|
// */
|
|
export type True = 1
|
|
|
|
/**
|
|
0
|
|
*/
|
|
export type False = 0
|
|
|
|
export type Not<B extends Boolean> = {
|
|
0: 1
|
|
1: 0
|
|
}[B]
|
|
|
|
export type Extends<A1 extends any, A2 extends any> = [A1] extends [never]
|
|
? 0 // anything `never` is false
|
|
: A1 extends A2
|
|
? 1
|
|
: 0
|
|
|
|
export type Has<U extends Union, U1 extends Union> = Not<
|
|
Extends<Exclude<U1, U>, U1>
|
|
>
|
|
|
|
export type Or<B1 extends Boolean, B2 extends Boolean> = {
|
|
0: {
|
|
0: 0
|
|
1: 1
|
|
}
|
|
1: {
|
|
0: 1
|
|
1: 1
|
|
}
|
|
}[B1][B2]
|
|
|
|
export type Keys<U extends Union> = U extends unknown ? keyof U : never
|
|
|
|
type Cast<A, B> = A extends B ? A : B;
|
|
|
|
export const type: unique symbol;
|
|
|
|
|
|
|
|
/**
|
|
* Used by group by
|
|
*/
|
|
|
|
export type GetScalarType<T, O> = O extends object ? {
|
|
[P in keyof T]: P extends keyof O
|
|
? O[P]
|
|
: never
|
|
} : never
|
|
|
|
type FieldPaths<
|
|
T,
|
|
U = Omit<T, '_avg' | '_sum' | '_count' | '_min' | '_max'>
|
|
> = IsObject<T> extends True ? U : T
|
|
|
|
type GetHavingFields<T> = {
|
|
[K in keyof T]: Or<
|
|
Or<Extends<'OR', K>, Extends<'AND', K>>,
|
|
Extends<'NOT', K>
|
|
> extends True
|
|
? // infer is only needed to not hit TS limit
|
|
// based on the brilliant idea of Pierre-Antoine Mills
|
|
// https://github.com/microsoft/TypeScript/issues/30188#issuecomment-478938437
|
|
T[K] extends infer TK
|
|
? GetHavingFields<UnEnumerate<TK> extends object ? Merge<UnEnumerate<TK>> : never>
|
|
: never
|
|
: {} extends FieldPaths<T[K]>
|
|
? never
|
|
: K
|
|
}[keyof T]
|
|
|
|
/**
|
|
* Convert tuple to union
|
|
*/
|
|
type _TupleToUnion<T> = T extends (infer E)[] ? E : never
|
|
type TupleToUnion<K extends readonly any[]> = _TupleToUnion<K>
|
|
type MaybeTupleToUnion<T> = T extends any[] ? TupleToUnion<T> : T
|
|
|
|
/**
|
|
* Like `Pick`, but additionally can also accept an array of keys
|
|
*/
|
|
type PickEnumerable<T, K extends Enumerable<keyof T> | keyof T> = Prisma__Pick<T, MaybeTupleToUnion<K>>
|
|
|
|
/**
|
|
* Exclude all keys with underscores
|
|
*/
|
|
type ExcludeUnderscoreKeys<T extends string> = T extends `_${string}` ? never : T
|
|
|
|
|
|
export type FieldRef<Model, FieldType> = runtime.FieldRef<Model, FieldType>
|
|
|
|
type FieldRefInputType<Model, FieldType> = Model extends never ? never : FieldRef<Model, FieldType>
|
|
|
|
|
|
export const ModelName: {
|
|
User: 'User',
|
|
Question: 'Question',
|
|
GameSession: 'GameSession',
|
|
UserAnswer: 'UserAnswer',
|
|
LeaderboardEntry: 'LeaderboardEntry'
|
|
};
|
|
|
|
export type ModelName = (typeof ModelName)[keyof typeof ModelName]
|
|
|
|
|
|
export type Datasources = {
|
|
db?: Datasource
|
|
}
|
|
|
|
interface TypeMapCb extends $Utils.Fn<{extArgs: $Extensions.InternalArgs, clientOptions: PrismaClientOptions }, $Utils.Record<string, any>> {
|
|
returns: Prisma.TypeMap<this['params']['extArgs'], this['params']['clientOptions']>
|
|
}
|
|
|
|
export type TypeMap<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, ClientOptions = {}> = {
|
|
meta: {
|
|
modelProps: "user" | "question" | "gameSession" | "userAnswer" | "leaderboardEntry"
|
|
txIsolationLevel: Prisma.TransactionIsolationLevel
|
|
}
|
|
model: {
|
|
User: {
|
|
payload: Prisma.$UserPayload<ExtArgs>
|
|
fields: Prisma.UserFieldRefs
|
|
operations: {
|
|
findUnique: {
|
|
args: Prisma.UserFindUniqueArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$UserPayload> | null
|
|
}
|
|
findUniqueOrThrow: {
|
|
args: Prisma.UserFindUniqueOrThrowArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$UserPayload>
|
|
}
|
|
findFirst: {
|
|
args: Prisma.UserFindFirstArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$UserPayload> | null
|
|
}
|
|
findFirstOrThrow: {
|
|
args: Prisma.UserFindFirstOrThrowArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$UserPayload>
|
|
}
|
|
findMany: {
|
|
args: Prisma.UserFindManyArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$UserPayload>[]
|
|
}
|
|
create: {
|
|
args: Prisma.UserCreateArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$UserPayload>
|
|
}
|
|
createMany: {
|
|
args: Prisma.UserCreateManyArgs<ExtArgs>
|
|
result: BatchPayload
|
|
}
|
|
createManyAndReturn: {
|
|
args: Prisma.UserCreateManyAndReturnArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$UserPayload>[]
|
|
}
|
|
delete: {
|
|
args: Prisma.UserDeleteArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$UserPayload>
|
|
}
|
|
update: {
|
|
args: Prisma.UserUpdateArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$UserPayload>
|
|
}
|
|
deleteMany: {
|
|
args: Prisma.UserDeleteManyArgs<ExtArgs>
|
|
result: BatchPayload
|
|
}
|
|
updateMany: {
|
|
args: Prisma.UserUpdateManyArgs<ExtArgs>
|
|
result: BatchPayload
|
|
}
|
|
upsert: {
|
|
args: Prisma.UserUpsertArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$UserPayload>
|
|
}
|
|
aggregate: {
|
|
args: Prisma.UserAggregateArgs<ExtArgs>
|
|
result: $Utils.Optional<AggregateUser>
|
|
}
|
|
groupBy: {
|
|
args: Prisma.UserGroupByArgs<ExtArgs>
|
|
result: $Utils.Optional<UserGroupByOutputType>[]
|
|
}
|
|
count: {
|
|
args: Prisma.UserCountArgs<ExtArgs>
|
|
result: $Utils.Optional<UserCountAggregateOutputType> | number
|
|
}
|
|
}
|
|
}
|
|
Question: {
|
|
payload: Prisma.$QuestionPayload<ExtArgs>
|
|
fields: Prisma.QuestionFieldRefs
|
|
operations: {
|
|
findUnique: {
|
|
args: Prisma.QuestionFindUniqueArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$QuestionPayload> | null
|
|
}
|
|
findUniqueOrThrow: {
|
|
args: Prisma.QuestionFindUniqueOrThrowArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$QuestionPayload>
|
|
}
|
|
findFirst: {
|
|
args: Prisma.QuestionFindFirstArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$QuestionPayload> | null
|
|
}
|
|
findFirstOrThrow: {
|
|
args: Prisma.QuestionFindFirstOrThrowArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$QuestionPayload>
|
|
}
|
|
findMany: {
|
|
args: Prisma.QuestionFindManyArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$QuestionPayload>[]
|
|
}
|
|
create: {
|
|
args: Prisma.QuestionCreateArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$QuestionPayload>
|
|
}
|
|
createMany: {
|
|
args: Prisma.QuestionCreateManyArgs<ExtArgs>
|
|
result: BatchPayload
|
|
}
|
|
createManyAndReturn: {
|
|
args: Prisma.QuestionCreateManyAndReturnArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$QuestionPayload>[]
|
|
}
|
|
delete: {
|
|
args: Prisma.QuestionDeleteArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$QuestionPayload>
|
|
}
|
|
update: {
|
|
args: Prisma.QuestionUpdateArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$QuestionPayload>
|
|
}
|
|
deleteMany: {
|
|
args: Prisma.QuestionDeleteManyArgs<ExtArgs>
|
|
result: BatchPayload
|
|
}
|
|
updateMany: {
|
|
args: Prisma.QuestionUpdateManyArgs<ExtArgs>
|
|
result: BatchPayload
|
|
}
|
|
upsert: {
|
|
args: Prisma.QuestionUpsertArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$QuestionPayload>
|
|
}
|
|
aggregate: {
|
|
args: Prisma.QuestionAggregateArgs<ExtArgs>
|
|
result: $Utils.Optional<AggregateQuestion>
|
|
}
|
|
groupBy: {
|
|
args: Prisma.QuestionGroupByArgs<ExtArgs>
|
|
result: $Utils.Optional<QuestionGroupByOutputType>[]
|
|
}
|
|
count: {
|
|
args: Prisma.QuestionCountArgs<ExtArgs>
|
|
result: $Utils.Optional<QuestionCountAggregateOutputType> | number
|
|
}
|
|
}
|
|
}
|
|
GameSession: {
|
|
payload: Prisma.$GameSessionPayload<ExtArgs>
|
|
fields: Prisma.GameSessionFieldRefs
|
|
operations: {
|
|
findUnique: {
|
|
args: Prisma.GameSessionFindUniqueArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$GameSessionPayload> | null
|
|
}
|
|
findUniqueOrThrow: {
|
|
args: Prisma.GameSessionFindUniqueOrThrowArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$GameSessionPayload>
|
|
}
|
|
findFirst: {
|
|
args: Prisma.GameSessionFindFirstArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$GameSessionPayload> | null
|
|
}
|
|
findFirstOrThrow: {
|
|
args: Prisma.GameSessionFindFirstOrThrowArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$GameSessionPayload>
|
|
}
|
|
findMany: {
|
|
args: Prisma.GameSessionFindManyArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$GameSessionPayload>[]
|
|
}
|
|
create: {
|
|
args: Prisma.GameSessionCreateArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$GameSessionPayload>
|
|
}
|
|
createMany: {
|
|
args: Prisma.GameSessionCreateManyArgs<ExtArgs>
|
|
result: BatchPayload
|
|
}
|
|
createManyAndReturn: {
|
|
args: Prisma.GameSessionCreateManyAndReturnArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$GameSessionPayload>[]
|
|
}
|
|
delete: {
|
|
args: Prisma.GameSessionDeleteArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$GameSessionPayload>
|
|
}
|
|
update: {
|
|
args: Prisma.GameSessionUpdateArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$GameSessionPayload>
|
|
}
|
|
deleteMany: {
|
|
args: Prisma.GameSessionDeleteManyArgs<ExtArgs>
|
|
result: BatchPayload
|
|
}
|
|
updateMany: {
|
|
args: Prisma.GameSessionUpdateManyArgs<ExtArgs>
|
|
result: BatchPayload
|
|
}
|
|
upsert: {
|
|
args: Prisma.GameSessionUpsertArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$GameSessionPayload>
|
|
}
|
|
aggregate: {
|
|
args: Prisma.GameSessionAggregateArgs<ExtArgs>
|
|
result: $Utils.Optional<AggregateGameSession>
|
|
}
|
|
groupBy: {
|
|
args: Prisma.GameSessionGroupByArgs<ExtArgs>
|
|
result: $Utils.Optional<GameSessionGroupByOutputType>[]
|
|
}
|
|
count: {
|
|
args: Prisma.GameSessionCountArgs<ExtArgs>
|
|
result: $Utils.Optional<GameSessionCountAggregateOutputType> | number
|
|
}
|
|
}
|
|
}
|
|
UserAnswer: {
|
|
payload: Prisma.$UserAnswerPayload<ExtArgs>
|
|
fields: Prisma.UserAnswerFieldRefs
|
|
operations: {
|
|
findUnique: {
|
|
args: Prisma.UserAnswerFindUniqueArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$UserAnswerPayload> | null
|
|
}
|
|
findUniqueOrThrow: {
|
|
args: Prisma.UserAnswerFindUniqueOrThrowArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$UserAnswerPayload>
|
|
}
|
|
findFirst: {
|
|
args: Prisma.UserAnswerFindFirstArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$UserAnswerPayload> | null
|
|
}
|
|
findFirstOrThrow: {
|
|
args: Prisma.UserAnswerFindFirstOrThrowArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$UserAnswerPayload>
|
|
}
|
|
findMany: {
|
|
args: Prisma.UserAnswerFindManyArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$UserAnswerPayload>[]
|
|
}
|
|
create: {
|
|
args: Prisma.UserAnswerCreateArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$UserAnswerPayload>
|
|
}
|
|
createMany: {
|
|
args: Prisma.UserAnswerCreateManyArgs<ExtArgs>
|
|
result: BatchPayload
|
|
}
|
|
createManyAndReturn: {
|
|
args: Prisma.UserAnswerCreateManyAndReturnArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$UserAnswerPayload>[]
|
|
}
|
|
delete: {
|
|
args: Prisma.UserAnswerDeleteArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$UserAnswerPayload>
|
|
}
|
|
update: {
|
|
args: Prisma.UserAnswerUpdateArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$UserAnswerPayload>
|
|
}
|
|
deleteMany: {
|
|
args: Prisma.UserAnswerDeleteManyArgs<ExtArgs>
|
|
result: BatchPayload
|
|
}
|
|
updateMany: {
|
|
args: Prisma.UserAnswerUpdateManyArgs<ExtArgs>
|
|
result: BatchPayload
|
|
}
|
|
upsert: {
|
|
args: Prisma.UserAnswerUpsertArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$UserAnswerPayload>
|
|
}
|
|
aggregate: {
|
|
args: Prisma.UserAnswerAggregateArgs<ExtArgs>
|
|
result: $Utils.Optional<AggregateUserAnswer>
|
|
}
|
|
groupBy: {
|
|
args: Prisma.UserAnswerGroupByArgs<ExtArgs>
|
|
result: $Utils.Optional<UserAnswerGroupByOutputType>[]
|
|
}
|
|
count: {
|
|
args: Prisma.UserAnswerCountArgs<ExtArgs>
|
|
result: $Utils.Optional<UserAnswerCountAggregateOutputType> | number
|
|
}
|
|
}
|
|
}
|
|
LeaderboardEntry: {
|
|
payload: Prisma.$LeaderboardEntryPayload<ExtArgs>
|
|
fields: Prisma.LeaderboardEntryFieldRefs
|
|
operations: {
|
|
findUnique: {
|
|
args: Prisma.LeaderboardEntryFindUniqueArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$LeaderboardEntryPayload> | null
|
|
}
|
|
findUniqueOrThrow: {
|
|
args: Prisma.LeaderboardEntryFindUniqueOrThrowArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$LeaderboardEntryPayload>
|
|
}
|
|
findFirst: {
|
|
args: Prisma.LeaderboardEntryFindFirstArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$LeaderboardEntryPayload> | null
|
|
}
|
|
findFirstOrThrow: {
|
|
args: Prisma.LeaderboardEntryFindFirstOrThrowArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$LeaderboardEntryPayload>
|
|
}
|
|
findMany: {
|
|
args: Prisma.LeaderboardEntryFindManyArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$LeaderboardEntryPayload>[]
|
|
}
|
|
create: {
|
|
args: Prisma.LeaderboardEntryCreateArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$LeaderboardEntryPayload>
|
|
}
|
|
createMany: {
|
|
args: Prisma.LeaderboardEntryCreateManyArgs<ExtArgs>
|
|
result: BatchPayload
|
|
}
|
|
createManyAndReturn: {
|
|
args: Prisma.LeaderboardEntryCreateManyAndReturnArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$LeaderboardEntryPayload>[]
|
|
}
|
|
delete: {
|
|
args: Prisma.LeaderboardEntryDeleteArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$LeaderboardEntryPayload>
|
|
}
|
|
update: {
|
|
args: Prisma.LeaderboardEntryUpdateArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$LeaderboardEntryPayload>
|
|
}
|
|
deleteMany: {
|
|
args: Prisma.LeaderboardEntryDeleteManyArgs<ExtArgs>
|
|
result: BatchPayload
|
|
}
|
|
updateMany: {
|
|
args: Prisma.LeaderboardEntryUpdateManyArgs<ExtArgs>
|
|
result: BatchPayload
|
|
}
|
|
upsert: {
|
|
args: Prisma.LeaderboardEntryUpsertArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$LeaderboardEntryPayload>
|
|
}
|
|
aggregate: {
|
|
args: Prisma.LeaderboardEntryAggregateArgs<ExtArgs>
|
|
result: $Utils.Optional<AggregateLeaderboardEntry>
|
|
}
|
|
groupBy: {
|
|
args: Prisma.LeaderboardEntryGroupByArgs<ExtArgs>
|
|
result: $Utils.Optional<LeaderboardEntryGroupByOutputType>[]
|
|
}
|
|
count: {
|
|
args: Prisma.LeaderboardEntryCountArgs<ExtArgs>
|
|
result: $Utils.Optional<LeaderboardEntryCountAggregateOutputType> | number
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} & {
|
|
other: {
|
|
payload: any
|
|
operations: {
|
|
$executeRaw: {
|
|
args: [query: TemplateStringsArray | Prisma.Sql, ...values: any[]],
|
|
result: any
|
|
}
|
|
$executeRawUnsafe: {
|
|
args: [query: string, ...values: any[]],
|
|
result: any
|
|
}
|
|
$queryRaw: {
|
|
args: [query: TemplateStringsArray | Prisma.Sql, ...values: any[]],
|
|
result: any
|
|
}
|
|
$queryRawUnsafe: {
|
|
args: [query: string, ...values: any[]],
|
|
result: any
|
|
}
|
|
}
|
|
}
|
|
}
|
|
export const defineExtension: $Extensions.ExtendsHook<"define", Prisma.TypeMapCb, $Extensions.DefaultArgs>
|
|
export type DefaultPrismaClient = PrismaClient
|
|
export type ErrorFormat = 'pretty' | 'colorless' | 'minimal'
|
|
export interface PrismaClientOptions {
|
|
/**
|
|
* Overwrites the datasource url from your schema.prisma file
|
|
*/
|
|
datasources?: Datasources
|
|
/**
|
|
* Overwrites the datasource url from your schema.prisma file
|
|
*/
|
|
datasourceUrl?: string
|
|
/**
|
|
* @default "colorless"
|
|
*/
|
|
errorFormat?: ErrorFormat
|
|
/**
|
|
* @example
|
|
* ```
|
|
* // Defaults to stdout
|
|
* log: ['query', 'info', 'warn', 'error']
|
|
*
|
|
* // Emit as events
|
|
* log: [
|
|
* { emit: 'stdout', level: 'query' },
|
|
* { emit: 'stdout', level: 'info' },
|
|
* { emit: 'stdout', level: 'warn' }
|
|
* { emit: 'stdout', level: 'error' }
|
|
* ]
|
|
* ```
|
|
* Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/logging#the-log-option).
|
|
*/
|
|
log?: (LogLevel | LogDefinition)[]
|
|
/**
|
|
* The default values for transactionOptions
|
|
* maxWait ?= 2000
|
|
* timeout ?= 5000
|
|
*/
|
|
transactionOptions?: {
|
|
maxWait?: number
|
|
timeout?: number
|
|
isolationLevel?: Prisma.TransactionIsolationLevel
|
|
}
|
|
}
|
|
|
|
|
|
/* Types for Logging */
|
|
export type LogLevel = 'info' | 'query' | 'warn' | 'error'
|
|
export type LogDefinition = {
|
|
level: LogLevel
|
|
emit: 'stdout' | 'event'
|
|
}
|
|
|
|
export type GetLogType<T extends LogLevel | LogDefinition> = T extends LogDefinition ? T['emit'] extends 'event' ? T['level'] : never : never
|
|
export type GetEvents<T extends any> = T extends Array<LogLevel | LogDefinition> ?
|
|
GetLogType<T[0]> | GetLogType<T[1]> | GetLogType<T[2]> | GetLogType<T[3]>
|
|
: never
|
|
|
|
export type QueryEvent = {
|
|
timestamp: Date
|
|
query: string
|
|
params: string
|
|
duration: number
|
|
target: string
|
|
}
|
|
|
|
export type LogEvent = {
|
|
timestamp: Date
|
|
message: string
|
|
target: string
|
|
}
|
|
/* End Types for Logging */
|
|
|
|
|
|
export type PrismaAction =
|
|
| 'findUnique'
|
|
| 'findUniqueOrThrow'
|
|
| 'findMany'
|
|
| 'findFirst'
|
|
| 'findFirstOrThrow'
|
|
| 'create'
|
|
| 'createMany'
|
|
| 'createManyAndReturn'
|
|
| 'update'
|
|
| 'updateMany'
|
|
| 'upsert'
|
|
| 'delete'
|
|
| 'deleteMany'
|
|
| 'executeRaw'
|
|
| 'queryRaw'
|
|
| 'aggregate'
|
|
| 'count'
|
|
| 'runCommandRaw'
|
|
| 'findRaw'
|
|
| 'groupBy'
|
|
|
|
/**
|
|
* These options are being passed into the middleware as "params"
|
|
*/
|
|
export type MiddlewareParams = {
|
|
model?: ModelName
|
|
action: PrismaAction
|
|
args: any
|
|
dataPath: string[]
|
|
runInTransaction: boolean
|
|
}
|
|
|
|
/**
|
|
* The `T` type makes sure, that the `return proceed` is not forgotten in the middleware implementation
|
|
*/
|
|
export type Middleware<T = any> = (
|
|
params: MiddlewareParams,
|
|
next: (params: MiddlewareParams) => $Utils.JsPromise<T>,
|
|
) => $Utils.JsPromise<T>
|
|
|
|
// tested in getLogLevel.test.ts
|
|
export function getLogLevel(log: Array<LogLevel | LogDefinition>): LogLevel | undefined;
|
|
|
|
/**
|
|
* `PrismaClient` proxy available in interactive transactions.
|
|
*/
|
|
export type TransactionClient = Omit<Prisma.DefaultPrismaClient, runtime.ITXClientDenyList>
|
|
|
|
export type Datasource = {
|
|
url?: string
|
|
}
|
|
|
|
/**
|
|
* Count Types
|
|
*/
|
|
|
|
|
|
/**
|
|
* Count Type UserCountOutputType
|
|
*/
|
|
|
|
export type UserCountOutputType = {
|
|
sessions: number
|
|
leaderboardEntries: number
|
|
}
|
|
|
|
export type UserCountOutputTypeSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
sessions?: boolean | UserCountOutputTypeCountSessionsArgs
|
|
leaderboardEntries?: boolean | UserCountOutputTypeCountLeaderboardEntriesArgs
|
|
}
|
|
|
|
// Custom InputTypes
|
|
/**
|
|
* UserCountOutputType without action
|
|
*/
|
|
export type UserCountOutputTypeDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the UserCountOutputType
|
|
*/
|
|
select?: UserCountOutputTypeSelect<ExtArgs> | null
|
|
}
|
|
|
|
/**
|
|
* UserCountOutputType without action
|
|
*/
|
|
export type UserCountOutputTypeCountSessionsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
where?: GameSessionWhereInput
|
|
}
|
|
|
|
/**
|
|
* UserCountOutputType without action
|
|
*/
|
|
export type UserCountOutputTypeCountLeaderboardEntriesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
where?: LeaderboardEntryWhereInput
|
|
}
|
|
|
|
|
|
/**
|
|
* Count Type QuestionCountOutputType
|
|
*/
|
|
|
|
export type QuestionCountOutputType = {
|
|
answers: number
|
|
}
|
|
|
|
export type QuestionCountOutputTypeSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
answers?: boolean | QuestionCountOutputTypeCountAnswersArgs
|
|
}
|
|
|
|
// Custom InputTypes
|
|
/**
|
|
* QuestionCountOutputType without action
|
|
*/
|
|
export type QuestionCountOutputTypeDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the QuestionCountOutputType
|
|
*/
|
|
select?: QuestionCountOutputTypeSelect<ExtArgs> | null
|
|
}
|
|
|
|
/**
|
|
* QuestionCountOutputType without action
|
|
*/
|
|
export type QuestionCountOutputTypeCountAnswersArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
where?: UserAnswerWhereInput
|
|
}
|
|
|
|
|
|
/**
|
|
* Count Type GameSessionCountOutputType
|
|
*/
|
|
|
|
export type GameSessionCountOutputType = {
|
|
answers: number
|
|
}
|
|
|
|
export type GameSessionCountOutputTypeSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
answers?: boolean | GameSessionCountOutputTypeCountAnswersArgs
|
|
}
|
|
|
|
// Custom InputTypes
|
|
/**
|
|
* GameSessionCountOutputType without action
|
|
*/
|
|
export type GameSessionCountOutputTypeDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the GameSessionCountOutputType
|
|
*/
|
|
select?: GameSessionCountOutputTypeSelect<ExtArgs> | null
|
|
}
|
|
|
|
/**
|
|
* GameSessionCountOutputType without action
|
|
*/
|
|
export type GameSessionCountOutputTypeCountAnswersArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
where?: UserAnswerWhereInput
|
|
}
|
|
|
|
|
|
/**
|
|
* Models
|
|
*/
|
|
|
|
/**
|
|
* Model User
|
|
*/
|
|
|
|
export type AggregateUser = {
|
|
_count: UserCountAggregateOutputType | null
|
|
_min: UserMinAggregateOutputType | null
|
|
_max: UserMaxAggregateOutputType | null
|
|
}
|
|
|
|
export type UserMinAggregateOutputType = {
|
|
id: string | null
|
|
googleId: string | null
|
|
email: string | null
|
|
displayName: string | null
|
|
avatarUrl: string | null
|
|
createdAt: Date | null
|
|
updatedAt: Date | null
|
|
}
|
|
|
|
export type UserMaxAggregateOutputType = {
|
|
id: string | null
|
|
googleId: string | null
|
|
email: string | null
|
|
displayName: string | null
|
|
avatarUrl: string | null
|
|
createdAt: Date | null
|
|
updatedAt: Date | null
|
|
}
|
|
|
|
export type UserCountAggregateOutputType = {
|
|
id: number
|
|
googleId: number
|
|
email: number
|
|
displayName: number
|
|
avatarUrl: number
|
|
createdAt: number
|
|
updatedAt: number
|
|
_all: number
|
|
}
|
|
|
|
|
|
export type UserMinAggregateInputType = {
|
|
id?: true
|
|
googleId?: true
|
|
email?: true
|
|
displayName?: true
|
|
avatarUrl?: true
|
|
createdAt?: true
|
|
updatedAt?: true
|
|
}
|
|
|
|
export type UserMaxAggregateInputType = {
|
|
id?: true
|
|
googleId?: true
|
|
email?: true
|
|
displayName?: true
|
|
avatarUrl?: true
|
|
createdAt?: true
|
|
updatedAt?: true
|
|
}
|
|
|
|
export type UserCountAggregateInputType = {
|
|
id?: true
|
|
googleId?: true
|
|
email?: true
|
|
displayName?: true
|
|
avatarUrl?: true
|
|
createdAt?: true
|
|
updatedAt?: true
|
|
_all?: true
|
|
}
|
|
|
|
export type UserAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Filter which User to aggregate.
|
|
*/
|
|
where?: UserWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of Users to fetch.
|
|
*/
|
|
orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[]
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the start position
|
|
*/
|
|
cursor?: UserWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Users 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` Users.
|
|
*/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Count returned Users
|
|
**/
|
|
_count?: true | UserCountAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to find the minimum value
|
|
**/
|
|
_min?: UserMinAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to find the maximum value
|
|
**/
|
|
_max?: UserMaxAggregateInputType
|
|
}
|
|
|
|
export type GetUserAggregateType<T extends UserAggregateArgs> = {
|
|
[P in keyof T & keyof AggregateUser]: P extends '_count' | 'count'
|
|
? T[P] extends true
|
|
? number
|
|
: GetScalarType<T[P], AggregateUser[P]>
|
|
: GetScalarType<T[P], AggregateUser[P]>
|
|
}
|
|
|
|
|
|
|
|
|
|
export type UserGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
where?: UserWhereInput
|
|
orderBy?: UserOrderByWithAggregationInput | UserOrderByWithAggregationInput[]
|
|
by: UserScalarFieldEnum[] | UserScalarFieldEnum
|
|
having?: UserScalarWhereWithAggregatesInput
|
|
take?: number
|
|
skip?: number
|
|
_count?: UserCountAggregateInputType | true
|
|
_min?: UserMinAggregateInputType
|
|
_max?: UserMaxAggregateInputType
|
|
}
|
|
|
|
export type UserGroupByOutputType = {
|
|
id: string
|
|
googleId: string
|
|
email: string
|
|
displayName: string
|
|
avatarUrl: string | null
|
|
createdAt: Date
|
|
updatedAt: Date
|
|
_count: UserCountAggregateOutputType | null
|
|
_min: UserMinAggregateOutputType | null
|
|
_max: UserMaxAggregateOutputType | null
|
|
}
|
|
|
|
type GetUserGroupByPayload<T extends UserGroupByArgs> = Prisma.PrismaPromise<
|
|
Array<
|
|
PickEnumerable<UserGroupByOutputType, T['by']> &
|
|
{
|
|
[P in ((keyof T) & (keyof UserGroupByOutputType))]: P extends '_count'
|
|
? T[P] extends boolean
|
|
? number
|
|
: GetScalarType<T[P], UserGroupByOutputType[P]>
|
|
: GetScalarType<T[P], UserGroupByOutputType[P]>
|
|
}
|
|
>
|
|
>
|
|
|
|
|
|
export type UserSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
|
|
id?: boolean
|
|
googleId?: boolean
|
|
email?: boolean
|
|
displayName?: boolean
|
|
avatarUrl?: boolean
|
|
createdAt?: boolean
|
|
updatedAt?: boolean
|
|
sessions?: boolean | User$sessionsArgs<ExtArgs>
|
|
leaderboardEntries?: boolean | User$leaderboardEntriesArgs<ExtArgs>
|
|
_count?: boolean | UserCountOutputTypeDefaultArgs<ExtArgs>
|
|
}, ExtArgs["result"]["user"]>
|
|
|
|
export type UserSelectCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
|
|
id?: boolean
|
|
googleId?: boolean
|
|
email?: boolean
|
|
displayName?: boolean
|
|
avatarUrl?: boolean
|
|
createdAt?: boolean
|
|
updatedAt?: boolean
|
|
}, ExtArgs["result"]["user"]>
|
|
|
|
export type UserSelectScalar = {
|
|
id?: boolean
|
|
googleId?: boolean
|
|
email?: boolean
|
|
displayName?: boolean
|
|
avatarUrl?: boolean
|
|
createdAt?: boolean
|
|
updatedAt?: boolean
|
|
}
|
|
|
|
export type UserInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
sessions?: boolean | User$sessionsArgs<ExtArgs>
|
|
leaderboardEntries?: boolean | User$leaderboardEntriesArgs<ExtArgs>
|
|
_count?: boolean | UserCountOutputTypeDefaultArgs<ExtArgs>
|
|
}
|
|
export type UserIncludeCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {}
|
|
|
|
export type $UserPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
name: "User"
|
|
objects: {
|
|
sessions: Prisma.$GameSessionPayload<ExtArgs>[]
|
|
leaderboardEntries: Prisma.$LeaderboardEntryPayload<ExtArgs>[]
|
|
}
|
|
scalars: $Extensions.GetPayloadResult<{
|
|
id: string
|
|
googleId: string
|
|
email: string
|
|
displayName: string
|
|
avatarUrl: string | null
|
|
createdAt: Date
|
|
updatedAt: Date
|
|
}, ExtArgs["result"]["user"]>
|
|
composites: {}
|
|
}
|
|
|
|
type UserGetPayload<S extends boolean | null | undefined | UserDefaultArgs> = $Result.GetResult<Prisma.$UserPayload, S>
|
|
|
|
type UserCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
|
|
Omit<UserFindManyArgs, 'select' | 'include' | 'distinct'> & {
|
|
select?: UserCountAggregateInputType | true
|
|
}
|
|
|
|
export interface UserDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> {
|
|
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['User'], meta: { name: 'User' } }
|
|
/**
|
|
* Find zero or one User that matches the filter.
|
|
* @param {UserFindUniqueArgs} args - Arguments to find a User
|
|
* @example
|
|
* // Get one User
|
|
* const user = await prisma.user.findUnique({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*/
|
|
findUnique<T extends UserFindUniqueArgs>(args: SelectSubset<T, UserFindUniqueArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findUnique"> | null, null, ExtArgs>
|
|
|
|
/**
|
|
* Find one User that matches the filter or throw an error with `error.code='P2025'`
|
|
* if no matches were found.
|
|
* @param {UserFindUniqueOrThrowArgs} args - Arguments to find a User
|
|
* @example
|
|
* // Get one User
|
|
* const user = await prisma.user.findUniqueOrThrow({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*/
|
|
findUniqueOrThrow<T extends UserFindUniqueOrThrowArgs>(args: SelectSubset<T, UserFindUniqueOrThrowArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findUniqueOrThrow">, never, ExtArgs>
|
|
|
|
/**
|
|
* Find the first User 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 {UserFindFirstArgs} args - Arguments to find a User
|
|
* @example
|
|
* // Get one User
|
|
* const user = await prisma.user.findFirst({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*/
|
|
findFirst<T extends UserFindFirstArgs>(args?: SelectSubset<T, UserFindFirstArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findFirst"> | null, null, ExtArgs>
|
|
|
|
/**
|
|
* Find the first User 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 {UserFindFirstOrThrowArgs} args - Arguments to find a User
|
|
* @example
|
|
* // Get one User
|
|
* const user = await prisma.user.findFirstOrThrow({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*/
|
|
findFirstOrThrow<T extends UserFindFirstOrThrowArgs>(args?: SelectSubset<T, UserFindFirstOrThrowArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findFirstOrThrow">, never, ExtArgs>
|
|
|
|
/**
|
|
* Find zero or more Users 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 {UserFindManyArgs} args - Arguments to filter and select certain fields only.
|
|
* @example
|
|
* // Get all Users
|
|
* const users = await prisma.user.findMany()
|
|
*
|
|
* // Get first 10 Users
|
|
* const users = await prisma.user.findMany({ take: 10 })
|
|
*
|
|
* // Only select the `id`
|
|
* const userWithIdOnly = await prisma.user.findMany({ select: { id: true } })
|
|
*
|
|
*/
|
|
findMany<T extends UserFindManyArgs>(args?: SelectSubset<T, UserFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findMany">>
|
|
|
|
/**
|
|
* Create a User.
|
|
* @param {UserCreateArgs} args - Arguments to create a User.
|
|
* @example
|
|
* // Create one User
|
|
* const User = await prisma.user.create({
|
|
* data: {
|
|
* // ... data to create a User
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
create<T extends UserCreateArgs>(args: SelectSubset<T, UserCreateArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "create">, never, ExtArgs>
|
|
|
|
/**
|
|
* Create many Users.
|
|
* @param {UserCreateManyArgs} args - Arguments to create many Users.
|
|
* @example
|
|
* // Create many Users
|
|
* const user = await prisma.user.createMany({
|
|
* data: [
|
|
* // ... provide data here
|
|
* ]
|
|
* })
|
|
*
|
|
*/
|
|
createMany<T extends UserCreateManyArgs>(args?: SelectSubset<T, UserCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
|
|
|
|
/**
|
|
* Create many Users and returns the data saved in the database.
|
|
* @param {UserCreateManyAndReturnArgs} args - Arguments to create many Users.
|
|
* @example
|
|
* // Create many Users
|
|
* const user = await prisma.user.createManyAndReturn({
|
|
* data: [
|
|
* // ... provide data here
|
|
* ]
|
|
* })
|
|
*
|
|
* // Create many Users and only return the `id`
|
|
* const userWithIdOnly = await prisma.user.createManyAndReturn({
|
|
* select: { id: true },
|
|
* data: [
|
|
* // ... provide data here
|
|
* ]
|
|
* })
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
*
|
|
*/
|
|
createManyAndReturn<T extends UserCreateManyAndReturnArgs>(args?: SelectSubset<T, UserCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "createManyAndReturn">>
|
|
|
|
/**
|
|
* Delete a User.
|
|
* @param {UserDeleteArgs} args - Arguments to delete one User.
|
|
* @example
|
|
* // Delete one User
|
|
* const User = await prisma.user.delete({
|
|
* where: {
|
|
* // ... filter to delete one User
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
delete<T extends UserDeleteArgs>(args: SelectSubset<T, UserDeleteArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "delete">, never, ExtArgs>
|
|
|
|
/**
|
|
* Update one User.
|
|
* @param {UserUpdateArgs} args - Arguments to update one User.
|
|
* @example
|
|
* // Update one User
|
|
* const user = await prisma.user.update({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* },
|
|
* data: {
|
|
* // ... provide data here
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
update<T extends UserUpdateArgs>(args: SelectSubset<T, UserUpdateArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "update">, never, ExtArgs>
|
|
|
|
/**
|
|
* Delete zero or more Users.
|
|
* @param {UserDeleteManyArgs} args - Arguments to filter Users to delete.
|
|
* @example
|
|
* // Delete a few Users
|
|
* const { count } = await prisma.user.deleteMany({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
deleteMany<T extends UserDeleteManyArgs>(args?: SelectSubset<T, UserDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
|
|
|
|
/**
|
|
* Update zero or more Users.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {UserUpdateManyArgs} args - Arguments to update one or more rows.
|
|
* @example
|
|
* // Update many Users
|
|
* const user = await prisma.user.updateMany({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* },
|
|
* data: {
|
|
* // ... provide data here
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
updateMany<T extends UserUpdateManyArgs>(args: SelectSubset<T, UserUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
|
|
|
|
/**
|
|
* Create or update one User.
|
|
* @param {UserUpsertArgs} args - Arguments to update or create a User.
|
|
* @example
|
|
* // Update or create a User
|
|
* const user = await prisma.user.upsert({
|
|
* create: {
|
|
* // ... data to create a User
|
|
* },
|
|
* update: {
|
|
* // ... in case it already exists, update
|
|
* },
|
|
* where: {
|
|
* // ... the filter for the User we want to update
|
|
* }
|
|
* })
|
|
*/
|
|
upsert<T extends UserUpsertArgs>(args: SelectSubset<T, UserUpsertArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "upsert">, never, ExtArgs>
|
|
|
|
|
|
/**
|
|
* Count the number of Users.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {UserCountArgs} args - Arguments to filter Users to count.
|
|
* @example
|
|
* // Count the number of Users
|
|
* const count = await prisma.user.count({
|
|
* where: {
|
|
* // ... the filter for the Users we want to count
|
|
* }
|
|
* })
|
|
**/
|
|
count<T extends UserCountArgs>(
|
|
args?: Subset<T, UserCountArgs>,
|
|
): Prisma.PrismaPromise<
|
|
T extends $Utils.Record<'select', any>
|
|
? T['select'] extends true
|
|
? number
|
|
: GetScalarType<T['select'], UserCountAggregateOutputType>
|
|
: number
|
|
>
|
|
|
|
/**
|
|
* Allows you to perform aggregations operations on a User.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {UserAggregateArgs} 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 UserAggregateArgs>(args: Subset<T, UserAggregateArgs>): Prisma.PrismaPromise<GetUserAggregateType<T>>
|
|
|
|
/**
|
|
* Group by User.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {UserGroupByArgs} 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 UserGroupByArgs,
|
|
HasSelectOrTake extends Or<
|
|
Extends<'skip', Keys<T>>,
|
|
Extends<'take', Keys<T>>
|
|
>,
|
|
OrderByArg extends True extends HasSelectOrTake
|
|
? { orderBy: UserGroupByArgs['orderBy'] }
|
|
: { orderBy?: UserGroupByArgs['orderBy'] },
|
|
OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
|
|
ByFields extends MaybeTupleToUnion<T['by']>,
|
|
ByValid extends Has<ByFields, OrderFields>,
|
|
HavingFields extends GetHavingFields<T['having']>,
|
|
HavingValid extends Has<ByFields, HavingFields>,
|
|
ByEmpty extends T['by'] extends never[] ? True : False,
|
|
InputErrors extends ByEmpty extends True
|
|
? `Error: "by" must not be empty.`
|
|
: HavingValid extends 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 Keys<T>
|
|
? 'orderBy' extends Keys<T>
|
|
? ByValid extends 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 Keys<T>
|
|
? 'orderBy' extends Keys<T>
|
|
? ByValid extends 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 True
|
|
? {}
|
|
: {
|
|
[P in OrderFields]: P extends ByFields
|
|
? never
|
|
: `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
|
|
}[OrderFields]
|
|
>(args: SubsetIntersection<T, UserGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetUserGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
|
|
/**
|
|
* Fields of the User model
|
|
*/
|
|
readonly fields: UserFieldRefs;
|
|
}
|
|
|
|
/**
|
|
* The delegate class that acts as a "Promise-like" for User.
|
|
* 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__UserClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> extends Prisma.PrismaPromise<T> {
|
|
readonly [Symbol.toStringTag]: "PrismaPromise"
|
|
sessions<T extends User$sessionsArgs<ExtArgs> = {}>(args?: Subset<T, User$sessionsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$GameSessionPayload<ExtArgs>, T, "findMany"> | Null>
|
|
leaderboardEntries<T extends User$leaderboardEntriesArgs<ExtArgs> = {}>(args?: Subset<T, User$leaderboardEntriesArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$LeaderboardEntryPayload<ExtArgs>, T, "findMany"> | 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): $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): $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): $Utils.JsPromise<T>
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Fields of the User model
|
|
*/
|
|
interface UserFieldRefs {
|
|
readonly id: FieldRef<"User", 'String'>
|
|
readonly googleId: FieldRef<"User", 'String'>
|
|
readonly email: FieldRef<"User", 'String'>
|
|
readonly displayName: FieldRef<"User", 'String'>
|
|
readonly avatarUrl: FieldRef<"User", 'String'>
|
|
readonly createdAt: FieldRef<"User", 'DateTime'>
|
|
readonly updatedAt: FieldRef<"User", 'DateTime'>
|
|
}
|
|
|
|
|
|
// Custom InputTypes
|
|
/**
|
|
* User findUnique
|
|
*/
|
|
export type UserFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the User
|
|
*/
|
|
select?: UserSelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: UserInclude<ExtArgs> | null
|
|
/**
|
|
* Filter, which User to fetch.
|
|
*/
|
|
where: UserWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* User findUniqueOrThrow
|
|
*/
|
|
export type UserFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the User
|
|
*/
|
|
select?: UserSelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: UserInclude<ExtArgs> | null
|
|
/**
|
|
* Filter, which User to fetch.
|
|
*/
|
|
where: UserWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* User findFirst
|
|
*/
|
|
export type UserFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the User
|
|
*/
|
|
select?: UserSelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: UserInclude<ExtArgs> | null
|
|
/**
|
|
* Filter, which User to fetch.
|
|
*/
|
|
where?: UserWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of Users to fetch.
|
|
*/
|
|
orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[]
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for searching for Users.
|
|
*/
|
|
cursor?: UserWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Users 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` Users.
|
|
*/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
|
*
|
|
* Filter by unique combinations of Users.
|
|
*/
|
|
distinct?: UserScalarFieldEnum | UserScalarFieldEnum[]
|
|
}
|
|
|
|
/**
|
|
* User findFirstOrThrow
|
|
*/
|
|
export type UserFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the User
|
|
*/
|
|
select?: UserSelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: UserInclude<ExtArgs> | null
|
|
/**
|
|
* Filter, which User to fetch.
|
|
*/
|
|
where?: UserWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of Users to fetch.
|
|
*/
|
|
orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[]
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for searching for Users.
|
|
*/
|
|
cursor?: UserWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Users 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` Users.
|
|
*/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
|
*
|
|
* Filter by unique combinations of Users.
|
|
*/
|
|
distinct?: UserScalarFieldEnum | UserScalarFieldEnum[]
|
|
}
|
|
|
|
/**
|
|
* User findMany
|
|
*/
|
|
export type UserFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the User
|
|
*/
|
|
select?: UserSelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: UserInclude<ExtArgs> | null
|
|
/**
|
|
* Filter, which Users to fetch.
|
|
*/
|
|
where?: UserWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of Users to fetch.
|
|
*/
|
|
orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[]
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for listing Users.
|
|
*/
|
|
cursor?: UserWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Users 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` Users.
|
|
*/
|
|
skip?: number
|
|
distinct?: UserScalarFieldEnum | UserScalarFieldEnum[]
|
|
}
|
|
|
|
/**
|
|
* User create
|
|
*/
|
|
export type UserCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the User
|
|
*/
|
|
select?: UserSelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: UserInclude<ExtArgs> | null
|
|
/**
|
|
* The data needed to create a User.
|
|
*/
|
|
data: XOR<UserCreateInput, UserUncheckedCreateInput>
|
|
}
|
|
|
|
/**
|
|
* User createMany
|
|
*/
|
|
export type UserCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* The data used to create many Users.
|
|
*/
|
|
data: UserCreateManyInput | UserCreateManyInput[]
|
|
skipDuplicates?: boolean
|
|
}
|
|
|
|
/**
|
|
* User createManyAndReturn
|
|
*/
|
|
export type UserCreateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the User
|
|
*/
|
|
select?: UserSelectCreateManyAndReturn<ExtArgs> | null
|
|
/**
|
|
* The data used to create many Users.
|
|
*/
|
|
data: UserCreateManyInput | UserCreateManyInput[]
|
|
skipDuplicates?: boolean
|
|
}
|
|
|
|
/**
|
|
* User update
|
|
*/
|
|
export type UserUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the User
|
|
*/
|
|
select?: UserSelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: UserInclude<ExtArgs> | null
|
|
/**
|
|
* The data needed to update a User.
|
|
*/
|
|
data: XOR<UserUpdateInput, UserUncheckedUpdateInput>
|
|
/**
|
|
* Choose, which User to update.
|
|
*/
|
|
where: UserWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* User updateMany
|
|
*/
|
|
export type UserUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* The data used to update Users.
|
|
*/
|
|
data: XOR<UserUpdateManyMutationInput, UserUncheckedUpdateManyInput>
|
|
/**
|
|
* Filter which Users to update
|
|
*/
|
|
where?: UserWhereInput
|
|
}
|
|
|
|
/**
|
|
* User upsert
|
|
*/
|
|
export type UserUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the User
|
|
*/
|
|
select?: UserSelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: UserInclude<ExtArgs> | null
|
|
/**
|
|
* The filter to search for the User to update in case it exists.
|
|
*/
|
|
where: UserWhereUniqueInput
|
|
/**
|
|
* In case the User found by the `where` argument doesn't exist, create a new User with this data.
|
|
*/
|
|
create: XOR<UserCreateInput, UserUncheckedCreateInput>
|
|
/**
|
|
* In case the User was found with the provided `where` argument, update it with this data.
|
|
*/
|
|
update: XOR<UserUpdateInput, UserUncheckedUpdateInput>
|
|
}
|
|
|
|
/**
|
|
* User delete
|
|
*/
|
|
export type UserDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the User
|
|
*/
|
|
select?: UserSelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: UserInclude<ExtArgs> | null
|
|
/**
|
|
* Filter which User to delete.
|
|
*/
|
|
where: UserWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* User deleteMany
|
|
*/
|
|
export type UserDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Filter which Users to delete
|
|
*/
|
|
where?: UserWhereInput
|
|
}
|
|
|
|
/**
|
|
* User.sessions
|
|
*/
|
|
export type User$sessionsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the GameSession
|
|
*/
|
|
select?: GameSessionSelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: GameSessionInclude<ExtArgs> | null
|
|
where?: GameSessionWhereInput
|
|
orderBy?: GameSessionOrderByWithRelationInput | GameSessionOrderByWithRelationInput[]
|
|
cursor?: GameSessionWhereUniqueInput
|
|
take?: number
|
|
skip?: number
|
|
distinct?: GameSessionScalarFieldEnum | GameSessionScalarFieldEnum[]
|
|
}
|
|
|
|
/**
|
|
* User.leaderboardEntries
|
|
*/
|
|
export type User$leaderboardEntriesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the LeaderboardEntry
|
|
*/
|
|
select?: LeaderboardEntrySelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: LeaderboardEntryInclude<ExtArgs> | null
|
|
where?: LeaderboardEntryWhereInput
|
|
orderBy?: LeaderboardEntryOrderByWithRelationInput | LeaderboardEntryOrderByWithRelationInput[]
|
|
cursor?: LeaderboardEntryWhereUniqueInput
|
|
take?: number
|
|
skip?: number
|
|
distinct?: LeaderboardEntryScalarFieldEnum | LeaderboardEntryScalarFieldEnum[]
|
|
}
|
|
|
|
/**
|
|
* User without action
|
|
*/
|
|
export type UserDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the User
|
|
*/
|
|
select?: UserSelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: UserInclude<ExtArgs> | null
|
|
}
|
|
|
|
|
|
/**
|
|
* Model Question
|
|
*/
|
|
|
|
export type AggregateQuestion = {
|
|
_count: QuestionCountAggregateOutputType | null
|
|
_min: QuestionMinAggregateOutputType | null
|
|
_max: QuestionMaxAggregateOutputType | null
|
|
}
|
|
|
|
export type QuestionMinAggregateOutputType = {
|
|
id: string | null
|
|
grade: $Enums.Grade | null
|
|
subject: $Enums.Subject | null
|
|
strand: string | null
|
|
difficulty: $Enums.Difficulty | null
|
|
questionText: string | null
|
|
correctAnswer: string | null
|
|
explanation: string | null
|
|
createdAt: Date | null
|
|
}
|
|
|
|
export type QuestionMaxAggregateOutputType = {
|
|
id: string | null
|
|
grade: $Enums.Grade | null
|
|
subject: $Enums.Subject | null
|
|
strand: string | null
|
|
difficulty: $Enums.Difficulty | null
|
|
questionText: string | null
|
|
correctAnswer: string | null
|
|
explanation: string | null
|
|
createdAt: Date | null
|
|
}
|
|
|
|
export type QuestionCountAggregateOutputType = {
|
|
id: number
|
|
grade: number
|
|
subject: number
|
|
strand: number
|
|
difficulty: number
|
|
questionText: number
|
|
options: number
|
|
correctAnswer: number
|
|
explanation: number
|
|
createdAt: number
|
|
_all: number
|
|
}
|
|
|
|
|
|
export type QuestionMinAggregateInputType = {
|
|
id?: true
|
|
grade?: true
|
|
subject?: true
|
|
strand?: true
|
|
difficulty?: true
|
|
questionText?: true
|
|
correctAnswer?: true
|
|
explanation?: true
|
|
createdAt?: true
|
|
}
|
|
|
|
export type QuestionMaxAggregateInputType = {
|
|
id?: true
|
|
grade?: true
|
|
subject?: true
|
|
strand?: true
|
|
difficulty?: true
|
|
questionText?: true
|
|
correctAnswer?: true
|
|
explanation?: true
|
|
createdAt?: true
|
|
}
|
|
|
|
export type QuestionCountAggregateInputType = {
|
|
id?: true
|
|
grade?: true
|
|
subject?: true
|
|
strand?: true
|
|
difficulty?: true
|
|
questionText?: true
|
|
options?: true
|
|
correctAnswer?: true
|
|
explanation?: true
|
|
createdAt?: true
|
|
_all?: true
|
|
}
|
|
|
|
export type QuestionAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Filter which Question to aggregate.
|
|
*/
|
|
where?: QuestionWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of Questions to fetch.
|
|
*/
|
|
orderBy?: QuestionOrderByWithRelationInput | QuestionOrderByWithRelationInput[]
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the start position
|
|
*/
|
|
cursor?: QuestionWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Questions 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` Questions.
|
|
*/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Count returned Questions
|
|
**/
|
|
_count?: true | QuestionCountAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to find the minimum value
|
|
**/
|
|
_min?: QuestionMinAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to find the maximum value
|
|
**/
|
|
_max?: QuestionMaxAggregateInputType
|
|
}
|
|
|
|
export type GetQuestionAggregateType<T extends QuestionAggregateArgs> = {
|
|
[P in keyof T & keyof AggregateQuestion]: P extends '_count' | 'count'
|
|
? T[P] extends true
|
|
? number
|
|
: GetScalarType<T[P], AggregateQuestion[P]>
|
|
: GetScalarType<T[P], AggregateQuestion[P]>
|
|
}
|
|
|
|
|
|
|
|
|
|
export type QuestionGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
where?: QuestionWhereInput
|
|
orderBy?: QuestionOrderByWithAggregationInput | QuestionOrderByWithAggregationInput[]
|
|
by: QuestionScalarFieldEnum[] | QuestionScalarFieldEnum
|
|
having?: QuestionScalarWhereWithAggregatesInput
|
|
take?: number
|
|
skip?: number
|
|
_count?: QuestionCountAggregateInputType | true
|
|
_min?: QuestionMinAggregateInputType
|
|
_max?: QuestionMaxAggregateInputType
|
|
}
|
|
|
|
export type QuestionGroupByOutputType = {
|
|
id: string
|
|
grade: $Enums.Grade
|
|
subject: $Enums.Subject
|
|
strand: string
|
|
difficulty: $Enums.Difficulty
|
|
questionText: string
|
|
options: JsonValue
|
|
correctAnswer: string
|
|
explanation: string | null
|
|
createdAt: Date
|
|
_count: QuestionCountAggregateOutputType | null
|
|
_min: QuestionMinAggregateOutputType | null
|
|
_max: QuestionMaxAggregateOutputType | null
|
|
}
|
|
|
|
type GetQuestionGroupByPayload<T extends QuestionGroupByArgs> = Prisma.PrismaPromise<
|
|
Array<
|
|
PickEnumerable<QuestionGroupByOutputType, T['by']> &
|
|
{
|
|
[P in ((keyof T) & (keyof QuestionGroupByOutputType))]: P extends '_count'
|
|
? T[P] extends boolean
|
|
? number
|
|
: GetScalarType<T[P], QuestionGroupByOutputType[P]>
|
|
: GetScalarType<T[P], QuestionGroupByOutputType[P]>
|
|
}
|
|
>
|
|
>
|
|
|
|
|
|
export type QuestionSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
|
|
id?: boolean
|
|
grade?: boolean
|
|
subject?: boolean
|
|
strand?: boolean
|
|
difficulty?: boolean
|
|
questionText?: boolean
|
|
options?: boolean
|
|
correctAnswer?: boolean
|
|
explanation?: boolean
|
|
createdAt?: boolean
|
|
answers?: boolean | Question$answersArgs<ExtArgs>
|
|
_count?: boolean | QuestionCountOutputTypeDefaultArgs<ExtArgs>
|
|
}, ExtArgs["result"]["question"]>
|
|
|
|
export type QuestionSelectCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
|
|
id?: boolean
|
|
grade?: boolean
|
|
subject?: boolean
|
|
strand?: boolean
|
|
difficulty?: boolean
|
|
questionText?: boolean
|
|
options?: boolean
|
|
correctAnswer?: boolean
|
|
explanation?: boolean
|
|
createdAt?: boolean
|
|
}, ExtArgs["result"]["question"]>
|
|
|
|
export type QuestionSelectScalar = {
|
|
id?: boolean
|
|
grade?: boolean
|
|
subject?: boolean
|
|
strand?: boolean
|
|
difficulty?: boolean
|
|
questionText?: boolean
|
|
options?: boolean
|
|
correctAnswer?: boolean
|
|
explanation?: boolean
|
|
createdAt?: boolean
|
|
}
|
|
|
|
export type QuestionInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
answers?: boolean | Question$answersArgs<ExtArgs>
|
|
_count?: boolean | QuestionCountOutputTypeDefaultArgs<ExtArgs>
|
|
}
|
|
export type QuestionIncludeCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {}
|
|
|
|
export type $QuestionPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
name: "Question"
|
|
objects: {
|
|
answers: Prisma.$UserAnswerPayload<ExtArgs>[]
|
|
}
|
|
scalars: $Extensions.GetPayloadResult<{
|
|
id: string
|
|
grade: $Enums.Grade
|
|
subject: $Enums.Subject
|
|
strand: string
|
|
difficulty: $Enums.Difficulty
|
|
questionText: string
|
|
options: Prisma.JsonValue
|
|
correctAnswer: string
|
|
explanation: string | null
|
|
createdAt: Date
|
|
}, ExtArgs["result"]["question"]>
|
|
composites: {}
|
|
}
|
|
|
|
type QuestionGetPayload<S extends boolean | null | undefined | QuestionDefaultArgs> = $Result.GetResult<Prisma.$QuestionPayload, S>
|
|
|
|
type QuestionCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
|
|
Omit<QuestionFindManyArgs, 'select' | 'include' | 'distinct'> & {
|
|
select?: QuestionCountAggregateInputType | true
|
|
}
|
|
|
|
export interface QuestionDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> {
|
|
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['Question'], meta: { name: 'Question' } }
|
|
/**
|
|
* Find zero or one Question that matches the filter.
|
|
* @param {QuestionFindUniqueArgs} args - Arguments to find a Question
|
|
* @example
|
|
* // Get one Question
|
|
* const question = await prisma.question.findUnique({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*/
|
|
findUnique<T extends QuestionFindUniqueArgs>(args: SelectSubset<T, QuestionFindUniqueArgs<ExtArgs>>): Prisma__QuestionClient<$Result.GetResult<Prisma.$QuestionPayload<ExtArgs>, T, "findUnique"> | null, null, ExtArgs>
|
|
|
|
/**
|
|
* Find one Question that matches the filter or throw an error with `error.code='P2025'`
|
|
* if no matches were found.
|
|
* @param {QuestionFindUniqueOrThrowArgs} args - Arguments to find a Question
|
|
* @example
|
|
* // Get one Question
|
|
* const question = await prisma.question.findUniqueOrThrow({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*/
|
|
findUniqueOrThrow<T extends QuestionFindUniqueOrThrowArgs>(args: SelectSubset<T, QuestionFindUniqueOrThrowArgs<ExtArgs>>): Prisma__QuestionClient<$Result.GetResult<Prisma.$QuestionPayload<ExtArgs>, T, "findUniqueOrThrow">, never, ExtArgs>
|
|
|
|
/**
|
|
* Find the first Question 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 {QuestionFindFirstArgs} args - Arguments to find a Question
|
|
* @example
|
|
* // Get one Question
|
|
* const question = await prisma.question.findFirst({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*/
|
|
findFirst<T extends QuestionFindFirstArgs>(args?: SelectSubset<T, QuestionFindFirstArgs<ExtArgs>>): Prisma__QuestionClient<$Result.GetResult<Prisma.$QuestionPayload<ExtArgs>, T, "findFirst"> | null, null, ExtArgs>
|
|
|
|
/**
|
|
* Find the first Question 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 {QuestionFindFirstOrThrowArgs} args - Arguments to find a Question
|
|
* @example
|
|
* // Get one Question
|
|
* const question = await prisma.question.findFirstOrThrow({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*/
|
|
findFirstOrThrow<T extends QuestionFindFirstOrThrowArgs>(args?: SelectSubset<T, QuestionFindFirstOrThrowArgs<ExtArgs>>): Prisma__QuestionClient<$Result.GetResult<Prisma.$QuestionPayload<ExtArgs>, T, "findFirstOrThrow">, never, ExtArgs>
|
|
|
|
/**
|
|
* Find zero or more Questions 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 {QuestionFindManyArgs} args - Arguments to filter and select certain fields only.
|
|
* @example
|
|
* // Get all Questions
|
|
* const questions = await prisma.question.findMany()
|
|
*
|
|
* // Get first 10 Questions
|
|
* const questions = await prisma.question.findMany({ take: 10 })
|
|
*
|
|
* // Only select the `id`
|
|
* const questionWithIdOnly = await prisma.question.findMany({ select: { id: true } })
|
|
*
|
|
*/
|
|
findMany<T extends QuestionFindManyArgs>(args?: SelectSubset<T, QuestionFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$QuestionPayload<ExtArgs>, T, "findMany">>
|
|
|
|
/**
|
|
* Create a Question.
|
|
* @param {QuestionCreateArgs} args - Arguments to create a Question.
|
|
* @example
|
|
* // Create one Question
|
|
* const Question = await prisma.question.create({
|
|
* data: {
|
|
* // ... data to create a Question
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
create<T extends QuestionCreateArgs>(args: SelectSubset<T, QuestionCreateArgs<ExtArgs>>): Prisma__QuestionClient<$Result.GetResult<Prisma.$QuestionPayload<ExtArgs>, T, "create">, never, ExtArgs>
|
|
|
|
/**
|
|
* Create many Questions.
|
|
* @param {QuestionCreateManyArgs} args - Arguments to create many Questions.
|
|
* @example
|
|
* // Create many Questions
|
|
* const question = await prisma.question.createMany({
|
|
* data: [
|
|
* // ... provide data here
|
|
* ]
|
|
* })
|
|
*
|
|
*/
|
|
createMany<T extends QuestionCreateManyArgs>(args?: SelectSubset<T, QuestionCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
|
|
|
|
/**
|
|
* Create many Questions and returns the data saved in the database.
|
|
* @param {QuestionCreateManyAndReturnArgs} args - Arguments to create many Questions.
|
|
* @example
|
|
* // Create many Questions
|
|
* const question = await prisma.question.createManyAndReturn({
|
|
* data: [
|
|
* // ... provide data here
|
|
* ]
|
|
* })
|
|
*
|
|
* // Create many Questions and only return the `id`
|
|
* const questionWithIdOnly = await prisma.question.createManyAndReturn({
|
|
* select: { id: true },
|
|
* data: [
|
|
* // ... provide data here
|
|
* ]
|
|
* })
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
*
|
|
*/
|
|
createManyAndReturn<T extends QuestionCreateManyAndReturnArgs>(args?: SelectSubset<T, QuestionCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$QuestionPayload<ExtArgs>, T, "createManyAndReturn">>
|
|
|
|
/**
|
|
* Delete a Question.
|
|
* @param {QuestionDeleteArgs} args - Arguments to delete one Question.
|
|
* @example
|
|
* // Delete one Question
|
|
* const Question = await prisma.question.delete({
|
|
* where: {
|
|
* // ... filter to delete one Question
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
delete<T extends QuestionDeleteArgs>(args: SelectSubset<T, QuestionDeleteArgs<ExtArgs>>): Prisma__QuestionClient<$Result.GetResult<Prisma.$QuestionPayload<ExtArgs>, T, "delete">, never, ExtArgs>
|
|
|
|
/**
|
|
* Update one Question.
|
|
* @param {QuestionUpdateArgs} args - Arguments to update one Question.
|
|
* @example
|
|
* // Update one Question
|
|
* const question = await prisma.question.update({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* },
|
|
* data: {
|
|
* // ... provide data here
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
update<T extends QuestionUpdateArgs>(args: SelectSubset<T, QuestionUpdateArgs<ExtArgs>>): Prisma__QuestionClient<$Result.GetResult<Prisma.$QuestionPayload<ExtArgs>, T, "update">, never, ExtArgs>
|
|
|
|
/**
|
|
* Delete zero or more Questions.
|
|
* @param {QuestionDeleteManyArgs} args - Arguments to filter Questions to delete.
|
|
* @example
|
|
* // Delete a few Questions
|
|
* const { count } = await prisma.question.deleteMany({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
deleteMany<T extends QuestionDeleteManyArgs>(args?: SelectSubset<T, QuestionDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
|
|
|
|
/**
|
|
* Update zero or more Questions.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {QuestionUpdateManyArgs} args - Arguments to update one or more rows.
|
|
* @example
|
|
* // Update many Questions
|
|
* const question = await prisma.question.updateMany({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* },
|
|
* data: {
|
|
* // ... provide data here
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
updateMany<T extends QuestionUpdateManyArgs>(args: SelectSubset<T, QuestionUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
|
|
|
|
/**
|
|
* Create or update one Question.
|
|
* @param {QuestionUpsertArgs} args - Arguments to update or create a Question.
|
|
* @example
|
|
* // Update or create a Question
|
|
* const question = await prisma.question.upsert({
|
|
* create: {
|
|
* // ... data to create a Question
|
|
* },
|
|
* update: {
|
|
* // ... in case it already exists, update
|
|
* },
|
|
* where: {
|
|
* // ... the filter for the Question we want to update
|
|
* }
|
|
* })
|
|
*/
|
|
upsert<T extends QuestionUpsertArgs>(args: SelectSubset<T, QuestionUpsertArgs<ExtArgs>>): Prisma__QuestionClient<$Result.GetResult<Prisma.$QuestionPayload<ExtArgs>, T, "upsert">, never, ExtArgs>
|
|
|
|
|
|
/**
|
|
* Count the number of Questions.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {QuestionCountArgs} args - Arguments to filter Questions to count.
|
|
* @example
|
|
* // Count the number of Questions
|
|
* const count = await prisma.question.count({
|
|
* where: {
|
|
* // ... the filter for the Questions we want to count
|
|
* }
|
|
* })
|
|
**/
|
|
count<T extends QuestionCountArgs>(
|
|
args?: Subset<T, QuestionCountArgs>,
|
|
): Prisma.PrismaPromise<
|
|
T extends $Utils.Record<'select', any>
|
|
? T['select'] extends true
|
|
? number
|
|
: GetScalarType<T['select'], QuestionCountAggregateOutputType>
|
|
: number
|
|
>
|
|
|
|
/**
|
|
* Allows you to perform aggregations operations on a Question.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {QuestionAggregateArgs} 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 QuestionAggregateArgs>(args: Subset<T, QuestionAggregateArgs>): Prisma.PrismaPromise<GetQuestionAggregateType<T>>
|
|
|
|
/**
|
|
* Group by Question.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {QuestionGroupByArgs} 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 QuestionGroupByArgs,
|
|
HasSelectOrTake extends Or<
|
|
Extends<'skip', Keys<T>>,
|
|
Extends<'take', Keys<T>>
|
|
>,
|
|
OrderByArg extends True extends HasSelectOrTake
|
|
? { orderBy: QuestionGroupByArgs['orderBy'] }
|
|
: { orderBy?: QuestionGroupByArgs['orderBy'] },
|
|
OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
|
|
ByFields extends MaybeTupleToUnion<T['by']>,
|
|
ByValid extends Has<ByFields, OrderFields>,
|
|
HavingFields extends GetHavingFields<T['having']>,
|
|
HavingValid extends Has<ByFields, HavingFields>,
|
|
ByEmpty extends T['by'] extends never[] ? True : False,
|
|
InputErrors extends ByEmpty extends True
|
|
? `Error: "by" must not be empty.`
|
|
: HavingValid extends 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 Keys<T>
|
|
? 'orderBy' extends Keys<T>
|
|
? ByValid extends 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 Keys<T>
|
|
? 'orderBy' extends Keys<T>
|
|
? ByValid extends 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 True
|
|
? {}
|
|
: {
|
|
[P in OrderFields]: P extends ByFields
|
|
? never
|
|
: `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
|
|
}[OrderFields]
|
|
>(args: SubsetIntersection<T, QuestionGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetQuestionGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
|
|
/**
|
|
* Fields of the Question model
|
|
*/
|
|
readonly fields: QuestionFieldRefs;
|
|
}
|
|
|
|
/**
|
|
* The delegate class that acts as a "Promise-like" for Question.
|
|
* 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__QuestionClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> extends Prisma.PrismaPromise<T> {
|
|
readonly [Symbol.toStringTag]: "PrismaPromise"
|
|
answers<T extends Question$answersArgs<ExtArgs> = {}>(args?: Subset<T, Question$answersArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$UserAnswerPayload<ExtArgs>, T, "findMany"> | 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): $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): $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): $Utils.JsPromise<T>
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Fields of the Question model
|
|
*/
|
|
interface QuestionFieldRefs {
|
|
readonly id: FieldRef<"Question", 'String'>
|
|
readonly grade: FieldRef<"Question", 'Grade'>
|
|
readonly subject: FieldRef<"Question", 'Subject'>
|
|
readonly strand: FieldRef<"Question", 'String'>
|
|
readonly difficulty: FieldRef<"Question", 'Difficulty'>
|
|
readonly questionText: FieldRef<"Question", 'String'>
|
|
readonly options: FieldRef<"Question", 'Json'>
|
|
readonly correctAnswer: FieldRef<"Question", 'String'>
|
|
readonly explanation: FieldRef<"Question", 'String'>
|
|
readonly createdAt: FieldRef<"Question", 'DateTime'>
|
|
}
|
|
|
|
|
|
// Custom InputTypes
|
|
/**
|
|
* Question findUnique
|
|
*/
|
|
export type QuestionFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Question
|
|
*/
|
|
select?: QuestionSelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: QuestionInclude<ExtArgs> | null
|
|
/**
|
|
* Filter, which Question to fetch.
|
|
*/
|
|
where: QuestionWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* Question findUniqueOrThrow
|
|
*/
|
|
export type QuestionFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Question
|
|
*/
|
|
select?: QuestionSelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: QuestionInclude<ExtArgs> | null
|
|
/**
|
|
* Filter, which Question to fetch.
|
|
*/
|
|
where: QuestionWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* Question findFirst
|
|
*/
|
|
export type QuestionFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Question
|
|
*/
|
|
select?: QuestionSelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: QuestionInclude<ExtArgs> | null
|
|
/**
|
|
* Filter, which Question to fetch.
|
|
*/
|
|
where?: QuestionWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of Questions to fetch.
|
|
*/
|
|
orderBy?: QuestionOrderByWithRelationInput | QuestionOrderByWithRelationInput[]
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for searching for Questions.
|
|
*/
|
|
cursor?: QuestionWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Questions 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` Questions.
|
|
*/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
|
*
|
|
* Filter by unique combinations of Questions.
|
|
*/
|
|
distinct?: QuestionScalarFieldEnum | QuestionScalarFieldEnum[]
|
|
}
|
|
|
|
/**
|
|
* Question findFirstOrThrow
|
|
*/
|
|
export type QuestionFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Question
|
|
*/
|
|
select?: QuestionSelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: QuestionInclude<ExtArgs> | null
|
|
/**
|
|
* Filter, which Question to fetch.
|
|
*/
|
|
where?: QuestionWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of Questions to fetch.
|
|
*/
|
|
orderBy?: QuestionOrderByWithRelationInput | QuestionOrderByWithRelationInput[]
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for searching for Questions.
|
|
*/
|
|
cursor?: QuestionWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Questions 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` Questions.
|
|
*/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
|
*
|
|
* Filter by unique combinations of Questions.
|
|
*/
|
|
distinct?: QuestionScalarFieldEnum | QuestionScalarFieldEnum[]
|
|
}
|
|
|
|
/**
|
|
* Question findMany
|
|
*/
|
|
export type QuestionFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Question
|
|
*/
|
|
select?: QuestionSelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: QuestionInclude<ExtArgs> | null
|
|
/**
|
|
* Filter, which Questions to fetch.
|
|
*/
|
|
where?: QuestionWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of Questions to fetch.
|
|
*/
|
|
orderBy?: QuestionOrderByWithRelationInput | QuestionOrderByWithRelationInput[]
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for listing Questions.
|
|
*/
|
|
cursor?: QuestionWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Questions 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` Questions.
|
|
*/
|
|
skip?: number
|
|
distinct?: QuestionScalarFieldEnum | QuestionScalarFieldEnum[]
|
|
}
|
|
|
|
/**
|
|
* Question create
|
|
*/
|
|
export type QuestionCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Question
|
|
*/
|
|
select?: QuestionSelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: QuestionInclude<ExtArgs> | null
|
|
/**
|
|
* The data needed to create a Question.
|
|
*/
|
|
data: XOR<QuestionCreateInput, QuestionUncheckedCreateInput>
|
|
}
|
|
|
|
/**
|
|
* Question createMany
|
|
*/
|
|
export type QuestionCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* The data used to create many Questions.
|
|
*/
|
|
data: QuestionCreateManyInput | QuestionCreateManyInput[]
|
|
skipDuplicates?: boolean
|
|
}
|
|
|
|
/**
|
|
* Question createManyAndReturn
|
|
*/
|
|
export type QuestionCreateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Question
|
|
*/
|
|
select?: QuestionSelectCreateManyAndReturn<ExtArgs> | null
|
|
/**
|
|
* The data used to create many Questions.
|
|
*/
|
|
data: QuestionCreateManyInput | QuestionCreateManyInput[]
|
|
skipDuplicates?: boolean
|
|
}
|
|
|
|
/**
|
|
* Question update
|
|
*/
|
|
export type QuestionUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Question
|
|
*/
|
|
select?: QuestionSelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: QuestionInclude<ExtArgs> | null
|
|
/**
|
|
* The data needed to update a Question.
|
|
*/
|
|
data: XOR<QuestionUpdateInput, QuestionUncheckedUpdateInput>
|
|
/**
|
|
* Choose, which Question to update.
|
|
*/
|
|
where: QuestionWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* Question updateMany
|
|
*/
|
|
export type QuestionUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* The data used to update Questions.
|
|
*/
|
|
data: XOR<QuestionUpdateManyMutationInput, QuestionUncheckedUpdateManyInput>
|
|
/**
|
|
* Filter which Questions to update
|
|
*/
|
|
where?: QuestionWhereInput
|
|
}
|
|
|
|
/**
|
|
* Question upsert
|
|
*/
|
|
export type QuestionUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Question
|
|
*/
|
|
select?: QuestionSelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: QuestionInclude<ExtArgs> | null
|
|
/**
|
|
* The filter to search for the Question to update in case it exists.
|
|
*/
|
|
where: QuestionWhereUniqueInput
|
|
/**
|
|
* In case the Question found by the `where` argument doesn't exist, create a new Question with this data.
|
|
*/
|
|
create: XOR<QuestionCreateInput, QuestionUncheckedCreateInput>
|
|
/**
|
|
* In case the Question was found with the provided `where` argument, update it with this data.
|
|
*/
|
|
update: XOR<QuestionUpdateInput, QuestionUncheckedUpdateInput>
|
|
}
|
|
|
|
/**
|
|
* Question delete
|
|
*/
|
|
export type QuestionDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Question
|
|
*/
|
|
select?: QuestionSelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: QuestionInclude<ExtArgs> | null
|
|
/**
|
|
* Filter which Question to delete.
|
|
*/
|
|
where: QuestionWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* Question deleteMany
|
|
*/
|
|
export type QuestionDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Filter which Questions to delete
|
|
*/
|
|
where?: QuestionWhereInput
|
|
}
|
|
|
|
/**
|
|
* Question.answers
|
|
*/
|
|
export type Question$answersArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the UserAnswer
|
|
*/
|
|
select?: UserAnswerSelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: UserAnswerInclude<ExtArgs> | null
|
|
where?: UserAnswerWhereInput
|
|
orderBy?: UserAnswerOrderByWithRelationInput | UserAnswerOrderByWithRelationInput[]
|
|
cursor?: UserAnswerWhereUniqueInput
|
|
take?: number
|
|
skip?: number
|
|
distinct?: UserAnswerScalarFieldEnum | UserAnswerScalarFieldEnum[]
|
|
}
|
|
|
|
/**
|
|
* Question without action
|
|
*/
|
|
export type QuestionDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Question
|
|
*/
|
|
select?: QuestionSelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: QuestionInclude<ExtArgs> | null
|
|
}
|
|
|
|
|
|
/**
|
|
* Model GameSession
|
|
*/
|
|
|
|
export type AggregateGameSession = {
|
|
_count: GameSessionCountAggregateOutputType | null
|
|
_avg: GameSessionAvgAggregateOutputType | null
|
|
_sum: GameSessionSumAggregateOutputType | null
|
|
_min: GameSessionMinAggregateOutputType | null
|
|
_max: GameSessionMaxAggregateOutputType | null
|
|
}
|
|
|
|
export type GameSessionAvgAggregateOutputType = {
|
|
score: number | null
|
|
totalQuestions: number | null
|
|
correctAnswers: number | null
|
|
}
|
|
|
|
export type GameSessionSumAggregateOutputType = {
|
|
score: number | null
|
|
totalQuestions: number | null
|
|
correctAnswers: number | null
|
|
}
|
|
|
|
export type GameSessionMinAggregateOutputType = {
|
|
id: string | null
|
|
userId: string | null
|
|
grade: $Enums.Grade | null
|
|
subject: $Enums.Subject | null
|
|
status: $Enums.SessionStatus | null
|
|
score: number | null
|
|
totalQuestions: number | null
|
|
correctAnswers: number | null
|
|
startedAt: Date | null
|
|
completedAt: Date | null
|
|
}
|
|
|
|
export type GameSessionMaxAggregateOutputType = {
|
|
id: string | null
|
|
userId: string | null
|
|
grade: $Enums.Grade | null
|
|
subject: $Enums.Subject | null
|
|
status: $Enums.SessionStatus | null
|
|
score: number | null
|
|
totalQuestions: number | null
|
|
correctAnswers: number | null
|
|
startedAt: Date | null
|
|
completedAt: Date | null
|
|
}
|
|
|
|
export type GameSessionCountAggregateOutputType = {
|
|
id: number
|
|
userId: number
|
|
grade: number
|
|
subject: number
|
|
status: number
|
|
score: number
|
|
totalQuestions: number
|
|
correctAnswers: number
|
|
startedAt: number
|
|
completedAt: number
|
|
_all: number
|
|
}
|
|
|
|
|
|
export type GameSessionAvgAggregateInputType = {
|
|
score?: true
|
|
totalQuestions?: true
|
|
correctAnswers?: true
|
|
}
|
|
|
|
export type GameSessionSumAggregateInputType = {
|
|
score?: true
|
|
totalQuestions?: true
|
|
correctAnswers?: true
|
|
}
|
|
|
|
export type GameSessionMinAggregateInputType = {
|
|
id?: true
|
|
userId?: true
|
|
grade?: true
|
|
subject?: true
|
|
status?: true
|
|
score?: true
|
|
totalQuestions?: true
|
|
correctAnswers?: true
|
|
startedAt?: true
|
|
completedAt?: true
|
|
}
|
|
|
|
export type GameSessionMaxAggregateInputType = {
|
|
id?: true
|
|
userId?: true
|
|
grade?: true
|
|
subject?: true
|
|
status?: true
|
|
score?: true
|
|
totalQuestions?: true
|
|
correctAnswers?: true
|
|
startedAt?: true
|
|
completedAt?: true
|
|
}
|
|
|
|
export type GameSessionCountAggregateInputType = {
|
|
id?: true
|
|
userId?: true
|
|
grade?: true
|
|
subject?: true
|
|
status?: true
|
|
score?: true
|
|
totalQuestions?: true
|
|
correctAnswers?: true
|
|
startedAt?: true
|
|
completedAt?: true
|
|
_all?: true
|
|
}
|
|
|
|
export type GameSessionAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Filter which GameSession to aggregate.
|
|
*/
|
|
where?: GameSessionWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of GameSessions to fetch.
|
|
*/
|
|
orderBy?: GameSessionOrderByWithRelationInput | GameSessionOrderByWithRelationInput[]
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the start position
|
|
*/
|
|
cursor?: GameSessionWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` GameSessions 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` GameSessions.
|
|
*/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Count returned GameSessions
|
|
**/
|
|
_count?: true | GameSessionCountAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to average
|
|
**/
|
|
_avg?: GameSessionAvgAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to sum
|
|
**/
|
|
_sum?: GameSessionSumAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to find the minimum value
|
|
**/
|
|
_min?: GameSessionMinAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to find the maximum value
|
|
**/
|
|
_max?: GameSessionMaxAggregateInputType
|
|
}
|
|
|
|
export type GetGameSessionAggregateType<T extends GameSessionAggregateArgs> = {
|
|
[P in keyof T & keyof AggregateGameSession]: P extends '_count' | 'count'
|
|
? T[P] extends true
|
|
? number
|
|
: GetScalarType<T[P], AggregateGameSession[P]>
|
|
: GetScalarType<T[P], AggregateGameSession[P]>
|
|
}
|
|
|
|
|
|
|
|
|
|
export type GameSessionGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
where?: GameSessionWhereInput
|
|
orderBy?: GameSessionOrderByWithAggregationInput | GameSessionOrderByWithAggregationInput[]
|
|
by: GameSessionScalarFieldEnum[] | GameSessionScalarFieldEnum
|
|
having?: GameSessionScalarWhereWithAggregatesInput
|
|
take?: number
|
|
skip?: number
|
|
_count?: GameSessionCountAggregateInputType | true
|
|
_avg?: GameSessionAvgAggregateInputType
|
|
_sum?: GameSessionSumAggregateInputType
|
|
_min?: GameSessionMinAggregateInputType
|
|
_max?: GameSessionMaxAggregateInputType
|
|
}
|
|
|
|
export type GameSessionGroupByOutputType = {
|
|
id: string
|
|
userId: string
|
|
grade: $Enums.Grade
|
|
subject: $Enums.Subject
|
|
status: $Enums.SessionStatus
|
|
score: number
|
|
totalQuestions: number
|
|
correctAnswers: number
|
|
startedAt: Date
|
|
completedAt: Date | null
|
|
_count: GameSessionCountAggregateOutputType | null
|
|
_avg: GameSessionAvgAggregateOutputType | null
|
|
_sum: GameSessionSumAggregateOutputType | null
|
|
_min: GameSessionMinAggregateOutputType | null
|
|
_max: GameSessionMaxAggregateOutputType | null
|
|
}
|
|
|
|
type GetGameSessionGroupByPayload<T extends GameSessionGroupByArgs> = Prisma.PrismaPromise<
|
|
Array<
|
|
PickEnumerable<GameSessionGroupByOutputType, T['by']> &
|
|
{
|
|
[P in ((keyof T) & (keyof GameSessionGroupByOutputType))]: P extends '_count'
|
|
? T[P] extends boolean
|
|
? number
|
|
: GetScalarType<T[P], GameSessionGroupByOutputType[P]>
|
|
: GetScalarType<T[P], GameSessionGroupByOutputType[P]>
|
|
}
|
|
>
|
|
>
|
|
|
|
|
|
export type GameSessionSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
|
|
id?: boolean
|
|
userId?: boolean
|
|
grade?: boolean
|
|
subject?: boolean
|
|
status?: boolean
|
|
score?: boolean
|
|
totalQuestions?: boolean
|
|
correctAnswers?: boolean
|
|
startedAt?: boolean
|
|
completedAt?: boolean
|
|
user?: boolean | UserDefaultArgs<ExtArgs>
|
|
answers?: boolean | GameSession$answersArgs<ExtArgs>
|
|
_count?: boolean | GameSessionCountOutputTypeDefaultArgs<ExtArgs>
|
|
}, ExtArgs["result"]["gameSession"]>
|
|
|
|
export type GameSessionSelectCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
|
|
id?: boolean
|
|
userId?: boolean
|
|
grade?: boolean
|
|
subject?: boolean
|
|
status?: boolean
|
|
score?: boolean
|
|
totalQuestions?: boolean
|
|
correctAnswers?: boolean
|
|
startedAt?: boolean
|
|
completedAt?: boolean
|
|
user?: boolean | UserDefaultArgs<ExtArgs>
|
|
}, ExtArgs["result"]["gameSession"]>
|
|
|
|
export type GameSessionSelectScalar = {
|
|
id?: boolean
|
|
userId?: boolean
|
|
grade?: boolean
|
|
subject?: boolean
|
|
status?: boolean
|
|
score?: boolean
|
|
totalQuestions?: boolean
|
|
correctAnswers?: boolean
|
|
startedAt?: boolean
|
|
completedAt?: boolean
|
|
}
|
|
|
|
export type GameSessionInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
user?: boolean | UserDefaultArgs<ExtArgs>
|
|
answers?: boolean | GameSession$answersArgs<ExtArgs>
|
|
_count?: boolean | GameSessionCountOutputTypeDefaultArgs<ExtArgs>
|
|
}
|
|
export type GameSessionIncludeCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
user?: boolean | UserDefaultArgs<ExtArgs>
|
|
}
|
|
|
|
export type $GameSessionPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
name: "GameSession"
|
|
objects: {
|
|
user: Prisma.$UserPayload<ExtArgs>
|
|
answers: Prisma.$UserAnswerPayload<ExtArgs>[]
|
|
}
|
|
scalars: $Extensions.GetPayloadResult<{
|
|
id: string
|
|
userId: string
|
|
grade: $Enums.Grade
|
|
subject: $Enums.Subject
|
|
status: $Enums.SessionStatus
|
|
score: number
|
|
totalQuestions: number
|
|
correctAnswers: number
|
|
startedAt: Date
|
|
completedAt: Date | null
|
|
}, ExtArgs["result"]["gameSession"]>
|
|
composites: {}
|
|
}
|
|
|
|
type GameSessionGetPayload<S extends boolean | null | undefined | GameSessionDefaultArgs> = $Result.GetResult<Prisma.$GameSessionPayload, S>
|
|
|
|
type GameSessionCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
|
|
Omit<GameSessionFindManyArgs, 'select' | 'include' | 'distinct'> & {
|
|
select?: GameSessionCountAggregateInputType | true
|
|
}
|
|
|
|
export interface GameSessionDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> {
|
|
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['GameSession'], meta: { name: 'GameSession' } }
|
|
/**
|
|
* Find zero or one GameSession that matches the filter.
|
|
* @param {GameSessionFindUniqueArgs} args - Arguments to find a GameSession
|
|
* @example
|
|
* // Get one GameSession
|
|
* const gameSession = await prisma.gameSession.findUnique({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*/
|
|
findUnique<T extends GameSessionFindUniqueArgs>(args: SelectSubset<T, GameSessionFindUniqueArgs<ExtArgs>>): Prisma__GameSessionClient<$Result.GetResult<Prisma.$GameSessionPayload<ExtArgs>, T, "findUnique"> | null, null, ExtArgs>
|
|
|
|
/**
|
|
* Find one GameSession that matches the filter or throw an error with `error.code='P2025'`
|
|
* if no matches were found.
|
|
* @param {GameSessionFindUniqueOrThrowArgs} args - Arguments to find a GameSession
|
|
* @example
|
|
* // Get one GameSession
|
|
* const gameSession = await prisma.gameSession.findUniqueOrThrow({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*/
|
|
findUniqueOrThrow<T extends GameSessionFindUniqueOrThrowArgs>(args: SelectSubset<T, GameSessionFindUniqueOrThrowArgs<ExtArgs>>): Prisma__GameSessionClient<$Result.GetResult<Prisma.$GameSessionPayload<ExtArgs>, T, "findUniqueOrThrow">, never, ExtArgs>
|
|
|
|
/**
|
|
* Find the first GameSession 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 {GameSessionFindFirstArgs} args - Arguments to find a GameSession
|
|
* @example
|
|
* // Get one GameSession
|
|
* const gameSession = await prisma.gameSession.findFirst({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*/
|
|
findFirst<T extends GameSessionFindFirstArgs>(args?: SelectSubset<T, GameSessionFindFirstArgs<ExtArgs>>): Prisma__GameSessionClient<$Result.GetResult<Prisma.$GameSessionPayload<ExtArgs>, T, "findFirst"> | null, null, ExtArgs>
|
|
|
|
/**
|
|
* Find the first GameSession 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 {GameSessionFindFirstOrThrowArgs} args - Arguments to find a GameSession
|
|
* @example
|
|
* // Get one GameSession
|
|
* const gameSession = await prisma.gameSession.findFirstOrThrow({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*/
|
|
findFirstOrThrow<T extends GameSessionFindFirstOrThrowArgs>(args?: SelectSubset<T, GameSessionFindFirstOrThrowArgs<ExtArgs>>): Prisma__GameSessionClient<$Result.GetResult<Prisma.$GameSessionPayload<ExtArgs>, T, "findFirstOrThrow">, never, ExtArgs>
|
|
|
|
/**
|
|
* Find zero or more GameSessions 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 {GameSessionFindManyArgs} args - Arguments to filter and select certain fields only.
|
|
* @example
|
|
* // Get all GameSessions
|
|
* const gameSessions = await prisma.gameSession.findMany()
|
|
*
|
|
* // Get first 10 GameSessions
|
|
* const gameSessions = await prisma.gameSession.findMany({ take: 10 })
|
|
*
|
|
* // Only select the `id`
|
|
* const gameSessionWithIdOnly = await prisma.gameSession.findMany({ select: { id: true } })
|
|
*
|
|
*/
|
|
findMany<T extends GameSessionFindManyArgs>(args?: SelectSubset<T, GameSessionFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$GameSessionPayload<ExtArgs>, T, "findMany">>
|
|
|
|
/**
|
|
* Create a GameSession.
|
|
* @param {GameSessionCreateArgs} args - Arguments to create a GameSession.
|
|
* @example
|
|
* // Create one GameSession
|
|
* const GameSession = await prisma.gameSession.create({
|
|
* data: {
|
|
* // ... data to create a GameSession
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
create<T extends GameSessionCreateArgs>(args: SelectSubset<T, GameSessionCreateArgs<ExtArgs>>): Prisma__GameSessionClient<$Result.GetResult<Prisma.$GameSessionPayload<ExtArgs>, T, "create">, never, ExtArgs>
|
|
|
|
/**
|
|
* Create many GameSessions.
|
|
* @param {GameSessionCreateManyArgs} args - Arguments to create many GameSessions.
|
|
* @example
|
|
* // Create many GameSessions
|
|
* const gameSession = await prisma.gameSession.createMany({
|
|
* data: [
|
|
* // ... provide data here
|
|
* ]
|
|
* })
|
|
*
|
|
*/
|
|
createMany<T extends GameSessionCreateManyArgs>(args?: SelectSubset<T, GameSessionCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
|
|
|
|
/**
|
|
* Create many GameSessions and returns the data saved in the database.
|
|
* @param {GameSessionCreateManyAndReturnArgs} args - Arguments to create many GameSessions.
|
|
* @example
|
|
* // Create many GameSessions
|
|
* const gameSession = await prisma.gameSession.createManyAndReturn({
|
|
* data: [
|
|
* // ... provide data here
|
|
* ]
|
|
* })
|
|
*
|
|
* // Create many GameSessions and only return the `id`
|
|
* const gameSessionWithIdOnly = await prisma.gameSession.createManyAndReturn({
|
|
* select: { id: true },
|
|
* data: [
|
|
* // ... provide data here
|
|
* ]
|
|
* })
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
*
|
|
*/
|
|
createManyAndReturn<T extends GameSessionCreateManyAndReturnArgs>(args?: SelectSubset<T, GameSessionCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$GameSessionPayload<ExtArgs>, T, "createManyAndReturn">>
|
|
|
|
/**
|
|
* Delete a GameSession.
|
|
* @param {GameSessionDeleteArgs} args - Arguments to delete one GameSession.
|
|
* @example
|
|
* // Delete one GameSession
|
|
* const GameSession = await prisma.gameSession.delete({
|
|
* where: {
|
|
* // ... filter to delete one GameSession
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
delete<T extends GameSessionDeleteArgs>(args: SelectSubset<T, GameSessionDeleteArgs<ExtArgs>>): Prisma__GameSessionClient<$Result.GetResult<Prisma.$GameSessionPayload<ExtArgs>, T, "delete">, never, ExtArgs>
|
|
|
|
/**
|
|
* Update one GameSession.
|
|
* @param {GameSessionUpdateArgs} args - Arguments to update one GameSession.
|
|
* @example
|
|
* // Update one GameSession
|
|
* const gameSession = await prisma.gameSession.update({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* },
|
|
* data: {
|
|
* // ... provide data here
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
update<T extends GameSessionUpdateArgs>(args: SelectSubset<T, GameSessionUpdateArgs<ExtArgs>>): Prisma__GameSessionClient<$Result.GetResult<Prisma.$GameSessionPayload<ExtArgs>, T, "update">, never, ExtArgs>
|
|
|
|
/**
|
|
* Delete zero or more GameSessions.
|
|
* @param {GameSessionDeleteManyArgs} args - Arguments to filter GameSessions to delete.
|
|
* @example
|
|
* // Delete a few GameSessions
|
|
* const { count } = await prisma.gameSession.deleteMany({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
deleteMany<T extends GameSessionDeleteManyArgs>(args?: SelectSubset<T, GameSessionDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
|
|
|
|
/**
|
|
* Update zero or more GameSessions.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {GameSessionUpdateManyArgs} args - Arguments to update one or more rows.
|
|
* @example
|
|
* // Update many GameSessions
|
|
* const gameSession = await prisma.gameSession.updateMany({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* },
|
|
* data: {
|
|
* // ... provide data here
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
updateMany<T extends GameSessionUpdateManyArgs>(args: SelectSubset<T, GameSessionUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
|
|
|
|
/**
|
|
* Create or update one GameSession.
|
|
* @param {GameSessionUpsertArgs} args - Arguments to update or create a GameSession.
|
|
* @example
|
|
* // Update or create a GameSession
|
|
* const gameSession = await prisma.gameSession.upsert({
|
|
* create: {
|
|
* // ... data to create a GameSession
|
|
* },
|
|
* update: {
|
|
* // ... in case it already exists, update
|
|
* },
|
|
* where: {
|
|
* // ... the filter for the GameSession we want to update
|
|
* }
|
|
* })
|
|
*/
|
|
upsert<T extends GameSessionUpsertArgs>(args: SelectSubset<T, GameSessionUpsertArgs<ExtArgs>>): Prisma__GameSessionClient<$Result.GetResult<Prisma.$GameSessionPayload<ExtArgs>, T, "upsert">, never, ExtArgs>
|
|
|
|
|
|
/**
|
|
* Count the number of GameSessions.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {GameSessionCountArgs} args - Arguments to filter GameSessions to count.
|
|
* @example
|
|
* // Count the number of GameSessions
|
|
* const count = await prisma.gameSession.count({
|
|
* where: {
|
|
* // ... the filter for the GameSessions we want to count
|
|
* }
|
|
* })
|
|
**/
|
|
count<T extends GameSessionCountArgs>(
|
|
args?: Subset<T, GameSessionCountArgs>,
|
|
): Prisma.PrismaPromise<
|
|
T extends $Utils.Record<'select', any>
|
|
? T['select'] extends true
|
|
? number
|
|
: GetScalarType<T['select'], GameSessionCountAggregateOutputType>
|
|
: number
|
|
>
|
|
|
|
/**
|
|
* Allows you to perform aggregations operations on a GameSession.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {GameSessionAggregateArgs} 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 GameSessionAggregateArgs>(args: Subset<T, GameSessionAggregateArgs>): Prisma.PrismaPromise<GetGameSessionAggregateType<T>>
|
|
|
|
/**
|
|
* Group by GameSession.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {GameSessionGroupByArgs} 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 GameSessionGroupByArgs,
|
|
HasSelectOrTake extends Or<
|
|
Extends<'skip', Keys<T>>,
|
|
Extends<'take', Keys<T>>
|
|
>,
|
|
OrderByArg extends True extends HasSelectOrTake
|
|
? { orderBy: GameSessionGroupByArgs['orderBy'] }
|
|
: { orderBy?: GameSessionGroupByArgs['orderBy'] },
|
|
OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
|
|
ByFields extends MaybeTupleToUnion<T['by']>,
|
|
ByValid extends Has<ByFields, OrderFields>,
|
|
HavingFields extends GetHavingFields<T['having']>,
|
|
HavingValid extends Has<ByFields, HavingFields>,
|
|
ByEmpty extends T['by'] extends never[] ? True : False,
|
|
InputErrors extends ByEmpty extends True
|
|
? `Error: "by" must not be empty.`
|
|
: HavingValid extends 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 Keys<T>
|
|
? 'orderBy' extends Keys<T>
|
|
? ByValid extends 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 Keys<T>
|
|
? 'orderBy' extends Keys<T>
|
|
? ByValid extends 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 True
|
|
? {}
|
|
: {
|
|
[P in OrderFields]: P extends ByFields
|
|
? never
|
|
: `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
|
|
}[OrderFields]
|
|
>(args: SubsetIntersection<T, GameSessionGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetGameSessionGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
|
|
/**
|
|
* Fields of the GameSession model
|
|
*/
|
|
readonly fields: GameSessionFieldRefs;
|
|
}
|
|
|
|
/**
|
|
* The delegate class that acts as a "Promise-like" for GameSession.
|
|
* 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__GameSessionClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> extends Prisma.PrismaPromise<T> {
|
|
readonly [Symbol.toStringTag]: "PrismaPromise"
|
|
user<T extends UserDefaultArgs<ExtArgs> = {}>(args?: Subset<T, UserDefaultArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findUniqueOrThrow"> | Null, Null, ExtArgs>
|
|
answers<T extends GameSession$answersArgs<ExtArgs> = {}>(args?: Subset<T, GameSession$answersArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$UserAnswerPayload<ExtArgs>, T, "findMany"> | 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): $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): $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): $Utils.JsPromise<T>
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Fields of the GameSession model
|
|
*/
|
|
interface GameSessionFieldRefs {
|
|
readonly id: FieldRef<"GameSession", 'String'>
|
|
readonly userId: FieldRef<"GameSession", 'String'>
|
|
readonly grade: FieldRef<"GameSession", 'Grade'>
|
|
readonly subject: FieldRef<"GameSession", 'Subject'>
|
|
readonly status: FieldRef<"GameSession", 'SessionStatus'>
|
|
readonly score: FieldRef<"GameSession", 'Int'>
|
|
readonly totalQuestions: FieldRef<"GameSession", 'Int'>
|
|
readonly correctAnswers: FieldRef<"GameSession", 'Int'>
|
|
readonly startedAt: FieldRef<"GameSession", 'DateTime'>
|
|
readonly completedAt: FieldRef<"GameSession", 'DateTime'>
|
|
}
|
|
|
|
|
|
// Custom InputTypes
|
|
/**
|
|
* GameSession findUnique
|
|
*/
|
|
export type GameSessionFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the GameSession
|
|
*/
|
|
select?: GameSessionSelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: GameSessionInclude<ExtArgs> | null
|
|
/**
|
|
* Filter, which GameSession to fetch.
|
|
*/
|
|
where: GameSessionWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* GameSession findUniqueOrThrow
|
|
*/
|
|
export type GameSessionFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the GameSession
|
|
*/
|
|
select?: GameSessionSelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: GameSessionInclude<ExtArgs> | null
|
|
/**
|
|
* Filter, which GameSession to fetch.
|
|
*/
|
|
where: GameSessionWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* GameSession findFirst
|
|
*/
|
|
export type GameSessionFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the GameSession
|
|
*/
|
|
select?: GameSessionSelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: GameSessionInclude<ExtArgs> | null
|
|
/**
|
|
* Filter, which GameSession to fetch.
|
|
*/
|
|
where?: GameSessionWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of GameSessions to fetch.
|
|
*/
|
|
orderBy?: GameSessionOrderByWithRelationInput | GameSessionOrderByWithRelationInput[]
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for searching for GameSessions.
|
|
*/
|
|
cursor?: GameSessionWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` GameSessions 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` GameSessions.
|
|
*/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
|
*
|
|
* Filter by unique combinations of GameSessions.
|
|
*/
|
|
distinct?: GameSessionScalarFieldEnum | GameSessionScalarFieldEnum[]
|
|
}
|
|
|
|
/**
|
|
* GameSession findFirstOrThrow
|
|
*/
|
|
export type GameSessionFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the GameSession
|
|
*/
|
|
select?: GameSessionSelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: GameSessionInclude<ExtArgs> | null
|
|
/**
|
|
* Filter, which GameSession to fetch.
|
|
*/
|
|
where?: GameSessionWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of GameSessions to fetch.
|
|
*/
|
|
orderBy?: GameSessionOrderByWithRelationInput | GameSessionOrderByWithRelationInput[]
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for searching for GameSessions.
|
|
*/
|
|
cursor?: GameSessionWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` GameSessions 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` GameSessions.
|
|
*/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
|
*
|
|
* Filter by unique combinations of GameSessions.
|
|
*/
|
|
distinct?: GameSessionScalarFieldEnum | GameSessionScalarFieldEnum[]
|
|
}
|
|
|
|
/**
|
|
* GameSession findMany
|
|
*/
|
|
export type GameSessionFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the GameSession
|
|
*/
|
|
select?: GameSessionSelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: GameSessionInclude<ExtArgs> | null
|
|
/**
|
|
* Filter, which GameSessions to fetch.
|
|
*/
|
|
where?: GameSessionWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of GameSessions to fetch.
|
|
*/
|
|
orderBy?: GameSessionOrderByWithRelationInput | GameSessionOrderByWithRelationInput[]
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for listing GameSessions.
|
|
*/
|
|
cursor?: GameSessionWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` GameSessions 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` GameSessions.
|
|
*/
|
|
skip?: number
|
|
distinct?: GameSessionScalarFieldEnum | GameSessionScalarFieldEnum[]
|
|
}
|
|
|
|
/**
|
|
* GameSession create
|
|
*/
|
|
export type GameSessionCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the GameSession
|
|
*/
|
|
select?: GameSessionSelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: GameSessionInclude<ExtArgs> | null
|
|
/**
|
|
* The data needed to create a GameSession.
|
|
*/
|
|
data: XOR<GameSessionCreateInput, GameSessionUncheckedCreateInput>
|
|
}
|
|
|
|
/**
|
|
* GameSession createMany
|
|
*/
|
|
export type GameSessionCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* The data used to create many GameSessions.
|
|
*/
|
|
data: GameSessionCreateManyInput | GameSessionCreateManyInput[]
|
|
skipDuplicates?: boolean
|
|
}
|
|
|
|
/**
|
|
* GameSession createManyAndReturn
|
|
*/
|
|
export type GameSessionCreateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the GameSession
|
|
*/
|
|
select?: GameSessionSelectCreateManyAndReturn<ExtArgs> | null
|
|
/**
|
|
* The data used to create many GameSessions.
|
|
*/
|
|
data: GameSessionCreateManyInput | GameSessionCreateManyInput[]
|
|
skipDuplicates?: boolean
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: GameSessionIncludeCreateManyAndReturn<ExtArgs> | null
|
|
}
|
|
|
|
/**
|
|
* GameSession update
|
|
*/
|
|
export type GameSessionUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the GameSession
|
|
*/
|
|
select?: GameSessionSelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: GameSessionInclude<ExtArgs> | null
|
|
/**
|
|
* The data needed to update a GameSession.
|
|
*/
|
|
data: XOR<GameSessionUpdateInput, GameSessionUncheckedUpdateInput>
|
|
/**
|
|
* Choose, which GameSession to update.
|
|
*/
|
|
where: GameSessionWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* GameSession updateMany
|
|
*/
|
|
export type GameSessionUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* The data used to update GameSessions.
|
|
*/
|
|
data: XOR<GameSessionUpdateManyMutationInput, GameSessionUncheckedUpdateManyInput>
|
|
/**
|
|
* Filter which GameSessions to update
|
|
*/
|
|
where?: GameSessionWhereInput
|
|
}
|
|
|
|
/**
|
|
* GameSession upsert
|
|
*/
|
|
export type GameSessionUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the GameSession
|
|
*/
|
|
select?: GameSessionSelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: GameSessionInclude<ExtArgs> | null
|
|
/**
|
|
* The filter to search for the GameSession to update in case it exists.
|
|
*/
|
|
where: GameSessionWhereUniqueInput
|
|
/**
|
|
* In case the GameSession found by the `where` argument doesn't exist, create a new GameSession with this data.
|
|
*/
|
|
create: XOR<GameSessionCreateInput, GameSessionUncheckedCreateInput>
|
|
/**
|
|
* In case the GameSession was found with the provided `where` argument, update it with this data.
|
|
*/
|
|
update: XOR<GameSessionUpdateInput, GameSessionUncheckedUpdateInput>
|
|
}
|
|
|
|
/**
|
|
* GameSession delete
|
|
*/
|
|
export type GameSessionDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the GameSession
|
|
*/
|
|
select?: GameSessionSelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: GameSessionInclude<ExtArgs> | null
|
|
/**
|
|
* Filter which GameSession to delete.
|
|
*/
|
|
where: GameSessionWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* GameSession deleteMany
|
|
*/
|
|
export type GameSessionDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Filter which GameSessions to delete
|
|
*/
|
|
where?: GameSessionWhereInput
|
|
}
|
|
|
|
/**
|
|
* GameSession.answers
|
|
*/
|
|
export type GameSession$answersArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the UserAnswer
|
|
*/
|
|
select?: UserAnswerSelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: UserAnswerInclude<ExtArgs> | null
|
|
where?: UserAnswerWhereInput
|
|
orderBy?: UserAnswerOrderByWithRelationInput | UserAnswerOrderByWithRelationInput[]
|
|
cursor?: UserAnswerWhereUniqueInput
|
|
take?: number
|
|
skip?: number
|
|
distinct?: UserAnswerScalarFieldEnum | UserAnswerScalarFieldEnum[]
|
|
}
|
|
|
|
/**
|
|
* GameSession without action
|
|
*/
|
|
export type GameSessionDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the GameSession
|
|
*/
|
|
select?: GameSessionSelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: GameSessionInclude<ExtArgs> | null
|
|
}
|
|
|
|
|
|
/**
|
|
* Model UserAnswer
|
|
*/
|
|
|
|
export type AggregateUserAnswer = {
|
|
_count: UserAnswerCountAggregateOutputType | null
|
|
_avg: UserAnswerAvgAggregateOutputType | null
|
|
_sum: UserAnswerSumAggregateOutputType | null
|
|
_min: UserAnswerMinAggregateOutputType | null
|
|
_max: UserAnswerMaxAggregateOutputType | null
|
|
}
|
|
|
|
export type UserAnswerAvgAggregateOutputType = {
|
|
timeSpentMs: number | null
|
|
}
|
|
|
|
export type UserAnswerSumAggregateOutputType = {
|
|
timeSpentMs: number | null
|
|
}
|
|
|
|
export type UserAnswerMinAggregateOutputType = {
|
|
id: string | null
|
|
sessionId: string | null
|
|
questionId: string | null
|
|
selectedAnswer: string | null
|
|
isCorrect: boolean | null
|
|
timeSpentMs: number | null
|
|
answeredAt: Date | null
|
|
}
|
|
|
|
export type UserAnswerMaxAggregateOutputType = {
|
|
id: string | null
|
|
sessionId: string | null
|
|
questionId: string | null
|
|
selectedAnswer: string | null
|
|
isCorrect: boolean | null
|
|
timeSpentMs: number | null
|
|
answeredAt: Date | null
|
|
}
|
|
|
|
export type UserAnswerCountAggregateOutputType = {
|
|
id: number
|
|
sessionId: number
|
|
questionId: number
|
|
selectedAnswer: number
|
|
isCorrect: number
|
|
timeSpentMs: number
|
|
answeredAt: number
|
|
_all: number
|
|
}
|
|
|
|
|
|
export type UserAnswerAvgAggregateInputType = {
|
|
timeSpentMs?: true
|
|
}
|
|
|
|
export type UserAnswerSumAggregateInputType = {
|
|
timeSpentMs?: true
|
|
}
|
|
|
|
export type UserAnswerMinAggregateInputType = {
|
|
id?: true
|
|
sessionId?: true
|
|
questionId?: true
|
|
selectedAnswer?: true
|
|
isCorrect?: true
|
|
timeSpentMs?: true
|
|
answeredAt?: true
|
|
}
|
|
|
|
export type UserAnswerMaxAggregateInputType = {
|
|
id?: true
|
|
sessionId?: true
|
|
questionId?: true
|
|
selectedAnswer?: true
|
|
isCorrect?: true
|
|
timeSpentMs?: true
|
|
answeredAt?: true
|
|
}
|
|
|
|
export type UserAnswerCountAggregateInputType = {
|
|
id?: true
|
|
sessionId?: true
|
|
questionId?: true
|
|
selectedAnswer?: true
|
|
isCorrect?: true
|
|
timeSpentMs?: true
|
|
answeredAt?: true
|
|
_all?: true
|
|
}
|
|
|
|
export type UserAnswerAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Filter which UserAnswer to aggregate.
|
|
*/
|
|
where?: UserAnswerWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of UserAnswers to fetch.
|
|
*/
|
|
orderBy?: UserAnswerOrderByWithRelationInput | UserAnswerOrderByWithRelationInput[]
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the start position
|
|
*/
|
|
cursor?: UserAnswerWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` UserAnswers 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` UserAnswers.
|
|
*/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Count returned UserAnswers
|
|
**/
|
|
_count?: true | UserAnswerCountAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to average
|
|
**/
|
|
_avg?: UserAnswerAvgAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to sum
|
|
**/
|
|
_sum?: UserAnswerSumAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to find the minimum value
|
|
**/
|
|
_min?: UserAnswerMinAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to find the maximum value
|
|
**/
|
|
_max?: UserAnswerMaxAggregateInputType
|
|
}
|
|
|
|
export type GetUserAnswerAggregateType<T extends UserAnswerAggregateArgs> = {
|
|
[P in keyof T & keyof AggregateUserAnswer]: P extends '_count' | 'count'
|
|
? T[P] extends true
|
|
? number
|
|
: GetScalarType<T[P], AggregateUserAnswer[P]>
|
|
: GetScalarType<T[P], AggregateUserAnswer[P]>
|
|
}
|
|
|
|
|
|
|
|
|
|
export type UserAnswerGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
where?: UserAnswerWhereInput
|
|
orderBy?: UserAnswerOrderByWithAggregationInput | UserAnswerOrderByWithAggregationInput[]
|
|
by: UserAnswerScalarFieldEnum[] | UserAnswerScalarFieldEnum
|
|
having?: UserAnswerScalarWhereWithAggregatesInput
|
|
take?: number
|
|
skip?: number
|
|
_count?: UserAnswerCountAggregateInputType | true
|
|
_avg?: UserAnswerAvgAggregateInputType
|
|
_sum?: UserAnswerSumAggregateInputType
|
|
_min?: UserAnswerMinAggregateInputType
|
|
_max?: UserAnswerMaxAggregateInputType
|
|
}
|
|
|
|
export type UserAnswerGroupByOutputType = {
|
|
id: string
|
|
sessionId: string
|
|
questionId: string
|
|
selectedAnswer: string
|
|
isCorrect: boolean
|
|
timeSpentMs: number
|
|
answeredAt: Date
|
|
_count: UserAnswerCountAggregateOutputType | null
|
|
_avg: UserAnswerAvgAggregateOutputType | null
|
|
_sum: UserAnswerSumAggregateOutputType | null
|
|
_min: UserAnswerMinAggregateOutputType | null
|
|
_max: UserAnswerMaxAggregateOutputType | null
|
|
}
|
|
|
|
type GetUserAnswerGroupByPayload<T extends UserAnswerGroupByArgs> = Prisma.PrismaPromise<
|
|
Array<
|
|
PickEnumerable<UserAnswerGroupByOutputType, T['by']> &
|
|
{
|
|
[P in ((keyof T) & (keyof UserAnswerGroupByOutputType))]: P extends '_count'
|
|
? T[P] extends boolean
|
|
? number
|
|
: GetScalarType<T[P], UserAnswerGroupByOutputType[P]>
|
|
: GetScalarType<T[P], UserAnswerGroupByOutputType[P]>
|
|
}
|
|
>
|
|
>
|
|
|
|
|
|
export type UserAnswerSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
|
|
id?: boolean
|
|
sessionId?: boolean
|
|
questionId?: boolean
|
|
selectedAnswer?: boolean
|
|
isCorrect?: boolean
|
|
timeSpentMs?: boolean
|
|
answeredAt?: boolean
|
|
session?: boolean | GameSessionDefaultArgs<ExtArgs>
|
|
question?: boolean | QuestionDefaultArgs<ExtArgs>
|
|
}, ExtArgs["result"]["userAnswer"]>
|
|
|
|
export type UserAnswerSelectCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
|
|
id?: boolean
|
|
sessionId?: boolean
|
|
questionId?: boolean
|
|
selectedAnswer?: boolean
|
|
isCorrect?: boolean
|
|
timeSpentMs?: boolean
|
|
answeredAt?: boolean
|
|
session?: boolean | GameSessionDefaultArgs<ExtArgs>
|
|
question?: boolean | QuestionDefaultArgs<ExtArgs>
|
|
}, ExtArgs["result"]["userAnswer"]>
|
|
|
|
export type UserAnswerSelectScalar = {
|
|
id?: boolean
|
|
sessionId?: boolean
|
|
questionId?: boolean
|
|
selectedAnswer?: boolean
|
|
isCorrect?: boolean
|
|
timeSpentMs?: boolean
|
|
answeredAt?: boolean
|
|
}
|
|
|
|
export type UserAnswerInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
session?: boolean | GameSessionDefaultArgs<ExtArgs>
|
|
question?: boolean | QuestionDefaultArgs<ExtArgs>
|
|
}
|
|
export type UserAnswerIncludeCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
session?: boolean | GameSessionDefaultArgs<ExtArgs>
|
|
question?: boolean | QuestionDefaultArgs<ExtArgs>
|
|
}
|
|
|
|
export type $UserAnswerPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
name: "UserAnswer"
|
|
objects: {
|
|
session: Prisma.$GameSessionPayload<ExtArgs>
|
|
question: Prisma.$QuestionPayload<ExtArgs>
|
|
}
|
|
scalars: $Extensions.GetPayloadResult<{
|
|
id: string
|
|
sessionId: string
|
|
questionId: string
|
|
selectedAnswer: string
|
|
isCorrect: boolean
|
|
timeSpentMs: number
|
|
answeredAt: Date
|
|
}, ExtArgs["result"]["userAnswer"]>
|
|
composites: {}
|
|
}
|
|
|
|
type UserAnswerGetPayload<S extends boolean | null | undefined | UserAnswerDefaultArgs> = $Result.GetResult<Prisma.$UserAnswerPayload, S>
|
|
|
|
type UserAnswerCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
|
|
Omit<UserAnswerFindManyArgs, 'select' | 'include' | 'distinct'> & {
|
|
select?: UserAnswerCountAggregateInputType | true
|
|
}
|
|
|
|
export interface UserAnswerDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> {
|
|
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['UserAnswer'], meta: { name: 'UserAnswer' } }
|
|
/**
|
|
* Find zero or one UserAnswer that matches the filter.
|
|
* @param {UserAnswerFindUniqueArgs} args - Arguments to find a UserAnswer
|
|
* @example
|
|
* // Get one UserAnswer
|
|
* const userAnswer = await prisma.userAnswer.findUnique({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*/
|
|
findUnique<T extends UserAnswerFindUniqueArgs>(args: SelectSubset<T, UserAnswerFindUniqueArgs<ExtArgs>>): Prisma__UserAnswerClient<$Result.GetResult<Prisma.$UserAnswerPayload<ExtArgs>, T, "findUnique"> | null, null, ExtArgs>
|
|
|
|
/**
|
|
* Find one UserAnswer that matches the filter or throw an error with `error.code='P2025'`
|
|
* if no matches were found.
|
|
* @param {UserAnswerFindUniqueOrThrowArgs} args - Arguments to find a UserAnswer
|
|
* @example
|
|
* // Get one UserAnswer
|
|
* const userAnswer = await prisma.userAnswer.findUniqueOrThrow({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*/
|
|
findUniqueOrThrow<T extends UserAnswerFindUniqueOrThrowArgs>(args: SelectSubset<T, UserAnswerFindUniqueOrThrowArgs<ExtArgs>>): Prisma__UserAnswerClient<$Result.GetResult<Prisma.$UserAnswerPayload<ExtArgs>, T, "findUniqueOrThrow">, never, ExtArgs>
|
|
|
|
/**
|
|
* Find the first UserAnswer 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 {UserAnswerFindFirstArgs} args - Arguments to find a UserAnswer
|
|
* @example
|
|
* // Get one UserAnswer
|
|
* const userAnswer = await prisma.userAnswer.findFirst({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*/
|
|
findFirst<T extends UserAnswerFindFirstArgs>(args?: SelectSubset<T, UserAnswerFindFirstArgs<ExtArgs>>): Prisma__UserAnswerClient<$Result.GetResult<Prisma.$UserAnswerPayload<ExtArgs>, T, "findFirst"> | null, null, ExtArgs>
|
|
|
|
/**
|
|
* Find the first UserAnswer 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 {UserAnswerFindFirstOrThrowArgs} args - Arguments to find a UserAnswer
|
|
* @example
|
|
* // Get one UserAnswer
|
|
* const userAnswer = await prisma.userAnswer.findFirstOrThrow({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*/
|
|
findFirstOrThrow<T extends UserAnswerFindFirstOrThrowArgs>(args?: SelectSubset<T, UserAnswerFindFirstOrThrowArgs<ExtArgs>>): Prisma__UserAnswerClient<$Result.GetResult<Prisma.$UserAnswerPayload<ExtArgs>, T, "findFirstOrThrow">, never, ExtArgs>
|
|
|
|
/**
|
|
* Find zero or more UserAnswers 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 {UserAnswerFindManyArgs} args - Arguments to filter and select certain fields only.
|
|
* @example
|
|
* // Get all UserAnswers
|
|
* const userAnswers = await prisma.userAnswer.findMany()
|
|
*
|
|
* // Get first 10 UserAnswers
|
|
* const userAnswers = await prisma.userAnswer.findMany({ take: 10 })
|
|
*
|
|
* // Only select the `id`
|
|
* const userAnswerWithIdOnly = await prisma.userAnswer.findMany({ select: { id: true } })
|
|
*
|
|
*/
|
|
findMany<T extends UserAnswerFindManyArgs>(args?: SelectSubset<T, UserAnswerFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$UserAnswerPayload<ExtArgs>, T, "findMany">>
|
|
|
|
/**
|
|
* Create a UserAnswer.
|
|
* @param {UserAnswerCreateArgs} args - Arguments to create a UserAnswer.
|
|
* @example
|
|
* // Create one UserAnswer
|
|
* const UserAnswer = await prisma.userAnswer.create({
|
|
* data: {
|
|
* // ... data to create a UserAnswer
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
create<T extends UserAnswerCreateArgs>(args: SelectSubset<T, UserAnswerCreateArgs<ExtArgs>>): Prisma__UserAnswerClient<$Result.GetResult<Prisma.$UserAnswerPayload<ExtArgs>, T, "create">, never, ExtArgs>
|
|
|
|
/**
|
|
* Create many UserAnswers.
|
|
* @param {UserAnswerCreateManyArgs} args - Arguments to create many UserAnswers.
|
|
* @example
|
|
* // Create many UserAnswers
|
|
* const userAnswer = await prisma.userAnswer.createMany({
|
|
* data: [
|
|
* // ... provide data here
|
|
* ]
|
|
* })
|
|
*
|
|
*/
|
|
createMany<T extends UserAnswerCreateManyArgs>(args?: SelectSubset<T, UserAnswerCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
|
|
|
|
/**
|
|
* Create many UserAnswers and returns the data saved in the database.
|
|
* @param {UserAnswerCreateManyAndReturnArgs} args - Arguments to create many UserAnswers.
|
|
* @example
|
|
* // Create many UserAnswers
|
|
* const userAnswer = await prisma.userAnswer.createManyAndReturn({
|
|
* data: [
|
|
* // ... provide data here
|
|
* ]
|
|
* })
|
|
*
|
|
* // Create many UserAnswers and only return the `id`
|
|
* const userAnswerWithIdOnly = await prisma.userAnswer.createManyAndReturn({
|
|
* select: { id: true },
|
|
* data: [
|
|
* // ... provide data here
|
|
* ]
|
|
* })
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
*
|
|
*/
|
|
createManyAndReturn<T extends UserAnswerCreateManyAndReturnArgs>(args?: SelectSubset<T, UserAnswerCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$UserAnswerPayload<ExtArgs>, T, "createManyAndReturn">>
|
|
|
|
/**
|
|
* Delete a UserAnswer.
|
|
* @param {UserAnswerDeleteArgs} args - Arguments to delete one UserAnswer.
|
|
* @example
|
|
* // Delete one UserAnswer
|
|
* const UserAnswer = await prisma.userAnswer.delete({
|
|
* where: {
|
|
* // ... filter to delete one UserAnswer
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
delete<T extends UserAnswerDeleteArgs>(args: SelectSubset<T, UserAnswerDeleteArgs<ExtArgs>>): Prisma__UserAnswerClient<$Result.GetResult<Prisma.$UserAnswerPayload<ExtArgs>, T, "delete">, never, ExtArgs>
|
|
|
|
/**
|
|
* Update one UserAnswer.
|
|
* @param {UserAnswerUpdateArgs} args - Arguments to update one UserAnswer.
|
|
* @example
|
|
* // Update one UserAnswer
|
|
* const userAnswer = await prisma.userAnswer.update({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* },
|
|
* data: {
|
|
* // ... provide data here
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
update<T extends UserAnswerUpdateArgs>(args: SelectSubset<T, UserAnswerUpdateArgs<ExtArgs>>): Prisma__UserAnswerClient<$Result.GetResult<Prisma.$UserAnswerPayload<ExtArgs>, T, "update">, never, ExtArgs>
|
|
|
|
/**
|
|
* Delete zero or more UserAnswers.
|
|
* @param {UserAnswerDeleteManyArgs} args - Arguments to filter UserAnswers to delete.
|
|
* @example
|
|
* // Delete a few UserAnswers
|
|
* const { count } = await prisma.userAnswer.deleteMany({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
deleteMany<T extends UserAnswerDeleteManyArgs>(args?: SelectSubset<T, UserAnswerDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
|
|
|
|
/**
|
|
* Update zero or more UserAnswers.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {UserAnswerUpdateManyArgs} args - Arguments to update one or more rows.
|
|
* @example
|
|
* // Update many UserAnswers
|
|
* const userAnswer = await prisma.userAnswer.updateMany({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* },
|
|
* data: {
|
|
* // ... provide data here
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
updateMany<T extends UserAnswerUpdateManyArgs>(args: SelectSubset<T, UserAnswerUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
|
|
|
|
/**
|
|
* Create or update one UserAnswer.
|
|
* @param {UserAnswerUpsertArgs} args - Arguments to update or create a UserAnswer.
|
|
* @example
|
|
* // Update or create a UserAnswer
|
|
* const userAnswer = await prisma.userAnswer.upsert({
|
|
* create: {
|
|
* // ... data to create a UserAnswer
|
|
* },
|
|
* update: {
|
|
* // ... in case it already exists, update
|
|
* },
|
|
* where: {
|
|
* // ... the filter for the UserAnswer we want to update
|
|
* }
|
|
* })
|
|
*/
|
|
upsert<T extends UserAnswerUpsertArgs>(args: SelectSubset<T, UserAnswerUpsertArgs<ExtArgs>>): Prisma__UserAnswerClient<$Result.GetResult<Prisma.$UserAnswerPayload<ExtArgs>, T, "upsert">, never, ExtArgs>
|
|
|
|
|
|
/**
|
|
* Count the number of UserAnswers.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {UserAnswerCountArgs} args - Arguments to filter UserAnswers to count.
|
|
* @example
|
|
* // Count the number of UserAnswers
|
|
* const count = await prisma.userAnswer.count({
|
|
* where: {
|
|
* // ... the filter for the UserAnswers we want to count
|
|
* }
|
|
* })
|
|
**/
|
|
count<T extends UserAnswerCountArgs>(
|
|
args?: Subset<T, UserAnswerCountArgs>,
|
|
): Prisma.PrismaPromise<
|
|
T extends $Utils.Record<'select', any>
|
|
? T['select'] extends true
|
|
? number
|
|
: GetScalarType<T['select'], UserAnswerCountAggregateOutputType>
|
|
: number
|
|
>
|
|
|
|
/**
|
|
* Allows you to perform aggregations operations on a UserAnswer.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {UserAnswerAggregateArgs} 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 UserAnswerAggregateArgs>(args: Subset<T, UserAnswerAggregateArgs>): Prisma.PrismaPromise<GetUserAnswerAggregateType<T>>
|
|
|
|
/**
|
|
* Group by UserAnswer.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {UserAnswerGroupByArgs} 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 UserAnswerGroupByArgs,
|
|
HasSelectOrTake extends Or<
|
|
Extends<'skip', Keys<T>>,
|
|
Extends<'take', Keys<T>>
|
|
>,
|
|
OrderByArg extends True extends HasSelectOrTake
|
|
? { orderBy: UserAnswerGroupByArgs['orderBy'] }
|
|
: { orderBy?: UserAnswerGroupByArgs['orderBy'] },
|
|
OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
|
|
ByFields extends MaybeTupleToUnion<T['by']>,
|
|
ByValid extends Has<ByFields, OrderFields>,
|
|
HavingFields extends GetHavingFields<T['having']>,
|
|
HavingValid extends Has<ByFields, HavingFields>,
|
|
ByEmpty extends T['by'] extends never[] ? True : False,
|
|
InputErrors extends ByEmpty extends True
|
|
? `Error: "by" must not be empty.`
|
|
: HavingValid extends 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 Keys<T>
|
|
? 'orderBy' extends Keys<T>
|
|
? ByValid extends 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 Keys<T>
|
|
? 'orderBy' extends Keys<T>
|
|
? ByValid extends 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 True
|
|
? {}
|
|
: {
|
|
[P in OrderFields]: P extends ByFields
|
|
? never
|
|
: `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
|
|
}[OrderFields]
|
|
>(args: SubsetIntersection<T, UserAnswerGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetUserAnswerGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
|
|
/**
|
|
* Fields of the UserAnswer model
|
|
*/
|
|
readonly fields: UserAnswerFieldRefs;
|
|
}
|
|
|
|
/**
|
|
* The delegate class that acts as a "Promise-like" for UserAnswer.
|
|
* 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__UserAnswerClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> extends Prisma.PrismaPromise<T> {
|
|
readonly [Symbol.toStringTag]: "PrismaPromise"
|
|
session<T extends GameSessionDefaultArgs<ExtArgs> = {}>(args?: Subset<T, GameSessionDefaultArgs<ExtArgs>>): Prisma__GameSessionClient<$Result.GetResult<Prisma.$GameSessionPayload<ExtArgs>, T, "findUniqueOrThrow"> | Null, Null, ExtArgs>
|
|
question<T extends QuestionDefaultArgs<ExtArgs> = {}>(args?: Subset<T, QuestionDefaultArgs<ExtArgs>>): Prisma__QuestionClient<$Result.GetResult<Prisma.$QuestionPayload<ExtArgs>, T, "findUniqueOrThrow"> | Null, Null, ExtArgs>
|
|
/**
|
|
* 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): $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): $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): $Utils.JsPromise<T>
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Fields of the UserAnswer model
|
|
*/
|
|
interface UserAnswerFieldRefs {
|
|
readonly id: FieldRef<"UserAnswer", 'String'>
|
|
readonly sessionId: FieldRef<"UserAnswer", 'String'>
|
|
readonly questionId: FieldRef<"UserAnswer", 'String'>
|
|
readonly selectedAnswer: FieldRef<"UserAnswer", 'String'>
|
|
readonly isCorrect: FieldRef<"UserAnswer", 'Boolean'>
|
|
readonly timeSpentMs: FieldRef<"UserAnswer", 'Int'>
|
|
readonly answeredAt: FieldRef<"UserAnswer", 'DateTime'>
|
|
}
|
|
|
|
|
|
// Custom InputTypes
|
|
/**
|
|
* UserAnswer findUnique
|
|
*/
|
|
export type UserAnswerFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the UserAnswer
|
|
*/
|
|
select?: UserAnswerSelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: UserAnswerInclude<ExtArgs> | null
|
|
/**
|
|
* Filter, which UserAnswer to fetch.
|
|
*/
|
|
where: UserAnswerWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* UserAnswer findUniqueOrThrow
|
|
*/
|
|
export type UserAnswerFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the UserAnswer
|
|
*/
|
|
select?: UserAnswerSelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: UserAnswerInclude<ExtArgs> | null
|
|
/**
|
|
* Filter, which UserAnswer to fetch.
|
|
*/
|
|
where: UserAnswerWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* UserAnswer findFirst
|
|
*/
|
|
export type UserAnswerFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the UserAnswer
|
|
*/
|
|
select?: UserAnswerSelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: UserAnswerInclude<ExtArgs> | null
|
|
/**
|
|
* Filter, which UserAnswer to fetch.
|
|
*/
|
|
where?: UserAnswerWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of UserAnswers to fetch.
|
|
*/
|
|
orderBy?: UserAnswerOrderByWithRelationInput | UserAnswerOrderByWithRelationInput[]
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for searching for UserAnswers.
|
|
*/
|
|
cursor?: UserAnswerWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` UserAnswers 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` UserAnswers.
|
|
*/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
|
*
|
|
* Filter by unique combinations of UserAnswers.
|
|
*/
|
|
distinct?: UserAnswerScalarFieldEnum | UserAnswerScalarFieldEnum[]
|
|
}
|
|
|
|
/**
|
|
* UserAnswer findFirstOrThrow
|
|
*/
|
|
export type UserAnswerFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the UserAnswer
|
|
*/
|
|
select?: UserAnswerSelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: UserAnswerInclude<ExtArgs> | null
|
|
/**
|
|
* Filter, which UserAnswer to fetch.
|
|
*/
|
|
where?: UserAnswerWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of UserAnswers to fetch.
|
|
*/
|
|
orderBy?: UserAnswerOrderByWithRelationInput | UserAnswerOrderByWithRelationInput[]
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for searching for UserAnswers.
|
|
*/
|
|
cursor?: UserAnswerWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` UserAnswers 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` UserAnswers.
|
|
*/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
|
*
|
|
* Filter by unique combinations of UserAnswers.
|
|
*/
|
|
distinct?: UserAnswerScalarFieldEnum | UserAnswerScalarFieldEnum[]
|
|
}
|
|
|
|
/**
|
|
* UserAnswer findMany
|
|
*/
|
|
export type UserAnswerFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the UserAnswer
|
|
*/
|
|
select?: UserAnswerSelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: UserAnswerInclude<ExtArgs> | null
|
|
/**
|
|
* Filter, which UserAnswers to fetch.
|
|
*/
|
|
where?: UserAnswerWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of UserAnswers to fetch.
|
|
*/
|
|
orderBy?: UserAnswerOrderByWithRelationInput | UserAnswerOrderByWithRelationInput[]
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for listing UserAnswers.
|
|
*/
|
|
cursor?: UserAnswerWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` UserAnswers 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` UserAnswers.
|
|
*/
|
|
skip?: number
|
|
distinct?: UserAnswerScalarFieldEnum | UserAnswerScalarFieldEnum[]
|
|
}
|
|
|
|
/**
|
|
* UserAnswer create
|
|
*/
|
|
export type UserAnswerCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the UserAnswer
|
|
*/
|
|
select?: UserAnswerSelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: UserAnswerInclude<ExtArgs> | null
|
|
/**
|
|
* The data needed to create a UserAnswer.
|
|
*/
|
|
data: XOR<UserAnswerCreateInput, UserAnswerUncheckedCreateInput>
|
|
}
|
|
|
|
/**
|
|
* UserAnswer createMany
|
|
*/
|
|
export type UserAnswerCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* The data used to create many UserAnswers.
|
|
*/
|
|
data: UserAnswerCreateManyInput | UserAnswerCreateManyInput[]
|
|
skipDuplicates?: boolean
|
|
}
|
|
|
|
/**
|
|
* UserAnswer createManyAndReturn
|
|
*/
|
|
export type UserAnswerCreateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the UserAnswer
|
|
*/
|
|
select?: UserAnswerSelectCreateManyAndReturn<ExtArgs> | null
|
|
/**
|
|
* The data used to create many UserAnswers.
|
|
*/
|
|
data: UserAnswerCreateManyInput | UserAnswerCreateManyInput[]
|
|
skipDuplicates?: boolean
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: UserAnswerIncludeCreateManyAndReturn<ExtArgs> | null
|
|
}
|
|
|
|
/**
|
|
* UserAnswer update
|
|
*/
|
|
export type UserAnswerUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the UserAnswer
|
|
*/
|
|
select?: UserAnswerSelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: UserAnswerInclude<ExtArgs> | null
|
|
/**
|
|
* The data needed to update a UserAnswer.
|
|
*/
|
|
data: XOR<UserAnswerUpdateInput, UserAnswerUncheckedUpdateInput>
|
|
/**
|
|
* Choose, which UserAnswer to update.
|
|
*/
|
|
where: UserAnswerWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* UserAnswer updateMany
|
|
*/
|
|
export type UserAnswerUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* The data used to update UserAnswers.
|
|
*/
|
|
data: XOR<UserAnswerUpdateManyMutationInput, UserAnswerUncheckedUpdateManyInput>
|
|
/**
|
|
* Filter which UserAnswers to update
|
|
*/
|
|
where?: UserAnswerWhereInput
|
|
}
|
|
|
|
/**
|
|
* UserAnswer upsert
|
|
*/
|
|
export type UserAnswerUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the UserAnswer
|
|
*/
|
|
select?: UserAnswerSelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: UserAnswerInclude<ExtArgs> | null
|
|
/**
|
|
* The filter to search for the UserAnswer to update in case it exists.
|
|
*/
|
|
where: UserAnswerWhereUniqueInput
|
|
/**
|
|
* In case the UserAnswer found by the `where` argument doesn't exist, create a new UserAnswer with this data.
|
|
*/
|
|
create: XOR<UserAnswerCreateInput, UserAnswerUncheckedCreateInput>
|
|
/**
|
|
* In case the UserAnswer was found with the provided `where` argument, update it with this data.
|
|
*/
|
|
update: XOR<UserAnswerUpdateInput, UserAnswerUncheckedUpdateInput>
|
|
}
|
|
|
|
/**
|
|
* UserAnswer delete
|
|
*/
|
|
export type UserAnswerDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the UserAnswer
|
|
*/
|
|
select?: UserAnswerSelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: UserAnswerInclude<ExtArgs> | null
|
|
/**
|
|
* Filter which UserAnswer to delete.
|
|
*/
|
|
where: UserAnswerWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* UserAnswer deleteMany
|
|
*/
|
|
export type UserAnswerDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Filter which UserAnswers to delete
|
|
*/
|
|
where?: UserAnswerWhereInput
|
|
}
|
|
|
|
/**
|
|
* UserAnswer without action
|
|
*/
|
|
export type UserAnswerDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the UserAnswer
|
|
*/
|
|
select?: UserAnswerSelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: UserAnswerInclude<ExtArgs> | null
|
|
}
|
|
|
|
|
|
/**
|
|
* Model LeaderboardEntry
|
|
*/
|
|
|
|
export type AggregateLeaderboardEntry = {
|
|
_count: LeaderboardEntryCountAggregateOutputType | null
|
|
_avg: LeaderboardEntryAvgAggregateOutputType | null
|
|
_sum: LeaderboardEntrySumAggregateOutputType | null
|
|
_min: LeaderboardEntryMinAggregateOutputType | null
|
|
_max: LeaderboardEntryMaxAggregateOutputType | null
|
|
}
|
|
|
|
export type LeaderboardEntryAvgAggregateOutputType = {
|
|
bestScore: number | null
|
|
gamesPlayed: number | null
|
|
totalCorrect: number | null
|
|
rank: number | null
|
|
}
|
|
|
|
export type LeaderboardEntrySumAggregateOutputType = {
|
|
bestScore: number | null
|
|
gamesPlayed: number | null
|
|
totalCorrect: number | null
|
|
rank: number | null
|
|
}
|
|
|
|
export type LeaderboardEntryMinAggregateOutputType = {
|
|
id: string | null
|
|
userId: string | null
|
|
grade: $Enums.Grade | null
|
|
subject: $Enums.Subject | null
|
|
bestScore: number | null
|
|
gamesPlayed: number | null
|
|
totalCorrect: number | null
|
|
rank: number | null
|
|
updatedAt: Date | null
|
|
}
|
|
|
|
export type LeaderboardEntryMaxAggregateOutputType = {
|
|
id: string | null
|
|
userId: string | null
|
|
grade: $Enums.Grade | null
|
|
subject: $Enums.Subject | null
|
|
bestScore: number | null
|
|
gamesPlayed: number | null
|
|
totalCorrect: number | null
|
|
rank: number | null
|
|
updatedAt: Date | null
|
|
}
|
|
|
|
export type LeaderboardEntryCountAggregateOutputType = {
|
|
id: number
|
|
userId: number
|
|
grade: number
|
|
subject: number
|
|
bestScore: number
|
|
gamesPlayed: number
|
|
totalCorrect: number
|
|
rank: number
|
|
updatedAt: number
|
|
_all: number
|
|
}
|
|
|
|
|
|
export type LeaderboardEntryAvgAggregateInputType = {
|
|
bestScore?: true
|
|
gamesPlayed?: true
|
|
totalCorrect?: true
|
|
rank?: true
|
|
}
|
|
|
|
export type LeaderboardEntrySumAggregateInputType = {
|
|
bestScore?: true
|
|
gamesPlayed?: true
|
|
totalCorrect?: true
|
|
rank?: true
|
|
}
|
|
|
|
export type LeaderboardEntryMinAggregateInputType = {
|
|
id?: true
|
|
userId?: true
|
|
grade?: true
|
|
subject?: true
|
|
bestScore?: true
|
|
gamesPlayed?: true
|
|
totalCorrect?: true
|
|
rank?: true
|
|
updatedAt?: true
|
|
}
|
|
|
|
export type LeaderboardEntryMaxAggregateInputType = {
|
|
id?: true
|
|
userId?: true
|
|
grade?: true
|
|
subject?: true
|
|
bestScore?: true
|
|
gamesPlayed?: true
|
|
totalCorrect?: true
|
|
rank?: true
|
|
updatedAt?: true
|
|
}
|
|
|
|
export type LeaderboardEntryCountAggregateInputType = {
|
|
id?: true
|
|
userId?: true
|
|
grade?: true
|
|
subject?: true
|
|
bestScore?: true
|
|
gamesPlayed?: true
|
|
totalCorrect?: true
|
|
rank?: true
|
|
updatedAt?: true
|
|
_all?: true
|
|
}
|
|
|
|
export type LeaderboardEntryAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Filter which LeaderboardEntry to aggregate.
|
|
*/
|
|
where?: LeaderboardEntryWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of LeaderboardEntries to fetch.
|
|
*/
|
|
orderBy?: LeaderboardEntryOrderByWithRelationInput | LeaderboardEntryOrderByWithRelationInput[]
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the start position
|
|
*/
|
|
cursor?: LeaderboardEntryWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` LeaderboardEntries 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` LeaderboardEntries.
|
|
*/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Count returned LeaderboardEntries
|
|
**/
|
|
_count?: true | LeaderboardEntryCountAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to average
|
|
**/
|
|
_avg?: LeaderboardEntryAvgAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to sum
|
|
**/
|
|
_sum?: LeaderboardEntrySumAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to find the minimum value
|
|
**/
|
|
_min?: LeaderboardEntryMinAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to find the maximum value
|
|
**/
|
|
_max?: LeaderboardEntryMaxAggregateInputType
|
|
}
|
|
|
|
export type GetLeaderboardEntryAggregateType<T extends LeaderboardEntryAggregateArgs> = {
|
|
[P in keyof T & keyof AggregateLeaderboardEntry]: P extends '_count' | 'count'
|
|
? T[P] extends true
|
|
? number
|
|
: GetScalarType<T[P], AggregateLeaderboardEntry[P]>
|
|
: GetScalarType<T[P], AggregateLeaderboardEntry[P]>
|
|
}
|
|
|
|
|
|
|
|
|
|
export type LeaderboardEntryGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
where?: LeaderboardEntryWhereInput
|
|
orderBy?: LeaderboardEntryOrderByWithAggregationInput | LeaderboardEntryOrderByWithAggregationInput[]
|
|
by: LeaderboardEntryScalarFieldEnum[] | LeaderboardEntryScalarFieldEnum
|
|
having?: LeaderboardEntryScalarWhereWithAggregatesInput
|
|
take?: number
|
|
skip?: number
|
|
_count?: LeaderboardEntryCountAggregateInputType | true
|
|
_avg?: LeaderboardEntryAvgAggregateInputType
|
|
_sum?: LeaderboardEntrySumAggregateInputType
|
|
_min?: LeaderboardEntryMinAggregateInputType
|
|
_max?: LeaderboardEntryMaxAggregateInputType
|
|
}
|
|
|
|
export type LeaderboardEntryGroupByOutputType = {
|
|
id: string
|
|
userId: string
|
|
grade: $Enums.Grade
|
|
subject: $Enums.Subject
|
|
bestScore: number
|
|
gamesPlayed: number
|
|
totalCorrect: number
|
|
rank: number | null
|
|
updatedAt: Date
|
|
_count: LeaderboardEntryCountAggregateOutputType | null
|
|
_avg: LeaderboardEntryAvgAggregateOutputType | null
|
|
_sum: LeaderboardEntrySumAggregateOutputType | null
|
|
_min: LeaderboardEntryMinAggregateOutputType | null
|
|
_max: LeaderboardEntryMaxAggregateOutputType | null
|
|
}
|
|
|
|
type GetLeaderboardEntryGroupByPayload<T extends LeaderboardEntryGroupByArgs> = Prisma.PrismaPromise<
|
|
Array<
|
|
PickEnumerable<LeaderboardEntryGroupByOutputType, T['by']> &
|
|
{
|
|
[P in ((keyof T) & (keyof LeaderboardEntryGroupByOutputType))]: P extends '_count'
|
|
? T[P] extends boolean
|
|
? number
|
|
: GetScalarType<T[P], LeaderboardEntryGroupByOutputType[P]>
|
|
: GetScalarType<T[P], LeaderboardEntryGroupByOutputType[P]>
|
|
}
|
|
>
|
|
>
|
|
|
|
|
|
export type LeaderboardEntrySelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
|
|
id?: boolean
|
|
userId?: boolean
|
|
grade?: boolean
|
|
subject?: boolean
|
|
bestScore?: boolean
|
|
gamesPlayed?: boolean
|
|
totalCorrect?: boolean
|
|
rank?: boolean
|
|
updatedAt?: boolean
|
|
user?: boolean | UserDefaultArgs<ExtArgs>
|
|
}, ExtArgs["result"]["leaderboardEntry"]>
|
|
|
|
export type LeaderboardEntrySelectCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
|
|
id?: boolean
|
|
userId?: boolean
|
|
grade?: boolean
|
|
subject?: boolean
|
|
bestScore?: boolean
|
|
gamesPlayed?: boolean
|
|
totalCorrect?: boolean
|
|
rank?: boolean
|
|
updatedAt?: boolean
|
|
user?: boolean | UserDefaultArgs<ExtArgs>
|
|
}, ExtArgs["result"]["leaderboardEntry"]>
|
|
|
|
export type LeaderboardEntrySelectScalar = {
|
|
id?: boolean
|
|
userId?: boolean
|
|
grade?: boolean
|
|
subject?: boolean
|
|
bestScore?: boolean
|
|
gamesPlayed?: boolean
|
|
totalCorrect?: boolean
|
|
rank?: boolean
|
|
updatedAt?: boolean
|
|
}
|
|
|
|
export type LeaderboardEntryInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
user?: boolean | UserDefaultArgs<ExtArgs>
|
|
}
|
|
export type LeaderboardEntryIncludeCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
user?: boolean | UserDefaultArgs<ExtArgs>
|
|
}
|
|
|
|
export type $LeaderboardEntryPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
name: "LeaderboardEntry"
|
|
objects: {
|
|
user: Prisma.$UserPayload<ExtArgs>
|
|
}
|
|
scalars: $Extensions.GetPayloadResult<{
|
|
id: string
|
|
userId: string
|
|
grade: $Enums.Grade
|
|
subject: $Enums.Subject
|
|
bestScore: number
|
|
gamesPlayed: number
|
|
totalCorrect: number
|
|
rank: number | null
|
|
updatedAt: Date
|
|
}, ExtArgs["result"]["leaderboardEntry"]>
|
|
composites: {}
|
|
}
|
|
|
|
type LeaderboardEntryGetPayload<S extends boolean | null | undefined | LeaderboardEntryDefaultArgs> = $Result.GetResult<Prisma.$LeaderboardEntryPayload, S>
|
|
|
|
type LeaderboardEntryCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
|
|
Omit<LeaderboardEntryFindManyArgs, 'select' | 'include' | 'distinct'> & {
|
|
select?: LeaderboardEntryCountAggregateInputType | true
|
|
}
|
|
|
|
export interface LeaderboardEntryDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> {
|
|
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['LeaderboardEntry'], meta: { name: 'LeaderboardEntry' } }
|
|
/**
|
|
* Find zero or one LeaderboardEntry that matches the filter.
|
|
* @param {LeaderboardEntryFindUniqueArgs} args - Arguments to find a LeaderboardEntry
|
|
* @example
|
|
* // Get one LeaderboardEntry
|
|
* const leaderboardEntry = await prisma.leaderboardEntry.findUnique({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*/
|
|
findUnique<T extends LeaderboardEntryFindUniqueArgs>(args: SelectSubset<T, LeaderboardEntryFindUniqueArgs<ExtArgs>>): Prisma__LeaderboardEntryClient<$Result.GetResult<Prisma.$LeaderboardEntryPayload<ExtArgs>, T, "findUnique"> | null, null, ExtArgs>
|
|
|
|
/**
|
|
* Find one LeaderboardEntry that matches the filter or throw an error with `error.code='P2025'`
|
|
* if no matches were found.
|
|
* @param {LeaderboardEntryFindUniqueOrThrowArgs} args - Arguments to find a LeaderboardEntry
|
|
* @example
|
|
* // Get one LeaderboardEntry
|
|
* const leaderboardEntry = await prisma.leaderboardEntry.findUniqueOrThrow({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*/
|
|
findUniqueOrThrow<T extends LeaderboardEntryFindUniqueOrThrowArgs>(args: SelectSubset<T, LeaderboardEntryFindUniqueOrThrowArgs<ExtArgs>>): Prisma__LeaderboardEntryClient<$Result.GetResult<Prisma.$LeaderboardEntryPayload<ExtArgs>, T, "findUniqueOrThrow">, never, ExtArgs>
|
|
|
|
/**
|
|
* Find the first LeaderboardEntry 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 {LeaderboardEntryFindFirstArgs} args - Arguments to find a LeaderboardEntry
|
|
* @example
|
|
* // Get one LeaderboardEntry
|
|
* const leaderboardEntry = await prisma.leaderboardEntry.findFirst({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*/
|
|
findFirst<T extends LeaderboardEntryFindFirstArgs>(args?: SelectSubset<T, LeaderboardEntryFindFirstArgs<ExtArgs>>): Prisma__LeaderboardEntryClient<$Result.GetResult<Prisma.$LeaderboardEntryPayload<ExtArgs>, T, "findFirst"> | null, null, ExtArgs>
|
|
|
|
/**
|
|
* Find the first LeaderboardEntry 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 {LeaderboardEntryFindFirstOrThrowArgs} args - Arguments to find a LeaderboardEntry
|
|
* @example
|
|
* // Get one LeaderboardEntry
|
|
* const leaderboardEntry = await prisma.leaderboardEntry.findFirstOrThrow({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*/
|
|
findFirstOrThrow<T extends LeaderboardEntryFindFirstOrThrowArgs>(args?: SelectSubset<T, LeaderboardEntryFindFirstOrThrowArgs<ExtArgs>>): Prisma__LeaderboardEntryClient<$Result.GetResult<Prisma.$LeaderboardEntryPayload<ExtArgs>, T, "findFirstOrThrow">, never, ExtArgs>
|
|
|
|
/**
|
|
* Find zero or more LeaderboardEntries 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 {LeaderboardEntryFindManyArgs} args - Arguments to filter and select certain fields only.
|
|
* @example
|
|
* // Get all LeaderboardEntries
|
|
* const leaderboardEntries = await prisma.leaderboardEntry.findMany()
|
|
*
|
|
* // Get first 10 LeaderboardEntries
|
|
* const leaderboardEntries = await prisma.leaderboardEntry.findMany({ take: 10 })
|
|
*
|
|
* // Only select the `id`
|
|
* const leaderboardEntryWithIdOnly = await prisma.leaderboardEntry.findMany({ select: { id: true } })
|
|
*
|
|
*/
|
|
findMany<T extends LeaderboardEntryFindManyArgs>(args?: SelectSubset<T, LeaderboardEntryFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$LeaderboardEntryPayload<ExtArgs>, T, "findMany">>
|
|
|
|
/**
|
|
* Create a LeaderboardEntry.
|
|
* @param {LeaderboardEntryCreateArgs} args - Arguments to create a LeaderboardEntry.
|
|
* @example
|
|
* // Create one LeaderboardEntry
|
|
* const LeaderboardEntry = await prisma.leaderboardEntry.create({
|
|
* data: {
|
|
* // ... data to create a LeaderboardEntry
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
create<T extends LeaderboardEntryCreateArgs>(args: SelectSubset<T, LeaderboardEntryCreateArgs<ExtArgs>>): Prisma__LeaderboardEntryClient<$Result.GetResult<Prisma.$LeaderboardEntryPayload<ExtArgs>, T, "create">, never, ExtArgs>
|
|
|
|
/**
|
|
* Create many LeaderboardEntries.
|
|
* @param {LeaderboardEntryCreateManyArgs} args - Arguments to create many LeaderboardEntries.
|
|
* @example
|
|
* // Create many LeaderboardEntries
|
|
* const leaderboardEntry = await prisma.leaderboardEntry.createMany({
|
|
* data: [
|
|
* // ... provide data here
|
|
* ]
|
|
* })
|
|
*
|
|
*/
|
|
createMany<T extends LeaderboardEntryCreateManyArgs>(args?: SelectSubset<T, LeaderboardEntryCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
|
|
|
|
/**
|
|
* Create many LeaderboardEntries and returns the data saved in the database.
|
|
* @param {LeaderboardEntryCreateManyAndReturnArgs} args - Arguments to create many LeaderboardEntries.
|
|
* @example
|
|
* // Create many LeaderboardEntries
|
|
* const leaderboardEntry = await prisma.leaderboardEntry.createManyAndReturn({
|
|
* data: [
|
|
* // ... provide data here
|
|
* ]
|
|
* })
|
|
*
|
|
* // Create many LeaderboardEntries and only return the `id`
|
|
* const leaderboardEntryWithIdOnly = await prisma.leaderboardEntry.createManyAndReturn({
|
|
* select: { id: true },
|
|
* data: [
|
|
* // ... provide data here
|
|
* ]
|
|
* })
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
*
|
|
*/
|
|
createManyAndReturn<T extends LeaderboardEntryCreateManyAndReturnArgs>(args?: SelectSubset<T, LeaderboardEntryCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$LeaderboardEntryPayload<ExtArgs>, T, "createManyAndReturn">>
|
|
|
|
/**
|
|
* Delete a LeaderboardEntry.
|
|
* @param {LeaderboardEntryDeleteArgs} args - Arguments to delete one LeaderboardEntry.
|
|
* @example
|
|
* // Delete one LeaderboardEntry
|
|
* const LeaderboardEntry = await prisma.leaderboardEntry.delete({
|
|
* where: {
|
|
* // ... filter to delete one LeaderboardEntry
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
delete<T extends LeaderboardEntryDeleteArgs>(args: SelectSubset<T, LeaderboardEntryDeleteArgs<ExtArgs>>): Prisma__LeaderboardEntryClient<$Result.GetResult<Prisma.$LeaderboardEntryPayload<ExtArgs>, T, "delete">, never, ExtArgs>
|
|
|
|
/**
|
|
* Update one LeaderboardEntry.
|
|
* @param {LeaderboardEntryUpdateArgs} args - Arguments to update one LeaderboardEntry.
|
|
* @example
|
|
* // Update one LeaderboardEntry
|
|
* const leaderboardEntry = await prisma.leaderboardEntry.update({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* },
|
|
* data: {
|
|
* // ... provide data here
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
update<T extends LeaderboardEntryUpdateArgs>(args: SelectSubset<T, LeaderboardEntryUpdateArgs<ExtArgs>>): Prisma__LeaderboardEntryClient<$Result.GetResult<Prisma.$LeaderboardEntryPayload<ExtArgs>, T, "update">, never, ExtArgs>
|
|
|
|
/**
|
|
* Delete zero or more LeaderboardEntries.
|
|
* @param {LeaderboardEntryDeleteManyArgs} args - Arguments to filter LeaderboardEntries to delete.
|
|
* @example
|
|
* // Delete a few LeaderboardEntries
|
|
* const { count } = await prisma.leaderboardEntry.deleteMany({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
deleteMany<T extends LeaderboardEntryDeleteManyArgs>(args?: SelectSubset<T, LeaderboardEntryDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
|
|
|
|
/**
|
|
* Update zero or more LeaderboardEntries.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {LeaderboardEntryUpdateManyArgs} args - Arguments to update one or more rows.
|
|
* @example
|
|
* // Update many LeaderboardEntries
|
|
* const leaderboardEntry = await prisma.leaderboardEntry.updateMany({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* },
|
|
* data: {
|
|
* // ... provide data here
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
updateMany<T extends LeaderboardEntryUpdateManyArgs>(args: SelectSubset<T, LeaderboardEntryUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
|
|
|
|
/**
|
|
* Create or update one LeaderboardEntry.
|
|
* @param {LeaderboardEntryUpsertArgs} args - Arguments to update or create a LeaderboardEntry.
|
|
* @example
|
|
* // Update or create a LeaderboardEntry
|
|
* const leaderboardEntry = await prisma.leaderboardEntry.upsert({
|
|
* create: {
|
|
* // ... data to create a LeaderboardEntry
|
|
* },
|
|
* update: {
|
|
* // ... in case it already exists, update
|
|
* },
|
|
* where: {
|
|
* // ... the filter for the LeaderboardEntry we want to update
|
|
* }
|
|
* })
|
|
*/
|
|
upsert<T extends LeaderboardEntryUpsertArgs>(args: SelectSubset<T, LeaderboardEntryUpsertArgs<ExtArgs>>): Prisma__LeaderboardEntryClient<$Result.GetResult<Prisma.$LeaderboardEntryPayload<ExtArgs>, T, "upsert">, never, ExtArgs>
|
|
|
|
|
|
/**
|
|
* Count the number of LeaderboardEntries.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {LeaderboardEntryCountArgs} args - Arguments to filter LeaderboardEntries to count.
|
|
* @example
|
|
* // Count the number of LeaderboardEntries
|
|
* const count = await prisma.leaderboardEntry.count({
|
|
* where: {
|
|
* // ... the filter for the LeaderboardEntries we want to count
|
|
* }
|
|
* })
|
|
**/
|
|
count<T extends LeaderboardEntryCountArgs>(
|
|
args?: Subset<T, LeaderboardEntryCountArgs>,
|
|
): Prisma.PrismaPromise<
|
|
T extends $Utils.Record<'select', any>
|
|
? T['select'] extends true
|
|
? number
|
|
: GetScalarType<T['select'], LeaderboardEntryCountAggregateOutputType>
|
|
: number
|
|
>
|
|
|
|
/**
|
|
* Allows you to perform aggregations operations on a LeaderboardEntry.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {LeaderboardEntryAggregateArgs} 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 LeaderboardEntryAggregateArgs>(args: Subset<T, LeaderboardEntryAggregateArgs>): Prisma.PrismaPromise<GetLeaderboardEntryAggregateType<T>>
|
|
|
|
/**
|
|
* Group by LeaderboardEntry.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {LeaderboardEntryGroupByArgs} 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 LeaderboardEntryGroupByArgs,
|
|
HasSelectOrTake extends Or<
|
|
Extends<'skip', Keys<T>>,
|
|
Extends<'take', Keys<T>>
|
|
>,
|
|
OrderByArg extends True extends HasSelectOrTake
|
|
? { orderBy: LeaderboardEntryGroupByArgs['orderBy'] }
|
|
: { orderBy?: LeaderboardEntryGroupByArgs['orderBy'] },
|
|
OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
|
|
ByFields extends MaybeTupleToUnion<T['by']>,
|
|
ByValid extends Has<ByFields, OrderFields>,
|
|
HavingFields extends GetHavingFields<T['having']>,
|
|
HavingValid extends Has<ByFields, HavingFields>,
|
|
ByEmpty extends T['by'] extends never[] ? True : False,
|
|
InputErrors extends ByEmpty extends True
|
|
? `Error: "by" must not be empty.`
|
|
: HavingValid extends 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 Keys<T>
|
|
? 'orderBy' extends Keys<T>
|
|
? ByValid extends 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 Keys<T>
|
|
? 'orderBy' extends Keys<T>
|
|
? ByValid extends 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 True
|
|
? {}
|
|
: {
|
|
[P in OrderFields]: P extends ByFields
|
|
? never
|
|
: `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
|
|
}[OrderFields]
|
|
>(args: SubsetIntersection<T, LeaderboardEntryGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetLeaderboardEntryGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
|
|
/**
|
|
* Fields of the LeaderboardEntry model
|
|
*/
|
|
readonly fields: LeaderboardEntryFieldRefs;
|
|
}
|
|
|
|
/**
|
|
* The delegate class that acts as a "Promise-like" for LeaderboardEntry.
|
|
* 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__LeaderboardEntryClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> extends Prisma.PrismaPromise<T> {
|
|
readonly [Symbol.toStringTag]: "PrismaPromise"
|
|
user<T extends UserDefaultArgs<ExtArgs> = {}>(args?: Subset<T, UserDefaultArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findUniqueOrThrow"> | Null, Null, ExtArgs>
|
|
/**
|
|
* 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): $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): $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): $Utils.JsPromise<T>
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Fields of the LeaderboardEntry model
|
|
*/
|
|
interface LeaderboardEntryFieldRefs {
|
|
readonly id: FieldRef<"LeaderboardEntry", 'String'>
|
|
readonly userId: FieldRef<"LeaderboardEntry", 'String'>
|
|
readonly grade: FieldRef<"LeaderboardEntry", 'Grade'>
|
|
readonly subject: FieldRef<"LeaderboardEntry", 'Subject'>
|
|
readonly bestScore: FieldRef<"LeaderboardEntry", 'Int'>
|
|
readonly gamesPlayed: FieldRef<"LeaderboardEntry", 'Int'>
|
|
readonly totalCorrect: FieldRef<"LeaderboardEntry", 'Int'>
|
|
readonly rank: FieldRef<"LeaderboardEntry", 'Int'>
|
|
readonly updatedAt: FieldRef<"LeaderboardEntry", 'DateTime'>
|
|
}
|
|
|
|
|
|
// Custom InputTypes
|
|
/**
|
|
* LeaderboardEntry findUnique
|
|
*/
|
|
export type LeaderboardEntryFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the LeaderboardEntry
|
|
*/
|
|
select?: LeaderboardEntrySelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: LeaderboardEntryInclude<ExtArgs> | null
|
|
/**
|
|
* Filter, which LeaderboardEntry to fetch.
|
|
*/
|
|
where: LeaderboardEntryWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* LeaderboardEntry findUniqueOrThrow
|
|
*/
|
|
export type LeaderboardEntryFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the LeaderboardEntry
|
|
*/
|
|
select?: LeaderboardEntrySelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: LeaderboardEntryInclude<ExtArgs> | null
|
|
/**
|
|
* Filter, which LeaderboardEntry to fetch.
|
|
*/
|
|
where: LeaderboardEntryWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* LeaderboardEntry findFirst
|
|
*/
|
|
export type LeaderboardEntryFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the LeaderboardEntry
|
|
*/
|
|
select?: LeaderboardEntrySelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: LeaderboardEntryInclude<ExtArgs> | null
|
|
/**
|
|
* Filter, which LeaderboardEntry to fetch.
|
|
*/
|
|
where?: LeaderboardEntryWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of LeaderboardEntries to fetch.
|
|
*/
|
|
orderBy?: LeaderboardEntryOrderByWithRelationInput | LeaderboardEntryOrderByWithRelationInput[]
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for searching for LeaderboardEntries.
|
|
*/
|
|
cursor?: LeaderboardEntryWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` LeaderboardEntries 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` LeaderboardEntries.
|
|
*/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
|
*
|
|
* Filter by unique combinations of LeaderboardEntries.
|
|
*/
|
|
distinct?: LeaderboardEntryScalarFieldEnum | LeaderboardEntryScalarFieldEnum[]
|
|
}
|
|
|
|
/**
|
|
* LeaderboardEntry findFirstOrThrow
|
|
*/
|
|
export type LeaderboardEntryFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the LeaderboardEntry
|
|
*/
|
|
select?: LeaderboardEntrySelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: LeaderboardEntryInclude<ExtArgs> | null
|
|
/**
|
|
* Filter, which LeaderboardEntry to fetch.
|
|
*/
|
|
where?: LeaderboardEntryWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of LeaderboardEntries to fetch.
|
|
*/
|
|
orderBy?: LeaderboardEntryOrderByWithRelationInput | LeaderboardEntryOrderByWithRelationInput[]
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for searching for LeaderboardEntries.
|
|
*/
|
|
cursor?: LeaderboardEntryWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` LeaderboardEntries 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` LeaderboardEntries.
|
|
*/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
|
*
|
|
* Filter by unique combinations of LeaderboardEntries.
|
|
*/
|
|
distinct?: LeaderboardEntryScalarFieldEnum | LeaderboardEntryScalarFieldEnum[]
|
|
}
|
|
|
|
/**
|
|
* LeaderboardEntry findMany
|
|
*/
|
|
export type LeaderboardEntryFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the LeaderboardEntry
|
|
*/
|
|
select?: LeaderboardEntrySelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: LeaderboardEntryInclude<ExtArgs> | null
|
|
/**
|
|
* Filter, which LeaderboardEntries to fetch.
|
|
*/
|
|
where?: LeaderboardEntryWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of LeaderboardEntries to fetch.
|
|
*/
|
|
orderBy?: LeaderboardEntryOrderByWithRelationInput | LeaderboardEntryOrderByWithRelationInput[]
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for listing LeaderboardEntries.
|
|
*/
|
|
cursor?: LeaderboardEntryWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` LeaderboardEntries 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` LeaderboardEntries.
|
|
*/
|
|
skip?: number
|
|
distinct?: LeaderboardEntryScalarFieldEnum | LeaderboardEntryScalarFieldEnum[]
|
|
}
|
|
|
|
/**
|
|
* LeaderboardEntry create
|
|
*/
|
|
export type LeaderboardEntryCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the LeaderboardEntry
|
|
*/
|
|
select?: LeaderboardEntrySelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: LeaderboardEntryInclude<ExtArgs> | null
|
|
/**
|
|
* The data needed to create a LeaderboardEntry.
|
|
*/
|
|
data: XOR<LeaderboardEntryCreateInput, LeaderboardEntryUncheckedCreateInput>
|
|
}
|
|
|
|
/**
|
|
* LeaderboardEntry createMany
|
|
*/
|
|
export type LeaderboardEntryCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* The data used to create many LeaderboardEntries.
|
|
*/
|
|
data: LeaderboardEntryCreateManyInput | LeaderboardEntryCreateManyInput[]
|
|
skipDuplicates?: boolean
|
|
}
|
|
|
|
/**
|
|
* LeaderboardEntry createManyAndReturn
|
|
*/
|
|
export type LeaderboardEntryCreateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the LeaderboardEntry
|
|
*/
|
|
select?: LeaderboardEntrySelectCreateManyAndReturn<ExtArgs> | null
|
|
/**
|
|
* The data used to create many LeaderboardEntries.
|
|
*/
|
|
data: LeaderboardEntryCreateManyInput | LeaderboardEntryCreateManyInput[]
|
|
skipDuplicates?: boolean
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: LeaderboardEntryIncludeCreateManyAndReturn<ExtArgs> | null
|
|
}
|
|
|
|
/**
|
|
* LeaderboardEntry update
|
|
*/
|
|
export type LeaderboardEntryUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the LeaderboardEntry
|
|
*/
|
|
select?: LeaderboardEntrySelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: LeaderboardEntryInclude<ExtArgs> | null
|
|
/**
|
|
* The data needed to update a LeaderboardEntry.
|
|
*/
|
|
data: XOR<LeaderboardEntryUpdateInput, LeaderboardEntryUncheckedUpdateInput>
|
|
/**
|
|
* Choose, which LeaderboardEntry to update.
|
|
*/
|
|
where: LeaderboardEntryWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* LeaderboardEntry updateMany
|
|
*/
|
|
export type LeaderboardEntryUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* The data used to update LeaderboardEntries.
|
|
*/
|
|
data: XOR<LeaderboardEntryUpdateManyMutationInput, LeaderboardEntryUncheckedUpdateManyInput>
|
|
/**
|
|
* Filter which LeaderboardEntries to update
|
|
*/
|
|
where?: LeaderboardEntryWhereInput
|
|
}
|
|
|
|
/**
|
|
* LeaderboardEntry upsert
|
|
*/
|
|
export type LeaderboardEntryUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the LeaderboardEntry
|
|
*/
|
|
select?: LeaderboardEntrySelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: LeaderboardEntryInclude<ExtArgs> | null
|
|
/**
|
|
* The filter to search for the LeaderboardEntry to update in case it exists.
|
|
*/
|
|
where: LeaderboardEntryWhereUniqueInput
|
|
/**
|
|
* In case the LeaderboardEntry found by the `where` argument doesn't exist, create a new LeaderboardEntry with this data.
|
|
*/
|
|
create: XOR<LeaderboardEntryCreateInput, LeaderboardEntryUncheckedCreateInput>
|
|
/**
|
|
* In case the LeaderboardEntry was found with the provided `where` argument, update it with this data.
|
|
*/
|
|
update: XOR<LeaderboardEntryUpdateInput, LeaderboardEntryUncheckedUpdateInput>
|
|
}
|
|
|
|
/**
|
|
* LeaderboardEntry delete
|
|
*/
|
|
export type LeaderboardEntryDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the LeaderboardEntry
|
|
*/
|
|
select?: LeaderboardEntrySelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: LeaderboardEntryInclude<ExtArgs> | null
|
|
/**
|
|
* Filter which LeaderboardEntry to delete.
|
|
*/
|
|
where: LeaderboardEntryWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* LeaderboardEntry deleteMany
|
|
*/
|
|
export type LeaderboardEntryDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Filter which LeaderboardEntries to delete
|
|
*/
|
|
where?: LeaderboardEntryWhereInput
|
|
}
|
|
|
|
/**
|
|
* LeaderboardEntry without action
|
|
*/
|
|
export type LeaderboardEntryDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the LeaderboardEntry
|
|
*/
|
|
select?: LeaderboardEntrySelect<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: LeaderboardEntryInclude<ExtArgs> | null
|
|
}
|
|
|
|
|
|
/**
|
|
* Enums
|
|
*/
|
|
|
|
export const TransactionIsolationLevel: {
|
|
ReadUncommitted: 'ReadUncommitted',
|
|
ReadCommitted: 'ReadCommitted',
|
|
RepeatableRead: 'RepeatableRead',
|
|
Serializable: 'Serializable'
|
|
};
|
|
|
|
export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel]
|
|
|
|
|
|
export const UserScalarFieldEnum: {
|
|
id: 'id',
|
|
googleId: 'googleId',
|
|
email: 'email',
|
|
displayName: 'displayName',
|
|
avatarUrl: 'avatarUrl',
|
|
createdAt: 'createdAt',
|
|
updatedAt: 'updatedAt'
|
|
};
|
|
|
|
export type UserScalarFieldEnum = (typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum]
|
|
|
|
|
|
export const QuestionScalarFieldEnum: {
|
|
id: 'id',
|
|
grade: 'grade',
|
|
subject: 'subject',
|
|
strand: 'strand',
|
|
difficulty: 'difficulty',
|
|
questionText: 'questionText',
|
|
options: 'options',
|
|
correctAnswer: 'correctAnswer',
|
|
explanation: 'explanation',
|
|
createdAt: 'createdAt'
|
|
};
|
|
|
|
export type QuestionScalarFieldEnum = (typeof QuestionScalarFieldEnum)[keyof typeof QuestionScalarFieldEnum]
|
|
|
|
|
|
export const GameSessionScalarFieldEnum: {
|
|
id: 'id',
|
|
userId: 'userId',
|
|
grade: 'grade',
|
|
subject: 'subject',
|
|
status: 'status',
|
|
score: 'score',
|
|
totalQuestions: 'totalQuestions',
|
|
correctAnswers: 'correctAnswers',
|
|
startedAt: 'startedAt',
|
|
completedAt: 'completedAt'
|
|
};
|
|
|
|
export type GameSessionScalarFieldEnum = (typeof GameSessionScalarFieldEnum)[keyof typeof GameSessionScalarFieldEnum]
|
|
|
|
|
|
export const UserAnswerScalarFieldEnum: {
|
|
id: 'id',
|
|
sessionId: 'sessionId',
|
|
questionId: 'questionId',
|
|
selectedAnswer: 'selectedAnswer',
|
|
isCorrect: 'isCorrect',
|
|
timeSpentMs: 'timeSpentMs',
|
|
answeredAt: 'answeredAt'
|
|
};
|
|
|
|
export type UserAnswerScalarFieldEnum = (typeof UserAnswerScalarFieldEnum)[keyof typeof UserAnswerScalarFieldEnum]
|
|
|
|
|
|
export const LeaderboardEntryScalarFieldEnum: {
|
|
id: 'id',
|
|
userId: 'userId',
|
|
grade: 'grade',
|
|
subject: 'subject',
|
|
bestScore: 'bestScore',
|
|
gamesPlayed: 'gamesPlayed',
|
|
totalCorrect: 'totalCorrect',
|
|
rank: 'rank',
|
|
updatedAt: 'updatedAt'
|
|
};
|
|
|
|
export type LeaderboardEntryScalarFieldEnum = (typeof LeaderboardEntryScalarFieldEnum)[keyof typeof LeaderboardEntryScalarFieldEnum]
|
|
|
|
|
|
export const SortOrder: {
|
|
asc: 'asc',
|
|
desc: 'desc'
|
|
};
|
|
|
|
export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder]
|
|
|
|
|
|
export const JsonNullValueInput: {
|
|
JsonNull: typeof JsonNull
|
|
};
|
|
|
|
export type JsonNullValueInput = (typeof JsonNullValueInput)[keyof typeof JsonNullValueInput]
|
|
|
|
|
|
export const QueryMode: {
|
|
default: 'default',
|
|
insensitive: 'insensitive'
|
|
};
|
|
|
|
export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode]
|
|
|
|
|
|
export const NullsOrder: {
|
|
first: 'first',
|
|
last: 'last'
|
|
};
|
|
|
|
export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder]
|
|
|
|
|
|
export const JsonNullValueFilter: {
|
|
DbNull: typeof DbNull,
|
|
JsonNull: typeof JsonNull,
|
|
AnyNull: typeof AnyNull
|
|
};
|
|
|
|
export type JsonNullValueFilter = (typeof JsonNullValueFilter)[keyof typeof JsonNullValueFilter]
|
|
|
|
|
|
/**
|
|
* Field references
|
|
*/
|
|
|
|
|
|
/**
|
|
* Reference to a field of type 'String'
|
|
*/
|
|
export type StringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String'>
|
|
|
|
|
|
|
|
/**
|
|
* Reference to a field of type 'String[]'
|
|
*/
|
|
export type ListStringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String[]'>
|
|
|
|
|
|
|
|
/**
|
|
* Reference to a field of type 'DateTime'
|
|
*/
|
|
export type DateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime'>
|
|
|
|
|
|
|
|
/**
|
|
* Reference to a field of type 'DateTime[]'
|
|
*/
|
|
export type ListDateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime[]'>
|
|
|
|
|
|
|
|
/**
|
|
* Reference to a field of type 'Grade'
|
|
*/
|
|
export type EnumGradeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Grade'>
|
|
|
|
|
|
|
|
/**
|
|
* Reference to a field of type 'Grade[]'
|
|
*/
|
|
export type ListEnumGradeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Grade[]'>
|
|
|
|
|
|
|
|
/**
|
|
* Reference to a field of type 'Subject'
|
|
*/
|
|
export type EnumSubjectFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Subject'>
|
|
|
|
|
|
|
|
/**
|
|
* Reference to a field of type 'Subject[]'
|
|
*/
|
|
export type ListEnumSubjectFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Subject[]'>
|
|
|
|
|
|
|
|
/**
|
|
* Reference to a field of type 'Difficulty'
|
|
*/
|
|
export type EnumDifficultyFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Difficulty'>
|
|
|
|
|
|
|
|
/**
|
|
* Reference to a field of type 'Difficulty[]'
|
|
*/
|
|
export type ListEnumDifficultyFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Difficulty[]'>
|
|
|
|
|
|
|
|
/**
|
|
* Reference to a field of type 'Json'
|
|
*/
|
|
export type JsonFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Json'>
|
|
|
|
|
|
|
|
/**
|
|
* Reference to a field of type 'SessionStatus'
|
|
*/
|
|
export type EnumSessionStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'SessionStatus'>
|
|
|
|
|
|
|
|
/**
|
|
* Reference to a field of type 'SessionStatus[]'
|
|
*/
|
|
export type ListEnumSessionStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'SessionStatus[]'>
|
|
|
|
|
|
|
|
/**
|
|
* Reference to a field of type 'Int'
|
|
*/
|
|
export type IntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int'>
|
|
|
|
|
|
|
|
/**
|
|
* Reference to a field of type 'Int[]'
|
|
*/
|
|
export type ListIntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int[]'>
|
|
|
|
|
|
|
|
/**
|
|
* Reference to a field of type 'Boolean'
|
|
*/
|
|
export type BooleanFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Boolean'>
|
|
|
|
|
|
|
|
/**
|
|
* Reference to a field of type 'Float'
|
|
*/
|
|
export type FloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float'>
|
|
|
|
|
|
|
|
/**
|
|
* Reference to a field of type 'Float[]'
|
|
*/
|
|
export type ListFloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float[]'>
|
|
|
|
/**
|
|
* Deep Input Types
|
|
*/
|
|
|
|
|
|
export type UserWhereInput = {
|
|
AND?: UserWhereInput | UserWhereInput[]
|
|
OR?: UserWhereInput[]
|
|
NOT?: UserWhereInput | UserWhereInput[]
|
|
id?: StringFilter<"User"> | string
|
|
googleId?: StringFilter<"User"> | string
|
|
email?: StringFilter<"User"> | string
|
|
displayName?: StringFilter<"User"> | string
|
|
avatarUrl?: StringNullableFilter<"User"> | string | null
|
|
createdAt?: DateTimeFilter<"User"> | Date | string
|
|
updatedAt?: DateTimeFilter<"User"> | Date | string
|
|
sessions?: GameSessionListRelationFilter
|
|
leaderboardEntries?: LeaderboardEntryListRelationFilter
|
|
}
|
|
|
|
export type UserOrderByWithRelationInput = {
|
|
id?: SortOrder
|
|
googleId?: SortOrder
|
|
email?: SortOrder
|
|
displayName?: SortOrder
|
|
avatarUrl?: SortOrderInput | SortOrder
|
|
createdAt?: SortOrder
|
|
updatedAt?: SortOrder
|
|
sessions?: GameSessionOrderByRelationAggregateInput
|
|
leaderboardEntries?: LeaderboardEntryOrderByRelationAggregateInput
|
|
}
|
|
|
|
export type UserWhereUniqueInput = Prisma.AtLeast<{
|
|
id?: string
|
|
googleId?: string
|
|
email?: string
|
|
AND?: UserWhereInput | UserWhereInput[]
|
|
OR?: UserWhereInput[]
|
|
NOT?: UserWhereInput | UserWhereInput[]
|
|
displayName?: StringFilter<"User"> | string
|
|
avatarUrl?: StringNullableFilter<"User"> | string | null
|
|
createdAt?: DateTimeFilter<"User"> | Date | string
|
|
updatedAt?: DateTimeFilter<"User"> | Date | string
|
|
sessions?: GameSessionListRelationFilter
|
|
leaderboardEntries?: LeaderboardEntryListRelationFilter
|
|
}, "id" | "googleId" | "email">
|
|
|
|
export type UserOrderByWithAggregationInput = {
|
|
id?: SortOrder
|
|
googleId?: SortOrder
|
|
email?: SortOrder
|
|
displayName?: SortOrder
|
|
avatarUrl?: SortOrderInput | SortOrder
|
|
createdAt?: SortOrder
|
|
updatedAt?: SortOrder
|
|
_count?: UserCountOrderByAggregateInput
|
|
_max?: UserMaxOrderByAggregateInput
|
|
_min?: UserMinOrderByAggregateInput
|
|
}
|
|
|
|
export type UserScalarWhereWithAggregatesInput = {
|
|
AND?: UserScalarWhereWithAggregatesInput | UserScalarWhereWithAggregatesInput[]
|
|
OR?: UserScalarWhereWithAggregatesInput[]
|
|
NOT?: UserScalarWhereWithAggregatesInput | UserScalarWhereWithAggregatesInput[]
|
|
id?: StringWithAggregatesFilter<"User"> | string
|
|
googleId?: StringWithAggregatesFilter<"User"> | string
|
|
email?: StringWithAggregatesFilter<"User"> | string
|
|
displayName?: StringWithAggregatesFilter<"User"> | string
|
|
avatarUrl?: StringNullableWithAggregatesFilter<"User"> | string | null
|
|
createdAt?: DateTimeWithAggregatesFilter<"User"> | Date | string
|
|
updatedAt?: DateTimeWithAggregatesFilter<"User"> | Date | string
|
|
}
|
|
|
|
export type QuestionWhereInput = {
|
|
AND?: QuestionWhereInput | QuestionWhereInput[]
|
|
OR?: QuestionWhereInput[]
|
|
NOT?: QuestionWhereInput | QuestionWhereInput[]
|
|
id?: StringFilter<"Question"> | string
|
|
grade?: EnumGradeFilter<"Question"> | $Enums.Grade
|
|
subject?: EnumSubjectFilter<"Question"> | $Enums.Subject
|
|
strand?: StringFilter<"Question"> | string
|
|
difficulty?: EnumDifficultyFilter<"Question"> | $Enums.Difficulty
|
|
questionText?: StringFilter<"Question"> | string
|
|
options?: JsonFilter<"Question">
|
|
correctAnswer?: StringFilter<"Question"> | string
|
|
explanation?: StringNullableFilter<"Question"> | string | null
|
|
createdAt?: DateTimeFilter<"Question"> | Date | string
|
|
answers?: UserAnswerListRelationFilter
|
|
}
|
|
|
|
export type QuestionOrderByWithRelationInput = {
|
|
id?: SortOrder
|
|
grade?: SortOrder
|
|
subject?: SortOrder
|
|
strand?: SortOrder
|
|
difficulty?: SortOrder
|
|
questionText?: SortOrder
|
|
options?: SortOrder
|
|
correctAnswer?: SortOrder
|
|
explanation?: SortOrderInput | SortOrder
|
|
createdAt?: SortOrder
|
|
answers?: UserAnswerOrderByRelationAggregateInput
|
|
}
|
|
|
|
export type QuestionWhereUniqueInput = Prisma.AtLeast<{
|
|
id?: string
|
|
AND?: QuestionWhereInput | QuestionWhereInput[]
|
|
OR?: QuestionWhereInput[]
|
|
NOT?: QuestionWhereInput | QuestionWhereInput[]
|
|
grade?: EnumGradeFilter<"Question"> | $Enums.Grade
|
|
subject?: EnumSubjectFilter<"Question"> | $Enums.Subject
|
|
strand?: StringFilter<"Question"> | string
|
|
difficulty?: EnumDifficultyFilter<"Question"> | $Enums.Difficulty
|
|
questionText?: StringFilter<"Question"> | string
|
|
options?: JsonFilter<"Question">
|
|
correctAnswer?: StringFilter<"Question"> | string
|
|
explanation?: StringNullableFilter<"Question"> | string | null
|
|
createdAt?: DateTimeFilter<"Question"> | Date | string
|
|
answers?: UserAnswerListRelationFilter
|
|
}, "id">
|
|
|
|
export type QuestionOrderByWithAggregationInput = {
|
|
id?: SortOrder
|
|
grade?: SortOrder
|
|
subject?: SortOrder
|
|
strand?: SortOrder
|
|
difficulty?: SortOrder
|
|
questionText?: SortOrder
|
|
options?: SortOrder
|
|
correctAnswer?: SortOrder
|
|
explanation?: SortOrderInput | SortOrder
|
|
createdAt?: SortOrder
|
|
_count?: QuestionCountOrderByAggregateInput
|
|
_max?: QuestionMaxOrderByAggregateInput
|
|
_min?: QuestionMinOrderByAggregateInput
|
|
}
|
|
|
|
export type QuestionScalarWhereWithAggregatesInput = {
|
|
AND?: QuestionScalarWhereWithAggregatesInput | QuestionScalarWhereWithAggregatesInput[]
|
|
OR?: QuestionScalarWhereWithAggregatesInput[]
|
|
NOT?: QuestionScalarWhereWithAggregatesInput | QuestionScalarWhereWithAggregatesInput[]
|
|
id?: StringWithAggregatesFilter<"Question"> | string
|
|
grade?: EnumGradeWithAggregatesFilter<"Question"> | $Enums.Grade
|
|
subject?: EnumSubjectWithAggregatesFilter<"Question"> | $Enums.Subject
|
|
strand?: StringWithAggregatesFilter<"Question"> | string
|
|
difficulty?: EnumDifficultyWithAggregatesFilter<"Question"> | $Enums.Difficulty
|
|
questionText?: StringWithAggregatesFilter<"Question"> | string
|
|
options?: JsonWithAggregatesFilter<"Question">
|
|
correctAnswer?: StringWithAggregatesFilter<"Question"> | string
|
|
explanation?: StringNullableWithAggregatesFilter<"Question"> | string | null
|
|
createdAt?: DateTimeWithAggregatesFilter<"Question"> | Date | string
|
|
}
|
|
|
|
export type GameSessionWhereInput = {
|
|
AND?: GameSessionWhereInput | GameSessionWhereInput[]
|
|
OR?: GameSessionWhereInput[]
|
|
NOT?: GameSessionWhereInput | GameSessionWhereInput[]
|
|
id?: StringFilter<"GameSession"> | string
|
|
userId?: StringFilter<"GameSession"> | string
|
|
grade?: EnumGradeFilter<"GameSession"> | $Enums.Grade
|
|
subject?: EnumSubjectFilter<"GameSession"> | $Enums.Subject
|
|
status?: EnumSessionStatusFilter<"GameSession"> | $Enums.SessionStatus
|
|
score?: IntFilter<"GameSession"> | number
|
|
totalQuestions?: IntFilter<"GameSession"> | number
|
|
correctAnswers?: IntFilter<"GameSession"> | number
|
|
startedAt?: DateTimeFilter<"GameSession"> | Date | string
|
|
completedAt?: DateTimeNullableFilter<"GameSession"> | Date | string | null
|
|
user?: XOR<UserRelationFilter, UserWhereInput>
|
|
answers?: UserAnswerListRelationFilter
|
|
}
|
|
|
|
export type GameSessionOrderByWithRelationInput = {
|
|
id?: SortOrder
|
|
userId?: SortOrder
|
|
grade?: SortOrder
|
|
subject?: SortOrder
|
|
status?: SortOrder
|
|
score?: SortOrder
|
|
totalQuestions?: SortOrder
|
|
correctAnswers?: SortOrder
|
|
startedAt?: SortOrder
|
|
completedAt?: SortOrderInput | SortOrder
|
|
user?: UserOrderByWithRelationInput
|
|
answers?: UserAnswerOrderByRelationAggregateInput
|
|
}
|
|
|
|
export type GameSessionWhereUniqueInput = Prisma.AtLeast<{
|
|
id?: string
|
|
AND?: GameSessionWhereInput | GameSessionWhereInput[]
|
|
OR?: GameSessionWhereInput[]
|
|
NOT?: GameSessionWhereInput | GameSessionWhereInput[]
|
|
userId?: StringFilter<"GameSession"> | string
|
|
grade?: EnumGradeFilter<"GameSession"> | $Enums.Grade
|
|
subject?: EnumSubjectFilter<"GameSession"> | $Enums.Subject
|
|
status?: EnumSessionStatusFilter<"GameSession"> | $Enums.SessionStatus
|
|
score?: IntFilter<"GameSession"> | number
|
|
totalQuestions?: IntFilter<"GameSession"> | number
|
|
correctAnswers?: IntFilter<"GameSession"> | number
|
|
startedAt?: DateTimeFilter<"GameSession"> | Date | string
|
|
completedAt?: DateTimeNullableFilter<"GameSession"> | Date | string | null
|
|
user?: XOR<UserRelationFilter, UserWhereInput>
|
|
answers?: UserAnswerListRelationFilter
|
|
}, "id">
|
|
|
|
export type GameSessionOrderByWithAggregationInput = {
|
|
id?: SortOrder
|
|
userId?: SortOrder
|
|
grade?: SortOrder
|
|
subject?: SortOrder
|
|
status?: SortOrder
|
|
score?: SortOrder
|
|
totalQuestions?: SortOrder
|
|
correctAnswers?: SortOrder
|
|
startedAt?: SortOrder
|
|
completedAt?: SortOrderInput | SortOrder
|
|
_count?: GameSessionCountOrderByAggregateInput
|
|
_avg?: GameSessionAvgOrderByAggregateInput
|
|
_max?: GameSessionMaxOrderByAggregateInput
|
|
_min?: GameSessionMinOrderByAggregateInput
|
|
_sum?: GameSessionSumOrderByAggregateInput
|
|
}
|
|
|
|
export type GameSessionScalarWhereWithAggregatesInput = {
|
|
AND?: GameSessionScalarWhereWithAggregatesInput | GameSessionScalarWhereWithAggregatesInput[]
|
|
OR?: GameSessionScalarWhereWithAggregatesInput[]
|
|
NOT?: GameSessionScalarWhereWithAggregatesInput | GameSessionScalarWhereWithAggregatesInput[]
|
|
id?: StringWithAggregatesFilter<"GameSession"> | string
|
|
userId?: StringWithAggregatesFilter<"GameSession"> | string
|
|
grade?: EnumGradeWithAggregatesFilter<"GameSession"> | $Enums.Grade
|
|
subject?: EnumSubjectWithAggregatesFilter<"GameSession"> | $Enums.Subject
|
|
status?: EnumSessionStatusWithAggregatesFilter<"GameSession"> | $Enums.SessionStatus
|
|
score?: IntWithAggregatesFilter<"GameSession"> | number
|
|
totalQuestions?: IntWithAggregatesFilter<"GameSession"> | number
|
|
correctAnswers?: IntWithAggregatesFilter<"GameSession"> | number
|
|
startedAt?: DateTimeWithAggregatesFilter<"GameSession"> | Date | string
|
|
completedAt?: DateTimeNullableWithAggregatesFilter<"GameSession"> | Date | string | null
|
|
}
|
|
|
|
export type UserAnswerWhereInput = {
|
|
AND?: UserAnswerWhereInput | UserAnswerWhereInput[]
|
|
OR?: UserAnswerWhereInput[]
|
|
NOT?: UserAnswerWhereInput | UserAnswerWhereInput[]
|
|
id?: StringFilter<"UserAnswer"> | string
|
|
sessionId?: StringFilter<"UserAnswer"> | string
|
|
questionId?: StringFilter<"UserAnswer"> | string
|
|
selectedAnswer?: StringFilter<"UserAnswer"> | string
|
|
isCorrect?: BoolFilter<"UserAnswer"> | boolean
|
|
timeSpentMs?: IntFilter<"UserAnswer"> | number
|
|
answeredAt?: DateTimeFilter<"UserAnswer"> | Date | string
|
|
session?: XOR<GameSessionRelationFilter, GameSessionWhereInput>
|
|
question?: XOR<QuestionRelationFilter, QuestionWhereInput>
|
|
}
|
|
|
|
export type UserAnswerOrderByWithRelationInput = {
|
|
id?: SortOrder
|
|
sessionId?: SortOrder
|
|
questionId?: SortOrder
|
|
selectedAnswer?: SortOrder
|
|
isCorrect?: SortOrder
|
|
timeSpentMs?: SortOrder
|
|
answeredAt?: SortOrder
|
|
session?: GameSessionOrderByWithRelationInput
|
|
question?: QuestionOrderByWithRelationInput
|
|
}
|
|
|
|
export type UserAnswerWhereUniqueInput = Prisma.AtLeast<{
|
|
id?: string
|
|
AND?: UserAnswerWhereInput | UserAnswerWhereInput[]
|
|
OR?: UserAnswerWhereInput[]
|
|
NOT?: UserAnswerWhereInput | UserAnswerWhereInput[]
|
|
sessionId?: StringFilter<"UserAnswer"> | string
|
|
questionId?: StringFilter<"UserAnswer"> | string
|
|
selectedAnswer?: StringFilter<"UserAnswer"> | string
|
|
isCorrect?: BoolFilter<"UserAnswer"> | boolean
|
|
timeSpentMs?: IntFilter<"UserAnswer"> | number
|
|
answeredAt?: DateTimeFilter<"UserAnswer"> | Date | string
|
|
session?: XOR<GameSessionRelationFilter, GameSessionWhereInput>
|
|
question?: XOR<QuestionRelationFilter, QuestionWhereInput>
|
|
}, "id">
|
|
|
|
export type UserAnswerOrderByWithAggregationInput = {
|
|
id?: SortOrder
|
|
sessionId?: SortOrder
|
|
questionId?: SortOrder
|
|
selectedAnswer?: SortOrder
|
|
isCorrect?: SortOrder
|
|
timeSpentMs?: SortOrder
|
|
answeredAt?: SortOrder
|
|
_count?: UserAnswerCountOrderByAggregateInput
|
|
_avg?: UserAnswerAvgOrderByAggregateInput
|
|
_max?: UserAnswerMaxOrderByAggregateInput
|
|
_min?: UserAnswerMinOrderByAggregateInput
|
|
_sum?: UserAnswerSumOrderByAggregateInput
|
|
}
|
|
|
|
export type UserAnswerScalarWhereWithAggregatesInput = {
|
|
AND?: UserAnswerScalarWhereWithAggregatesInput | UserAnswerScalarWhereWithAggregatesInput[]
|
|
OR?: UserAnswerScalarWhereWithAggregatesInput[]
|
|
NOT?: UserAnswerScalarWhereWithAggregatesInput | UserAnswerScalarWhereWithAggregatesInput[]
|
|
id?: StringWithAggregatesFilter<"UserAnswer"> | string
|
|
sessionId?: StringWithAggregatesFilter<"UserAnswer"> | string
|
|
questionId?: StringWithAggregatesFilter<"UserAnswer"> | string
|
|
selectedAnswer?: StringWithAggregatesFilter<"UserAnswer"> | string
|
|
isCorrect?: BoolWithAggregatesFilter<"UserAnswer"> | boolean
|
|
timeSpentMs?: IntWithAggregatesFilter<"UserAnswer"> | number
|
|
answeredAt?: DateTimeWithAggregatesFilter<"UserAnswer"> | Date | string
|
|
}
|
|
|
|
export type LeaderboardEntryWhereInput = {
|
|
AND?: LeaderboardEntryWhereInput | LeaderboardEntryWhereInput[]
|
|
OR?: LeaderboardEntryWhereInput[]
|
|
NOT?: LeaderboardEntryWhereInput | LeaderboardEntryWhereInput[]
|
|
id?: StringFilter<"LeaderboardEntry"> | string
|
|
userId?: StringFilter<"LeaderboardEntry"> | string
|
|
grade?: EnumGradeFilter<"LeaderboardEntry"> | $Enums.Grade
|
|
subject?: EnumSubjectFilter<"LeaderboardEntry"> | $Enums.Subject
|
|
bestScore?: IntFilter<"LeaderboardEntry"> | number
|
|
gamesPlayed?: IntFilter<"LeaderboardEntry"> | number
|
|
totalCorrect?: IntFilter<"LeaderboardEntry"> | number
|
|
rank?: IntNullableFilter<"LeaderboardEntry"> | number | null
|
|
updatedAt?: DateTimeFilter<"LeaderboardEntry"> | Date | string
|
|
user?: XOR<UserRelationFilter, UserWhereInput>
|
|
}
|
|
|
|
export type LeaderboardEntryOrderByWithRelationInput = {
|
|
id?: SortOrder
|
|
userId?: SortOrder
|
|
grade?: SortOrder
|
|
subject?: SortOrder
|
|
bestScore?: SortOrder
|
|
gamesPlayed?: SortOrder
|
|
totalCorrect?: SortOrder
|
|
rank?: SortOrderInput | SortOrder
|
|
updatedAt?: SortOrder
|
|
user?: UserOrderByWithRelationInput
|
|
}
|
|
|
|
export type LeaderboardEntryWhereUniqueInput = Prisma.AtLeast<{
|
|
id?: string
|
|
userId_grade_subject?: LeaderboardEntryUserIdGradeSubjectCompoundUniqueInput
|
|
AND?: LeaderboardEntryWhereInput | LeaderboardEntryWhereInput[]
|
|
OR?: LeaderboardEntryWhereInput[]
|
|
NOT?: LeaderboardEntryWhereInput | LeaderboardEntryWhereInput[]
|
|
userId?: StringFilter<"LeaderboardEntry"> | string
|
|
grade?: EnumGradeFilter<"LeaderboardEntry"> | $Enums.Grade
|
|
subject?: EnumSubjectFilter<"LeaderboardEntry"> | $Enums.Subject
|
|
bestScore?: IntFilter<"LeaderboardEntry"> | number
|
|
gamesPlayed?: IntFilter<"LeaderboardEntry"> | number
|
|
totalCorrect?: IntFilter<"LeaderboardEntry"> | number
|
|
rank?: IntNullableFilter<"LeaderboardEntry"> | number | null
|
|
updatedAt?: DateTimeFilter<"LeaderboardEntry"> | Date | string
|
|
user?: XOR<UserRelationFilter, UserWhereInput>
|
|
}, "id" | "userId_grade_subject">
|
|
|
|
export type LeaderboardEntryOrderByWithAggregationInput = {
|
|
id?: SortOrder
|
|
userId?: SortOrder
|
|
grade?: SortOrder
|
|
subject?: SortOrder
|
|
bestScore?: SortOrder
|
|
gamesPlayed?: SortOrder
|
|
totalCorrect?: SortOrder
|
|
rank?: SortOrderInput | SortOrder
|
|
updatedAt?: SortOrder
|
|
_count?: LeaderboardEntryCountOrderByAggregateInput
|
|
_avg?: LeaderboardEntryAvgOrderByAggregateInput
|
|
_max?: LeaderboardEntryMaxOrderByAggregateInput
|
|
_min?: LeaderboardEntryMinOrderByAggregateInput
|
|
_sum?: LeaderboardEntrySumOrderByAggregateInput
|
|
}
|
|
|
|
export type LeaderboardEntryScalarWhereWithAggregatesInput = {
|
|
AND?: LeaderboardEntryScalarWhereWithAggregatesInput | LeaderboardEntryScalarWhereWithAggregatesInput[]
|
|
OR?: LeaderboardEntryScalarWhereWithAggregatesInput[]
|
|
NOT?: LeaderboardEntryScalarWhereWithAggregatesInput | LeaderboardEntryScalarWhereWithAggregatesInput[]
|
|
id?: StringWithAggregatesFilter<"LeaderboardEntry"> | string
|
|
userId?: StringWithAggregatesFilter<"LeaderboardEntry"> | string
|
|
grade?: EnumGradeWithAggregatesFilter<"LeaderboardEntry"> | $Enums.Grade
|
|
subject?: EnumSubjectWithAggregatesFilter<"LeaderboardEntry"> | $Enums.Subject
|
|
bestScore?: IntWithAggregatesFilter<"LeaderboardEntry"> | number
|
|
gamesPlayed?: IntWithAggregatesFilter<"LeaderboardEntry"> | number
|
|
totalCorrect?: IntWithAggregatesFilter<"LeaderboardEntry"> | number
|
|
rank?: IntNullableWithAggregatesFilter<"LeaderboardEntry"> | number | null
|
|
updatedAt?: DateTimeWithAggregatesFilter<"LeaderboardEntry"> | Date | string
|
|
}
|
|
|
|
export type UserCreateInput = {
|
|
id?: string
|
|
googleId: string
|
|
email: string
|
|
displayName: string
|
|
avatarUrl?: string | null
|
|
createdAt?: Date | string
|
|
updatedAt?: Date | string
|
|
sessions?: GameSessionCreateNestedManyWithoutUserInput
|
|
leaderboardEntries?: LeaderboardEntryCreateNestedManyWithoutUserInput
|
|
}
|
|
|
|
export type UserUncheckedCreateInput = {
|
|
id?: string
|
|
googleId: string
|
|
email: string
|
|
displayName: string
|
|
avatarUrl?: string | null
|
|
createdAt?: Date | string
|
|
updatedAt?: Date | string
|
|
sessions?: GameSessionUncheckedCreateNestedManyWithoutUserInput
|
|
leaderboardEntries?: LeaderboardEntryUncheckedCreateNestedManyWithoutUserInput
|
|
}
|
|
|
|
export type UserUpdateInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
googleId?: StringFieldUpdateOperationsInput | string
|
|
email?: StringFieldUpdateOperationsInput | string
|
|
displayName?: StringFieldUpdateOperationsInput | string
|
|
avatarUrl?: NullableStringFieldUpdateOperationsInput | string | null
|
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
sessions?: GameSessionUpdateManyWithoutUserNestedInput
|
|
leaderboardEntries?: LeaderboardEntryUpdateManyWithoutUserNestedInput
|
|
}
|
|
|
|
export type UserUncheckedUpdateInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
googleId?: StringFieldUpdateOperationsInput | string
|
|
email?: StringFieldUpdateOperationsInput | string
|
|
displayName?: StringFieldUpdateOperationsInput | string
|
|
avatarUrl?: NullableStringFieldUpdateOperationsInput | string | null
|
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
sessions?: GameSessionUncheckedUpdateManyWithoutUserNestedInput
|
|
leaderboardEntries?: LeaderboardEntryUncheckedUpdateManyWithoutUserNestedInput
|
|
}
|
|
|
|
export type UserCreateManyInput = {
|
|
id?: string
|
|
googleId: string
|
|
email: string
|
|
displayName: string
|
|
avatarUrl?: string | null
|
|
createdAt?: Date | string
|
|
updatedAt?: Date | string
|
|
}
|
|
|
|
export type UserUpdateManyMutationInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
googleId?: StringFieldUpdateOperationsInput | string
|
|
email?: StringFieldUpdateOperationsInput | string
|
|
displayName?: StringFieldUpdateOperationsInput | string
|
|
avatarUrl?: NullableStringFieldUpdateOperationsInput | string | null
|
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
}
|
|
|
|
export type UserUncheckedUpdateManyInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
googleId?: StringFieldUpdateOperationsInput | string
|
|
email?: StringFieldUpdateOperationsInput | string
|
|
displayName?: StringFieldUpdateOperationsInput | string
|
|
avatarUrl?: NullableStringFieldUpdateOperationsInput | string | null
|
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
}
|
|
|
|
export type QuestionCreateInput = {
|
|
id?: string
|
|
grade: $Enums.Grade
|
|
subject: $Enums.Subject
|
|
strand: string
|
|
difficulty: $Enums.Difficulty
|
|
questionText: string
|
|
options: JsonNullValueInput | InputJsonValue
|
|
correctAnswer: string
|
|
explanation?: string | null
|
|
createdAt?: Date | string
|
|
answers?: UserAnswerCreateNestedManyWithoutQuestionInput
|
|
}
|
|
|
|
export type QuestionUncheckedCreateInput = {
|
|
id?: string
|
|
grade: $Enums.Grade
|
|
subject: $Enums.Subject
|
|
strand: string
|
|
difficulty: $Enums.Difficulty
|
|
questionText: string
|
|
options: JsonNullValueInput | InputJsonValue
|
|
correctAnswer: string
|
|
explanation?: string | null
|
|
createdAt?: Date | string
|
|
answers?: UserAnswerUncheckedCreateNestedManyWithoutQuestionInput
|
|
}
|
|
|
|
export type QuestionUpdateInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade
|
|
subject?: EnumSubjectFieldUpdateOperationsInput | $Enums.Subject
|
|
strand?: StringFieldUpdateOperationsInput | string
|
|
difficulty?: EnumDifficultyFieldUpdateOperationsInput | $Enums.Difficulty
|
|
questionText?: StringFieldUpdateOperationsInput | string
|
|
options?: JsonNullValueInput | InputJsonValue
|
|
correctAnswer?: StringFieldUpdateOperationsInput | string
|
|
explanation?: NullableStringFieldUpdateOperationsInput | string | null
|
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
answers?: UserAnswerUpdateManyWithoutQuestionNestedInput
|
|
}
|
|
|
|
export type QuestionUncheckedUpdateInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade
|
|
subject?: EnumSubjectFieldUpdateOperationsInput | $Enums.Subject
|
|
strand?: StringFieldUpdateOperationsInput | string
|
|
difficulty?: EnumDifficultyFieldUpdateOperationsInput | $Enums.Difficulty
|
|
questionText?: StringFieldUpdateOperationsInput | string
|
|
options?: JsonNullValueInput | InputJsonValue
|
|
correctAnswer?: StringFieldUpdateOperationsInput | string
|
|
explanation?: NullableStringFieldUpdateOperationsInput | string | null
|
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
answers?: UserAnswerUncheckedUpdateManyWithoutQuestionNestedInput
|
|
}
|
|
|
|
export type QuestionCreateManyInput = {
|
|
id?: string
|
|
grade: $Enums.Grade
|
|
subject: $Enums.Subject
|
|
strand: string
|
|
difficulty: $Enums.Difficulty
|
|
questionText: string
|
|
options: JsonNullValueInput | InputJsonValue
|
|
correctAnswer: string
|
|
explanation?: string | null
|
|
createdAt?: Date | string
|
|
}
|
|
|
|
export type QuestionUpdateManyMutationInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade
|
|
subject?: EnumSubjectFieldUpdateOperationsInput | $Enums.Subject
|
|
strand?: StringFieldUpdateOperationsInput | string
|
|
difficulty?: EnumDifficultyFieldUpdateOperationsInput | $Enums.Difficulty
|
|
questionText?: StringFieldUpdateOperationsInput | string
|
|
options?: JsonNullValueInput | InputJsonValue
|
|
correctAnswer?: StringFieldUpdateOperationsInput | string
|
|
explanation?: NullableStringFieldUpdateOperationsInput | string | null
|
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
}
|
|
|
|
export type QuestionUncheckedUpdateManyInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade
|
|
subject?: EnumSubjectFieldUpdateOperationsInput | $Enums.Subject
|
|
strand?: StringFieldUpdateOperationsInput | string
|
|
difficulty?: EnumDifficultyFieldUpdateOperationsInput | $Enums.Difficulty
|
|
questionText?: StringFieldUpdateOperationsInput | string
|
|
options?: JsonNullValueInput | InputJsonValue
|
|
correctAnswer?: StringFieldUpdateOperationsInput | string
|
|
explanation?: NullableStringFieldUpdateOperationsInput | string | null
|
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
}
|
|
|
|
export type GameSessionCreateInput = {
|
|
id?: string
|
|
grade: $Enums.Grade
|
|
subject: $Enums.Subject
|
|
status?: $Enums.SessionStatus
|
|
score?: number
|
|
totalQuestions: number
|
|
correctAnswers?: number
|
|
startedAt?: Date | string
|
|
completedAt?: Date | string | null
|
|
user: UserCreateNestedOneWithoutSessionsInput
|
|
answers?: UserAnswerCreateNestedManyWithoutSessionInput
|
|
}
|
|
|
|
export type GameSessionUncheckedCreateInput = {
|
|
id?: string
|
|
userId: string
|
|
grade: $Enums.Grade
|
|
subject: $Enums.Subject
|
|
status?: $Enums.SessionStatus
|
|
score?: number
|
|
totalQuestions: number
|
|
correctAnswers?: number
|
|
startedAt?: Date | string
|
|
completedAt?: Date | string | null
|
|
answers?: UserAnswerUncheckedCreateNestedManyWithoutSessionInput
|
|
}
|
|
|
|
export type GameSessionUpdateInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade
|
|
subject?: EnumSubjectFieldUpdateOperationsInput | $Enums.Subject
|
|
status?: EnumSessionStatusFieldUpdateOperationsInput | $Enums.SessionStatus
|
|
score?: IntFieldUpdateOperationsInput | number
|
|
totalQuestions?: IntFieldUpdateOperationsInput | number
|
|
correctAnswers?: IntFieldUpdateOperationsInput | number
|
|
startedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
completedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
user?: UserUpdateOneRequiredWithoutSessionsNestedInput
|
|
answers?: UserAnswerUpdateManyWithoutSessionNestedInput
|
|
}
|
|
|
|
export type GameSessionUncheckedUpdateInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
userId?: StringFieldUpdateOperationsInput | string
|
|
grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade
|
|
subject?: EnumSubjectFieldUpdateOperationsInput | $Enums.Subject
|
|
status?: EnumSessionStatusFieldUpdateOperationsInput | $Enums.SessionStatus
|
|
score?: IntFieldUpdateOperationsInput | number
|
|
totalQuestions?: IntFieldUpdateOperationsInput | number
|
|
correctAnswers?: IntFieldUpdateOperationsInput | number
|
|
startedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
completedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
answers?: UserAnswerUncheckedUpdateManyWithoutSessionNestedInput
|
|
}
|
|
|
|
export type GameSessionCreateManyInput = {
|
|
id?: string
|
|
userId: string
|
|
grade: $Enums.Grade
|
|
subject: $Enums.Subject
|
|
status?: $Enums.SessionStatus
|
|
score?: number
|
|
totalQuestions: number
|
|
correctAnswers?: number
|
|
startedAt?: Date | string
|
|
completedAt?: Date | string | null
|
|
}
|
|
|
|
export type GameSessionUpdateManyMutationInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade
|
|
subject?: EnumSubjectFieldUpdateOperationsInput | $Enums.Subject
|
|
status?: EnumSessionStatusFieldUpdateOperationsInput | $Enums.SessionStatus
|
|
score?: IntFieldUpdateOperationsInput | number
|
|
totalQuestions?: IntFieldUpdateOperationsInput | number
|
|
correctAnswers?: IntFieldUpdateOperationsInput | number
|
|
startedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
completedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
}
|
|
|
|
export type GameSessionUncheckedUpdateManyInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
userId?: StringFieldUpdateOperationsInput | string
|
|
grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade
|
|
subject?: EnumSubjectFieldUpdateOperationsInput | $Enums.Subject
|
|
status?: EnumSessionStatusFieldUpdateOperationsInput | $Enums.SessionStatus
|
|
score?: IntFieldUpdateOperationsInput | number
|
|
totalQuestions?: IntFieldUpdateOperationsInput | number
|
|
correctAnswers?: IntFieldUpdateOperationsInput | number
|
|
startedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
completedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
}
|
|
|
|
export type UserAnswerCreateInput = {
|
|
id?: string
|
|
selectedAnswer: string
|
|
isCorrect: boolean
|
|
timeSpentMs: number
|
|
answeredAt?: Date | string
|
|
session: GameSessionCreateNestedOneWithoutAnswersInput
|
|
question: QuestionCreateNestedOneWithoutAnswersInput
|
|
}
|
|
|
|
export type UserAnswerUncheckedCreateInput = {
|
|
id?: string
|
|
sessionId: string
|
|
questionId: string
|
|
selectedAnswer: string
|
|
isCorrect: boolean
|
|
timeSpentMs: number
|
|
answeredAt?: Date | string
|
|
}
|
|
|
|
export type UserAnswerUpdateInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
selectedAnswer?: StringFieldUpdateOperationsInput | string
|
|
isCorrect?: BoolFieldUpdateOperationsInput | boolean
|
|
timeSpentMs?: IntFieldUpdateOperationsInput | number
|
|
answeredAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
session?: GameSessionUpdateOneRequiredWithoutAnswersNestedInput
|
|
question?: QuestionUpdateOneRequiredWithoutAnswersNestedInput
|
|
}
|
|
|
|
export type UserAnswerUncheckedUpdateInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
sessionId?: StringFieldUpdateOperationsInput | string
|
|
questionId?: StringFieldUpdateOperationsInput | string
|
|
selectedAnswer?: StringFieldUpdateOperationsInput | string
|
|
isCorrect?: BoolFieldUpdateOperationsInput | boolean
|
|
timeSpentMs?: IntFieldUpdateOperationsInput | number
|
|
answeredAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
}
|
|
|
|
export type UserAnswerCreateManyInput = {
|
|
id?: string
|
|
sessionId: string
|
|
questionId: string
|
|
selectedAnswer: string
|
|
isCorrect: boolean
|
|
timeSpentMs: number
|
|
answeredAt?: Date | string
|
|
}
|
|
|
|
export type UserAnswerUpdateManyMutationInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
selectedAnswer?: StringFieldUpdateOperationsInput | string
|
|
isCorrect?: BoolFieldUpdateOperationsInput | boolean
|
|
timeSpentMs?: IntFieldUpdateOperationsInput | number
|
|
answeredAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
}
|
|
|
|
export type UserAnswerUncheckedUpdateManyInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
sessionId?: StringFieldUpdateOperationsInput | string
|
|
questionId?: StringFieldUpdateOperationsInput | string
|
|
selectedAnswer?: StringFieldUpdateOperationsInput | string
|
|
isCorrect?: BoolFieldUpdateOperationsInput | boolean
|
|
timeSpentMs?: IntFieldUpdateOperationsInput | number
|
|
answeredAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
}
|
|
|
|
export type LeaderboardEntryCreateInput = {
|
|
id?: string
|
|
grade: $Enums.Grade
|
|
subject: $Enums.Subject
|
|
bestScore: number
|
|
gamesPlayed: number
|
|
totalCorrect: number
|
|
rank?: number | null
|
|
updatedAt?: Date | string
|
|
user: UserCreateNestedOneWithoutLeaderboardEntriesInput
|
|
}
|
|
|
|
export type LeaderboardEntryUncheckedCreateInput = {
|
|
id?: string
|
|
userId: string
|
|
grade: $Enums.Grade
|
|
subject: $Enums.Subject
|
|
bestScore: number
|
|
gamesPlayed: number
|
|
totalCorrect: number
|
|
rank?: number | null
|
|
updatedAt?: Date | string
|
|
}
|
|
|
|
export type LeaderboardEntryUpdateInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade
|
|
subject?: EnumSubjectFieldUpdateOperationsInput | $Enums.Subject
|
|
bestScore?: IntFieldUpdateOperationsInput | number
|
|
gamesPlayed?: IntFieldUpdateOperationsInput | number
|
|
totalCorrect?: IntFieldUpdateOperationsInput | number
|
|
rank?: NullableIntFieldUpdateOperationsInput | number | null
|
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
user?: UserUpdateOneRequiredWithoutLeaderboardEntriesNestedInput
|
|
}
|
|
|
|
export type LeaderboardEntryUncheckedUpdateInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
userId?: StringFieldUpdateOperationsInput | string
|
|
grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade
|
|
subject?: EnumSubjectFieldUpdateOperationsInput | $Enums.Subject
|
|
bestScore?: IntFieldUpdateOperationsInput | number
|
|
gamesPlayed?: IntFieldUpdateOperationsInput | number
|
|
totalCorrect?: IntFieldUpdateOperationsInput | number
|
|
rank?: NullableIntFieldUpdateOperationsInput | number | null
|
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
}
|
|
|
|
export type LeaderboardEntryCreateManyInput = {
|
|
id?: string
|
|
userId: string
|
|
grade: $Enums.Grade
|
|
subject: $Enums.Subject
|
|
bestScore: number
|
|
gamesPlayed: number
|
|
totalCorrect: number
|
|
rank?: number | null
|
|
updatedAt?: Date | string
|
|
}
|
|
|
|
export type LeaderboardEntryUpdateManyMutationInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade
|
|
subject?: EnumSubjectFieldUpdateOperationsInput | $Enums.Subject
|
|
bestScore?: IntFieldUpdateOperationsInput | number
|
|
gamesPlayed?: IntFieldUpdateOperationsInput | number
|
|
totalCorrect?: IntFieldUpdateOperationsInput | number
|
|
rank?: NullableIntFieldUpdateOperationsInput | number | null
|
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
}
|
|
|
|
export type LeaderboardEntryUncheckedUpdateManyInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
userId?: StringFieldUpdateOperationsInput | string
|
|
grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade
|
|
subject?: EnumSubjectFieldUpdateOperationsInput | $Enums.Subject
|
|
bestScore?: IntFieldUpdateOperationsInput | number
|
|
gamesPlayed?: IntFieldUpdateOperationsInput | number
|
|
totalCorrect?: IntFieldUpdateOperationsInput | number
|
|
rank?: NullableIntFieldUpdateOperationsInput | number | null
|
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
}
|
|
|
|
export type StringFilter<$PrismaModel = never> = {
|
|
equals?: string | StringFieldRefInput<$PrismaModel>
|
|
in?: string[] | ListStringFieldRefInput<$PrismaModel>
|
|
notIn?: string[] | ListStringFieldRefInput<$PrismaModel>
|
|
lt?: string | StringFieldRefInput<$PrismaModel>
|
|
lte?: string | StringFieldRefInput<$PrismaModel>
|
|
gt?: string | StringFieldRefInput<$PrismaModel>
|
|
gte?: string | StringFieldRefInput<$PrismaModel>
|
|
contains?: string | StringFieldRefInput<$PrismaModel>
|
|
startsWith?: string | StringFieldRefInput<$PrismaModel>
|
|
endsWith?: string | StringFieldRefInput<$PrismaModel>
|
|
mode?: QueryMode
|
|
not?: NestedStringFilter<$PrismaModel> | string
|
|
}
|
|
|
|
export type StringNullableFilter<$PrismaModel = never> = {
|
|
equals?: string | StringFieldRefInput<$PrismaModel> | null
|
|
in?: string[] | ListStringFieldRefInput<$PrismaModel> | null
|
|
notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null
|
|
lt?: string | StringFieldRefInput<$PrismaModel>
|
|
lte?: string | StringFieldRefInput<$PrismaModel>
|
|
gt?: string | StringFieldRefInput<$PrismaModel>
|
|
gte?: string | StringFieldRefInput<$PrismaModel>
|
|
contains?: string | StringFieldRefInput<$PrismaModel>
|
|
startsWith?: string | StringFieldRefInput<$PrismaModel>
|
|
endsWith?: string | StringFieldRefInput<$PrismaModel>
|
|
mode?: QueryMode
|
|
not?: NestedStringNullableFilter<$PrismaModel> | string | null
|
|
}
|
|
|
|
export type DateTimeFilter<$PrismaModel = never> = {
|
|
equals?: Date | string | DateTimeFieldRefInput<$PrismaModel>
|
|
in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel>
|
|
notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel>
|
|
lt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
|
|
lte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
|
|
gt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
|
|
gte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
|
|
not?: NestedDateTimeFilter<$PrismaModel> | Date | string
|
|
}
|
|
|
|
export type GameSessionListRelationFilter = {
|
|
every?: GameSessionWhereInput
|
|
some?: GameSessionWhereInput
|
|
none?: GameSessionWhereInput
|
|
}
|
|
|
|
export type LeaderboardEntryListRelationFilter = {
|
|
every?: LeaderboardEntryWhereInput
|
|
some?: LeaderboardEntryWhereInput
|
|
none?: LeaderboardEntryWhereInput
|
|
}
|
|
|
|
export type SortOrderInput = {
|
|
sort: SortOrder
|
|
nulls?: NullsOrder
|
|
}
|
|
|
|
export type GameSessionOrderByRelationAggregateInput = {
|
|
_count?: SortOrder
|
|
}
|
|
|
|
export type LeaderboardEntryOrderByRelationAggregateInput = {
|
|
_count?: SortOrder
|
|
}
|
|
|
|
export type UserCountOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
googleId?: SortOrder
|
|
email?: SortOrder
|
|
displayName?: SortOrder
|
|
avatarUrl?: SortOrder
|
|
createdAt?: SortOrder
|
|
updatedAt?: SortOrder
|
|
}
|
|
|
|
export type UserMaxOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
googleId?: SortOrder
|
|
email?: SortOrder
|
|
displayName?: SortOrder
|
|
avatarUrl?: SortOrder
|
|
createdAt?: SortOrder
|
|
updatedAt?: SortOrder
|
|
}
|
|
|
|
export type UserMinOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
googleId?: SortOrder
|
|
email?: SortOrder
|
|
displayName?: SortOrder
|
|
avatarUrl?: SortOrder
|
|
createdAt?: SortOrder
|
|
updatedAt?: SortOrder
|
|
}
|
|
|
|
export type StringWithAggregatesFilter<$PrismaModel = never> = {
|
|
equals?: string | StringFieldRefInput<$PrismaModel>
|
|
in?: string[] | ListStringFieldRefInput<$PrismaModel>
|
|
notIn?: string[] | ListStringFieldRefInput<$PrismaModel>
|
|
lt?: string | StringFieldRefInput<$PrismaModel>
|
|
lte?: string | StringFieldRefInput<$PrismaModel>
|
|
gt?: string | StringFieldRefInput<$PrismaModel>
|
|
gte?: string | StringFieldRefInput<$PrismaModel>
|
|
contains?: string | StringFieldRefInput<$PrismaModel>
|
|
startsWith?: string | StringFieldRefInput<$PrismaModel>
|
|
endsWith?: string | StringFieldRefInput<$PrismaModel>
|
|
mode?: QueryMode
|
|
not?: NestedStringWithAggregatesFilter<$PrismaModel> | string
|
|
_count?: NestedIntFilter<$PrismaModel>
|
|
_min?: NestedStringFilter<$PrismaModel>
|
|
_max?: NestedStringFilter<$PrismaModel>
|
|
}
|
|
|
|
export type StringNullableWithAggregatesFilter<$PrismaModel = never> = {
|
|
equals?: string | StringFieldRefInput<$PrismaModel> | null
|
|
in?: string[] | ListStringFieldRefInput<$PrismaModel> | null
|
|
notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null
|
|
lt?: string | StringFieldRefInput<$PrismaModel>
|
|
lte?: string | StringFieldRefInput<$PrismaModel>
|
|
gt?: string | StringFieldRefInput<$PrismaModel>
|
|
gte?: string | StringFieldRefInput<$PrismaModel>
|
|
contains?: string | StringFieldRefInput<$PrismaModel>
|
|
startsWith?: string | StringFieldRefInput<$PrismaModel>
|
|
endsWith?: string | StringFieldRefInput<$PrismaModel>
|
|
mode?: QueryMode
|
|
not?: NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null
|
|
_count?: NestedIntNullableFilter<$PrismaModel>
|
|
_min?: NestedStringNullableFilter<$PrismaModel>
|
|
_max?: NestedStringNullableFilter<$PrismaModel>
|
|
}
|
|
|
|
export type DateTimeWithAggregatesFilter<$PrismaModel = never> = {
|
|
equals?: Date | string | DateTimeFieldRefInput<$PrismaModel>
|
|
in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel>
|
|
notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel>
|
|
lt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
|
|
lte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
|
|
gt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
|
|
gte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
|
|
not?: NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string
|
|
_count?: NestedIntFilter<$PrismaModel>
|
|
_min?: NestedDateTimeFilter<$PrismaModel>
|
|
_max?: NestedDateTimeFilter<$PrismaModel>
|
|
}
|
|
|
|
export type EnumGradeFilter<$PrismaModel = never> = {
|
|
equals?: $Enums.Grade | EnumGradeFieldRefInput<$PrismaModel>
|
|
in?: $Enums.Grade[] | ListEnumGradeFieldRefInput<$PrismaModel>
|
|
notIn?: $Enums.Grade[] | ListEnumGradeFieldRefInput<$PrismaModel>
|
|
not?: NestedEnumGradeFilter<$PrismaModel> | $Enums.Grade
|
|
}
|
|
|
|
export type EnumSubjectFilter<$PrismaModel = never> = {
|
|
equals?: $Enums.Subject | EnumSubjectFieldRefInput<$PrismaModel>
|
|
in?: $Enums.Subject[] | ListEnumSubjectFieldRefInput<$PrismaModel>
|
|
notIn?: $Enums.Subject[] | ListEnumSubjectFieldRefInput<$PrismaModel>
|
|
not?: NestedEnumSubjectFilter<$PrismaModel> | $Enums.Subject
|
|
}
|
|
|
|
export type EnumDifficultyFilter<$PrismaModel = never> = {
|
|
equals?: $Enums.Difficulty | EnumDifficultyFieldRefInput<$PrismaModel>
|
|
in?: $Enums.Difficulty[] | ListEnumDifficultyFieldRefInput<$PrismaModel>
|
|
notIn?: $Enums.Difficulty[] | ListEnumDifficultyFieldRefInput<$PrismaModel>
|
|
not?: NestedEnumDifficultyFilter<$PrismaModel> | $Enums.Difficulty
|
|
}
|
|
export type JsonFilter<$PrismaModel = never> =
|
|
| PatchUndefined<
|
|
Either<Required<JsonFilterBase<$PrismaModel>>, Exclude<keyof Required<JsonFilterBase<$PrismaModel>>, 'path'>>,
|
|
Required<JsonFilterBase<$PrismaModel>>
|
|
>
|
|
| OptionalFlat<Omit<Required<JsonFilterBase<$PrismaModel>>, 'path'>>
|
|
|
|
export type JsonFilterBase<$PrismaModel = never> = {
|
|
equals?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
|
|
path?: string[]
|
|
string_contains?: string | StringFieldRefInput<$PrismaModel>
|
|
string_starts_with?: string | StringFieldRefInput<$PrismaModel>
|
|
string_ends_with?: string | StringFieldRefInput<$PrismaModel>
|
|
array_contains?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
|
|
array_starts_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
|
|
array_ends_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
|
|
lt?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
|
|
lte?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
|
|
gt?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
|
|
gte?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
|
|
not?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
|
|
}
|
|
|
|
export type UserAnswerListRelationFilter = {
|
|
every?: UserAnswerWhereInput
|
|
some?: UserAnswerWhereInput
|
|
none?: UserAnswerWhereInput
|
|
}
|
|
|
|
export type UserAnswerOrderByRelationAggregateInput = {
|
|
_count?: SortOrder
|
|
}
|
|
|
|
export type QuestionCountOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
grade?: SortOrder
|
|
subject?: SortOrder
|
|
strand?: SortOrder
|
|
difficulty?: SortOrder
|
|
questionText?: SortOrder
|
|
options?: SortOrder
|
|
correctAnswer?: SortOrder
|
|
explanation?: SortOrder
|
|
createdAt?: SortOrder
|
|
}
|
|
|
|
export type QuestionMaxOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
grade?: SortOrder
|
|
subject?: SortOrder
|
|
strand?: SortOrder
|
|
difficulty?: SortOrder
|
|
questionText?: SortOrder
|
|
correctAnswer?: SortOrder
|
|
explanation?: SortOrder
|
|
createdAt?: SortOrder
|
|
}
|
|
|
|
export type QuestionMinOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
grade?: SortOrder
|
|
subject?: SortOrder
|
|
strand?: SortOrder
|
|
difficulty?: SortOrder
|
|
questionText?: SortOrder
|
|
correctAnswer?: SortOrder
|
|
explanation?: SortOrder
|
|
createdAt?: SortOrder
|
|
}
|
|
|
|
export type EnumGradeWithAggregatesFilter<$PrismaModel = never> = {
|
|
equals?: $Enums.Grade | EnumGradeFieldRefInput<$PrismaModel>
|
|
in?: $Enums.Grade[] | ListEnumGradeFieldRefInput<$PrismaModel>
|
|
notIn?: $Enums.Grade[] | ListEnumGradeFieldRefInput<$PrismaModel>
|
|
not?: NestedEnumGradeWithAggregatesFilter<$PrismaModel> | $Enums.Grade
|
|
_count?: NestedIntFilter<$PrismaModel>
|
|
_min?: NestedEnumGradeFilter<$PrismaModel>
|
|
_max?: NestedEnumGradeFilter<$PrismaModel>
|
|
}
|
|
|
|
export type EnumSubjectWithAggregatesFilter<$PrismaModel = never> = {
|
|
equals?: $Enums.Subject | EnumSubjectFieldRefInput<$PrismaModel>
|
|
in?: $Enums.Subject[] | ListEnumSubjectFieldRefInput<$PrismaModel>
|
|
notIn?: $Enums.Subject[] | ListEnumSubjectFieldRefInput<$PrismaModel>
|
|
not?: NestedEnumSubjectWithAggregatesFilter<$PrismaModel> | $Enums.Subject
|
|
_count?: NestedIntFilter<$PrismaModel>
|
|
_min?: NestedEnumSubjectFilter<$PrismaModel>
|
|
_max?: NestedEnumSubjectFilter<$PrismaModel>
|
|
}
|
|
|
|
export type EnumDifficultyWithAggregatesFilter<$PrismaModel = never> = {
|
|
equals?: $Enums.Difficulty | EnumDifficultyFieldRefInput<$PrismaModel>
|
|
in?: $Enums.Difficulty[] | ListEnumDifficultyFieldRefInput<$PrismaModel>
|
|
notIn?: $Enums.Difficulty[] | ListEnumDifficultyFieldRefInput<$PrismaModel>
|
|
not?: NestedEnumDifficultyWithAggregatesFilter<$PrismaModel> | $Enums.Difficulty
|
|
_count?: NestedIntFilter<$PrismaModel>
|
|
_min?: NestedEnumDifficultyFilter<$PrismaModel>
|
|
_max?: NestedEnumDifficultyFilter<$PrismaModel>
|
|
}
|
|
export type JsonWithAggregatesFilter<$PrismaModel = never> =
|
|
| PatchUndefined<
|
|
Either<Required<JsonWithAggregatesFilterBase<$PrismaModel>>, Exclude<keyof Required<JsonWithAggregatesFilterBase<$PrismaModel>>, 'path'>>,
|
|
Required<JsonWithAggregatesFilterBase<$PrismaModel>>
|
|
>
|
|
| OptionalFlat<Omit<Required<JsonWithAggregatesFilterBase<$PrismaModel>>, 'path'>>
|
|
|
|
export type JsonWithAggregatesFilterBase<$PrismaModel = never> = {
|
|
equals?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
|
|
path?: string[]
|
|
string_contains?: string | StringFieldRefInput<$PrismaModel>
|
|
string_starts_with?: string | StringFieldRefInput<$PrismaModel>
|
|
string_ends_with?: string | StringFieldRefInput<$PrismaModel>
|
|
array_contains?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
|
|
array_starts_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
|
|
array_ends_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
|
|
lt?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
|
|
lte?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
|
|
gt?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
|
|
gte?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
|
|
not?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
|
|
_count?: NestedIntFilter<$PrismaModel>
|
|
_min?: NestedJsonFilter<$PrismaModel>
|
|
_max?: NestedJsonFilter<$PrismaModel>
|
|
}
|
|
|
|
export type EnumSessionStatusFilter<$PrismaModel = never> = {
|
|
equals?: $Enums.SessionStatus | EnumSessionStatusFieldRefInput<$PrismaModel>
|
|
in?: $Enums.SessionStatus[] | ListEnumSessionStatusFieldRefInput<$PrismaModel>
|
|
notIn?: $Enums.SessionStatus[] | ListEnumSessionStatusFieldRefInput<$PrismaModel>
|
|
not?: NestedEnumSessionStatusFilter<$PrismaModel> | $Enums.SessionStatus
|
|
}
|
|
|
|
export type IntFilter<$PrismaModel = never> = {
|
|
equals?: number | IntFieldRefInput<$PrismaModel>
|
|
in?: number[] | ListIntFieldRefInput<$PrismaModel>
|
|
notIn?: number[] | ListIntFieldRefInput<$PrismaModel>
|
|
lt?: number | IntFieldRefInput<$PrismaModel>
|
|
lte?: number | IntFieldRefInput<$PrismaModel>
|
|
gt?: number | IntFieldRefInput<$PrismaModel>
|
|
gte?: number | IntFieldRefInput<$PrismaModel>
|
|
not?: NestedIntFilter<$PrismaModel> | number
|
|
}
|
|
|
|
export type DateTimeNullableFilter<$PrismaModel = never> = {
|
|
equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null
|
|
in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null
|
|
notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null
|
|
lt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
|
|
lte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
|
|
gt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
|
|
gte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
|
|
not?: NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null
|
|
}
|
|
|
|
export type UserRelationFilter = {
|
|
is?: UserWhereInput
|
|
isNot?: UserWhereInput
|
|
}
|
|
|
|
export type GameSessionCountOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
userId?: SortOrder
|
|
grade?: SortOrder
|
|
subject?: SortOrder
|
|
status?: SortOrder
|
|
score?: SortOrder
|
|
totalQuestions?: SortOrder
|
|
correctAnswers?: SortOrder
|
|
startedAt?: SortOrder
|
|
completedAt?: SortOrder
|
|
}
|
|
|
|
export type GameSessionAvgOrderByAggregateInput = {
|
|
score?: SortOrder
|
|
totalQuestions?: SortOrder
|
|
correctAnswers?: SortOrder
|
|
}
|
|
|
|
export type GameSessionMaxOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
userId?: SortOrder
|
|
grade?: SortOrder
|
|
subject?: SortOrder
|
|
status?: SortOrder
|
|
score?: SortOrder
|
|
totalQuestions?: SortOrder
|
|
correctAnswers?: SortOrder
|
|
startedAt?: SortOrder
|
|
completedAt?: SortOrder
|
|
}
|
|
|
|
export type GameSessionMinOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
userId?: SortOrder
|
|
grade?: SortOrder
|
|
subject?: SortOrder
|
|
status?: SortOrder
|
|
score?: SortOrder
|
|
totalQuestions?: SortOrder
|
|
correctAnswers?: SortOrder
|
|
startedAt?: SortOrder
|
|
completedAt?: SortOrder
|
|
}
|
|
|
|
export type GameSessionSumOrderByAggregateInput = {
|
|
score?: SortOrder
|
|
totalQuestions?: SortOrder
|
|
correctAnswers?: SortOrder
|
|
}
|
|
|
|
export type EnumSessionStatusWithAggregatesFilter<$PrismaModel = never> = {
|
|
equals?: $Enums.SessionStatus | EnumSessionStatusFieldRefInput<$PrismaModel>
|
|
in?: $Enums.SessionStatus[] | ListEnumSessionStatusFieldRefInput<$PrismaModel>
|
|
notIn?: $Enums.SessionStatus[] | ListEnumSessionStatusFieldRefInput<$PrismaModel>
|
|
not?: NestedEnumSessionStatusWithAggregatesFilter<$PrismaModel> | $Enums.SessionStatus
|
|
_count?: NestedIntFilter<$PrismaModel>
|
|
_min?: NestedEnumSessionStatusFilter<$PrismaModel>
|
|
_max?: NestedEnumSessionStatusFilter<$PrismaModel>
|
|
}
|
|
|
|
export type IntWithAggregatesFilter<$PrismaModel = never> = {
|
|
equals?: number | IntFieldRefInput<$PrismaModel>
|
|
in?: number[] | ListIntFieldRefInput<$PrismaModel>
|
|
notIn?: number[] | ListIntFieldRefInput<$PrismaModel>
|
|
lt?: number | IntFieldRefInput<$PrismaModel>
|
|
lte?: number | IntFieldRefInput<$PrismaModel>
|
|
gt?: number | IntFieldRefInput<$PrismaModel>
|
|
gte?: number | IntFieldRefInput<$PrismaModel>
|
|
not?: NestedIntWithAggregatesFilter<$PrismaModel> | number
|
|
_count?: NestedIntFilter<$PrismaModel>
|
|
_avg?: NestedFloatFilter<$PrismaModel>
|
|
_sum?: NestedIntFilter<$PrismaModel>
|
|
_min?: NestedIntFilter<$PrismaModel>
|
|
_max?: NestedIntFilter<$PrismaModel>
|
|
}
|
|
|
|
export type DateTimeNullableWithAggregatesFilter<$PrismaModel = never> = {
|
|
equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null
|
|
in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null
|
|
notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null
|
|
lt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
|
|
lte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
|
|
gt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
|
|
gte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
|
|
not?: NestedDateTimeNullableWithAggregatesFilter<$PrismaModel> | Date | string | null
|
|
_count?: NestedIntNullableFilter<$PrismaModel>
|
|
_min?: NestedDateTimeNullableFilter<$PrismaModel>
|
|
_max?: NestedDateTimeNullableFilter<$PrismaModel>
|
|
}
|
|
|
|
export type BoolFilter<$PrismaModel = never> = {
|
|
equals?: boolean | BooleanFieldRefInput<$PrismaModel>
|
|
not?: NestedBoolFilter<$PrismaModel> | boolean
|
|
}
|
|
|
|
export type GameSessionRelationFilter = {
|
|
is?: GameSessionWhereInput
|
|
isNot?: GameSessionWhereInput
|
|
}
|
|
|
|
export type QuestionRelationFilter = {
|
|
is?: QuestionWhereInput
|
|
isNot?: QuestionWhereInput
|
|
}
|
|
|
|
export type UserAnswerCountOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
sessionId?: SortOrder
|
|
questionId?: SortOrder
|
|
selectedAnswer?: SortOrder
|
|
isCorrect?: SortOrder
|
|
timeSpentMs?: SortOrder
|
|
answeredAt?: SortOrder
|
|
}
|
|
|
|
export type UserAnswerAvgOrderByAggregateInput = {
|
|
timeSpentMs?: SortOrder
|
|
}
|
|
|
|
export type UserAnswerMaxOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
sessionId?: SortOrder
|
|
questionId?: SortOrder
|
|
selectedAnswer?: SortOrder
|
|
isCorrect?: SortOrder
|
|
timeSpentMs?: SortOrder
|
|
answeredAt?: SortOrder
|
|
}
|
|
|
|
export type UserAnswerMinOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
sessionId?: SortOrder
|
|
questionId?: SortOrder
|
|
selectedAnswer?: SortOrder
|
|
isCorrect?: SortOrder
|
|
timeSpentMs?: SortOrder
|
|
answeredAt?: SortOrder
|
|
}
|
|
|
|
export type UserAnswerSumOrderByAggregateInput = {
|
|
timeSpentMs?: SortOrder
|
|
}
|
|
|
|
export type BoolWithAggregatesFilter<$PrismaModel = never> = {
|
|
equals?: boolean | BooleanFieldRefInput<$PrismaModel>
|
|
not?: NestedBoolWithAggregatesFilter<$PrismaModel> | boolean
|
|
_count?: NestedIntFilter<$PrismaModel>
|
|
_min?: NestedBoolFilter<$PrismaModel>
|
|
_max?: NestedBoolFilter<$PrismaModel>
|
|
}
|
|
|
|
export type IntNullableFilter<$PrismaModel = never> = {
|
|
equals?: number | IntFieldRefInput<$PrismaModel> | null
|
|
in?: number[] | ListIntFieldRefInput<$PrismaModel> | null
|
|
notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null
|
|
lt?: number | IntFieldRefInput<$PrismaModel>
|
|
lte?: number | IntFieldRefInput<$PrismaModel>
|
|
gt?: number | IntFieldRefInput<$PrismaModel>
|
|
gte?: number | IntFieldRefInput<$PrismaModel>
|
|
not?: NestedIntNullableFilter<$PrismaModel> | number | null
|
|
}
|
|
|
|
export type LeaderboardEntryUserIdGradeSubjectCompoundUniqueInput = {
|
|
userId: string
|
|
grade: $Enums.Grade
|
|
subject: $Enums.Subject
|
|
}
|
|
|
|
export type LeaderboardEntryCountOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
userId?: SortOrder
|
|
grade?: SortOrder
|
|
subject?: SortOrder
|
|
bestScore?: SortOrder
|
|
gamesPlayed?: SortOrder
|
|
totalCorrect?: SortOrder
|
|
rank?: SortOrder
|
|
updatedAt?: SortOrder
|
|
}
|
|
|
|
export type LeaderboardEntryAvgOrderByAggregateInput = {
|
|
bestScore?: SortOrder
|
|
gamesPlayed?: SortOrder
|
|
totalCorrect?: SortOrder
|
|
rank?: SortOrder
|
|
}
|
|
|
|
export type LeaderboardEntryMaxOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
userId?: SortOrder
|
|
grade?: SortOrder
|
|
subject?: SortOrder
|
|
bestScore?: SortOrder
|
|
gamesPlayed?: SortOrder
|
|
totalCorrect?: SortOrder
|
|
rank?: SortOrder
|
|
updatedAt?: SortOrder
|
|
}
|
|
|
|
export type LeaderboardEntryMinOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
userId?: SortOrder
|
|
grade?: SortOrder
|
|
subject?: SortOrder
|
|
bestScore?: SortOrder
|
|
gamesPlayed?: SortOrder
|
|
totalCorrect?: SortOrder
|
|
rank?: SortOrder
|
|
updatedAt?: SortOrder
|
|
}
|
|
|
|
export type LeaderboardEntrySumOrderByAggregateInput = {
|
|
bestScore?: SortOrder
|
|
gamesPlayed?: SortOrder
|
|
totalCorrect?: SortOrder
|
|
rank?: SortOrder
|
|
}
|
|
|
|
export type IntNullableWithAggregatesFilter<$PrismaModel = never> = {
|
|
equals?: number | IntFieldRefInput<$PrismaModel> | null
|
|
in?: number[] | ListIntFieldRefInput<$PrismaModel> | null
|
|
notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null
|
|
lt?: number | IntFieldRefInput<$PrismaModel>
|
|
lte?: number | IntFieldRefInput<$PrismaModel>
|
|
gt?: number | IntFieldRefInput<$PrismaModel>
|
|
gte?: number | IntFieldRefInput<$PrismaModel>
|
|
not?: NestedIntNullableWithAggregatesFilter<$PrismaModel> | number | null
|
|
_count?: NestedIntNullableFilter<$PrismaModel>
|
|
_avg?: NestedFloatNullableFilter<$PrismaModel>
|
|
_sum?: NestedIntNullableFilter<$PrismaModel>
|
|
_min?: NestedIntNullableFilter<$PrismaModel>
|
|
_max?: NestedIntNullableFilter<$PrismaModel>
|
|
}
|
|
|
|
export type GameSessionCreateNestedManyWithoutUserInput = {
|
|
create?: XOR<GameSessionCreateWithoutUserInput, GameSessionUncheckedCreateWithoutUserInput> | GameSessionCreateWithoutUserInput[] | GameSessionUncheckedCreateWithoutUserInput[]
|
|
connectOrCreate?: GameSessionCreateOrConnectWithoutUserInput | GameSessionCreateOrConnectWithoutUserInput[]
|
|
createMany?: GameSessionCreateManyUserInputEnvelope
|
|
connect?: GameSessionWhereUniqueInput | GameSessionWhereUniqueInput[]
|
|
}
|
|
|
|
export type LeaderboardEntryCreateNestedManyWithoutUserInput = {
|
|
create?: XOR<LeaderboardEntryCreateWithoutUserInput, LeaderboardEntryUncheckedCreateWithoutUserInput> | LeaderboardEntryCreateWithoutUserInput[] | LeaderboardEntryUncheckedCreateWithoutUserInput[]
|
|
connectOrCreate?: LeaderboardEntryCreateOrConnectWithoutUserInput | LeaderboardEntryCreateOrConnectWithoutUserInput[]
|
|
createMany?: LeaderboardEntryCreateManyUserInputEnvelope
|
|
connect?: LeaderboardEntryWhereUniqueInput | LeaderboardEntryWhereUniqueInput[]
|
|
}
|
|
|
|
export type GameSessionUncheckedCreateNestedManyWithoutUserInput = {
|
|
create?: XOR<GameSessionCreateWithoutUserInput, GameSessionUncheckedCreateWithoutUserInput> | GameSessionCreateWithoutUserInput[] | GameSessionUncheckedCreateWithoutUserInput[]
|
|
connectOrCreate?: GameSessionCreateOrConnectWithoutUserInput | GameSessionCreateOrConnectWithoutUserInput[]
|
|
createMany?: GameSessionCreateManyUserInputEnvelope
|
|
connect?: GameSessionWhereUniqueInput | GameSessionWhereUniqueInput[]
|
|
}
|
|
|
|
export type LeaderboardEntryUncheckedCreateNestedManyWithoutUserInput = {
|
|
create?: XOR<LeaderboardEntryCreateWithoutUserInput, LeaderboardEntryUncheckedCreateWithoutUserInput> | LeaderboardEntryCreateWithoutUserInput[] | LeaderboardEntryUncheckedCreateWithoutUserInput[]
|
|
connectOrCreate?: LeaderboardEntryCreateOrConnectWithoutUserInput | LeaderboardEntryCreateOrConnectWithoutUserInput[]
|
|
createMany?: LeaderboardEntryCreateManyUserInputEnvelope
|
|
connect?: LeaderboardEntryWhereUniqueInput | LeaderboardEntryWhereUniqueInput[]
|
|
}
|
|
|
|
export type StringFieldUpdateOperationsInput = {
|
|
set?: string
|
|
}
|
|
|
|
export type NullableStringFieldUpdateOperationsInput = {
|
|
set?: string | null
|
|
}
|
|
|
|
export type DateTimeFieldUpdateOperationsInput = {
|
|
set?: Date | string
|
|
}
|
|
|
|
export type GameSessionUpdateManyWithoutUserNestedInput = {
|
|
create?: XOR<GameSessionCreateWithoutUserInput, GameSessionUncheckedCreateWithoutUserInput> | GameSessionCreateWithoutUserInput[] | GameSessionUncheckedCreateWithoutUserInput[]
|
|
connectOrCreate?: GameSessionCreateOrConnectWithoutUserInput | GameSessionCreateOrConnectWithoutUserInput[]
|
|
upsert?: GameSessionUpsertWithWhereUniqueWithoutUserInput | GameSessionUpsertWithWhereUniqueWithoutUserInput[]
|
|
createMany?: GameSessionCreateManyUserInputEnvelope
|
|
set?: GameSessionWhereUniqueInput | GameSessionWhereUniqueInput[]
|
|
disconnect?: GameSessionWhereUniqueInput | GameSessionWhereUniqueInput[]
|
|
delete?: GameSessionWhereUniqueInput | GameSessionWhereUniqueInput[]
|
|
connect?: GameSessionWhereUniqueInput | GameSessionWhereUniqueInput[]
|
|
update?: GameSessionUpdateWithWhereUniqueWithoutUserInput | GameSessionUpdateWithWhereUniqueWithoutUserInput[]
|
|
updateMany?: GameSessionUpdateManyWithWhereWithoutUserInput | GameSessionUpdateManyWithWhereWithoutUserInput[]
|
|
deleteMany?: GameSessionScalarWhereInput | GameSessionScalarWhereInput[]
|
|
}
|
|
|
|
export type LeaderboardEntryUpdateManyWithoutUserNestedInput = {
|
|
create?: XOR<LeaderboardEntryCreateWithoutUserInput, LeaderboardEntryUncheckedCreateWithoutUserInput> | LeaderboardEntryCreateWithoutUserInput[] | LeaderboardEntryUncheckedCreateWithoutUserInput[]
|
|
connectOrCreate?: LeaderboardEntryCreateOrConnectWithoutUserInput | LeaderboardEntryCreateOrConnectWithoutUserInput[]
|
|
upsert?: LeaderboardEntryUpsertWithWhereUniqueWithoutUserInput | LeaderboardEntryUpsertWithWhereUniqueWithoutUserInput[]
|
|
createMany?: LeaderboardEntryCreateManyUserInputEnvelope
|
|
set?: LeaderboardEntryWhereUniqueInput | LeaderboardEntryWhereUniqueInput[]
|
|
disconnect?: LeaderboardEntryWhereUniqueInput | LeaderboardEntryWhereUniqueInput[]
|
|
delete?: LeaderboardEntryWhereUniqueInput | LeaderboardEntryWhereUniqueInput[]
|
|
connect?: LeaderboardEntryWhereUniqueInput | LeaderboardEntryWhereUniqueInput[]
|
|
update?: LeaderboardEntryUpdateWithWhereUniqueWithoutUserInput | LeaderboardEntryUpdateWithWhereUniqueWithoutUserInput[]
|
|
updateMany?: LeaderboardEntryUpdateManyWithWhereWithoutUserInput | LeaderboardEntryUpdateManyWithWhereWithoutUserInput[]
|
|
deleteMany?: LeaderboardEntryScalarWhereInput | LeaderboardEntryScalarWhereInput[]
|
|
}
|
|
|
|
export type GameSessionUncheckedUpdateManyWithoutUserNestedInput = {
|
|
create?: XOR<GameSessionCreateWithoutUserInput, GameSessionUncheckedCreateWithoutUserInput> | GameSessionCreateWithoutUserInput[] | GameSessionUncheckedCreateWithoutUserInput[]
|
|
connectOrCreate?: GameSessionCreateOrConnectWithoutUserInput | GameSessionCreateOrConnectWithoutUserInput[]
|
|
upsert?: GameSessionUpsertWithWhereUniqueWithoutUserInput | GameSessionUpsertWithWhereUniqueWithoutUserInput[]
|
|
createMany?: GameSessionCreateManyUserInputEnvelope
|
|
set?: GameSessionWhereUniqueInput | GameSessionWhereUniqueInput[]
|
|
disconnect?: GameSessionWhereUniqueInput | GameSessionWhereUniqueInput[]
|
|
delete?: GameSessionWhereUniqueInput | GameSessionWhereUniqueInput[]
|
|
connect?: GameSessionWhereUniqueInput | GameSessionWhereUniqueInput[]
|
|
update?: GameSessionUpdateWithWhereUniqueWithoutUserInput | GameSessionUpdateWithWhereUniqueWithoutUserInput[]
|
|
updateMany?: GameSessionUpdateManyWithWhereWithoutUserInput | GameSessionUpdateManyWithWhereWithoutUserInput[]
|
|
deleteMany?: GameSessionScalarWhereInput | GameSessionScalarWhereInput[]
|
|
}
|
|
|
|
export type LeaderboardEntryUncheckedUpdateManyWithoutUserNestedInput = {
|
|
create?: XOR<LeaderboardEntryCreateWithoutUserInput, LeaderboardEntryUncheckedCreateWithoutUserInput> | LeaderboardEntryCreateWithoutUserInput[] | LeaderboardEntryUncheckedCreateWithoutUserInput[]
|
|
connectOrCreate?: LeaderboardEntryCreateOrConnectWithoutUserInput | LeaderboardEntryCreateOrConnectWithoutUserInput[]
|
|
upsert?: LeaderboardEntryUpsertWithWhereUniqueWithoutUserInput | LeaderboardEntryUpsertWithWhereUniqueWithoutUserInput[]
|
|
createMany?: LeaderboardEntryCreateManyUserInputEnvelope
|
|
set?: LeaderboardEntryWhereUniqueInput | LeaderboardEntryWhereUniqueInput[]
|
|
disconnect?: LeaderboardEntryWhereUniqueInput | LeaderboardEntryWhereUniqueInput[]
|
|
delete?: LeaderboardEntryWhereUniqueInput | LeaderboardEntryWhereUniqueInput[]
|
|
connect?: LeaderboardEntryWhereUniqueInput | LeaderboardEntryWhereUniqueInput[]
|
|
update?: LeaderboardEntryUpdateWithWhereUniqueWithoutUserInput | LeaderboardEntryUpdateWithWhereUniqueWithoutUserInput[]
|
|
updateMany?: LeaderboardEntryUpdateManyWithWhereWithoutUserInput | LeaderboardEntryUpdateManyWithWhereWithoutUserInput[]
|
|
deleteMany?: LeaderboardEntryScalarWhereInput | LeaderboardEntryScalarWhereInput[]
|
|
}
|
|
|
|
export type UserAnswerCreateNestedManyWithoutQuestionInput = {
|
|
create?: XOR<UserAnswerCreateWithoutQuestionInput, UserAnswerUncheckedCreateWithoutQuestionInput> | UserAnswerCreateWithoutQuestionInput[] | UserAnswerUncheckedCreateWithoutQuestionInput[]
|
|
connectOrCreate?: UserAnswerCreateOrConnectWithoutQuestionInput | UserAnswerCreateOrConnectWithoutQuestionInput[]
|
|
createMany?: UserAnswerCreateManyQuestionInputEnvelope
|
|
connect?: UserAnswerWhereUniqueInput | UserAnswerWhereUniqueInput[]
|
|
}
|
|
|
|
export type UserAnswerUncheckedCreateNestedManyWithoutQuestionInput = {
|
|
create?: XOR<UserAnswerCreateWithoutQuestionInput, UserAnswerUncheckedCreateWithoutQuestionInput> | UserAnswerCreateWithoutQuestionInput[] | UserAnswerUncheckedCreateWithoutQuestionInput[]
|
|
connectOrCreate?: UserAnswerCreateOrConnectWithoutQuestionInput | UserAnswerCreateOrConnectWithoutQuestionInput[]
|
|
createMany?: UserAnswerCreateManyQuestionInputEnvelope
|
|
connect?: UserAnswerWhereUniqueInput | UserAnswerWhereUniqueInput[]
|
|
}
|
|
|
|
export type EnumGradeFieldUpdateOperationsInput = {
|
|
set?: $Enums.Grade
|
|
}
|
|
|
|
export type EnumSubjectFieldUpdateOperationsInput = {
|
|
set?: $Enums.Subject
|
|
}
|
|
|
|
export type EnumDifficultyFieldUpdateOperationsInput = {
|
|
set?: $Enums.Difficulty
|
|
}
|
|
|
|
export type UserAnswerUpdateManyWithoutQuestionNestedInput = {
|
|
create?: XOR<UserAnswerCreateWithoutQuestionInput, UserAnswerUncheckedCreateWithoutQuestionInput> | UserAnswerCreateWithoutQuestionInput[] | UserAnswerUncheckedCreateWithoutQuestionInput[]
|
|
connectOrCreate?: UserAnswerCreateOrConnectWithoutQuestionInput | UserAnswerCreateOrConnectWithoutQuestionInput[]
|
|
upsert?: UserAnswerUpsertWithWhereUniqueWithoutQuestionInput | UserAnswerUpsertWithWhereUniqueWithoutQuestionInput[]
|
|
createMany?: UserAnswerCreateManyQuestionInputEnvelope
|
|
set?: UserAnswerWhereUniqueInput | UserAnswerWhereUniqueInput[]
|
|
disconnect?: UserAnswerWhereUniqueInput | UserAnswerWhereUniqueInput[]
|
|
delete?: UserAnswerWhereUniqueInput | UserAnswerWhereUniqueInput[]
|
|
connect?: UserAnswerWhereUniqueInput | UserAnswerWhereUniqueInput[]
|
|
update?: UserAnswerUpdateWithWhereUniqueWithoutQuestionInput | UserAnswerUpdateWithWhereUniqueWithoutQuestionInput[]
|
|
updateMany?: UserAnswerUpdateManyWithWhereWithoutQuestionInput | UserAnswerUpdateManyWithWhereWithoutQuestionInput[]
|
|
deleteMany?: UserAnswerScalarWhereInput | UserAnswerScalarWhereInput[]
|
|
}
|
|
|
|
export type UserAnswerUncheckedUpdateManyWithoutQuestionNestedInput = {
|
|
create?: XOR<UserAnswerCreateWithoutQuestionInput, UserAnswerUncheckedCreateWithoutQuestionInput> | UserAnswerCreateWithoutQuestionInput[] | UserAnswerUncheckedCreateWithoutQuestionInput[]
|
|
connectOrCreate?: UserAnswerCreateOrConnectWithoutQuestionInput | UserAnswerCreateOrConnectWithoutQuestionInput[]
|
|
upsert?: UserAnswerUpsertWithWhereUniqueWithoutQuestionInput | UserAnswerUpsertWithWhereUniqueWithoutQuestionInput[]
|
|
createMany?: UserAnswerCreateManyQuestionInputEnvelope
|
|
set?: UserAnswerWhereUniqueInput | UserAnswerWhereUniqueInput[]
|
|
disconnect?: UserAnswerWhereUniqueInput | UserAnswerWhereUniqueInput[]
|
|
delete?: UserAnswerWhereUniqueInput | UserAnswerWhereUniqueInput[]
|
|
connect?: UserAnswerWhereUniqueInput | UserAnswerWhereUniqueInput[]
|
|
update?: UserAnswerUpdateWithWhereUniqueWithoutQuestionInput | UserAnswerUpdateWithWhereUniqueWithoutQuestionInput[]
|
|
updateMany?: UserAnswerUpdateManyWithWhereWithoutQuestionInput | UserAnswerUpdateManyWithWhereWithoutQuestionInput[]
|
|
deleteMany?: UserAnswerScalarWhereInput | UserAnswerScalarWhereInput[]
|
|
}
|
|
|
|
export type UserCreateNestedOneWithoutSessionsInput = {
|
|
create?: XOR<UserCreateWithoutSessionsInput, UserUncheckedCreateWithoutSessionsInput>
|
|
connectOrCreate?: UserCreateOrConnectWithoutSessionsInput
|
|
connect?: UserWhereUniqueInput
|
|
}
|
|
|
|
export type UserAnswerCreateNestedManyWithoutSessionInput = {
|
|
create?: XOR<UserAnswerCreateWithoutSessionInput, UserAnswerUncheckedCreateWithoutSessionInput> | UserAnswerCreateWithoutSessionInput[] | UserAnswerUncheckedCreateWithoutSessionInput[]
|
|
connectOrCreate?: UserAnswerCreateOrConnectWithoutSessionInput | UserAnswerCreateOrConnectWithoutSessionInput[]
|
|
createMany?: UserAnswerCreateManySessionInputEnvelope
|
|
connect?: UserAnswerWhereUniqueInput | UserAnswerWhereUniqueInput[]
|
|
}
|
|
|
|
export type UserAnswerUncheckedCreateNestedManyWithoutSessionInput = {
|
|
create?: XOR<UserAnswerCreateWithoutSessionInput, UserAnswerUncheckedCreateWithoutSessionInput> | UserAnswerCreateWithoutSessionInput[] | UserAnswerUncheckedCreateWithoutSessionInput[]
|
|
connectOrCreate?: UserAnswerCreateOrConnectWithoutSessionInput | UserAnswerCreateOrConnectWithoutSessionInput[]
|
|
createMany?: UserAnswerCreateManySessionInputEnvelope
|
|
connect?: UserAnswerWhereUniqueInput | UserAnswerWhereUniqueInput[]
|
|
}
|
|
|
|
export type EnumSessionStatusFieldUpdateOperationsInput = {
|
|
set?: $Enums.SessionStatus
|
|
}
|
|
|
|
export type IntFieldUpdateOperationsInput = {
|
|
set?: number
|
|
increment?: number
|
|
decrement?: number
|
|
multiply?: number
|
|
divide?: number
|
|
}
|
|
|
|
export type NullableDateTimeFieldUpdateOperationsInput = {
|
|
set?: Date | string | null
|
|
}
|
|
|
|
export type UserUpdateOneRequiredWithoutSessionsNestedInput = {
|
|
create?: XOR<UserCreateWithoutSessionsInput, UserUncheckedCreateWithoutSessionsInput>
|
|
connectOrCreate?: UserCreateOrConnectWithoutSessionsInput
|
|
upsert?: UserUpsertWithoutSessionsInput
|
|
connect?: UserWhereUniqueInput
|
|
update?: XOR<XOR<UserUpdateToOneWithWhereWithoutSessionsInput, UserUpdateWithoutSessionsInput>, UserUncheckedUpdateWithoutSessionsInput>
|
|
}
|
|
|
|
export type UserAnswerUpdateManyWithoutSessionNestedInput = {
|
|
create?: XOR<UserAnswerCreateWithoutSessionInput, UserAnswerUncheckedCreateWithoutSessionInput> | UserAnswerCreateWithoutSessionInput[] | UserAnswerUncheckedCreateWithoutSessionInput[]
|
|
connectOrCreate?: UserAnswerCreateOrConnectWithoutSessionInput | UserAnswerCreateOrConnectWithoutSessionInput[]
|
|
upsert?: UserAnswerUpsertWithWhereUniqueWithoutSessionInput | UserAnswerUpsertWithWhereUniqueWithoutSessionInput[]
|
|
createMany?: UserAnswerCreateManySessionInputEnvelope
|
|
set?: UserAnswerWhereUniqueInput | UserAnswerWhereUniqueInput[]
|
|
disconnect?: UserAnswerWhereUniqueInput | UserAnswerWhereUniqueInput[]
|
|
delete?: UserAnswerWhereUniqueInput | UserAnswerWhereUniqueInput[]
|
|
connect?: UserAnswerWhereUniqueInput | UserAnswerWhereUniqueInput[]
|
|
update?: UserAnswerUpdateWithWhereUniqueWithoutSessionInput | UserAnswerUpdateWithWhereUniqueWithoutSessionInput[]
|
|
updateMany?: UserAnswerUpdateManyWithWhereWithoutSessionInput | UserAnswerUpdateManyWithWhereWithoutSessionInput[]
|
|
deleteMany?: UserAnswerScalarWhereInput | UserAnswerScalarWhereInput[]
|
|
}
|
|
|
|
export type UserAnswerUncheckedUpdateManyWithoutSessionNestedInput = {
|
|
create?: XOR<UserAnswerCreateWithoutSessionInput, UserAnswerUncheckedCreateWithoutSessionInput> | UserAnswerCreateWithoutSessionInput[] | UserAnswerUncheckedCreateWithoutSessionInput[]
|
|
connectOrCreate?: UserAnswerCreateOrConnectWithoutSessionInput | UserAnswerCreateOrConnectWithoutSessionInput[]
|
|
upsert?: UserAnswerUpsertWithWhereUniqueWithoutSessionInput | UserAnswerUpsertWithWhereUniqueWithoutSessionInput[]
|
|
createMany?: UserAnswerCreateManySessionInputEnvelope
|
|
set?: UserAnswerWhereUniqueInput | UserAnswerWhereUniqueInput[]
|
|
disconnect?: UserAnswerWhereUniqueInput | UserAnswerWhereUniqueInput[]
|
|
delete?: UserAnswerWhereUniqueInput | UserAnswerWhereUniqueInput[]
|
|
connect?: UserAnswerWhereUniqueInput | UserAnswerWhereUniqueInput[]
|
|
update?: UserAnswerUpdateWithWhereUniqueWithoutSessionInput | UserAnswerUpdateWithWhereUniqueWithoutSessionInput[]
|
|
updateMany?: UserAnswerUpdateManyWithWhereWithoutSessionInput | UserAnswerUpdateManyWithWhereWithoutSessionInput[]
|
|
deleteMany?: UserAnswerScalarWhereInput | UserAnswerScalarWhereInput[]
|
|
}
|
|
|
|
export type GameSessionCreateNestedOneWithoutAnswersInput = {
|
|
create?: XOR<GameSessionCreateWithoutAnswersInput, GameSessionUncheckedCreateWithoutAnswersInput>
|
|
connectOrCreate?: GameSessionCreateOrConnectWithoutAnswersInput
|
|
connect?: GameSessionWhereUniqueInput
|
|
}
|
|
|
|
export type QuestionCreateNestedOneWithoutAnswersInput = {
|
|
create?: XOR<QuestionCreateWithoutAnswersInput, QuestionUncheckedCreateWithoutAnswersInput>
|
|
connectOrCreate?: QuestionCreateOrConnectWithoutAnswersInput
|
|
connect?: QuestionWhereUniqueInput
|
|
}
|
|
|
|
export type BoolFieldUpdateOperationsInput = {
|
|
set?: boolean
|
|
}
|
|
|
|
export type GameSessionUpdateOneRequiredWithoutAnswersNestedInput = {
|
|
create?: XOR<GameSessionCreateWithoutAnswersInput, GameSessionUncheckedCreateWithoutAnswersInput>
|
|
connectOrCreate?: GameSessionCreateOrConnectWithoutAnswersInput
|
|
upsert?: GameSessionUpsertWithoutAnswersInput
|
|
connect?: GameSessionWhereUniqueInput
|
|
update?: XOR<XOR<GameSessionUpdateToOneWithWhereWithoutAnswersInput, GameSessionUpdateWithoutAnswersInput>, GameSessionUncheckedUpdateWithoutAnswersInput>
|
|
}
|
|
|
|
export type QuestionUpdateOneRequiredWithoutAnswersNestedInput = {
|
|
create?: XOR<QuestionCreateWithoutAnswersInput, QuestionUncheckedCreateWithoutAnswersInput>
|
|
connectOrCreate?: QuestionCreateOrConnectWithoutAnswersInput
|
|
upsert?: QuestionUpsertWithoutAnswersInput
|
|
connect?: QuestionWhereUniqueInput
|
|
update?: XOR<XOR<QuestionUpdateToOneWithWhereWithoutAnswersInput, QuestionUpdateWithoutAnswersInput>, QuestionUncheckedUpdateWithoutAnswersInput>
|
|
}
|
|
|
|
export type UserCreateNestedOneWithoutLeaderboardEntriesInput = {
|
|
create?: XOR<UserCreateWithoutLeaderboardEntriesInput, UserUncheckedCreateWithoutLeaderboardEntriesInput>
|
|
connectOrCreate?: UserCreateOrConnectWithoutLeaderboardEntriesInput
|
|
connect?: UserWhereUniqueInput
|
|
}
|
|
|
|
export type NullableIntFieldUpdateOperationsInput = {
|
|
set?: number | null
|
|
increment?: number
|
|
decrement?: number
|
|
multiply?: number
|
|
divide?: number
|
|
}
|
|
|
|
export type UserUpdateOneRequiredWithoutLeaderboardEntriesNestedInput = {
|
|
create?: XOR<UserCreateWithoutLeaderboardEntriesInput, UserUncheckedCreateWithoutLeaderboardEntriesInput>
|
|
connectOrCreate?: UserCreateOrConnectWithoutLeaderboardEntriesInput
|
|
upsert?: UserUpsertWithoutLeaderboardEntriesInput
|
|
connect?: UserWhereUniqueInput
|
|
update?: XOR<XOR<UserUpdateToOneWithWhereWithoutLeaderboardEntriesInput, UserUpdateWithoutLeaderboardEntriesInput>, UserUncheckedUpdateWithoutLeaderboardEntriesInput>
|
|
}
|
|
|
|
export type NestedStringFilter<$PrismaModel = never> = {
|
|
equals?: string | StringFieldRefInput<$PrismaModel>
|
|
in?: string[] | ListStringFieldRefInput<$PrismaModel>
|
|
notIn?: string[] | ListStringFieldRefInput<$PrismaModel>
|
|
lt?: string | StringFieldRefInput<$PrismaModel>
|
|
lte?: string | StringFieldRefInput<$PrismaModel>
|
|
gt?: string | StringFieldRefInput<$PrismaModel>
|
|
gte?: string | StringFieldRefInput<$PrismaModel>
|
|
contains?: string | StringFieldRefInput<$PrismaModel>
|
|
startsWith?: string | StringFieldRefInput<$PrismaModel>
|
|
endsWith?: string | StringFieldRefInput<$PrismaModel>
|
|
not?: NestedStringFilter<$PrismaModel> | string
|
|
}
|
|
|
|
export type NestedStringNullableFilter<$PrismaModel = never> = {
|
|
equals?: string | StringFieldRefInput<$PrismaModel> | null
|
|
in?: string[] | ListStringFieldRefInput<$PrismaModel> | null
|
|
notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null
|
|
lt?: string | StringFieldRefInput<$PrismaModel>
|
|
lte?: string | StringFieldRefInput<$PrismaModel>
|
|
gt?: string | StringFieldRefInput<$PrismaModel>
|
|
gte?: string | StringFieldRefInput<$PrismaModel>
|
|
contains?: string | StringFieldRefInput<$PrismaModel>
|
|
startsWith?: string | StringFieldRefInput<$PrismaModel>
|
|
endsWith?: string | StringFieldRefInput<$PrismaModel>
|
|
not?: NestedStringNullableFilter<$PrismaModel> | string | null
|
|
}
|
|
|
|
export type NestedDateTimeFilter<$PrismaModel = never> = {
|
|
equals?: Date | string | DateTimeFieldRefInput<$PrismaModel>
|
|
in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel>
|
|
notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel>
|
|
lt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
|
|
lte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
|
|
gt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
|
|
gte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
|
|
not?: NestedDateTimeFilter<$PrismaModel> | Date | string
|
|
}
|
|
|
|
export type NestedStringWithAggregatesFilter<$PrismaModel = never> = {
|
|
equals?: string | StringFieldRefInput<$PrismaModel>
|
|
in?: string[] | ListStringFieldRefInput<$PrismaModel>
|
|
notIn?: string[] | ListStringFieldRefInput<$PrismaModel>
|
|
lt?: string | StringFieldRefInput<$PrismaModel>
|
|
lte?: string | StringFieldRefInput<$PrismaModel>
|
|
gt?: string | StringFieldRefInput<$PrismaModel>
|
|
gte?: string | StringFieldRefInput<$PrismaModel>
|
|
contains?: string | StringFieldRefInput<$PrismaModel>
|
|
startsWith?: string | StringFieldRefInput<$PrismaModel>
|
|
endsWith?: string | StringFieldRefInput<$PrismaModel>
|
|
not?: NestedStringWithAggregatesFilter<$PrismaModel> | string
|
|
_count?: NestedIntFilter<$PrismaModel>
|
|
_min?: NestedStringFilter<$PrismaModel>
|
|
_max?: NestedStringFilter<$PrismaModel>
|
|
}
|
|
|
|
export type NestedIntFilter<$PrismaModel = never> = {
|
|
equals?: number | IntFieldRefInput<$PrismaModel>
|
|
in?: number[] | ListIntFieldRefInput<$PrismaModel>
|
|
notIn?: number[] | ListIntFieldRefInput<$PrismaModel>
|
|
lt?: number | IntFieldRefInput<$PrismaModel>
|
|
lte?: number | IntFieldRefInput<$PrismaModel>
|
|
gt?: number | IntFieldRefInput<$PrismaModel>
|
|
gte?: number | IntFieldRefInput<$PrismaModel>
|
|
not?: NestedIntFilter<$PrismaModel> | number
|
|
}
|
|
|
|
export type NestedStringNullableWithAggregatesFilter<$PrismaModel = never> = {
|
|
equals?: string | StringFieldRefInput<$PrismaModel> | null
|
|
in?: string[] | ListStringFieldRefInput<$PrismaModel> | null
|
|
notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null
|
|
lt?: string | StringFieldRefInput<$PrismaModel>
|
|
lte?: string | StringFieldRefInput<$PrismaModel>
|
|
gt?: string | StringFieldRefInput<$PrismaModel>
|
|
gte?: string | StringFieldRefInput<$PrismaModel>
|
|
contains?: string | StringFieldRefInput<$PrismaModel>
|
|
startsWith?: string | StringFieldRefInput<$PrismaModel>
|
|
endsWith?: string | StringFieldRefInput<$PrismaModel>
|
|
not?: NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null
|
|
_count?: NestedIntNullableFilter<$PrismaModel>
|
|
_min?: NestedStringNullableFilter<$PrismaModel>
|
|
_max?: NestedStringNullableFilter<$PrismaModel>
|
|
}
|
|
|
|
export type NestedIntNullableFilter<$PrismaModel = never> = {
|
|
equals?: number | IntFieldRefInput<$PrismaModel> | null
|
|
in?: number[] | ListIntFieldRefInput<$PrismaModel> | null
|
|
notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null
|
|
lt?: number | IntFieldRefInput<$PrismaModel>
|
|
lte?: number | IntFieldRefInput<$PrismaModel>
|
|
gt?: number | IntFieldRefInput<$PrismaModel>
|
|
gte?: number | IntFieldRefInput<$PrismaModel>
|
|
not?: NestedIntNullableFilter<$PrismaModel> | number | null
|
|
}
|
|
|
|
export type NestedDateTimeWithAggregatesFilter<$PrismaModel = never> = {
|
|
equals?: Date | string | DateTimeFieldRefInput<$PrismaModel>
|
|
in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel>
|
|
notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel>
|
|
lt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
|
|
lte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
|
|
gt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
|
|
gte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
|
|
not?: NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string
|
|
_count?: NestedIntFilter<$PrismaModel>
|
|
_min?: NestedDateTimeFilter<$PrismaModel>
|
|
_max?: NestedDateTimeFilter<$PrismaModel>
|
|
}
|
|
|
|
export type NestedEnumGradeFilter<$PrismaModel = never> = {
|
|
equals?: $Enums.Grade | EnumGradeFieldRefInput<$PrismaModel>
|
|
in?: $Enums.Grade[] | ListEnumGradeFieldRefInput<$PrismaModel>
|
|
notIn?: $Enums.Grade[] | ListEnumGradeFieldRefInput<$PrismaModel>
|
|
not?: NestedEnumGradeFilter<$PrismaModel> | $Enums.Grade
|
|
}
|
|
|
|
export type NestedEnumSubjectFilter<$PrismaModel = never> = {
|
|
equals?: $Enums.Subject | EnumSubjectFieldRefInput<$PrismaModel>
|
|
in?: $Enums.Subject[] | ListEnumSubjectFieldRefInput<$PrismaModel>
|
|
notIn?: $Enums.Subject[] | ListEnumSubjectFieldRefInput<$PrismaModel>
|
|
not?: NestedEnumSubjectFilter<$PrismaModel> | $Enums.Subject
|
|
}
|
|
|
|
export type NestedEnumDifficultyFilter<$PrismaModel = never> = {
|
|
equals?: $Enums.Difficulty | EnumDifficultyFieldRefInput<$PrismaModel>
|
|
in?: $Enums.Difficulty[] | ListEnumDifficultyFieldRefInput<$PrismaModel>
|
|
notIn?: $Enums.Difficulty[] | ListEnumDifficultyFieldRefInput<$PrismaModel>
|
|
not?: NestedEnumDifficultyFilter<$PrismaModel> | $Enums.Difficulty
|
|
}
|
|
|
|
export type NestedEnumGradeWithAggregatesFilter<$PrismaModel = never> = {
|
|
equals?: $Enums.Grade | EnumGradeFieldRefInput<$PrismaModel>
|
|
in?: $Enums.Grade[] | ListEnumGradeFieldRefInput<$PrismaModel>
|
|
notIn?: $Enums.Grade[] | ListEnumGradeFieldRefInput<$PrismaModel>
|
|
not?: NestedEnumGradeWithAggregatesFilter<$PrismaModel> | $Enums.Grade
|
|
_count?: NestedIntFilter<$PrismaModel>
|
|
_min?: NestedEnumGradeFilter<$PrismaModel>
|
|
_max?: NestedEnumGradeFilter<$PrismaModel>
|
|
}
|
|
|
|
export type NestedEnumSubjectWithAggregatesFilter<$PrismaModel = never> = {
|
|
equals?: $Enums.Subject | EnumSubjectFieldRefInput<$PrismaModel>
|
|
in?: $Enums.Subject[] | ListEnumSubjectFieldRefInput<$PrismaModel>
|
|
notIn?: $Enums.Subject[] | ListEnumSubjectFieldRefInput<$PrismaModel>
|
|
not?: NestedEnumSubjectWithAggregatesFilter<$PrismaModel> | $Enums.Subject
|
|
_count?: NestedIntFilter<$PrismaModel>
|
|
_min?: NestedEnumSubjectFilter<$PrismaModel>
|
|
_max?: NestedEnumSubjectFilter<$PrismaModel>
|
|
}
|
|
|
|
export type NestedEnumDifficultyWithAggregatesFilter<$PrismaModel = never> = {
|
|
equals?: $Enums.Difficulty | EnumDifficultyFieldRefInput<$PrismaModel>
|
|
in?: $Enums.Difficulty[] | ListEnumDifficultyFieldRefInput<$PrismaModel>
|
|
notIn?: $Enums.Difficulty[] | ListEnumDifficultyFieldRefInput<$PrismaModel>
|
|
not?: NestedEnumDifficultyWithAggregatesFilter<$PrismaModel> | $Enums.Difficulty
|
|
_count?: NestedIntFilter<$PrismaModel>
|
|
_min?: NestedEnumDifficultyFilter<$PrismaModel>
|
|
_max?: NestedEnumDifficultyFilter<$PrismaModel>
|
|
}
|
|
export type NestedJsonFilter<$PrismaModel = never> =
|
|
| PatchUndefined<
|
|
Either<Required<NestedJsonFilterBase<$PrismaModel>>, Exclude<keyof Required<NestedJsonFilterBase<$PrismaModel>>, 'path'>>,
|
|
Required<NestedJsonFilterBase<$PrismaModel>>
|
|
>
|
|
| OptionalFlat<Omit<Required<NestedJsonFilterBase<$PrismaModel>>, 'path'>>
|
|
|
|
export type NestedJsonFilterBase<$PrismaModel = never> = {
|
|
equals?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
|
|
path?: string[]
|
|
string_contains?: string | StringFieldRefInput<$PrismaModel>
|
|
string_starts_with?: string | StringFieldRefInput<$PrismaModel>
|
|
string_ends_with?: string | StringFieldRefInput<$PrismaModel>
|
|
array_contains?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
|
|
array_starts_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
|
|
array_ends_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
|
|
lt?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
|
|
lte?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
|
|
gt?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
|
|
gte?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
|
|
not?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
|
|
}
|
|
|
|
export type NestedEnumSessionStatusFilter<$PrismaModel = never> = {
|
|
equals?: $Enums.SessionStatus | EnumSessionStatusFieldRefInput<$PrismaModel>
|
|
in?: $Enums.SessionStatus[] | ListEnumSessionStatusFieldRefInput<$PrismaModel>
|
|
notIn?: $Enums.SessionStatus[] | ListEnumSessionStatusFieldRefInput<$PrismaModel>
|
|
not?: NestedEnumSessionStatusFilter<$PrismaModel> | $Enums.SessionStatus
|
|
}
|
|
|
|
export type NestedDateTimeNullableFilter<$PrismaModel = never> = {
|
|
equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null
|
|
in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null
|
|
notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null
|
|
lt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
|
|
lte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
|
|
gt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
|
|
gte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
|
|
not?: NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null
|
|
}
|
|
|
|
export type NestedEnumSessionStatusWithAggregatesFilter<$PrismaModel = never> = {
|
|
equals?: $Enums.SessionStatus | EnumSessionStatusFieldRefInput<$PrismaModel>
|
|
in?: $Enums.SessionStatus[] | ListEnumSessionStatusFieldRefInput<$PrismaModel>
|
|
notIn?: $Enums.SessionStatus[] | ListEnumSessionStatusFieldRefInput<$PrismaModel>
|
|
not?: NestedEnumSessionStatusWithAggregatesFilter<$PrismaModel> | $Enums.SessionStatus
|
|
_count?: NestedIntFilter<$PrismaModel>
|
|
_min?: NestedEnumSessionStatusFilter<$PrismaModel>
|
|
_max?: NestedEnumSessionStatusFilter<$PrismaModel>
|
|
}
|
|
|
|
export type NestedIntWithAggregatesFilter<$PrismaModel = never> = {
|
|
equals?: number | IntFieldRefInput<$PrismaModel>
|
|
in?: number[] | ListIntFieldRefInput<$PrismaModel>
|
|
notIn?: number[] | ListIntFieldRefInput<$PrismaModel>
|
|
lt?: number | IntFieldRefInput<$PrismaModel>
|
|
lte?: number | IntFieldRefInput<$PrismaModel>
|
|
gt?: number | IntFieldRefInput<$PrismaModel>
|
|
gte?: number | IntFieldRefInput<$PrismaModel>
|
|
not?: NestedIntWithAggregatesFilter<$PrismaModel> | number
|
|
_count?: NestedIntFilter<$PrismaModel>
|
|
_avg?: NestedFloatFilter<$PrismaModel>
|
|
_sum?: NestedIntFilter<$PrismaModel>
|
|
_min?: NestedIntFilter<$PrismaModel>
|
|
_max?: NestedIntFilter<$PrismaModel>
|
|
}
|
|
|
|
export type NestedFloatFilter<$PrismaModel = never> = {
|
|
equals?: number | FloatFieldRefInput<$PrismaModel>
|
|
in?: number[] | ListFloatFieldRefInput<$PrismaModel>
|
|
notIn?: number[] | ListFloatFieldRefInput<$PrismaModel>
|
|
lt?: number | FloatFieldRefInput<$PrismaModel>
|
|
lte?: number | FloatFieldRefInput<$PrismaModel>
|
|
gt?: number | FloatFieldRefInput<$PrismaModel>
|
|
gte?: number | FloatFieldRefInput<$PrismaModel>
|
|
not?: NestedFloatFilter<$PrismaModel> | number
|
|
}
|
|
|
|
export type NestedDateTimeNullableWithAggregatesFilter<$PrismaModel = never> = {
|
|
equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null
|
|
in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null
|
|
notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null
|
|
lt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
|
|
lte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
|
|
gt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
|
|
gte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
|
|
not?: NestedDateTimeNullableWithAggregatesFilter<$PrismaModel> | Date | string | null
|
|
_count?: NestedIntNullableFilter<$PrismaModel>
|
|
_min?: NestedDateTimeNullableFilter<$PrismaModel>
|
|
_max?: NestedDateTimeNullableFilter<$PrismaModel>
|
|
}
|
|
|
|
export type NestedBoolFilter<$PrismaModel = never> = {
|
|
equals?: boolean | BooleanFieldRefInput<$PrismaModel>
|
|
not?: NestedBoolFilter<$PrismaModel> | boolean
|
|
}
|
|
|
|
export type NestedBoolWithAggregatesFilter<$PrismaModel = never> = {
|
|
equals?: boolean | BooleanFieldRefInput<$PrismaModel>
|
|
not?: NestedBoolWithAggregatesFilter<$PrismaModel> | boolean
|
|
_count?: NestedIntFilter<$PrismaModel>
|
|
_min?: NestedBoolFilter<$PrismaModel>
|
|
_max?: NestedBoolFilter<$PrismaModel>
|
|
}
|
|
|
|
export type NestedIntNullableWithAggregatesFilter<$PrismaModel = never> = {
|
|
equals?: number | IntFieldRefInput<$PrismaModel> | null
|
|
in?: number[] | ListIntFieldRefInput<$PrismaModel> | null
|
|
notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null
|
|
lt?: number | IntFieldRefInput<$PrismaModel>
|
|
lte?: number | IntFieldRefInput<$PrismaModel>
|
|
gt?: number | IntFieldRefInput<$PrismaModel>
|
|
gte?: number | IntFieldRefInput<$PrismaModel>
|
|
not?: NestedIntNullableWithAggregatesFilter<$PrismaModel> | number | null
|
|
_count?: NestedIntNullableFilter<$PrismaModel>
|
|
_avg?: NestedFloatNullableFilter<$PrismaModel>
|
|
_sum?: NestedIntNullableFilter<$PrismaModel>
|
|
_min?: NestedIntNullableFilter<$PrismaModel>
|
|
_max?: NestedIntNullableFilter<$PrismaModel>
|
|
}
|
|
|
|
export type NestedFloatNullableFilter<$PrismaModel = never> = {
|
|
equals?: number | FloatFieldRefInput<$PrismaModel> | null
|
|
in?: number[] | ListFloatFieldRefInput<$PrismaModel> | null
|
|
notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> | null
|
|
lt?: number | FloatFieldRefInput<$PrismaModel>
|
|
lte?: number | FloatFieldRefInput<$PrismaModel>
|
|
gt?: number | FloatFieldRefInput<$PrismaModel>
|
|
gte?: number | FloatFieldRefInput<$PrismaModel>
|
|
not?: NestedFloatNullableFilter<$PrismaModel> | number | null
|
|
}
|
|
|
|
export type GameSessionCreateWithoutUserInput = {
|
|
id?: string
|
|
grade: $Enums.Grade
|
|
subject: $Enums.Subject
|
|
status?: $Enums.SessionStatus
|
|
score?: number
|
|
totalQuestions: number
|
|
correctAnswers?: number
|
|
startedAt?: Date | string
|
|
completedAt?: Date | string | null
|
|
answers?: UserAnswerCreateNestedManyWithoutSessionInput
|
|
}
|
|
|
|
export type GameSessionUncheckedCreateWithoutUserInput = {
|
|
id?: string
|
|
grade: $Enums.Grade
|
|
subject: $Enums.Subject
|
|
status?: $Enums.SessionStatus
|
|
score?: number
|
|
totalQuestions: number
|
|
correctAnswers?: number
|
|
startedAt?: Date | string
|
|
completedAt?: Date | string | null
|
|
answers?: UserAnswerUncheckedCreateNestedManyWithoutSessionInput
|
|
}
|
|
|
|
export type GameSessionCreateOrConnectWithoutUserInput = {
|
|
where: GameSessionWhereUniqueInput
|
|
create: XOR<GameSessionCreateWithoutUserInput, GameSessionUncheckedCreateWithoutUserInput>
|
|
}
|
|
|
|
export type GameSessionCreateManyUserInputEnvelope = {
|
|
data: GameSessionCreateManyUserInput | GameSessionCreateManyUserInput[]
|
|
skipDuplicates?: boolean
|
|
}
|
|
|
|
export type LeaderboardEntryCreateWithoutUserInput = {
|
|
id?: string
|
|
grade: $Enums.Grade
|
|
subject: $Enums.Subject
|
|
bestScore: number
|
|
gamesPlayed: number
|
|
totalCorrect: number
|
|
rank?: number | null
|
|
updatedAt?: Date | string
|
|
}
|
|
|
|
export type LeaderboardEntryUncheckedCreateWithoutUserInput = {
|
|
id?: string
|
|
grade: $Enums.Grade
|
|
subject: $Enums.Subject
|
|
bestScore: number
|
|
gamesPlayed: number
|
|
totalCorrect: number
|
|
rank?: number | null
|
|
updatedAt?: Date | string
|
|
}
|
|
|
|
export type LeaderboardEntryCreateOrConnectWithoutUserInput = {
|
|
where: LeaderboardEntryWhereUniqueInput
|
|
create: XOR<LeaderboardEntryCreateWithoutUserInput, LeaderboardEntryUncheckedCreateWithoutUserInput>
|
|
}
|
|
|
|
export type LeaderboardEntryCreateManyUserInputEnvelope = {
|
|
data: LeaderboardEntryCreateManyUserInput | LeaderboardEntryCreateManyUserInput[]
|
|
skipDuplicates?: boolean
|
|
}
|
|
|
|
export type GameSessionUpsertWithWhereUniqueWithoutUserInput = {
|
|
where: GameSessionWhereUniqueInput
|
|
update: XOR<GameSessionUpdateWithoutUserInput, GameSessionUncheckedUpdateWithoutUserInput>
|
|
create: XOR<GameSessionCreateWithoutUserInput, GameSessionUncheckedCreateWithoutUserInput>
|
|
}
|
|
|
|
export type GameSessionUpdateWithWhereUniqueWithoutUserInput = {
|
|
where: GameSessionWhereUniqueInput
|
|
data: XOR<GameSessionUpdateWithoutUserInput, GameSessionUncheckedUpdateWithoutUserInput>
|
|
}
|
|
|
|
export type GameSessionUpdateManyWithWhereWithoutUserInput = {
|
|
where: GameSessionScalarWhereInput
|
|
data: XOR<GameSessionUpdateManyMutationInput, GameSessionUncheckedUpdateManyWithoutUserInput>
|
|
}
|
|
|
|
export type GameSessionScalarWhereInput = {
|
|
AND?: GameSessionScalarWhereInput | GameSessionScalarWhereInput[]
|
|
OR?: GameSessionScalarWhereInput[]
|
|
NOT?: GameSessionScalarWhereInput | GameSessionScalarWhereInput[]
|
|
id?: StringFilter<"GameSession"> | string
|
|
userId?: StringFilter<"GameSession"> | string
|
|
grade?: EnumGradeFilter<"GameSession"> | $Enums.Grade
|
|
subject?: EnumSubjectFilter<"GameSession"> | $Enums.Subject
|
|
status?: EnumSessionStatusFilter<"GameSession"> | $Enums.SessionStatus
|
|
score?: IntFilter<"GameSession"> | number
|
|
totalQuestions?: IntFilter<"GameSession"> | number
|
|
correctAnswers?: IntFilter<"GameSession"> | number
|
|
startedAt?: DateTimeFilter<"GameSession"> | Date | string
|
|
completedAt?: DateTimeNullableFilter<"GameSession"> | Date | string | null
|
|
}
|
|
|
|
export type LeaderboardEntryUpsertWithWhereUniqueWithoutUserInput = {
|
|
where: LeaderboardEntryWhereUniqueInput
|
|
update: XOR<LeaderboardEntryUpdateWithoutUserInput, LeaderboardEntryUncheckedUpdateWithoutUserInput>
|
|
create: XOR<LeaderboardEntryCreateWithoutUserInput, LeaderboardEntryUncheckedCreateWithoutUserInput>
|
|
}
|
|
|
|
export type LeaderboardEntryUpdateWithWhereUniqueWithoutUserInput = {
|
|
where: LeaderboardEntryWhereUniqueInput
|
|
data: XOR<LeaderboardEntryUpdateWithoutUserInput, LeaderboardEntryUncheckedUpdateWithoutUserInput>
|
|
}
|
|
|
|
export type LeaderboardEntryUpdateManyWithWhereWithoutUserInput = {
|
|
where: LeaderboardEntryScalarWhereInput
|
|
data: XOR<LeaderboardEntryUpdateManyMutationInput, LeaderboardEntryUncheckedUpdateManyWithoutUserInput>
|
|
}
|
|
|
|
export type LeaderboardEntryScalarWhereInput = {
|
|
AND?: LeaderboardEntryScalarWhereInput | LeaderboardEntryScalarWhereInput[]
|
|
OR?: LeaderboardEntryScalarWhereInput[]
|
|
NOT?: LeaderboardEntryScalarWhereInput | LeaderboardEntryScalarWhereInput[]
|
|
id?: StringFilter<"LeaderboardEntry"> | string
|
|
userId?: StringFilter<"LeaderboardEntry"> | string
|
|
grade?: EnumGradeFilter<"LeaderboardEntry"> | $Enums.Grade
|
|
subject?: EnumSubjectFilter<"LeaderboardEntry"> | $Enums.Subject
|
|
bestScore?: IntFilter<"LeaderboardEntry"> | number
|
|
gamesPlayed?: IntFilter<"LeaderboardEntry"> | number
|
|
totalCorrect?: IntFilter<"LeaderboardEntry"> | number
|
|
rank?: IntNullableFilter<"LeaderboardEntry"> | number | null
|
|
updatedAt?: DateTimeFilter<"LeaderboardEntry"> | Date | string
|
|
}
|
|
|
|
export type UserAnswerCreateWithoutQuestionInput = {
|
|
id?: string
|
|
selectedAnswer: string
|
|
isCorrect: boolean
|
|
timeSpentMs: number
|
|
answeredAt?: Date | string
|
|
session: GameSessionCreateNestedOneWithoutAnswersInput
|
|
}
|
|
|
|
export type UserAnswerUncheckedCreateWithoutQuestionInput = {
|
|
id?: string
|
|
sessionId: string
|
|
selectedAnswer: string
|
|
isCorrect: boolean
|
|
timeSpentMs: number
|
|
answeredAt?: Date | string
|
|
}
|
|
|
|
export type UserAnswerCreateOrConnectWithoutQuestionInput = {
|
|
where: UserAnswerWhereUniqueInput
|
|
create: XOR<UserAnswerCreateWithoutQuestionInput, UserAnswerUncheckedCreateWithoutQuestionInput>
|
|
}
|
|
|
|
export type UserAnswerCreateManyQuestionInputEnvelope = {
|
|
data: UserAnswerCreateManyQuestionInput | UserAnswerCreateManyQuestionInput[]
|
|
skipDuplicates?: boolean
|
|
}
|
|
|
|
export type UserAnswerUpsertWithWhereUniqueWithoutQuestionInput = {
|
|
where: UserAnswerWhereUniqueInput
|
|
update: XOR<UserAnswerUpdateWithoutQuestionInput, UserAnswerUncheckedUpdateWithoutQuestionInput>
|
|
create: XOR<UserAnswerCreateWithoutQuestionInput, UserAnswerUncheckedCreateWithoutQuestionInput>
|
|
}
|
|
|
|
export type UserAnswerUpdateWithWhereUniqueWithoutQuestionInput = {
|
|
where: UserAnswerWhereUniqueInput
|
|
data: XOR<UserAnswerUpdateWithoutQuestionInput, UserAnswerUncheckedUpdateWithoutQuestionInput>
|
|
}
|
|
|
|
export type UserAnswerUpdateManyWithWhereWithoutQuestionInput = {
|
|
where: UserAnswerScalarWhereInput
|
|
data: XOR<UserAnswerUpdateManyMutationInput, UserAnswerUncheckedUpdateManyWithoutQuestionInput>
|
|
}
|
|
|
|
export type UserAnswerScalarWhereInput = {
|
|
AND?: UserAnswerScalarWhereInput | UserAnswerScalarWhereInput[]
|
|
OR?: UserAnswerScalarWhereInput[]
|
|
NOT?: UserAnswerScalarWhereInput | UserAnswerScalarWhereInput[]
|
|
id?: StringFilter<"UserAnswer"> | string
|
|
sessionId?: StringFilter<"UserAnswer"> | string
|
|
questionId?: StringFilter<"UserAnswer"> | string
|
|
selectedAnswer?: StringFilter<"UserAnswer"> | string
|
|
isCorrect?: BoolFilter<"UserAnswer"> | boolean
|
|
timeSpentMs?: IntFilter<"UserAnswer"> | number
|
|
answeredAt?: DateTimeFilter<"UserAnswer"> | Date | string
|
|
}
|
|
|
|
export type UserCreateWithoutSessionsInput = {
|
|
id?: string
|
|
googleId: string
|
|
email: string
|
|
displayName: string
|
|
avatarUrl?: string | null
|
|
createdAt?: Date | string
|
|
updatedAt?: Date | string
|
|
leaderboardEntries?: LeaderboardEntryCreateNestedManyWithoutUserInput
|
|
}
|
|
|
|
export type UserUncheckedCreateWithoutSessionsInput = {
|
|
id?: string
|
|
googleId: string
|
|
email: string
|
|
displayName: string
|
|
avatarUrl?: string | null
|
|
createdAt?: Date | string
|
|
updatedAt?: Date | string
|
|
leaderboardEntries?: LeaderboardEntryUncheckedCreateNestedManyWithoutUserInput
|
|
}
|
|
|
|
export type UserCreateOrConnectWithoutSessionsInput = {
|
|
where: UserWhereUniqueInput
|
|
create: XOR<UserCreateWithoutSessionsInput, UserUncheckedCreateWithoutSessionsInput>
|
|
}
|
|
|
|
export type UserAnswerCreateWithoutSessionInput = {
|
|
id?: string
|
|
selectedAnswer: string
|
|
isCorrect: boolean
|
|
timeSpentMs: number
|
|
answeredAt?: Date | string
|
|
question: QuestionCreateNestedOneWithoutAnswersInput
|
|
}
|
|
|
|
export type UserAnswerUncheckedCreateWithoutSessionInput = {
|
|
id?: string
|
|
questionId: string
|
|
selectedAnswer: string
|
|
isCorrect: boolean
|
|
timeSpentMs: number
|
|
answeredAt?: Date | string
|
|
}
|
|
|
|
export type UserAnswerCreateOrConnectWithoutSessionInput = {
|
|
where: UserAnswerWhereUniqueInput
|
|
create: XOR<UserAnswerCreateWithoutSessionInput, UserAnswerUncheckedCreateWithoutSessionInput>
|
|
}
|
|
|
|
export type UserAnswerCreateManySessionInputEnvelope = {
|
|
data: UserAnswerCreateManySessionInput | UserAnswerCreateManySessionInput[]
|
|
skipDuplicates?: boolean
|
|
}
|
|
|
|
export type UserUpsertWithoutSessionsInput = {
|
|
update: XOR<UserUpdateWithoutSessionsInput, UserUncheckedUpdateWithoutSessionsInput>
|
|
create: XOR<UserCreateWithoutSessionsInput, UserUncheckedCreateWithoutSessionsInput>
|
|
where?: UserWhereInput
|
|
}
|
|
|
|
export type UserUpdateToOneWithWhereWithoutSessionsInput = {
|
|
where?: UserWhereInput
|
|
data: XOR<UserUpdateWithoutSessionsInput, UserUncheckedUpdateWithoutSessionsInput>
|
|
}
|
|
|
|
export type UserUpdateWithoutSessionsInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
googleId?: StringFieldUpdateOperationsInput | string
|
|
email?: StringFieldUpdateOperationsInput | string
|
|
displayName?: StringFieldUpdateOperationsInput | string
|
|
avatarUrl?: NullableStringFieldUpdateOperationsInput | string | null
|
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
leaderboardEntries?: LeaderboardEntryUpdateManyWithoutUserNestedInput
|
|
}
|
|
|
|
export type UserUncheckedUpdateWithoutSessionsInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
googleId?: StringFieldUpdateOperationsInput | string
|
|
email?: StringFieldUpdateOperationsInput | string
|
|
displayName?: StringFieldUpdateOperationsInput | string
|
|
avatarUrl?: NullableStringFieldUpdateOperationsInput | string | null
|
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
leaderboardEntries?: LeaderboardEntryUncheckedUpdateManyWithoutUserNestedInput
|
|
}
|
|
|
|
export type UserAnswerUpsertWithWhereUniqueWithoutSessionInput = {
|
|
where: UserAnswerWhereUniqueInput
|
|
update: XOR<UserAnswerUpdateWithoutSessionInput, UserAnswerUncheckedUpdateWithoutSessionInput>
|
|
create: XOR<UserAnswerCreateWithoutSessionInput, UserAnswerUncheckedCreateWithoutSessionInput>
|
|
}
|
|
|
|
export type UserAnswerUpdateWithWhereUniqueWithoutSessionInput = {
|
|
where: UserAnswerWhereUniqueInput
|
|
data: XOR<UserAnswerUpdateWithoutSessionInput, UserAnswerUncheckedUpdateWithoutSessionInput>
|
|
}
|
|
|
|
export type UserAnswerUpdateManyWithWhereWithoutSessionInput = {
|
|
where: UserAnswerScalarWhereInput
|
|
data: XOR<UserAnswerUpdateManyMutationInput, UserAnswerUncheckedUpdateManyWithoutSessionInput>
|
|
}
|
|
|
|
export type GameSessionCreateWithoutAnswersInput = {
|
|
id?: string
|
|
grade: $Enums.Grade
|
|
subject: $Enums.Subject
|
|
status?: $Enums.SessionStatus
|
|
score?: number
|
|
totalQuestions: number
|
|
correctAnswers?: number
|
|
startedAt?: Date | string
|
|
completedAt?: Date | string | null
|
|
user: UserCreateNestedOneWithoutSessionsInput
|
|
}
|
|
|
|
export type GameSessionUncheckedCreateWithoutAnswersInput = {
|
|
id?: string
|
|
userId: string
|
|
grade: $Enums.Grade
|
|
subject: $Enums.Subject
|
|
status?: $Enums.SessionStatus
|
|
score?: number
|
|
totalQuestions: number
|
|
correctAnswers?: number
|
|
startedAt?: Date | string
|
|
completedAt?: Date | string | null
|
|
}
|
|
|
|
export type GameSessionCreateOrConnectWithoutAnswersInput = {
|
|
where: GameSessionWhereUniqueInput
|
|
create: XOR<GameSessionCreateWithoutAnswersInput, GameSessionUncheckedCreateWithoutAnswersInput>
|
|
}
|
|
|
|
export type QuestionCreateWithoutAnswersInput = {
|
|
id?: string
|
|
grade: $Enums.Grade
|
|
subject: $Enums.Subject
|
|
strand: string
|
|
difficulty: $Enums.Difficulty
|
|
questionText: string
|
|
options: JsonNullValueInput | InputJsonValue
|
|
correctAnswer: string
|
|
explanation?: string | null
|
|
createdAt?: Date | string
|
|
}
|
|
|
|
export type QuestionUncheckedCreateWithoutAnswersInput = {
|
|
id?: string
|
|
grade: $Enums.Grade
|
|
subject: $Enums.Subject
|
|
strand: string
|
|
difficulty: $Enums.Difficulty
|
|
questionText: string
|
|
options: JsonNullValueInput | InputJsonValue
|
|
correctAnswer: string
|
|
explanation?: string | null
|
|
createdAt?: Date | string
|
|
}
|
|
|
|
export type QuestionCreateOrConnectWithoutAnswersInput = {
|
|
where: QuestionWhereUniqueInput
|
|
create: XOR<QuestionCreateWithoutAnswersInput, QuestionUncheckedCreateWithoutAnswersInput>
|
|
}
|
|
|
|
export type GameSessionUpsertWithoutAnswersInput = {
|
|
update: XOR<GameSessionUpdateWithoutAnswersInput, GameSessionUncheckedUpdateWithoutAnswersInput>
|
|
create: XOR<GameSessionCreateWithoutAnswersInput, GameSessionUncheckedCreateWithoutAnswersInput>
|
|
where?: GameSessionWhereInput
|
|
}
|
|
|
|
export type GameSessionUpdateToOneWithWhereWithoutAnswersInput = {
|
|
where?: GameSessionWhereInput
|
|
data: XOR<GameSessionUpdateWithoutAnswersInput, GameSessionUncheckedUpdateWithoutAnswersInput>
|
|
}
|
|
|
|
export type GameSessionUpdateWithoutAnswersInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade
|
|
subject?: EnumSubjectFieldUpdateOperationsInput | $Enums.Subject
|
|
status?: EnumSessionStatusFieldUpdateOperationsInput | $Enums.SessionStatus
|
|
score?: IntFieldUpdateOperationsInput | number
|
|
totalQuestions?: IntFieldUpdateOperationsInput | number
|
|
correctAnswers?: IntFieldUpdateOperationsInput | number
|
|
startedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
completedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
user?: UserUpdateOneRequiredWithoutSessionsNestedInput
|
|
}
|
|
|
|
export type GameSessionUncheckedUpdateWithoutAnswersInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
userId?: StringFieldUpdateOperationsInput | string
|
|
grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade
|
|
subject?: EnumSubjectFieldUpdateOperationsInput | $Enums.Subject
|
|
status?: EnumSessionStatusFieldUpdateOperationsInput | $Enums.SessionStatus
|
|
score?: IntFieldUpdateOperationsInput | number
|
|
totalQuestions?: IntFieldUpdateOperationsInput | number
|
|
correctAnswers?: IntFieldUpdateOperationsInput | number
|
|
startedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
completedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
}
|
|
|
|
export type QuestionUpsertWithoutAnswersInput = {
|
|
update: XOR<QuestionUpdateWithoutAnswersInput, QuestionUncheckedUpdateWithoutAnswersInput>
|
|
create: XOR<QuestionCreateWithoutAnswersInput, QuestionUncheckedCreateWithoutAnswersInput>
|
|
where?: QuestionWhereInput
|
|
}
|
|
|
|
export type QuestionUpdateToOneWithWhereWithoutAnswersInput = {
|
|
where?: QuestionWhereInput
|
|
data: XOR<QuestionUpdateWithoutAnswersInput, QuestionUncheckedUpdateWithoutAnswersInput>
|
|
}
|
|
|
|
export type QuestionUpdateWithoutAnswersInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade
|
|
subject?: EnumSubjectFieldUpdateOperationsInput | $Enums.Subject
|
|
strand?: StringFieldUpdateOperationsInput | string
|
|
difficulty?: EnumDifficultyFieldUpdateOperationsInput | $Enums.Difficulty
|
|
questionText?: StringFieldUpdateOperationsInput | string
|
|
options?: JsonNullValueInput | InputJsonValue
|
|
correctAnswer?: StringFieldUpdateOperationsInput | string
|
|
explanation?: NullableStringFieldUpdateOperationsInput | string | null
|
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
}
|
|
|
|
export type QuestionUncheckedUpdateWithoutAnswersInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade
|
|
subject?: EnumSubjectFieldUpdateOperationsInput | $Enums.Subject
|
|
strand?: StringFieldUpdateOperationsInput | string
|
|
difficulty?: EnumDifficultyFieldUpdateOperationsInput | $Enums.Difficulty
|
|
questionText?: StringFieldUpdateOperationsInput | string
|
|
options?: JsonNullValueInput | InputJsonValue
|
|
correctAnswer?: StringFieldUpdateOperationsInput | string
|
|
explanation?: NullableStringFieldUpdateOperationsInput | string | null
|
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
}
|
|
|
|
export type UserCreateWithoutLeaderboardEntriesInput = {
|
|
id?: string
|
|
googleId: string
|
|
email: string
|
|
displayName: string
|
|
avatarUrl?: string | null
|
|
createdAt?: Date | string
|
|
updatedAt?: Date | string
|
|
sessions?: GameSessionCreateNestedManyWithoutUserInput
|
|
}
|
|
|
|
export type UserUncheckedCreateWithoutLeaderboardEntriesInput = {
|
|
id?: string
|
|
googleId: string
|
|
email: string
|
|
displayName: string
|
|
avatarUrl?: string | null
|
|
createdAt?: Date | string
|
|
updatedAt?: Date | string
|
|
sessions?: GameSessionUncheckedCreateNestedManyWithoutUserInput
|
|
}
|
|
|
|
export type UserCreateOrConnectWithoutLeaderboardEntriesInput = {
|
|
where: UserWhereUniqueInput
|
|
create: XOR<UserCreateWithoutLeaderboardEntriesInput, UserUncheckedCreateWithoutLeaderboardEntriesInput>
|
|
}
|
|
|
|
export type UserUpsertWithoutLeaderboardEntriesInput = {
|
|
update: XOR<UserUpdateWithoutLeaderboardEntriesInput, UserUncheckedUpdateWithoutLeaderboardEntriesInput>
|
|
create: XOR<UserCreateWithoutLeaderboardEntriesInput, UserUncheckedCreateWithoutLeaderboardEntriesInput>
|
|
where?: UserWhereInput
|
|
}
|
|
|
|
export type UserUpdateToOneWithWhereWithoutLeaderboardEntriesInput = {
|
|
where?: UserWhereInput
|
|
data: XOR<UserUpdateWithoutLeaderboardEntriesInput, UserUncheckedUpdateWithoutLeaderboardEntriesInput>
|
|
}
|
|
|
|
export type UserUpdateWithoutLeaderboardEntriesInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
googleId?: StringFieldUpdateOperationsInput | string
|
|
email?: StringFieldUpdateOperationsInput | string
|
|
displayName?: StringFieldUpdateOperationsInput | string
|
|
avatarUrl?: NullableStringFieldUpdateOperationsInput | string | null
|
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
sessions?: GameSessionUpdateManyWithoutUserNestedInput
|
|
}
|
|
|
|
export type UserUncheckedUpdateWithoutLeaderboardEntriesInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
googleId?: StringFieldUpdateOperationsInput | string
|
|
email?: StringFieldUpdateOperationsInput | string
|
|
displayName?: StringFieldUpdateOperationsInput | string
|
|
avatarUrl?: NullableStringFieldUpdateOperationsInput | string | null
|
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
sessions?: GameSessionUncheckedUpdateManyWithoutUserNestedInput
|
|
}
|
|
|
|
export type GameSessionCreateManyUserInput = {
|
|
id?: string
|
|
grade: $Enums.Grade
|
|
subject: $Enums.Subject
|
|
status?: $Enums.SessionStatus
|
|
score?: number
|
|
totalQuestions: number
|
|
correctAnswers?: number
|
|
startedAt?: Date | string
|
|
completedAt?: Date | string | null
|
|
}
|
|
|
|
export type LeaderboardEntryCreateManyUserInput = {
|
|
id?: string
|
|
grade: $Enums.Grade
|
|
subject: $Enums.Subject
|
|
bestScore: number
|
|
gamesPlayed: number
|
|
totalCorrect: number
|
|
rank?: number | null
|
|
updatedAt?: Date | string
|
|
}
|
|
|
|
export type GameSessionUpdateWithoutUserInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade
|
|
subject?: EnumSubjectFieldUpdateOperationsInput | $Enums.Subject
|
|
status?: EnumSessionStatusFieldUpdateOperationsInput | $Enums.SessionStatus
|
|
score?: IntFieldUpdateOperationsInput | number
|
|
totalQuestions?: IntFieldUpdateOperationsInput | number
|
|
correctAnswers?: IntFieldUpdateOperationsInput | number
|
|
startedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
completedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
answers?: UserAnswerUpdateManyWithoutSessionNestedInput
|
|
}
|
|
|
|
export type GameSessionUncheckedUpdateWithoutUserInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade
|
|
subject?: EnumSubjectFieldUpdateOperationsInput | $Enums.Subject
|
|
status?: EnumSessionStatusFieldUpdateOperationsInput | $Enums.SessionStatus
|
|
score?: IntFieldUpdateOperationsInput | number
|
|
totalQuestions?: IntFieldUpdateOperationsInput | number
|
|
correctAnswers?: IntFieldUpdateOperationsInput | number
|
|
startedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
completedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
answers?: UserAnswerUncheckedUpdateManyWithoutSessionNestedInput
|
|
}
|
|
|
|
export type GameSessionUncheckedUpdateManyWithoutUserInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade
|
|
subject?: EnumSubjectFieldUpdateOperationsInput | $Enums.Subject
|
|
status?: EnumSessionStatusFieldUpdateOperationsInput | $Enums.SessionStatus
|
|
score?: IntFieldUpdateOperationsInput | number
|
|
totalQuestions?: IntFieldUpdateOperationsInput | number
|
|
correctAnswers?: IntFieldUpdateOperationsInput | number
|
|
startedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
completedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
}
|
|
|
|
export type LeaderboardEntryUpdateWithoutUserInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade
|
|
subject?: EnumSubjectFieldUpdateOperationsInput | $Enums.Subject
|
|
bestScore?: IntFieldUpdateOperationsInput | number
|
|
gamesPlayed?: IntFieldUpdateOperationsInput | number
|
|
totalCorrect?: IntFieldUpdateOperationsInput | number
|
|
rank?: NullableIntFieldUpdateOperationsInput | number | null
|
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
}
|
|
|
|
export type LeaderboardEntryUncheckedUpdateWithoutUserInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade
|
|
subject?: EnumSubjectFieldUpdateOperationsInput | $Enums.Subject
|
|
bestScore?: IntFieldUpdateOperationsInput | number
|
|
gamesPlayed?: IntFieldUpdateOperationsInput | number
|
|
totalCorrect?: IntFieldUpdateOperationsInput | number
|
|
rank?: NullableIntFieldUpdateOperationsInput | number | null
|
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
}
|
|
|
|
export type LeaderboardEntryUncheckedUpdateManyWithoutUserInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade
|
|
subject?: EnumSubjectFieldUpdateOperationsInput | $Enums.Subject
|
|
bestScore?: IntFieldUpdateOperationsInput | number
|
|
gamesPlayed?: IntFieldUpdateOperationsInput | number
|
|
totalCorrect?: IntFieldUpdateOperationsInput | number
|
|
rank?: NullableIntFieldUpdateOperationsInput | number | null
|
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
}
|
|
|
|
export type UserAnswerCreateManyQuestionInput = {
|
|
id?: string
|
|
sessionId: string
|
|
selectedAnswer: string
|
|
isCorrect: boolean
|
|
timeSpentMs: number
|
|
answeredAt?: Date | string
|
|
}
|
|
|
|
export type UserAnswerUpdateWithoutQuestionInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
selectedAnswer?: StringFieldUpdateOperationsInput | string
|
|
isCorrect?: BoolFieldUpdateOperationsInput | boolean
|
|
timeSpentMs?: IntFieldUpdateOperationsInput | number
|
|
answeredAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
session?: GameSessionUpdateOneRequiredWithoutAnswersNestedInput
|
|
}
|
|
|
|
export type UserAnswerUncheckedUpdateWithoutQuestionInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
sessionId?: StringFieldUpdateOperationsInput | string
|
|
selectedAnswer?: StringFieldUpdateOperationsInput | string
|
|
isCorrect?: BoolFieldUpdateOperationsInput | boolean
|
|
timeSpentMs?: IntFieldUpdateOperationsInput | number
|
|
answeredAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
}
|
|
|
|
export type UserAnswerUncheckedUpdateManyWithoutQuestionInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
sessionId?: StringFieldUpdateOperationsInput | string
|
|
selectedAnswer?: StringFieldUpdateOperationsInput | string
|
|
isCorrect?: BoolFieldUpdateOperationsInput | boolean
|
|
timeSpentMs?: IntFieldUpdateOperationsInput | number
|
|
answeredAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
}
|
|
|
|
export type UserAnswerCreateManySessionInput = {
|
|
id?: string
|
|
questionId: string
|
|
selectedAnswer: string
|
|
isCorrect: boolean
|
|
timeSpentMs: number
|
|
answeredAt?: Date | string
|
|
}
|
|
|
|
export type UserAnswerUpdateWithoutSessionInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
selectedAnswer?: StringFieldUpdateOperationsInput | string
|
|
isCorrect?: BoolFieldUpdateOperationsInput | boolean
|
|
timeSpentMs?: IntFieldUpdateOperationsInput | number
|
|
answeredAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
question?: QuestionUpdateOneRequiredWithoutAnswersNestedInput
|
|
}
|
|
|
|
export type UserAnswerUncheckedUpdateWithoutSessionInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
questionId?: StringFieldUpdateOperationsInput | string
|
|
selectedAnswer?: StringFieldUpdateOperationsInput | string
|
|
isCorrect?: BoolFieldUpdateOperationsInput | boolean
|
|
timeSpentMs?: IntFieldUpdateOperationsInput | number
|
|
answeredAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
}
|
|
|
|
export type UserAnswerUncheckedUpdateManyWithoutSessionInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
questionId?: StringFieldUpdateOperationsInput | string
|
|
selectedAnswer?: StringFieldUpdateOperationsInput | string
|
|
isCorrect?: BoolFieldUpdateOperationsInput | boolean
|
|
timeSpentMs?: IntFieldUpdateOperationsInput | number
|
|
answeredAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
* Aliases for legacy arg types
|
|
*/
|
|
/**
|
|
* @deprecated Use UserCountOutputTypeDefaultArgs instead
|
|
*/
|
|
export type UserCountOutputTypeArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = UserCountOutputTypeDefaultArgs<ExtArgs>
|
|
/**
|
|
* @deprecated Use QuestionCountOutputTypeDefaultArgs instead
|
|
*/
|
|
export type QuestionCountOutputTypeArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = QuestionCountOutputTypeDefaultArgs<ExtArgs>
|
|
/**
|
|
* @deprecated Use GameSessionCountOutputTypeDefaultArgs instead
|
|
*/
|
|
export type GameSessionCountOutputTypeArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = GameSessionCountOutputTypeDefaultArgs<ExtArgs>
|
|
/**
|
|
* @deprecated Use UserDefaultArgs instead
|
|
*/
|
|
export type UserArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = UserDefaultArgs<ExtArgs>
|
|
/**
|
|
* @deprecated Use QuestionDefaultArgs instead
|
|
*/
|
|
export type QuestionArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = QuestionDefaultArgs<ExtArgs>
|
|
/**
|
|
* @deprecated Use GameSessionDefaultArgs instead
|
|
*/
|
|
export type GameSessionArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = GameSessionDefaultArgs<ExtArgs>
|
|
/**
|
|
* @deprecated Use UserAnswerDefaultArgs instead
|
|
*/
|
|
export type UserAnswerArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = UserAnswerDefaultArgs<ExtArgs>
|
|
/**
|
|
* @deprecated Use LeaderboardEntryDefaultArgs instead
|
|
*/
|
|
export type LeaderboardEntryArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = LeaderboardEntryDefaultArgs<ExtArgs>
|
|
|
|
/**
|
|
* Batch Payload for updateMany & deleteMany & createMany
|
|
*/
|
|
|
|
export type BatchPayload = {
|
|
count: number
|
|
}
|
|
|
|
/**
|
|
* DMMF
|
|
*/
|
|
export const dmmf: runtime.BaseDMMF
|
|
} |