;
/**
* Performs a raw query and returns the SELECT data
* @example
* ```
* // With parameters use prisma.queryRaw``, values will be escaped automatically
* const result = await prisma.queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'ema.il'};`
* // Or
* const result = await prisma.queryRaw('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'ema.il')
* ```
*
* Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
*/
$queryRaw < T = any > (query: string | TemplateStringsArray | Prisma.Sql, ...values: any[]): PrismaPromise;
/**
* 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[]>(arg: [...P]): Promise>
/**
* `prisma.admin`: Exposes CRUD operations for the **Admin** model.
* Example usage:
* ```ts
* // Fetch zero or more Admins
* const admins = await prisma.admin.findMany()
* ```
*/
get admin(): Prisma.AdminDelegate;
/**
* `prisma.cafeteriaMenu`: Exposes CRUD operations for the **CafeteriaMenu** model.
* Example usage:
* ```ts
* // Fetch zero or more CafeteriaMenus
* const cafeteriaMenus = await prisma.cafeteriaMenu.findMany()
* ```
*/
get cafeteriaMenu(): Prisma.CafeteriaMenuDelegate;
/**
* `prisma.changePassword`: Exposes CRUD operations for the **ChangePassword** model.
* Example usage:
* ```ts
* // Fetch zero or more ChangePasswords
* const changePasswords = await prisma.changePassword.findMany()
* ```
*/
get changePassword(): Prisma.ChangePasswordDelegate;
/**
* `prisma.communityBoard`: Exposes CRUD operations for the **CommunityBoard** model.
* Example usage:
* ```ts
* // Fetch zero or more CommunityBoards
* const communityBoards = await prisma.communityBoard.findMany()
* ```
*/
get communityBoard(): Prisma.CommunityBoardDelegate;
/**
* `prisma.communityBoardCandidate`: Exposes CRUD operations for the **CommunityBoardCandidate** model.
* Example usage:
* ```ts
* // Fetch zero or more CommunityBoardCandidates
* const communityBoardCandidates = await prisma.communityBoardCandidate.findMany()
* ```
*/
get communityBoardCandidate(): Prisma.CommunityBoardCandidateDelegate;
/**
* `prisma.communityBoardCandidateVote`: Exposes CRUD operations for the **CommunityBoardCandidateVote** model.
* Example usage:
* ```ts
* // Fetch zero or more CommunityBoardCandidateVotes
* const communityBoardCandidateVotes = await prisma.communityBoardCandidateVote.findMany()
* ```
*/
get communityBoardCandidateVote(): Prisma.CommunityBoardCandidateVoteDelegate;
/**
* `prisma.communityBoardPin`: Exposes CRUD operations for the **CommunityBoardPin** model.
* Example usage:
* ```ts
* // Fetch zero or more CommunityBoardPins
* const communityBoardPins = await prisma.communityBoardPin.findMany()
* ```
*/
get communityBoardPin(): Prisma.CommunityBoardPinDelegate;
/**
* `prisma.communityComment`: Exposes CRUD operations for the **CommunityComment** model.
* Example usage:
* ```ts
* // Fetch zero or more CommunityComments
* const communityComments = await prisma.communityComment.findMany()
* ```
*/
get communityComment(): Prisma.CommunityCommentDelegate;
/**
* `prisma.communityPost`: Exposes CRUD operations for the **CommunityPost** model.
* Example usage:
* ```ts
* // Fetch zero or more CommunityPosts
* const communityPosts = await prisma.communityPost.findMany()
* ```
*/
get communityPost(): Prisma.CommunityPostDelegate;
/**
* `prisma.communityPostBookmark`: Exposes CRUD operations for the **CommunityPostBookmark** model.
* Example usage:
* ```ts
* // Fetch zero or more CommunityPostBookmarks
* const communityPostBookmarks = await prisma.communityPostBookmark.findMany()
* ```
*/
get communityPostBookmark(): Prisma.CommunityPostBookmarkDelegate;
/**
* `prisma.communityPostLike`: Exposes CRUD operations for the **CommunityPostLike** model.
* Example usage:
* ```ts
* // Fetch zero or more CommunityPostLikes
* const communityPostLikes = await prisma.communityPostLike.findMany()
* ```
*/
get communityPostLike(): Prisma.CommunityPostLikeDelegate;
/**
* `prisma.communitySubcomment`: Exposes CRUD operations for the **CommunitySubcomment** model.
* Example usage:
* ```ts
* // Fetch zero or more CommunitySubcomments
* const communitySubcomments = await prisma.communitySubcomment.findMany()
* ```
*/
get communitySubcomment(): Prisma.CommunitySubcommentDelegate;
/**
* `prisma.coverageMajor`: Exposes CRUD operations for the **CoverageMajor** model.
* Example usage:
* ```ts
* // Fetch zero or more CoverageMajors
* const coverageMajors = await prisma.coverageMajor.findMany()
* ```
*/
get coverageMajor(): Prisma.CoverageMajorDelegate;
/**
* `prisma.coverageMajorLecture`: Exposes CRUD operations for the **CoverageMajorLecture** model.
* Example usage:
* ```ts
* // Fetch zero or more CoverageMajorLectures
* const coverageMajorLectures = await prisma.coverageMajorLecture.findMany()
* ```
*/
get coverageMajorLecture(): Prisma.CoverageMajorLectureDelegate;
/**
* `prisma.lecture`: Exposes CRUD operations for the **Lecture** model.
* Example usage:
* ```ts
* // Fetch zero or more Lectures
* const lectures = await prisma.lecture.findMany()
* ```
*/
get lecture(): Prisma.LectureDelegate;
/**
* `prisma.liveChat`: Exposes CRUD operations for the **LiveChat** model.
* Example usage:
* ```ts
* // Fetch zero or more LiveChats
* const liveChats = await prisma.liveChat.findMany()
* ```
*/
get liveChat(): Prisma.LiveChatDelegate;
/**
* `prisma.noticeNotificationsSubscription`: Exposes CRUD operations for the **NoticeNotificationsSubscription** model.
* Example usage:
* ```ts
* // Fetch zero or more NoticeNotificationsSubscriptions
* const noticeNotificationsSubscriptions = await prisma.noticeNotificationsSubscription.findMany()
* ```
*/
get noticeNotificationsSubscription(): Prisma.NoticeNotificationsSubscriptionDelegate;
/**
* `prisma.pendingUser`: Exposes CRUD operations for the **PendingUser** model.
* Example usage:
* ```ts
* // Fetch zero or more PendingUsers
* const pendingUsers = await prisma.pendingUser.findMany()
* ```
*/
get pendingUser(): Prisma.PendingUserDelegate;
/**
* `prisma.period`: Exposes CRUD operations for the **Period** model.
* Example usage:
* ```ts
* // Fetch zero or more Periods
* const periods = await prisma.period.findMany()
* ```
*/
get period(): Prisma.PeriodDelegate;
/**
* `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;
/**
* `prisma.reportComment`: Exposes CRUD operations for the **ReportComment** model.
* Example usage:
* ```ts
* // Fetch zero or more ReportComments
* const reportComments = await prisma.reportComment.findMany()
* ```
*/
get reportComment(): Prisma.ReportCommentDelegate;
/**
* `prisma.reportPost`: Exposes CRUD operations for the **ReportPost** model.
* Example usage:
* ```ts
* // Fetch zero or more ReportPosts
* const reportPosts = await prisma.reportPost.findMany()
* ```
*/
get reportPost(): Prisma.ReportPostDelegate;
/**
* `prisma.reportSubcomment`: Exposes CRUD operations for the **ReportSubcomment** model.
* Example usage:
* ```ts
* // Fetch zero or more ReportSubcomments
* const reportSubcomments = await prisma.reportSubcomment.findMany()
* ```
*/
get reportSubcomment(): Prisma.ReportSubcommentDelegate;
/**
* `prisma.telegram`: Exposes CRUD operations for the **Telegram** model.
* Example usage:
* ```ts
* // Fetch zero or more Telegrams
* const telegrams = await prisma.telegram.findMany()
* ```
*/
get telegram(): Prisma.TelegramDelegate;
}
export namespace Prisma {
export import DMMF = runtime.DMMF
/**
* 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
/**
* 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
/**
* Prisma Client JS version: 2.20.1
* Query Engine version: 60ba6551f29b17d7d6ce479e5733c70d9c00860e
*/
export type PrismaVersion = {
client: string
}
export const prismaVersion: PrismaVersion
/**
* Utility Types
*/
/**
* From https://github.com/sindresorhus/type-fest/
* Matches a JSON object.
* This type can be useful to enforce some input to be JSON-compatible or as a super-type to be extended from.
*/
export type JsonObject = {[Key in string]?: JsonValue}
/**
* From https://github.com/sindresorhus/type-fest/
* Matches a JSON array.
*/
export interface JsonArray extends Array {}
/**
* From https://github.com/sindresorhus/type-fest/
* Matches any valid JSON value.
*/
export type JsonValue = string | number | boolean | null | JsonObject | JsonArray
/**
* Same as JsonObject, but allows undefined
*/
export type InputJsonObject = {[Key in string]?: JsonValue}
export interface InputJsonArray extends Array {}
export type InputJsonValue = undefined | string | number | boolean | null | InputJsonObject | InputJsonArray
type SelectAndInclude = {
select: any
include: any
}
type HasSelect = {
select: any
}
type HasInclude = {
include: any
}
type CheckSelect = T extends SelectAndInclude
? 'Please either choose `select` or `include`'
: T extends HasSelect
? U
: T extends HasInclude
? U
: S
/**
* Get the type of the value, that the Promise holds.
*/
export type PromiseType> = T extends PromiseLike ? U : T;
/**
* Get the return type of a function which returns a Promise.
*/
export type PromiseReturnType Promise> = PromiseType>
/**
* From T, pick a set of properties whose keys are in the union K
*/
type Prisma__Pick = {
[P in K]: T[P];
};
export type Enumerable = T | Array;
export type RequiredKeys = {
[K in keyof T]-?: {} extends Prisma__Pick ? never : K
}[keyof T]
export type TruthyKeys = {
[key in keyof T]: T[key] extends false | undefined | null ? never : key
}[keyof T]
export type TrueKeys = TruthyKeys>>
/**
* Subset
* @desc From `T` pick properties that exist in `U`. Simple version of Intersection
*/
export type Subset = {
[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 = {
[key in keyof T]: key extends keyof U ? T[key] : never
} &
(T extends SelectAndInclude
? 'Please either choose `select` or `include`.'
: {})
/**
* Subset + Intersection
* @desc From `T` pick properties that exist in `U` and intersect `K`
*/
export type SubsetIntersection = {
[key in keyof T]: key extends keyof U ? T[key] : never
} &
K
type Without = { [P in Exclude]?: 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) extends object ? (Without & U) | (Without & T) : T | U;
/**
* Is T a Record?
*/
type IsObject = T extends Array
? False
: T extends Date
? False
: T extends Buffer
? False
: T extends BigInt
? False
: T extends object
? True
: False
/**
* If it's T[], return T
*/
export type UnEnumerate = T extends Array ? U : T
/**
* From ts-toolbelt
*/
export type Union = any
/** Helper Types for "Merge" **/
export type IntersectOf = (
U extends unknown ? (k: U) => void : never
) extends (k: infer I) => void
? I
: never
export type Overwrite = {
[K in keyof O]: K extends keyof O1 ? O1[K] : O[K];
} & {};
type _Merge = IntersectOf;
}>>;
type Key = string | number | symbol;
type AtBasic = K extends keyof O ? O[K] : never;
type AtStrict = O[K & keyof O];
type AtLoose = O extends unknown ? AtStrict : never;
export type At = {
1: AtStrict;
0: AtLoose;
}[strict];
export type ComputeRaw = A extends Function ? A : {
[K in keyof A]: A[K];
} & {};
export type OptionalFlat = {
[K in keyof O]?: O[K];
} & {};
type _Record = {
[P in K]: T;
};
type _Strict = U extends unknown ? U & OptionalFlat<_Record, keyof U>, never>> : never;
export type Strict = ComputeRaw<_Strict>;
/** End Helper Types for "Merge" **/
export type Merge = ComputeRaw<_Merge>>;
/**
A [[Boolean]]
*/
export type Boolean = True | False
// /**
// 1
// */
export type True = 1
/**
0
*/
export type False = 0
export type Not = {
0: 1
1: 0
}[B]
export type Extends = [A1] extends [never]
? 0 // anything `never` is false
: A1 extends A2
? 1
: 0
export type Has = Not<
Extends, U1>
>
export type Or = {
0: {
0: 0
1: 1
}
1: {
0: 1
1: 1
}
}[B1][B2]
export type Keys = U extends unknown ? keyof U : never
type Exact =
W extends unknown ? A extends Narrowable ? Cast : Cast<
{[K in keyof A]: K extends keyof W ? Exact : never},
{[K in keyof W]: K extends keyof A ? Exact : W[K]}>
: never;
type Narrowable = string | number | boolean | bigint;
type Cast = A extends B ? A : B;
export const type: unique symbol;
export function validator(): (select: Exact) => S;
/**
* Used by group by
*/
export type GetScalarType = O extends object ? {
[P in keyof T]: P extends keyof O
? O[P]
: never
} : never
type FieldPaths<
T,
U = Omit
> = IsObject extends True ? U : T
type GetHavingFields = {
[K in keyof T]: Or<
Or, 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 extends object ? Merge> : never>
: never
: {} extends FieldPaths
? never
: K
}[keyof T]
/**
* Convert tuple to union
*/
type _TupleToUnion = T extends (infer E)[] ? E : never
type TupleToUnion = _TupleToUnion
type MaybeTupleToUnion = T extends any[] ? TupleToUnion : T
/**
* Like `Pick`, but with an array
*/
type PickArray> = Prisma__Pick>
class PrismaClientFetcher {
private readonly prisma;
private readonly debug;
private readonly hooks?;
constructor(prisma: PrismaClient, debug?: boolean, hooks?: Hooks | undefined);
request(document: any, dataPath?: string[], rootField?: string, typeName?: string, isList?: boolean, callsite?: string): Promise;
sanitizeMessage(message: string): string;
protected unpack(document: any, data: any, path: string[], rootField?: string, isList?: boolean): any;
}
export const ModelName: {
Admin: 'Admin',
CafeteriaMenu: 'CafeteriaMenu',
ChangePassword: 'ChangePassword',
CommunityBoard: 'CommunityBoard',
CommunityBoardCandidate: 'CommunityBoardCandidate',
CommunityBoardCandidateVote: 'CommunityBoardCandidateVote',
CommunityBoardPin: 'CommunityBoardPin',
CommunityComment: 'CommunityComment',
CommunityPost: 'CommunityPost',
CommunityPostBookmark: 'CommunityPostBookmark',
CommunityPostLike: 'CommunityPostLike',
CommunitySubcomment: 'CommunitySubcomment',
CoverageMajor: 'CoverageMajor',
CoverageMajorLecture: 'CoverageMajorLecture',
Lecture: 'Lecture',
LiveChat: 'LiveChat',
NoticeNotificationsSubscription: 'NoticeNotificationsSubscription',
PendingUser: 'PendingUser',
Period: 'Period',
User: 'User',
ReportComment: 'ReportComment',
ReportPost: 'ReportPost',
ReportSubcomment: 'ReportSubcomment',
Telegram: 'Telegram'
};
export type ModelName = (typeof ModelName)[keyof typeof ModelName]
export type Datasources = {
db?: Datasource
}
export type RejectOnNotFound = boolean | ((error: Error) => Error)
export type RejectPerModel = { [P in ModelName]?: RejectOnNotFound }
export type RejectPerOperation = { [P in "findUnique" | "findFirst"]?: RejectPerModel | RejectOnNotFound }
type IsReject = T extends true ? True : T extends (err: Error) => Error ? True : False
export type HasReject<
GlobalRejectSettings extends Prisma.PrismaClientOptions['rejectOnNotFound'],
LocalRejectSettings,
Action extends PrismaAction,
Model extends ModelName
> = LocalRejectSettings extends RejectOnNotFound
? IsReject
: GlobalRejectSettings extends RejectPerOperation
? Action extends keyof GlobalRejectSettings
? GlobalRejectSettings[Action] extends boolean
? IsReject
: GlobalRejectSettings[Action] extends RejectPerModel
? Model extends keyof GlobalRejectSettings[Action]
? IsReject
: False
: False
: False
: IsReject
export type ErrorFormat = 'pretty' | 'colorless' | 'minimal'
export interface PrismaClientOptions {
/**
* Configure findUnique/findFirst to throw an error if the query returns null.
* * @example
* ```
* // Reject on both findUnique/findFirst
* rejectOnNotFound: true
* // Reject only on findFirst with a custom error
* rejectOnNotFound: { findFirst: (err) => new Error("Custom Error")}
* // Reject on user.findUnique with a custom error
* rejectOnNotFound: { findUnique: {User: (err) => new Error("User not found")}}
* ```
*/
rejectOnNotFound?: RejectOnNotFound | RejectPerOperation
/**
* Overwrites the datasource url from your prisma.schema file
*/
datasources?: Datasources
/**
* @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?: Array
}
export type Hooks = {
beforeRequest?: (options: { query: string, path: string[], rootField?: string, typeName?: string, document: any }) => any
}
/* Types for Logging */
export type LogLevel = 'info' | 'query' | 'warn' | 'error'
export type LogDefinition = {
level: LogLevel
emit: 'stdout' | 'event'
}
export type GetLogType = T extends LogDefinition ? T['emit'] extends 'event' ? T['level'] : never : never
export type GetEvents = T extends Array ?
GetLogType | GetLogType | GetLogType | GetLogType
: 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'
| 'findMany'
| 'findFirst'
| 'create'
| 'createMany'
| 'update'
| 'updateMany'
| 'upsert'
| 'delete'
| 'deleteMany'
| 'executeRaw'
| 'queryRaw'
| 'aggregate'
| 'count'
/**
* These options are being passed in to 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 = (
params: MiddlewareParams,
next: (params: MiddlewareParams) => Promise,
) => Promise
// tested in getLogLevel.test.ts
export function getLogLevel(log: Array): LogLevel | undefined;
export type Datasource = {
url?: string
}
/**
* Count Types
*/
/**
* Models
*/
/**
* Model Admin
*/
export type AggregateAdmin = {
count: AdminCountAggregateOutputType | null
avg: AdminAvgAggregateOutputType | null
sum: AdminSumAggregateOutputType | null
min: AdminMinAggregateOutputType | null
max: AdminMaxAggregateOutputType | null
}
export type AdminAvgAggregateOutputType = {
userId: number
}
export type AdminSumAggregateOutputType = {
userId: number
}
export type AdminMinAggregateOutputType = {
userId: number
}
export type AdminMaxAggregateOutputType = {
userId: number
}
export type AdminCountAggregateOutputType = {
userId: number
_all: number
}
export type AdminAvgAggregateInputType = {
userId?: true
}
export type AdminSumAggregateInputType = {
userId?: true
}
export type AdminMinAggregateInputType = {
userId?: true
}
export type AdminMaxAggregateInputType = {
userId?: true
}
export type AdminCountAggregateInputType = {
userId?: true
_all?: true
}
export type AdminAggregateArgs = {
/**
* Filter which Admin to aggregate.
**/
where?: AdminWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of Admins to fetch.
**/
orderBy?: Enumerable
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the start position
**/
cursor?: AdminWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` Admins 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` Admins.
**/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Count returned Admins
**/
count?: true | AdminCountAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to average
**/
avg?: AdminAvgAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to sum
**/
sum?: AdminSumAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the minimum value
**/
min?: AdminMinAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the maximum value
**/
max?: AdminMaxAggregateInputType
}
export type GetAdminAggregateType = {
[P in keyof T & keyof AggregateAdmin]: P extends 'count'
? T[P] extends true
? number
: GetScalarType
: GetScalarType
}
export type AdminGroupByArgs = {
where?: AdminWhereInput
orderBy?: Enumerable
by: Array
having?: AdminScalarWhereWithAggregatesInput
take?: number
skip?: number
count?: AdminCountAggregateInputType | true
avg?: AdminAvgAggregateInputType
sum?: AdminSumAggregateInputType
min?: AdminMinAggregateInputType
max?: AdminMaxAggregateInputType
}
export type AdminGroupByOutputType = {
userId: number
count: AdminCountAggregateOutputType | null
avg: AdminAvgAggregateOutputType | null
sum: AdminSumAggregateOutputType | null
min: AdminMinAggregateOutputType | null
max: AdminMaxAggregateOutputType | null
}
type GetAdminGroupByPayload = Promise & {
[P in ((keyof T) & (keyof AdminGroupByOutputType))]: GetScalarType
}
>>
export type AdminSelect = {
userId?: boolean
user?: boolean | UserArgs
}
export type AdminInclude = {
user?: boolean | UserArgs
}
export type AdminGetPayload<
S extends boolean | null | undefined | AdminArgs,
U = keyof S
> = S extends true
? Admin
: S extends undefined
? never
: S extends AdminArgs | AdminFindManyArgs
?'include' extends U
? Admin & {
[P in TrueKeys]:
P extends 'user'
? UserGetPayload : never
}
: 'select' extends U
? {
[P in TrueKeys]: P extends keyof Admin ?Admin [P]
:
P extends 'user'
? UserGetPayload : never
}
: Admin
: Admin
type AdminCountArgs = Merge<
Omit & {
select?: AdminCountAggregateInputType | true
}
>
export interface AdminDelegate {
/**
* Find zero or one Admin that matches the filter.
* @param {AdminFindUniqueArgs} args - Arguments to find a Admin
* @example
* // Get one Admin
* const admin = await prisma.admin.findUnique({
* where: {
* // ... provide filter here
* }
* })
**/
findUnique(
args: SelectSubset
): HasReject extends True ? CheckSelect, Prisma__AdminClient>> : CheckSelect, Prisma__AdminClient | null >>
/**
* Find the first Admin 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 {AdminFindFirstArgs} args - Arguments to find a Admin
* @example
* // Get one Admin
* const admin = await prisma.admin.findFirst({
* where: {
* // ... provide filter here
* }
* })
**/
findFirst(
args?: SelectSubset
): HasReject extends True ? CheckSelect, Prisma__AdminClient>> : CheckSelect, Prisma__AdminClient | null >>
/**
* Find zero or more Admins 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 {AdminFindManyArgs=} args - Arguments to filter and select certain fields only.
* @example
* // Get all Admins
* const admins = await prisma.admin.findMany()
*
* // Get first 10 Admins
* const admins = await prisma.admin.findMany({ take: 10 })
*
* // Only select the `userId`
* const adminWithUserIdOnly = await prisma.admin.findMany({ select: { userId: true } })
*
**/
findMany(
args?: SelectSubset
): CheckSelect>, PrismaPromise>>>
/**
* Create a Admin.
* @param {AdminCreateArgs} args - Arguments to create a Admin.
* @example
* // Create one Admin
* const Admin = await prisma.admin.create({
* data: {
* // ... data to create a Admin
* }
* })
*
**/
create(
args: SelectSubset
): CheckSelect, Prisma__AdminClient>>
/**
* Create many Admins.
* @param {AdminCreateManyArgs} args - Arguments to create many Admins.
* @example
* // Create many Admins
* const admin = await prisma.admin.createMany({
* data: {
* // ... provide data here
* }
* })
*
**/
createMany(
args?: SelectSubset
): PrismaPromise
/**
* Delete a Admin.
* @param {AdminDeleteArgs} args - Arguments to delete one Admin.
* @example
* // Delete one Admin
* const Admin = await prisma.admin.delete({
* where: {
* // ... filter to delete one Admin
* }
* })
*
**/
delete(
args: SelectSubset
): CheckSelect, Prisma__AdminClient>>
/**
* Update one Admin.
* @param {AdminUpdateArgs} args - Arguments to update one Admin.
* @example
* // Update one Admin
* const admin = await prisma.admin.update({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
**/
update(
args: SelectSubset
): CheckSelect, Prisma__AdminClient>>
/**
* Delete zero or more Admins.
* @param {AdminDeleteManyArgs} args - Arguments to filter Admins to delete.
* @example
* // Delete a few Admins
* const { count } = await prisma.admin.deleteMany({
* where: {
* // ... provide filter here
* }
* })
*
**/
deleteMany(
args?: SelectSubset
): PrismaPromise
/**
* Update zero or more Admins.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {AdminUpdateManyArgs} args - Arguments to update one or more rows.
* @example
* // Update many Admins
* const admin = await prisma.admin.updateMany({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
**/
updateMany(
args: SelectSubset
): PrismaPromise
/**
* Create or update one Admin.
* @param {AdminUpsertArgs} args - Arguments to update or create a Admin.
* @example
* // Update or create a Admin
* const admin = await prisma.admin.upsert({
* create: {
* // ... data to create a Admin
* },
* update: {
* // ... in case it already exists, update
* },
* where: {
* // ... the filter for the Admin we want to update
* }
* })
**/
upsert(
args: SelectSubset
): CheckSelect, Prisma__AdminClient>>
/**
* Count the number of Admins.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {AdminCountArgs} args - Arguments to filter Admins to count.
* @example
* // Count the number of Admins
* const count = await prisma.admin.count({
* where: {
* // ... the filter for the Admins we want to count
* }
* })
**/
count(
args?: Subset,
): PrismaPromise<
T extends _Record<'select', any>
? T['select'] extends true
? number
: GetScalarType
: number
>
/**
* Allows you to perform aggregations operations on a Admin.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {AdminAggregateArgs} 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(args: Subset): PrismaPromise>
/**
* Group by Admin.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {AdminGroupByArgs} 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 AdminGroupByArgs,
HasSelectOrTake extends Or<
Extends<'skip', Keys>,
Extends<'take', Keys>
>,
OrderByArg extends True extends HasSelectOrTake
? { orderBy: AdminGroupByArgs['orderBy'] }
: { orderBy?: AdminGroupByArgs['orderBy'] },
OrderFields extends Keys>,
ByFields extends TupleToUnion,
ByValid extends Has,
HavingFields extends GetHavingFields,
HavingValid extends Has,
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
? 'orderBy' extends Keys
? 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
? 'orderBy' extends Keys
? 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 & InputErrors): {} extends InputErrors ? GetAdminGroupByPayload : Promise
}
/**
* The delegate class that acts as a "Promise-like" for Admin.
* 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 class Prisma__AdminClient implements PrismaPromise {
[prisma]: true;
private readonly _dmmf;
private readonly _fetcher;
private readonly _queryType;
private readonly _rootField;
private readonly _clientMethod;
private readonly _args;
private readonly _dataPath;
private readonly _errorFormat;
private readonly _measurePerformance?;
private _isList;
private _callsite;
private _requestPromise?;
constructor(_dmmf: runtime.DMMFClass, _fetcher: PrismaClientFetcher, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean);
readonly [Symbol.toStringTag]: 'PrismaClientPromise';
user(args?: Subset): CheckSelect, Prisma__UserClient | null >>;
private get _document();
/**
* 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(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise;
/**
* 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(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise;
/**
* 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): Promise;
}
// Custom InputTypes
/**
* Admin findUnique
*/
export type AdminFindUniqueArgs = {
/**
* Select specific fields to fetch from the Admin
**/
select?: AdminSelect | null
/**
* Choose, which related nodes to fetch as well.
**/
include?: AdminInclude | null
/**
* Throw an Error if a Admin can't be found
**/
rejectOnNotFound?: RejectOnNotFound
/**
* Filter, which Admin to fetch.
**/
where: AdminWhereUniqueInput
}
/**
* Admin findFirst
*/
export type AdminFindFirstArgs = {
/**
* Select specific fields to fetch from the Admin
**/
select?: AdminSelect | null
/**
* Choose, which related nodes to fetch as well.
**/
include?: AdminInclude | null
/**
* Throw an Error if a Admin can't be found
**/
rejectOnNotFound?: RejectOnNotFound
/**
* Filter, which Admin to fetch.
**/
where?: AdminWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of Admins to fetch.
**/
orderBy?: Enumerable
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for searching for Admins.
**/
cursor?: AdminWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` Admins 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` Admins.
**/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of Admins.
**/
distinct?: Enumerable
}
/**
* Admin findMany
*/
export type AdminFindManyArgs = {
/**
* Select specific fields to fetch from the Admin
**/
select?: AdminSelect | null
/**
* Choose, which related nodes to fetch as well.
**/
include?: AdminInclude | null
/**
* Filter, which Admins to fetch.
**/
where?: AdminWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of Admins to fetch.
**/
orderBy?: Enumerable
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for listing Admins.
**/
cursor?: AdminWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` Admins 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` Admins.
**/
skip?: number
distinct?: Enumerable
}
/**
* Admin create
*/
export type AdminCreateArgs = {
/**
* Select specific fields to fetch from the Admin
**/
select?: AdminSelect | null
/**
* Choose, which related nodes to fetch as well.
**/
include?: AdminInclude | null
/**
* The data needed to create a Admin.
**/
data: XOR
}
/**
* Admin createMany
*/
export type AdminCreateManyArgs = {
data: Enumerable
skipDuplicates?: boolean
}
/**
* Admin update
*/
export type AdminUpdateArgs = {
/**
* Select specific fields to fetch from the Admin
**/
select?: AdminSelect | null
/**
* Choose, which related nodes to fetch as well.
**/
include?: AdminInclude | null
/**
* The data needed to update a Admin.
**/
data: XOR
/**
* Choose, which Admin to update.
**/
where: AdminWhereUniqueInput
}
/**
* Admin updateMany
*/
export type AdminUpdateManyArgs = {
data: XOR
where?: AdminWhereInput
}
/**
* Admin upsert
*/
export type AdminUpsertArgs = {
/**
* Select specific fields to fetch from the Admin
**/
select?: AdminSelect | null
/**
* Choose, which related nodes to fetch as well.
**/
include?: AdminInclude | null
/**
* The filter to search for the Admin to update in case it exists.
**/
where: AdminWhereUniqueInput
/**
* In case the Admin found by the `where` argument doesn't exist, create a new Admin with this data.
**/
create: XOR
/**
* In case the Admin was found with the provided `where` argument, update it with this data.
**/
update: XOR
}
/**
* Admin delete
*/
export type AdminDeleteArgs = {
/**
* Select specific fields to fetch from the Admin
**/
select?: AdminSelect | null
/**
* Choose, which related nodes to fetch as well.
**/
include?: AdminInclude | null
/**
* Filter which Admin to delete.
**/
where: AdminWhereUniqueInput
}
/**
* Admin deleteMany
*/
export type AdminDeleteManyArgs = {
where?: AdminWhereInput
}
/**
* Admin without action
*/
export type AdminArgs = {
/**
* Select specific fields to fetch from the Admin
**/
select?: AdminSelect | null
/**
* Choose, which related nodes to fetch as well.
**/
include?: AdminInclude | null
}
/**
* Model CafeteriaMenu
*/
export type AggregateCafeteriaMenu = {
count: CafeteriaMenuCountAggregateOutputType | null
min: CafeteriaMenuMinAggregateOutputType | null
max: CafeteriaMenuMaxAggregateOutputType | null
}
export type CafeteriaMenuMinAggregateOutputType = {
campus: string | null
servedAt: Date | null
}
export type CafeteriaMenuMaxAggregateOutputType = {
campus: string | null
servedAt: Date | null
}
export type CafeteriaMenuCountAggregateOutputType = {
campus: number | null
servedAt: number | null
data: number | null
_all: number
}
export type CafeteriaMenuMinAggregateInputType = {
campus?: true
servedAt?: true
}
export type CafeteriaMenuMaxAggregateInputType = {
campus?: true
servedAt?: true
}
export type CafeteriaMenuCountAggregateInputType = {
campus?: true
servedAt?: true
data?: true
_all?: true
}
export type CafeteriaMenuAggregateArgs = {
/**
* Filter which CafeteriaMenu to aggregate.
**/
where?: CafeteriaMenuWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of CafeteriaMenus to fetch.
**/
orderBy?: Enumerable
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the start position
**/
cursor?: CafeteriaMenuWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` CafeteriaMenus 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` CafeteriaMenus.
**/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Count returned CafeteriaMenus
**/
count?: true | CafeteriaMenuCountAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the minimum value
**/
min?: CafeteriaMenuMinAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the maximum value
**/
max?: CafeteriaMenuMaxAggregateInputType
}
export type GetCafeteriaMenuAggregateType = {
[P in keyof T & keyof AggregateCafeteriaMenu]: P extends 'count'
? T[P] extends true
? number
: GetScalarType
: GetScalarType
}
export type CafeteriaMenuGroupByArgs = {
where?: CafeteriaMenuWhereInput
orderBy?: Enumerable
by: Array
having?: CafeteriaMenuScalarWhereWithAggregatesInput
take?: number
skip?: number
count?: CafeteriaMenuCountAggregateInputType | true
min?: CafeteriaMenuMinAggregateInputType
max?: CafeteriaMenuMaxAggregateInputType
}
export type CafeteriaMenuGroupByOutputType = {
campus: string
servedAt: Date
data: JsonValue | null
count: CafeteriaMenuCountAggregateOutputType | null
min: CafeteriaMenuMinAggregateOutputType | null
max: CafeteriaMenuMaxAggregateOutputType | null
}
type GetCafeteriaMenuGroupByPayload = Promise & {
[P in ((keyof T) & (keyof CafeteriaMenuGroupByOutputType))]: GetScalarType
}
>>
export type CafeteriaMenuSelect = {
campus?: boolean
servedAt?: boolean
data?: boolean
}
export type CafeteriaMenuGetPayload<
S extends boolean | null | undefined | CafeteriaMenuArgs,
U = keyof S
> = S extends true
? CafeteriaMenu
: S extends undefined
? never
: S extends CafeteriaMenuArgs | CafeteriaMenuFindManyArgs
?'include' extends U
? CafeteriaMenu
: 'select' extends U
? {
[P in TrueKeys]: P extends keyof CafeteriaMenu ?CafeteriaMenu [P]
:
never
}
: CafeteriaMenu
: CafeteriaMenu
type CafeteriaMenuCountArgs = Merge<
Omit & {
select?: CafeteriaMenuCountAggregateInputType | true
}
>
export interface CafeteriaMenuDelegate {
/**
* Find zero or one CafeteriaMenu that matches the filter.
* @param {CafeteriaMenuFindUniqueArgs} args - Arguments to find a CafeteriaMenu
* @example
* // Get one CafeteriaMenu
* const cafeteriaMenu = await prisma.cafeteriaMenu.findUnique({
* where: {
* // ... provide filter here
* }
* })
**/
findUnique(
args: SelectSubset
): HasReject extends True ? CheckSelect, Prisma__CafeteriaMenuClient>> : CheckSelect