6007 lines
195 KiB
TypeScript
6007 lines
195 KiB
TypeScript
|
|
/**
|
|
* Client
|
|
**/
|
|
|
|
import * as runtime from './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 Profile
|
|
*
|
|
*/
|
|
export type Profile = $Result.DefaultSelection<Prisma.$ProfilePayload>
|
|
/**
|
|
* Model Post
|
|
*
|
|
*/
|
|
export type Post = $Result.DefaultSelection<Prisma.$PostPayload>
|
|
|
|
/**
|
|
* Enums
|
|
*/
|
|
export namespace $Enums {
|
|
export const Role: {
|
|
USER: 'USER',
|
|
EDITOR: 'EDITOR',
|
|
ADMIN: 'ADMIN'
|
|
};
|
|
|
|
export type Role = (typeof Role)[keyof typeof Role]
|
|
|
|
}
|
|
|
|
export type Role = $Enums.Role
|
|
|
|
export const Role: typeof $Enums.Role
|
|
|
|
/**
|
|
* ## 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): PrismaClient;
|
|
|
|
/**
|
|
* 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<ClientOptions>, ExtArgs, $Utils.Call<Prisma.TypeMapCb<ClientOptions>, {
|
|
extArgs: 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, ClientOptions>;
|
|
|
|
/**
|
|
* `prisma.profile`: Exposes CRUD operations for the **Profile** model.
|
|
* Example usage:
|
|
* ```ts
|
|
* // Fetch zero or more Profiles
|
|
* const profiles = await prisma.profile.findMany()
|
|
* ```
|
|
*/
|
|
get profile(): Prisma.ProfileDelegate<ExtArgs, ClientOptions>;
|
|
|
|
/**
|
|
* `prisma.post`: Exposes CRUD operations for the **Post** model.
|
|
* Example usage:
|
|
* ```ts
|
|
* // Fetch zero or more Posts
|
|
* const posts = await prisma.post.findMany()
|
|
* ```
|
|
*/
|
|
get post(): Prisma.PostDelegate<ExtArgs, ClientOptions>;
|
|
}
|
|
|
|
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
|
|
|
|
/**
|
|
* 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: 6.7.0
|
|
* Query Engine version: 3cff47a7f5d65c3ea74883f1d736e41d68ce91ed
|
|
*/
|
|
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 ? P : 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',
|
|
Profile: 'Profile',
|
|
Post: 'Post'
|
|
};
|
|
|
|
export type ModelName = (typeof ModelName)[keyof typeof ModelName]
|
|
|
|
|
|
export type Datasources = {
|
|
db?: Datasource
|
|
}
|
|
|
|
interface TypeMapCb<ClientOptions = {}> extends $Utils.Fn<{extArgs: $Extensions.InternalArgs }, $Utils.Record<string, any>> {
|
|
returns: Prisma.TypeMap<this['params']['extArgs'], ClientOptions extends { omit: infer OmitOptions } ? OmitOptions : {}>
|
|
}
|
|
|
|
export type TypeMap<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> = {
|
|
globalOmitOptions: {
|
|
omit: GlobalOmitOptions
|
|
}
|
|
meta: {
|
|
modelProps: "user" | "profile" | "post"
|
|
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
|
|
}
|
|
updateManyAndReturn: {
|
|
args: Prisma.UserUpdateManyAndReturnArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$UserPayload>[]
|
|
}
|
|
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
|
|
}
|
|
}
|
|
}
|
|
Profile: {
|
|
payload: Prisma.$ProfilePayload<ExtArgs>
|
|
fields: Prisma.ProfileFieldRefs
|
|
operations: {
|
|
findUnique: {
|
|
args: Prisma.ProfileFindUniqueArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$ProfilePayload> | null
|
|
}
|
|
findUniqueOrThrow: {
|
|
args: Prisma.ProfileFindUniqueOrThrowArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$ProfilePayload>
|
|
}
|
|
findFirst: {
|
|
args: Prisma.ProfileFindFirstArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$ProfilePayload> | null
|
|
}
|
|
findFirstOrThrow: {
|
|
args: Prisma.ProfileFindFirstOrThrowArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$ProfilePayload>
|
|
}
|
|
findMany: {
|
|
args: Prisma.ProfileFindManyArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$ProfilePayload>[]
|
|
}
|
|
create: {
|
|
args: Prisma.ProfileCreateArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$ProfilePayload>
|
|
}
|
|
createMany: {
|
|
args: Prisma.ProfileCreateManyArgs<ExtArgs>
|
|
result: BatchPayload
|
|
}
|
|
createManyAndReturn: {
|
|
args: Prisma.ProfileCreateManyAndReturnArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$ProfilePayload>[]
|
|
}
|
|
delete: {
|
|
args: Prisma.ProfileDeleteArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$ProfilePayload>
|
|
}
|
|
update: {
|
|
args: Prisma.ProfileUpdateArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$ProfilePayload>
|
|
}
|
|
deleteMany: {
|
|
args: Prisma.ProfileDeleteManyArgs<ExtArgs>
|
|
result: BatchPayload
|
|
}
|
|
updateMany: {
|
|
args: Prisma.ProfileUpdateManyArgs<ExtArgs>
|
|
result: BatchPayload
|
|
}
|
|
updateManyAndReturn: {
|
|
args: Prisma.ProfileUpdateManyAndReturnArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$ProfilePayload>[]
|
|
}
|
|
upsert: {
|
|
args: Prisma.ProfileUpsertArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$ProfilePayload>
|
|
}
|
|
aggregate: {
|
|
args: Prisma.ProfileAggregateArgs<ExtArgs>
|
|
result: $Utils.Optional<AggregateProfile>
|
|
}
|
|
groupBy: {
|
|
args: Prisma.ProfileGroupByArgs<ExtArgs>
|
|
result: $Utils.Optional<ProfileGroupByOutputType>[]
|
|
}
|
|
count: {
|
|
args: Prisma.ProfileCountArgs<ExtArgs>
|
|
result: $Utils.Optional<ProfileCountAggregateOutputType> | number
|
|
}
|
|
}
|
|
}
|
|
Post: {
|
|
payload: Prisma.$PostPayload<ExtArgs>
|
|
fields: Prisma.PostFieldRefs
|
|
operations: {
|
|
findUnique: {
|
|
args: Prisma.PostFindUniqueArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$PostPayload> | null
|
|
}
|
|
findUniqueOrThrow: {
|
|
args: Prisma.PostFindUniqueOrThrowArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$PostPayload>
|
|
}
|
|
findFirst: {
|
|
args: Prisma.PostFindFirstArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$PostPayload> | null
|
|
}
|
|
findFirstOrThrow: {
|
|
args: Prisma.PostFindFirstOrThrowArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$PostPayload>
|
|
}
|
|
findMany: {
|
|
args: Prisma.PostFindManyArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$PostPayload>[]
|
|
}
|
|
create: {
|
|
args: Prisma.PostCreateArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$PostPayload>
|
|
}
|
|
createMany: {
|
|
args: Prisma.PostCreateManyArgs<ExtArgs>
|
|
result: BatchPayload
|
|
}
|
|
createManyAndReturn: {
|
|
args: Prisma.PostCreateManyAndReturnArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$PostPayload>[]
|
|
}
|
|
delete: {
|
|
args: Prisma.PostDeleteArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$PostPayload>
|
|
}
|
|
update: {
|
|
args: Prisma.PostUpdateArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$PostPayload>
|
|
}
|
|
deleteMany: {
|
|
args: Prisma.PostDeleteManyArgs<ExtArgs>
|
|
result: BatchPayload
|
|
}
|
|
updateMany: {
|
|
args: Prisma.PostUpdateManyArgs<ExtArgs>
|
|
result: BatchPayload
|
|
}
|
|
updateManyAndReturn: {
|
|
args: Prisma.PostUpdateManyAndReturnArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$PostPayload>[]
|
|
}
|
|
upsert: {
|
|
args: Prisma.PostUpsertArgs<ExtArgs>
|
|
result: $Utils.PayloadToResult<Prisma.$PostPayload>
|
|
}
|
|
aggregate: {
|
|
args: Prisma.PostAggregateArgs<ExtArgs>
|
|
result: $Utils.Optional<AggregatePost>
|
|
}
|
|
groupBy: {
|
|
args: Prisma.PostGroupByArgs<ExtArgs>
|
|
result: $Utils.Optional<PostGroupByOutputType>[]
|
|
}
|
|
count: {
|
|
args: Prisma.PostCountArgs<ExtArgs>
|
|
result: $Utils.Optional<PostCountAggregateOutputType> | 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
|
|
}
|
|
/**
|
|
* Global configuration for omitting model fields by default.
|
|
*
|
|
* @example
|
|
* ```
|
|
* const prisma = new PrismaClient({
|
|
* omit: {
|
|
* user: {
|
|
* password: true
|
|
* }
|
|
* }
|
|
* })
|
|
* ```
|
|
*/
|
|
omit?: Prisma.GlobalOmitConfig
|
|
}
|
|
export type GlobalOmitConfig = {
|
|
user?: UserOmit
|
|
profile?: ProfileOmit
|
|
post?: PostOmit
|
|
}
|
|
|
|
/* 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'
|
|
| 'updateManyAndReturn'
|
|
| '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 = {
|
|
posts: number
|
|
}
|
|
|
|
export type UserCountOutputTypeSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
posts?: boolean | UserCountOutputTypeCountPostsArgs
|
|
}
|
|
|
|
// 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 UserCountOutputTypeCountPostsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
where?: PostWhereInput
|
|
}
|
|
|
|
|
|
/**
|
|
* Models
|
|
*/
|
|
|
|
/**
|
|
* Model User
|
|
*/
|
|
|
|
export type AggregateUser = {
|
|
_count: UserCountAggregateOutputType | null
|
|
_avg: UserAvgAggregateOutputType | null
|
|
_sum: UserSumAggregateOutputType | null
|
|
_min: UserMinAggregateOutputType | null
|
|
_max: UserMaxAggregateOutputType | null
|
|
}
|
|
|
|
export type UserAvgAggregateOutputType = {
|
|
id: number | null
|
|
}
|
|
|
|
export type UserSumAggregateOutputType = {
|
|
id: number | null
|
|
}
|
|
|
|
export type UserMinAggregateOutputType = {
|
|
id: number | null
|
|
userId: string | null
|
|
email: string | null
|
|
name: string | null
|
|
role: $Enums.Role | null
|
|
username: string | null
|
|
avatar: string | null
|
|
password: string | null
|
|
birthdate: Date | null
|
|
registeredAt: Date | null
|
|
createdAt: Date | null
|
|
updatedAt: Date | null
|
|
}
|
|
|
|
export type UserMaxAggregateOutputType = {
|
|
id: number | null
|
|
userId: string | null
|
|
email: string | null
|
|
name: string | null
|
|
role: $Enums.Role | null
|
|
username: string | null
|
|
avatar: string | null
|
|
password: string | null
|
|
birthdate: Date | null
|
|
registeredAt: Date | null
|
|
createdAt: Date | null
|
|
updatedAt: Date | null
|
|
}
|
|
|
|
export type UserCountAggregateOutputType = {
|
|
id: number
|
|
userId: number
|
|
email: number
|
|
name: number
|
|
role: number
|
|
username: number
|
|
avatar: number
|
|
password: number
|
|
birthdate: number
|
|
registeredAt: number
|
|
createdAt: number
|
|
updatedAt: number
|
|
_all: number
|
|
}
|
|
|
|
|
|
export type UserAvgAggregateInputType = {
|
|
id?: true
|
|
}
|
|
|
|
export type UserSumAggregateInputType = {
|
|
id?: true
|
|
}
|
|
|
|
export type UserMinAggregateInputType = {
|
|
id?: true
|
|
userId?: true
|
|
email?: true
|
|
name?: true
|
|
role?: true
|
|
username?: true
|
|
avatar?: true
|
|
password?: true
|
|
birthdate?: true
|
|
registeredAt?: true
|
|
createdAt?: true
|
|
updatedAt?: true
|
|
}
|
|
|
|
export type UserMaxAggregateInputType = {
|
|
id?: true
|
|
userId?: true
|
|
email?: true
|
|
name?: true
|
|
role?: true
|
|
username?: true
|
|
avatar?: true
|
|
password?: true
|
|
birthdate?: true
|
|
registeredAt?: true
|
|
createdAt?: true
|
|
updatedAt?: true
|
|
}
|
|
|
|
export type UserCountAggregateInputType = {
|
|
id?: true
|
|
userId?: true
|
|
email?: true
|
|
name?: true
|
|
role?: true
|
|
username?: true
|
|
avatar?: true
|
|
password?: true
|
|
birthdate?: true
|
|
registeredAt?: 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 average
|
|
**/
|
|
_avg?: UserAvgAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to sum
|
|
**/
|
|
_sum?: UserSumAggregateInputType
|
|
/**
|
|
* {@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
|
|
_avg?: UserAvgAggregateInputType
|
|
_sum?: UserSumAggregateInputType
|
|
_min?: UserMinAggregateInputType
|
|
_max?: UserMaxAggregateInputType
|
|
}
|
|
|
|
export type UserGroupByOutputType = {
|
|
id: number
|
|
userId: string
|
|
email: string
|
|
name: string | null
|
|
role: $Enums.Role
|
|
username: string
|
|
avatar: string | null
|
|
password: string
|
|
birthdate: Date | null
|
|
registeredAt: Date | null
|
|
createdAt: Date
|
|
updatedAt: Date
|
|
_count: UserCountAggregateOutputType | null
|
|
_avg: UserAvgAggregateOutputType | null
|
|
_sum: UserSumAggregateOutputType | 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
|
|
userId?: boolean
|
|
email?: boolean
|
|
name?: boolean
|
|
role?: boolean
|
|
username?: boolean
|
|
avatar?: boolean
|
|
password?: boolean
|
|
birthdate?: boolean
|
|
registeredAt?: boolean
|
|
createdAt?: boolean
|
|
updatedAt?: boolean
|
|
posts?: boolean | User$postsArgs<ExtArgs>
|
|
profile?: boolean | User$profileArgs<ExtArgs>
|
|
_count?: boolean | UserCountOutputTypeDefaultArgs<ExtArgs>
|
|
}, ExtArgs["result"]["user"]>
|
|
|
|
export type UserSelectCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
|
|
id?: boolean
|
|
userId?: boolean
|
|
email?: boolean
|
|
name?: boolean
|
|
role?: boolean
|
|
username?: boolean
|
|
avatar?: boolean
|
|
password?: boolean
|
|
birthdate?: boolean
|
|
registeredAt?: boolean
|
|
createdAt?: boolean
|
|
updatedAt?: boolean
|
|
}, ExtArgs["result"]["user"]>
|
|
|
|
export type UserSelectUpdateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
|
|
id?: boolean
|
|
userId?: boolean
|
|
email?: boolean
|
|
name?: boolean
|
|
role?: boolean
|
|
username?: boolean
|
|
avatar?: boolean
|
|
password?: boolean
|
|
birthdate?: boolean
|
|
registeredAt?: boolean
|
|
createdAt?: boolean
|
|
updatedAt?: boolean
|
|
}, ExtArgs["result"]["user"]>
|
|
|
|
export type UserSelectScalar = {
|
|
id?: boolean
|
|
userId?: boolean
|
|
email?: boolean
|
|
name?: boolean
|
|
role?: boolean
|
|
username?: boolean
|
|
avatar?: boolean
|
|
password?: boolean
|
|
birthdate?: boolean
|
|
registeredAt?: boolean
|
|
createdAt?: boolean
|
|
updatedAt?: boolean
|
|
}
|
|
|
|
export type UserOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "userId" | "email" | "name" | "role" | "username" | "avatar" | "password" | "birthdate" | "registeredAt" | "createdAt" | "updatedAt", ExtArgs["result"]["user"]>
|
|
export type UserInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
posts?: boolean | User$postsArgs<ExtArgs>
|
|
profile?: boolean | User$profileArgs<ExtArgs>
|
|
_count?: boolean | UserCountOutputTypeDefaultArgs<ExtArgs>
|
|
}
|
|
export type UserIncludeCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {}
|
|
export type UserIncludeUpdateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {}
|
|
|
|
export type $UserPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
name: "User"
|
|
objects: {
|
|
posts: Prisma.$PostPayload<ExtArgs>[]
|
|
profile: Prisma.$ProfilePayload<ExtArgs> | null
|
|
}
|
|
scalars: $Extensions.GetPayloadResult<{
|
|
id: number
|
|
userId: string
|
|
email: string
|
|
name: string | null
|
|
role: $Enums.Role
|
|
username: string
|
|
avatar: string | null
|
|
password: string
|
|
birthdate: Date | null
|
|
registeredAt: Date | 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' | 'omit'> & {
|
|
select?: UserCountAggregateInputType | true
|
|
}
|
|
|
|
export interface UserDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
|
|
[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", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
|
|
|
/**
|
|
* 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", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
|
|
|
|
/**
|
|
* 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", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
|
|
|
/**
|
|
* 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", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
|
|
|
|
/**
|
|
* 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", GlobalOmitOptions>>
|
|
|
|
/**
|
|
* 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", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
|
|
|
|
/**
|
|
* 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", GlobalOmitOptions>>
|
|
|
|
/**
|
|
* 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", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
|
|
|
|
/**
|
|
* 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", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
|
|
|
|
/**
|
|
* 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>
|
|
|
|
/**
|
|
* Update zero or more Users and returns the data updated in the database.
|
|
* @param {UserUpdateManyAndReturnArgs} args - Arguments to update many Users.
|
|
* @example
|
|
* // Update many Users
|
|
* const user = await prisma.user.updateManyAndReturn({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* },
|
|
* data: [
|
|
* // ... provide data here
|
|
* ]
|
|
* })
|
|
*
|
|
* // Update zero or more Users and only return the `id`
|
|
* const userWithIdOnly = await prisma.user.updateManyAndReturn({
|
|
* select: { id: true },
|
|
* where: {
|
|
* // ... provide filter here
|
|
* },
|
|
* 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
|
|
*
|
|
*/
|
|
updateManyAndReturn<T extends UserUpdateManyAndReturnArgs>(args: SelectSubset<T, UserUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>
|
|
|
|
/**
|
|
* 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", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
|
|
|
|
|
|
/**
|
|
* 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, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
|
readonly [Symbol.toStringTag]: "PrismaPromise"
|
|
posts<T extends User$postsArgs<ExtArgs> = {}>(args?: Subset<T, User$postsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$PostPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
|
profile<T extends User$profileArgs<ExtArgs> = {}>(args?: Subset<T, User$profileArgs<ExtArgs>>): Prisma__ProfileClient<$Result.GetResult<Prisma.$ProfilePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
|
/**
|
|
* 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", 'Int'>
|
|
readonly userId: FieldRef<"User", 'String'>
|
|
readonly email: FieldRef<"User", 'String'>
|
|
readonly name: FieldRef<"User", 'String'>
|
|
readonly role: FieldRef<"User", 'Role'>
|
|
readonly username: FieldRef<"User", 'String'>
|
|
readonly avatar: FieldRef<"User", 'String'>
|
|
readonly password: FieldRef<"User", 'String'>
|
|
readonly birthdate: FieldRef<"User", 'DateTime'>
|
|
readonly registeredAt: FieldRef<"User", 'DateTime'>
|
|
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
|
|
/**
|
|
* Omit specific fields from the User
|
|
*/
|
|
omit?: UserOmit<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
|
|
/**
|
|
* Omit specific fields from the User
|
|
*/
|
|
omit?: UserOmit<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
|
|
/**
|
|
* Omit specific fields from the User
|
|
*/
|
|
omit?: UserOmit<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
|
|
/**
|
|
* Omit specific fields from the User
|
|
*/
|
|
omit?: UserOmit<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
|
|
/**
|
|
* Omit specific fields from the User
|
|
*/
|
|
omit?: UserOmit<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
|
|
/**
|
|
* Omit specific fields from the User
|
|
*/
|
|
omit?: UserOmit<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[]
|
|
}
|
|
|
|
/**
|
|
* User createManyAndReturn
|
|
*/
|
|
export type UserCreateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the User
|
|
*/
|
|
select?: UserSelectCreateManyAndReturn<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the User
|
|
*/
|
|
omit?: UserOmit<ExtArgs> | null
|
|
/**
|
|
* The data used to create many Users.
|
|
*/
|
|
data: UserCreateManyInput | UserCreateManyInput[]
|
|
}
|
|
|
|
/**
|
|
* User update
|
|
*/
|
|
export type UserUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the User
|
|
*/
|
|
select?: UserSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the User
|
|
*/
|
|
omit?: UserOmit<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
|
|
/**
|
|
* Limit how many Users to update.
|
|
*/
|
|
limit?: number
|
|
}
|
|
|
|
/**
|
|
* User updateManyAndReturn
|
|
*/
|
|
export type UserUpdateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the User
|
|
*/
|
|
select?: UserSelectUpdateManyAndReturn<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the User
|
|
*/
|
|
omit?: UserOmit<ExtArgs> | null
|
|
/**
|
|
* The data used to update Users.
|
|
*/
|
|
data: XOR<UserUpdateManyMutationInput, UserUncheckedUpdateManyInput>
|
|
/**
|
|
* Filter which Users to update
|
|
*/
|
|
where?: UserWhereInput
|
|
/**
|
|
* Limit how many Users to update.
|
|
*/
|
|
limit?: number
|
|
}
|
|
|
|
/**
|
|
* User upsert
|
|
*/
|
|
export type UserUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the User
|
|
*/
|
|
select?: UserSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the User
|
|
*/
|
|
omit?: UserOmit<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
|
|
/**
|
|
* Omit specific fields from the User
|
|
*/
|
|
omit?: UserOmit<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
|
|
/**
|
|
* Limit how many Users to delete.
|
|
*/
|
|
limit?: number
|
|
}
|
|
|
|
/**
|
|
* User.posts
|
|
*/
|
|
export type User$postsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Post
|
|
*/
|
|
select?: PostSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the Post
|
|
*/
|
|
omit?: PostOmit<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: PostInclude<ExtArgs> | null
|
|
where?: PostWhereInput
|
|
orderBy?: PostOrderByWithRelationInput | PostOrderByWithRelationInput[]
|
|
cursor?: PostWhereUniqueInput
|
|
take?: number
|
|
skip?: number
|
|
distinct?: PostScalarFieldEnum | PostScalarFieldEnum[]
|
|
}
|
|
|
|
/**
|
|
* User.profile
|
|
*/
|
|
export type User$profileArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Profile
|
|
*/
|
|
select?: ProfileSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the Profile
|
|
*/
|
|
omit?: ProfileOmit<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: ProfileInclude<ExtArgs> | null
|
|
where?: ProfileWhereInput
|
|
}
|
|
|
|
/**
|
|
* User without action
|
|
*/
|
|
export type UserDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the User
|
|
*/
|
|
select?: UserSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the User
|
|
*/
|
|
omit?: UserOmit<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: UserInclude<ExtArgs> | null
|
|
}
|
|
|
|
|
|
/**
|
|
* Model Profile
|
|
*/
|
|
|
|
export type AggregateProfile = {
|
|
_count: ProfileCountAggregateOutputType | null
|
|
_avg: ProfileAvgAggregateOutputType | null
|
|
_sum: ProfileSumAggregateOutputType | null
|
|
_min: ProfileMinAggregateOutputType | null
|
|
_max: ProfileMaxAggregateOutputType | null
|
|
}
|
|
|
|
export type ProfileAvgAggregateOutputType = {
|
|
id: number | null
|
|
}
|
|
|
|
export type ProfileSumAggregateOutputType = {
|
|
id: number | null
|
|
}
|
|
|
|
export type ProfileMinAggregateOutputType = {
|
|
id: number | null
|
|
bio: string | null
|
|
avatar: string | null
|
|
userId: string | null
|
|
}
|
|
|
|
export type ProfileMaxAggregateOutputType = {
|
|
id: number | null
|
|
bio: string | null
|
|
avatar: string | null
|
|
userId: string | null
|
|
}
|
|
|
|
export type ProfileCountAggregateOutputType = {
|
|
id: number
|
|
bio: number
|
|
avatar: number
|
|
userId: number
|
|
_all: number
|
|
}
|
|
|
|
|
|
export type ProfileAvgAggregateInputType = {
|
|
id?: true
|
|
}
|
|
|
|
export type ProfileSumAggregateInputType = {
|
|
id?: true
|
|
}
|
|
|
|
export type ProfileMinAggregateInputType = {
|
|
id?: true
|
|
bio?: true
|
|
avatar?: true
|
|
userId?: true
|
|
}
|
|
|
|
export type ProfileMaxAggregateInputType = {
|
|
id?: true
|
|
bio?: true
|
|
avatar?: true
|
|
userId?: true
|
|
}
|
|
|
|
export type ProfileCountAggregateInputType = {
|
|
id?: true
|
|
bio?: true
|
|
avatar?: true
|
|
userId?: true
|
|
_all?: true
|
|
}
|
|
|
|
export type ProfileAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Filter which Profile to aggregate.
|
|
*/
|
|
where?: ProfileWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of Profiles to fetch.
|
|
*/
|
|
orderBy?: ProfileOrderByWithRelationInput | ProfileOrderByWithRelationInput[]
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the start position
|
|
*/
|
|
cursor?: ProfileWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Profiles 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` Profiles.
|
|
*/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Count returned Profiles
|
|
**/
|
|
_count?: true | ProfileCountAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to average
|
|
**/
|
|
_avg?: ProfileAvgAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to sum
|
|
**/
|
|
_sum?: ProfileSumAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to find the minimum value
|
|
**/
|
|
_min?: ProfileMinAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to find the maximum value
|
|
**/
|
|
_max?: ProfileMaxAggregateInputType
|
|
}
|
|
|
|
export type GetProfileAggregateType<T extends ProfileAggregateArgs> = {
|
|
[P in keyof T & keyof AggregateProfile]: P extends '_count' | 'count'
|
|
? T[P] extends true
|
|
? number
|
|
: GetScalarType<T[P], AggregateProfile[P]>
|
|
: GetScalarType<T[P], AggregateProfile[P]>
|
|
}
|
|
|
|
|
|
|
|
|
|
export type ProfileGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
where?: ProfileWhereInput
|
|
orderBy?: ProfileOrderByWithAggregationInput | ProfileOrderByWithAggregationInput[]
|
|
by: ProfileScalarFieldEnum[] | ProfileScalarFieldEnum
|
|
having?: ProfileScalarWhereWithAggregatesInput
|
|
take?: number
|
|
skip?: number
|
|
_count?: ProfileCountAggregateInputType | true
|
|
_avg?: ProfileAvgAggregateInputType
|
|
_sum?: ProfileSumAggregateInputType
|
|
_min?: ProfileMinAggregateInputType
|
|
_max?: ProfileMaxAggregateInputType
|
|
}
|
|
|
|
export type ProfileGroupByOutputType = {
|
|
id: number
|
|
bio: string
|
|
avatar: string | null
|
|
userId: string
|
|
_count: ProfileCountAggregateOutputType | null
|
|
_avg: ProfileAvgAggregateOutputType | null
|
|
_sum: ProfileSumAggregateOutputType | null
|
|
_min: ProfileMinAggregateOutputType | null
|
|
_max: ProfileMaxAggregateOutputType | null
|
|
}
|
|
|
|
type GetProfileGroupByPayload<T extends ProfileGroupByArgs> = Prisma.PrismaPromise<
|
|
Array<
|
|
PickEnumerable<ProfileGroupByOutputType, T['by']> &
|
|
{
|
|
[P in ((keyof T) & (keyof ProfileGroupByOutputType))]: P extends '_count'
|
|
? T[P] extends boolean
|
|
? number
|
|
: GetScalarType<T[P], ProfileGroupByOutputType[P]>
|
|
: GetScalarType<T[P], ProfileGroupByOutputType[P]>
|
|
}
|
|
>
|
|
>
|
|
|
|
|
|
export type ProfileSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
|
|
id?: boolean
|
|
bio?: boolean
|
|
avatar?: boolean
|
|
userId?: boolean
|
|
user?: boolean | UserDefaultArgs<ExtArgs>
|
|
}, ExtArgs["result"]["profile"]>
|
|
|
|
export type ProfileSelectCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
|
|
id?: boolean
|
|
bio?: boolean
|
|
avatar?: boolean
|
|
userId?: boolean
|
|
user?: boolean | UserDefaultArgs<ExtArgs>
|
|
}, ExtArgs["result"]["profile"]>
|
|
|
|
export type ProfileSelectUpdateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
|
|
id?: boolean
|
|
bio?: boolean
|
|
avatar?: boolean
|
|
userId?: boolean
|
|
user?: boolean | UserDefaultArgs<ExtArgs>
|
|
}, ExtArgs["result"]["profile"]>
|
|
|
|
export type ProfileSelectScalar = {
|
|
id?: boolean
|
|
bio?: boolean
|
|
avatar?: boolean
|
|
userId?: boolean
|
|
}
|
|
|
|
export type ProfileOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "bio" | "avatar" | "userId", ExtArgs["result"]["profile"]>
|
|
export type ProfileInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
user?: boolean | UserDefaultArgs<ExtArgs>
|
|
}
|
|
export type ProfileIncludeCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
user?: boolean | UserDefaultArgs<ExtArgs>
|
|
}
|
|
export type ProfileIncludeUpdateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
user?: boolean | UserDefaultArgs<ExtArgs>
|
|
}
|
|
|
|
export type $ProfilePayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
name: "Profile"
|
|
objects: {
|
|
user: Prisma.$UserPayload<ExtArgs>
|
|
}
|
|
scalars: $Extensions.GetPayloadResult<{
|
|
id: number
|
|
bio: string
|
|
avatar: string | null
|
|
userId: string
|
|
}, ExtArgs["result"]["profile"]>
|
|
composites: {}
|
|
}
|
|
|
|
type ProfileGetPayload<S extends boolean | null | undefined | ProfileDefaultArgs> = $Result.GetResult<Prisma.$ProfilePayload, S>
|
|
|
|
type ProfileCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
|
|
Omit<ProfileFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
|
|
select?: ProfileCountAggregateInputType | true
|
|
}
|
|
|
|
export interface ProfileDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
|
|
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['Profile'], meta: { name: 'Profile' } }
|
|
/**
|
|
* Find zero or one Profile that matches the filter.
|
|
* @param {ProfileFindUniqueArgs} args - Arguments to find a Profile
|
|
* @example
|
|
* // Get one Profile
|
|
* const profile = await prisma.profile.findUnique({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*/
|
|
findUnique<T extends ProfileFindUniqueArgs>(args: SelectSubset<T, ProfileFindUniqueArgs<ExtArgs>>): Prisma__ProfileClient<$Result.GetResult<Prisma.$ProfilePayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
|
|
|
/**
|
|
* Find one Profile that matches the filter or throw an error with `error.code='P2025'`
|
|
* if no matches were found.
|
|
* @param {ProfileFindUniqueOrThrowArgs} args - Arguments to find a Profile
|
|
* @example
|
|
* // Get one Profile
|
|
* const profile = await prisma.profile.findUniqueOrThrow({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*/
|
|
findUniqueOrThrow<T extends ProfileFindUniqueOrThrowArgs>(args: SelectSubset<T, ProfileFindUniqueOrThrowArgs<ExtArgs>>): Prisma__ProfileClient<$Result.GetResult<Prisma.$ProfilePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
|
|
|
|
/**
|
|
* Find the first Profile 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 {ProfileFindFirstArgs} args - Arguments to find a Profile
|
|
* @example
|
|
* // Get one Profile
|
|
* const profile = await prisma.profile.findFirst({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*/
|
|
findFirst<T extends ProfileFindFirstArgs>(args?: SelectSubset<T, ProfileFindFirstArgs<ExtArgs>>): Prisma__ProfileClient<$Result.GetResult<Prisma.$ProfilePayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
|
|
|
/**
|
|
* Find the first Profile 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 {ProfileFindFirstOrThrowArgs} args - Arguments to find a Profile
|
|
* @example
|
|
* // Get one Profile
|
|
* const profile = await prisma.profile.findFirstOrThrow({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*/
|
|
findFirstOrThrow<T extends ProfileFindFirstOrThrowArgs>(args?: SelectSubset<T, ProfileFindFirstOrThrowArgs<ExtArgs>>): Prisma__ProfileClient<$Result.GetResult<Prisma.$ProfilePayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
|
|
|
|
/**
|
|
* Find zero or more Profiles 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 {ProfileFindManyArgs} args - Arguments to filter and select certain fields only.
|
|
* @example
|
|
* // Get all Profiles
|
|
* const profiles = await prisma.profile.findMany()
|
|
*
|
|
* // Get first 10 Profiles
|
|
* const profiles = await prisma.profile.findMany({ take: 10 })
|
|
*
|
|
* // Only select the `id`
|
|
* const profileWithIdOnly = await prisma.profile.findMany({ select: { id: true } })
|
|
*
|
|
*/
|
|
findMany<T extends ProfileFindManyArgs>(args?: SelectSubset<T, ProfileFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$ProfilePayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>
|
|
|
|
/**
|
|
* Create a Profile.
|
|
* @param {ProfileCreateArgs} args - Arguments to create a Profile.
|
|
* @example
|
|
* // Create one Profile
|
|
* const Profile = await prisma.profile.create({
|
|
* data: {
|
|
* // ... data to create a Profile
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
create<T extends ProfileCreateArgs>(args: SelectSubset<T, ProfileCreateArgs<ExtArgs>>): Prisma__ProfileClient<$Result.GetResult<Prisma.$ProfilePayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
|
|
|
|
/**
|
|
* Create many Profiles.
|
|
* @param {ProfileCreateManyArgs} args - Arguments to create many Profiles.
|
|
* @example
|
|
* // Create many Profiles
|
|
* const profile = await prisma.profile.createMany({
|
|
* data: [
|
|
* // ... provide data here
|
|
* ]
|
|
* })
|
|
*
|
|
*/
|
|
createMany<T extends ProfileCreateManyArgs>(args?: SelectSubset<T, ProfileCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
|
|
|
|
/**
|
|
* Create many Profiles and returns the data saved in the database.
|
|
* @param {ProfileCreateManyAndReturnArgs} args - Arguments to create many Profiles.
|
|
* @example
|
|
* // Create many Profiles
|
|
* const profile = await prisma.profile.createManyAndReturn({
|
|
* data: [
|
|
* // ... provide data here
|
|
* ]
|
|
* })
|
|
*
|
|
* // Create many Profiles and only return the `id`
|
|
* const profileWithIdOnly = await prisma.profile.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 ProfileCreateManyAndReturnArgs>(args?: SelectSubset<T, ProfileCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$ProfilePayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>
|
|
|
|
/**
|
|
* Delete a Profile.
|
|
* @param {ProfileDeleteArgs} args - Arguments to delete one Profile.
|
|
* @example
|
|
* // Delete one Profile
|
|
* const Profile = await prisma.profile.delete({
|
|
* where: {
|
|
* // ... filter to delete one Profile
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
delete<T extends ProfileDeleteArgs>(args: SelectSubset<T, ProfileDeleteArgs<ExtArgs>>): Prisma__ProfileClient<$Result.GetResult<Prisma.$ProfilePayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
|
|
|
|
/**
|
|
* Update one Profile.
|
|
* @param {ProfileUpdateArgs} args - Arguments to update one Profile.
|
|
* @example
|
|
* // Update one Profile
|
|
* const profile = await prisma.profile.update({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* },
|
|
* data: {
|
|
* // ... provide data here
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
update<T extends ProfileUpdateArgs>(args: SelectSubset<T, ProfileUpdateArgs<ExtArgs>>): Prisma__ProfileClient<$Result.GetResult<Prisma.$ProfilePayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
|
|
|
|
/**
|
|
* Delete zero or more Profiles.
|
|
* @param {ProfileDeleteManyArgs} args - Arguments to filter Profiles to delete.
|
|
* @example
|
|
* // Delete a few Profiles
|
|
* const { count } = await prisma.profile.deleteMany({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
deleteMany<T extends ProfileDeleteManyArgs>(args?: SelectSubset<T, ProfileDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
|
|
|
|
/**
|
|
* Update zero or more Profiles.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {ProfileUpdateManyArgs} args - Arguments to update one or more rows.
|
|
* @example
|
|
* // Update many Profiles
|
|
* const profile = await prisma.profile.updateMany({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* },
|
|
* data: {
|
|
* // ... provide data here
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
updateMany<T extends ProfileUpdateManyArgs>(args: SelectSubset<T, ProfileUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
|
|
|
|
/**
|
|
* Update zero or more Profiles and returns the data updated in the database.
|
|
* @param {ProfileUpdateManyAndReturnArgs} args - Arguments to update many Profiles.
|
|
* @example
|
|
* // Update many Profiles
|
|
* const profile = await prisma.profile.updateManyAndReturn({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* },
|
|
* data: [
|
|
* // ... provide data here
|
|
* ]
|
|
* })
|
|
*
|
|
* // Update zero or more Profiles and only return the `id`
|
|
* const profileWithIdOnly = await prisma.profile.updateManyAndReturn({
|
|
* select: { id: true },
|
|
* where: {
|
|
* // ... provide filter here
|
|
* },
|
|
* 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
|
|
*
|
|
*/
|
|
updateManyAndReturn<T extends ProfileUpdateManyAndReturnArgs>(args: SelectSubset<T, ProfileUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$ProfilePayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>
|
|
|
|
/**
|
|
* Create or update one Profile.
|
|
* @param {ProfileUpsertArgs} args - Arguments to update or create a Profile.
|
|
* @example
|
|
* // Update or create a Profile
|
|
* const profile = await prisma.profile.upsert({
|
|
* create: {
|
|
* // ... data to create a Profile
|
|
* },
|
|
* update: {
|
|
* // ... in case it already exists, update
|
|
* },
|
|
* where: {
|
|
* // ... the filter for the Profile we want to update
|
|
* }
|
|
* })
|
|
*/
|
|
upsert<T extends ProfileUpsertArgs>(args: SelectSubset<T, ProfileUpsertArgs<ExtArgs>>): Prisma__ProfileClient<$Result.GetResult<Prisma.$ProfilePayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
|
|
|
|
|
|
/**
|
|
* Count the number of Profiles.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {ProfileCountArgs} args - Arguments to filter Profiles to count.
|
|
* @example
|
|
* // Count the number of Profiles
|
|
* const count = await prisma.profile.count({
|
|
* where: {
|
|
* // ... the filter for the Profiles we want to count
|
|
* }
|
|
* })
|
|
**/
|
|
count<T extends ProfileCountArgs>(
|
|
args?: Subset<T, ProfileCountArgs>,
|
|
): Prisma.PrismaPromise<
|
|
T extends $Utils.Record<'select', any>
|
|
? T['select'] extends true
|
|
? number
|
|
: GetScalarType<T['select'], ProfileCountAggregateOutputType>
|
|
: number
|
|
>
|
|
|
|
/**
|
|
* Allows you to perform aggregations operations on a Profile.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {ProfileAggregateArgs} 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 ProfileAggregateArgs>(args: Subset<T, ProfileAggregateArgs>): Prisma.PrismaPromise<GetProfileAggregateType<T>>
|
|
|
|
/**
|
|
* Group by Profile.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {ProfileGroupByArgs} 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 ProfileGroupByArgs,
|
|
HasSelectOrTake extends Or<
|
|
Extends<'skip', Keys<T>>,
|
|
Extends<'take', Keys<T>>
|
|
>,
|
|
OrderByArg extends True extends HasSelectOrTake
|
|
? { orderBy: ProfileGroupByArgs['orderBy'] }
|
|
: { orderBy?: ProfileGroupByArgs['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, ProfileGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetProfileGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
|
|
/**
|
|
* Fields of the Profile model
|
|
*/
|
|
readonly fields: ProfileFieldRefs;
|
|
}
|
|
|
|
/**
|
|
* The delegate class that acts as a "Promise-like" for Profile.
|
|
* 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__ProfileClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> 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", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
|
/**
|
|
* 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 Profile model
|
|
*/
|
|
interface ProfileFieldRefs {
|
|
readonly id: FieldRef<"Profile", 'Int'>
|
|
readonly bio: FieldRef<"Profile", 'String'>
|
|
readonly avatar: FieldRef<"Profile", 'String'>
|
|
readonly userId: FieldRef<"Profile", 'String'>
|
|
}
|
|
|
|
|
|
// Custom InputTypes
|
|
/**
|
|
* Profile findUnique
|
|
*/
|
|
export type ProfileFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Profile
|
|
*/
|
|
select?: ProfileSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the Profile
|
|
*/
|
|
omit?: ProfileOmit<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: ProfileInclude<ExtArgs> | null
|
|
/**
|
|
* Filter, which Profile to fetch.
|
|
*/
|
|
where: ProfileWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* Profile findUniqueOrThrow
|
|
*/
|
|
export type ProfileFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Profile
|
|
*/
|
|
select?: ProfileSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the Profile
|
|
*/
|
|
omit?: ProfileOmit<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: ProfileInclude<ExtArgs> | null
|
|
/**
|
|
* Filter, which Profile to fetch.
|
|
*/
|
|
where: ProfileWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* Profile findFirst
|
|
*/
|
|
export type ProfileFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Profile
|
|
*/
|
|
select?: ProfileSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the Profile
|
|
*/
|
|
omit?: ProfileOmit<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: ProfileInclude<ExtArgs> | null
|
|
/**
|
|
* Filter, which Profile to fetch.
|
|
*/
|
|
where?: ProfileWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of Profiles to fetch.
|
|
*/
|
|
orderBy?: ProfileOrderByWithRelationInput | ProfileOrderByWithRelationInput[]
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for searching for Profiles.
|
|
*/
|
|
cursor?: ProfileWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Profiles 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` Profiles.
|
|
*/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
|
*
|
|
* Filter by unique combinations of Profiles.
|
|
*/
|
|
distinct?: ProfileScalarFieldEnum | ProfileScalarFieldEnum[]
|
|
}
|
|
|
|
/**
|
|
* Profile findFirstOrThrow
|
|
*/
|
|
export type ProfileFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Profile
|
|
*/
|
|
select?: ProfileSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the Profile
|
|
*/
|
|
omit?: ProfileOmit<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: ProfileInclude<ExtArgs> | null
|
|
/**
|
|
* Filter, which Profile to fetch.
|
|
*/
|
|
where?: ProfileWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of Profiles to fetch.
|
|
*/
|
|
orderBy?: ProfileOrderByWithRelationInput | ProfileOrderByWithRelationInput[]
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for searching for Profiles.
|
|
*/
|
|
cursor?: ProfileWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Profiles 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` Profiles.
|
|
*/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
|
*
|
|
* Filter by unique combinations of Profiles.
|
|
*/
|
|
distinct?: ProfileScalarFieldEnum | ProfileScalarFieldEnum[]
|
|
}
|
|
|
|
/**
|
|
* Profile findMany
|
|
*/
|
|
export type ProfileFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Profile
|
|
*/
|
|
select?: ProfileSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the Profile
|
|
*/
|
|
omit?: ProfileOmit<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: ProfileInclude<ExtArgs> | null
|
|
/**
|
|
* Filter, which Profiles to fetch.
|
|
*/
|
|
where?: ProfileWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of Profiles to fetch.
|
|
*/
|
|
orderBy?: ProfileOrderByWithRelationInput | ProfileOrderByWithRelationInput[]
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for listing Profiles.
|
|
*/
|
|
cursor?: ProfileWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Profiles 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` Profiles.
|
|
*/
|
|
skip?: number
|
|
distinct?: ProfileScalarFieldEnum | ProfileScalarFieldEnum[]
|
|
}
|
|
|
|
/**
|
|
* Profile create
|
|
*/
|
|
export type ProfileCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Profile
|
|
*/
|
|
select?: ProfileSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the Profile
|
|
*/
|
|
omit?: ProfileOmit<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: ProfileInclude<ExtArgs> | null
|
|
/**
|
|
* The data needed to create a Profile.
|
|
*/
|
|
data: XOR<ProfileCreateInput, ProfileUncheckedCreateInput>
|
|
}
|
|
|
|
/**
|
|
* Profile createMany
|
|
*/
|
|
export type ProfileCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* The data used to create many Profiles.
|
|
*/
|
|
data: ProfileCreateManyInput | ProfileCreateManyInput[]
|
|
}
|
|
|
|
/**
|
|
* Profile createManyAndReturn
|
|
*/
|
|
export type ProfileCreateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Profile
|
|
*/
|
|
select?: ProfileSelectCreateManyAndReturn<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the Profile
|
|
*/
|
|
omit?: ProfileOmit<ExtArgs> | null
|
|
/**
|
|
* The data used to create many Profiles.
|
|
*/
|
|
data: ProfileCreateManyInput | ProfileCreateManyInput[]
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: ProfileIncludeCreateManyAndReturn<ExtArgs> | null
|
|
}
|
|
|
|
/**
|
|
* Profile update
|
|
*/
|
|
export type ProfileUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Profile
|
|
*/
|
|
select?: ProfileSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the Profile
|
|
*/
|
|
omit?: ProfileOmit<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: ProfileInclude<ExtArgs> | null
|
|
/**
|
|
* The data needed to update a Profile.
|
|
*/
|
|
data: XOR<ProfileUpdateInput, ProfileUncheckedUpdateInput>
|
|
/**
|
|
* Choose, which Profile to update.
|
|
*/
|
|
where: ProfileWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* Profile updateMany
|
|
*/
|
|
export type ProfileUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* The data used to update Profiles.
|
|
*/
|
|
data: XOR<ProfileUpdateManyMutationInput, ProfileUncheckedUpdateManyInput>
|
|
/**
|
|
* Filter which Profiles to update
|
|
*/
|
|
where?: ProfileWhereInput
|
|
/**
|
|
* Limit how many Profiles to update.
|
|
*/
|
|
limit?: number
|
|
}
|
|
|
|
/**
|
|
* Profile updateManyAndReturn
|
|
*/
|
|
export type ProfileUpdateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Profile
|
|
*/
|
|
select?: ProfileSelectUpdateManyAndReturn<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the Profile
|
|
*/
|
|
omit?: ProfileOmit<ExtArgs> | null
|
|
/**
|
|
* The data used to update Profiles.
|
|
*/
|
|
data: XOR<ProfileUpdateManyMutationInput, ProfileUncheckedUpdateManyInput>
|
|
/**
|
|
* Filter which Profiles to update
|
|
*/
|
|
where?: ProfileWhereInput
|
|
/**
|
|
* Limit how many Profiles to update.
|
|
*/
|
|
limit?: number
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: ProfileIncludeUpdateManyAndReturn<ExtArgs> | null
|
|
}
|
|
|
|
/**
|
|
* Profile upsert
|
|
*/
|
|
export type ProfileUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Profile
|
|
*/
|
|
select?: ProfileSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the Profile
|
|
*/
|
|
omit?: ProfileOmit<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: ProfileInclude<ExtArgs> | null
|
|
/**
|
|
* The filter to search for the Profile to update in case it exists.
|
|
*/
|
|
where: ProfileWhereUniqueInput
|
|
/**
|
|
* In case the Profile found by the `where` argument doesn't exist, create a new Profile with this data.
|
|
*/
|
|
create: XOR<ProfileCreateInput, ProfileUncheckedCreateInput>
|
|
/**
|
|
* In case the Profile was found with the provided `where` argument, update it with this data.
|
|
*/
|
|
update: XOR<ProfileUpdateInput, ProfileUncheckedUpdateInput>
|
|
}
|
|
|
|
/**
|
|
* Profile delete
|
|
*/
|
|
export type ProfileDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Profile
|
|
*/
|
|
select?: ProfileSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the Profile
|
|
*/
|
|
omit?: ProfileOmit<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: ProfileInclude<ExtArgs> | null
|
|
/**
|
|
* Filter which Profile to delete.
|
|
*/
|
|
where: ProfileWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* Profile deleteMany
|
|
*/
|
|
export type ProfileDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Filter which Profiles to delete
|
|
*/
|
|
where?: ProfileWhereInput
|
|
/**
|
|
* Limit how many Profiles to delete.
|
|
*/
|
|
limit?: number
|
|
}
|
|
|
|
/**
|
|
* Profile without action
|
|
*/
|
|
export type ProfileDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Profile
|
|
*/
|
|
select?: ProfileSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the Profile
|
|
*/
|
|
omit?: ProfileOmit<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: ProfileInclude<ExtArgs> | null
|
|
}
|
|
|
|
|
|
/**
|
|
* Model Post
|
|
*/
|
|
|
|
export type AggregatePost = {
|
|
_count: PostCountAggregateOutputType | null
|
|
_avg: PostAvgAggregateOutputType | null
|
|
_sum: PostSumAggregateOutputType | null
|
|
_min: PostMinAggregateOutputType | null
|
|
_max: PostMaxAggregateOutputType | null
|
|
}
|
|
|
|
export type PostAvgAggregateOutputType = {
|
|
id: number | null
|
|
authorId: number | null
|
|
}
|
|
|
|
export type PostSumAggregateOutputType = {
|
|
id: number | null
|
|
authorId: number | null
|
|
}
|
|
|
|
export type PostMinAggregateOutputType = {
|
|
id: number | null
|
|
title: string | null
|
|
content: string | null
|
|
published: boolean | null
|
|
authorId: number | null
|
|
createdAt: Date | null
|
|
updatedAt: Date | null
|
|
}
|
|
|
|
export type PostMaxAggregateOutputType = {
|
|
id: number | null
|
|
title: string | null
|
|
content: string | null
|
|
published: boolean | null
|
|
authorId: number | null
|
|
createdAt: Date | null
|
|
updatedAt: Date | null
|
|
}
|
|
|
|
export type PostCountAggregateOutputType = {
|
|
id: number
|
|
title: number
|
|
content: number
|
|
published: number
|
|
authorId: number
|
|
createdAt: number
|
|
updatedAt: number
|
|
_all: number
|
|
}
|
|
|
|
|
|
export type PostAvgAggregateInputType = {
|
|
id?: true
|
|
authorId?: true
|
|
}
|
|
|
|
export type PostSumAggregateInputType = {
|
|
id?: true
|
|
authorId?: true
|
|
}
|
|
|
|
export type PostMinAggregateInputType = {
|
|
id?: true
|
|
title?: true
|
|
content?: true
|
|
published?: true
|
|
authorId?: true
|
|
createdAt?: true
|
|
updatedAt?: true
|
|
}
|
|
|
|
export type PostMaxAggregateInputType = {
|
|
id?: true
|
|
title?: true
|
|
content?: true
|
|
published?: true
|
|
authorId?: true
|
|
createdAt?: true
|
|
updatedAt?: true
|
|
}
|
|
|
|
export type PostCountAggregateInputType = {
|
|
id?: true
|
|
title?: true
|
|
content?: true
|
|
published?: true
|
|
authorId?: true
|
|
createdAt?: true
|
|
updatedAt?: true
|
|
_all?: true
|
|
}
|
|
|
|
export type PostAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Filter which Post to aggregate.
|
|
*/
|
|
where?: PostWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of Posts to fetch.
|
|
*/
|
|
orderBy?: PostOrderByWithRelationInput | PostOrderByWithRelationInput[]
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the start position
|
|
*/
|
|
cursor?: PostWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Posts 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` Posts.
|
|
*/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Count returned Posts
|
|
**/
|
|
_count?: true | PostCountAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to average
|
|
**/
|
|
_avg?: PostAvgAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to sum
|
|
**/
|
|
_sum?: PostSumAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to find the minimum value
|
|
**/
|
|
_min?: PostMinAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to find the maximum value
|
|
**/
|
|
_max?: PostMaxAggregateInputType
|
|
}
|
|
|
|
export type GetPostAggregateType<T extends PostAggregateArgs> = {
|
|
[P in keyof T & keyof AggregatePost]: P extends '_count' | 'count'
|
|
? T[P] extends true
|
|
? number
|
|
: GetScalarType<T[P], AggregatePost[P]>
|
|
: GetScalarType<T[P], AggregatePost[P]>
|
|
}
|
|
|
|
|
|
|
|
|
|
export type PostGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
where?: PostWhereInput
|
|
orderBy?: PostOrderByWithAggregationInput | PostOrderByWithAggregationInput[]
|
|
by: PostScalarFieldEnum[] | PostScalarFieldEnum
|
|
having?: PostScalarWhereWithAggregatesInput
|
|
take?: number
|
|
skip?: number
|
|
_count?: PostCountAggregateInputType | true
|
|
_avg?: PostAvgAggregateInputType
|
|
_sum?: PostSumAggregateInputType
|
|
_min?: PostMinAggregateInputType
|
|
_max?: PostMaxAggregateInputType
|
|
}
|
|
|
|
export type PostGroupByOutputType = {
|
|
id: number
|
|
title: string
|
|
content: string | null
|
|
published: boolean
|
|
authorId: number
|
|
createdAt: Date
|
|
updatedAt: Date
|
|
_count: PostCountAggregateOutputType | null
|
|
_avg: PostAvgAggregateOutputType | null
|
|
_sum: PostSumAggregateOutputType | null
|
|
_min: PostMinAggregateOutputType | null
|
|
_max: PostMaxAggregateOutputType | null
|
|
}
|
|
|
|
type GetPostGroupByPayload<T extends PostGroupByArgs> = Prisma.PrismaPromise<
|
|
Array<
|
|
PickEnumerable<PostGroupByOutputType, T['by']> &
|
|
{
|
|
[P in ((keyof T) & (keyof PostGroupByOutputType))]: P extends '_count'
|
|
? T[P] extends boolean
|
|
? number
|
|
: GetScalarType<T[P], PostGroupByOutputType[P]>
|
|
: GetScalarType<T[P], PostGroupByOutputType[P]>
|
|
}
|
|
>
|
|
>
|
|
|
|
|
|
export type PostSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
|
|
id?: boolean
|
|
title?: boolean
|
|
content?: boolean
|
|
published?: boolean
|
|
authorId?: boolean
|
|
createdAt?: boolean
|
|
updatedAt?: boolean
|
|
author?: boolean | UserDefaultArgs<ExtArgs>
|
|
}, ExtArgs["result"]["post"]>
|
|
|
|
export type PostSelectCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
|
|
id?: boolean
|
|
title?: boolean
|
|
content?: boolean
|
|
published?: boolean
|
|
authorId?: boolean
|
|
createdAt?: boolean
|
|
updatedAt?: boolean
|
|
author?: boolean | UserDefaultArgs<ExtArgs>
|
|
}, ExtArgs["result"]["post"]>
|
|
|
|
export type PostSelectUpdateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
|
|
id?: boolean
|
|
title?: boolean
|
|
content?: boolean
|
|
published?: boolean
|
|
authorId?: boolean
|
|
createdAt?: boolean
|
|
updatedAt?: boolean
|
|
author?: boolean | UserDefaultArgs<ExtArgs>
|
|
}, ExtArgs["result"]["post"]>
|
|
|
|
export type PostSelectScalar = {
|
|
id?: boolean
|
|
title?: boolean
|
|
content?: boolean
|
|
published?: boolean
|
|
authorId?: boolean
|
|
createdAt?: boolean
|
|
updatedAt?: boolean
|
|
}
|
|
|
|
export type PostOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "title" | "content" | "published" | "authorId" | "createdAt" | "updatedAt", ExtArgs["result"]["post"]>
|
|
export type PostInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
author?: boolean | UserDefaultArgs<ExtArgs>
|
|
}
|
|
export type PostIncludeCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
author?: boolean | UserDefaultArgs<ExtArgs>
|
|
}
|
|
export type PostIncludeUpdateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
author?: boolean | UserDefaultArgs<ExtArgs>
|
|
}
|
|
|
|
export type $PostPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
name: "Post"
|
|
objects: {
|
|
author: Prisma.$UserPayload<ExtArgs>
|
|
}
|
|
scalars: $Extensions.GetPayloadResult<{
|
|
id: number
|
|
title: string
|
|
content: string | null
|
|
published: boolean
|
|
authorId: number
|
|
createdAt: Date
|
|
updatedAt: Date
|
|
}, ExtArgs["result"]["post"]>
|
|
composites: {}
|
|
}
|
|
|
|
type PostGetPayload<S extends boolean | null | undefined | PostDefaultArgs> = $Result.GetResult<Prisma.$PostPayload, S>
|
|
|
|
type PostCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
|
|
Omit<PostFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
|
|
select?: PostCountAggregateInputType | true
|
|
}
|
|
|
|
export interface PostDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
|
|
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['Post'], meta: { name: 'Post' } }
|
|
/**
|
|
* Find zero or one Post that matches the filter.
|
|
* @param {PostFindUniqueArgs} args - Arguments to find a Post
|
|
* @example
|
|
* // Get one Post
|
|
* const post = await prisma.post.findUnique({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*/
|
|
findUnique<T extends PostFindUniqueArgs>(args: SelectSubset<T, PostFindUniqueArgs<ExtArgs>>): Prisma__PostClient<$Result.GetResult<Prisma.$PostPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
|
|
|
/**
|
|
* Find one Post that matches the filter or throw an error with `error.code='P2025'`
|
|
* if no matches were found.
|
|
* @param {PostFindUniqueOrThrowArgs} args - Arguments to find a Post
|
|
* @example
|
|
* // Get one Post
|
|
* const post = await prisma.post.findUniqueOrThrow({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*/
|
|
findUniqueOrThrow<T extends PostFindUniqueOrThrowArgs>(args: SelectSubset<T, PostFindUniqueOrThrowArgs<ExtArgs>>): Prisma__PostClient<$Result.GetResult<Prisma.$PostPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
|
|
|
|
/**
|
|
* Find the first Post 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 {PostFindFirstArgs} args - Arguments to find a Post
|
|
* @example
|
|
* // Get one Post
|
|
* const post = await prisma.post.findFirst({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*/
|
|
findFirst<T extends PostFindFirstArgs>(args?: SelectSubset<T, PostFindFirstArgs<ExtArgs>>): Prisma__PostClient<$Result.GetResult<Prisma.$PostPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
|
|
|
/**
|
|
* Find the first Post 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 {PostFindFirstOrThrowArgs} args - Arguments to find a Post
|
|
* @example
|
|
* // Get one Post
|
|
* const post = await prisma.post.findFirstOrThrow({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*/
|
|
findFirstOrThrow<T extends PostFindFirstOrThrowArgs>(args?: SelectSubset<T, PostFindFirstOrThrowArgs<ExtArgs>>): Prisma__PostClient<$Result.GetResult<Prisma.$PostPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
|
|
|
|
/**
|
|
* Find zero or more Posts 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 {PostFindManyArgs} args - Arguments to filter and select certain fields only.
|
|
* @example
|
|
* // Get all Posts
|
|
* const posts = await prisma.post.findMany()
|
|
*
|
|
* // Get first 10 Posts
|
|
* const posts = await prisma.post.findMany({ take: 10 })
|
|
*
|
|
* // Only select the `id`
|
|
* const postWithIdOnly = await prisma.post.findMany({ select: { id: true } })
|
|
*
|
|
*/
|
|
findMany<T extends PostFindManyArgs>(args?: SelectSubset<T, PostFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$PostPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>
|
|
|
|
/**
|
|
* Create a Post.
|
|
* @param {PostCreateArgs} args - Arguments to create a Post.
|
|
* @example
|
|
* // Create one Post
|
|
* const Post = await prisma.post.create({
|
|
* data: {
|
|
* // ... data to create a Post
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
create<T extends PostCreateArgs>(args: SelectSubset<T, PostCreateArgs<ExtArgs>>): Prisma__PostClient<$Result.GetResult<Prisma.$PostPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
|
|
|
|
/**
|
|
* Create many Posts.
|
|
* @param {PostCreateManyArgs} args - Arguments to create many Posts.
|
|
* @example
|
|
* // Create many Posts
|
|
* const post = await prisma.post.createMany({
|
|
* data: [
|
|
* // ... provide data here
|
|
* ]
|
|
* })
|
|
*
|
|
*/
|
|
createMany<T extends PostCreateManyArgs>(args?: SelectSubset<T, PostCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
|
|
|
|
/**
|
|
* Create many Posts and returns the data saved in the database.
|
|
* @param {PostCreateManyAndReturnArgs} args - Arguments to create many Posts.
|
|
* @example
|
|
* // Create many Posts
|
|
* const post = await prisma.post.createManyAndReturn({
|
|
* data: [
|
|
* // ... provide data here
|
|
* ]
|
|
* })
|
|
*
|
|
* // Create many Posts and only return the `id`
|
|
* const postWithIdOnly = await prisma.post.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 PostCreateManyAndReturnArgs>(args?: SelectSubset<T, PostCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$PostPayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>
|
|
|
|
/**
|
|
* Delete a Post.
|
|
* @param {PostDeleteArgs} args - Arguments to delete one Post.
|
|
* @example
|
|
* // Delete one Post
|
|
* const Post = await prisma.post.delete({
|
|
* where: {
|
|
* // ... filter to delete one Post
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
delete<T extends PostDeleteArgs>(args: SelectSubset<T, PostDeleteArgs<ExtArgs>>): Prisma__PostClient<$Result.GetResult<Prisma.$PostPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
|
|
|
|
/**
|
|
* Update one Post.
|
|
* @param {PostUpdateArgs} args - Arguments to update one Post.
|
|
* @example
|
|
* // Update one Post
|
|
* const post = await prisma.post.update({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* },
|
|
* data: {
|
|
* // ... provide data here
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
update<T extends PostUpdateArgs>(args: SelectSubset<T, PostUpdateArgs<ExtArgs>>): Prisma__PostClient<$Result.GetResult<Prisma.$PostPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
|
|
|
|
/**
|
|
* Delete zero or more Posts.
|
|
* @param {PostDeleteManyArgs} args - Arguments to filter Posts to delete.
|
|
* @example
|
|
* // Delete a few Posts
|
|
* const { count } = await prisma.post.deleteMany({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
deleteMany<T extends PostDeleteManyArgs>(args?: SelectSubset<T, PostDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
|
|
|
|
/**
|
|
* Update zero or more Posts.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {PostUpdateManyArgs} args - Arguments to update one or more rows.
|
|
* @example
|
|
* // Update many Posts
|
|
* const post = await prisma.post.updateMany({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* },
|
|
* data: {
|
|
* // ... provide data here
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
updateMany<T extends PostUpdateManyArgs>(args: SelectSubset<T, PostUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
|
|
|
|
/**
|
|
* Update zero or more Posts and returns the data updated in the database.
|
|
* @param {PostUpdateManyAndReturnArgs} args - Arguments to update many Posts.
|
|
* @example
|
|
* // Update many Posts
|
|
* const post = await prisma.post.updateManyAndReturn({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* },
|
|
* data: [
|
|
* // ... provide data here
|
|
* ]
|
|
* })
|
|
*
|
|
* // Update zero or more Posts and only return the `id`
|
|
* const postWithIdOnly = await prisma.post.updateManyAndReturn({
|
|
* select: { id: true },
|
|
* where: {
|
|
* // ... provide filter here
|
|
* },
|
|
* 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
|
|
*
|
|
*/
|
|
updateManyAndReturn<T extends PostUpdateManyAndReturnArgs>(args: SelectSubset<T, PostUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$PostPayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>
|
|
|
|
/**
|
|
* Create or update one Post.
|
|
* @param {PostUpsertArgs} args - Arguments to update or create a Post.
|
|
* @example
|
|
* // Update or create a Post
|
|
* const post = await prisma.post.upsert({
|
|
* create: {
|
|
* // ... data to create a Post
|
|
* },
|
|
* update: {
|
|
* // ... in case it already exists, update
|
|
* },
|
|
* where: {
|
|
* // ... the filter for the Post we want to update
|
|
* }
|
|
* })
|
|
*/
|
|
upsert<T extends PostUpsertArgs>(args: SelectSubset<T, PostUpsertArgs<ExtArgs>>): Prisma__PostClient<$Result.GetResult<Prisma.$PostPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
|
|
|
|
|
|
/**
|
|
* Count the number of Posts.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {PostCountArgs} args - Arguments to filter Posts to count.
|
|
* @example
|
|
* // Count the number of Posts
|
|
* const count = await prisma.post.count({
|
|
* where: {
|
|
* // ... the filter for the Posts we want to count
|
|
* }
|
|
* })
|
|
**/
|
|
count<T extends PostCountArgs>(
|
|
args?: Subset<T, PostCountArgs>,
|
|
): Prisma.PrismaPromise<
|
|
T extends $Utils.Record<'select', any>
|
|
? T['select'] extends true
|
|
? number
|
|
: GetScalarType<T['select'], PostCountAggregateOutputType>
|
|
: number
|
|
>
|
|
|
|
/**
|
|
* Allows you to perform aggregations operations on a Post.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {PostAggregateArgs} 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 PostAggregateArgs>(args: Subset<T, PostAggregateArgs>): Prisma.PrismaPromise<GetPostAggregateType<T>>
|
|
|
|
/**
|
|
* Group by Post.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {PostGroupByArgs} 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 PostGroupByArgs,
|
|
HasSelectOrTake extends Or<
|
|
Extends<'skip', Keys<T>>,
|
|
Extends<'take', Keys<T>>
|
|
>,
|
|
OrderByArg extends True extends HasSelectOrTake
|
|
? { orderBy: PostGroupByArgs['orderBy'] }
|
|
: { orderBy?: PostGroupByArgs['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, PostGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetPostGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
|
|
/**
|
|
* Fields of the Post model
|
|
*/
|
|
readonly fields: PostFieldRefs;
|
|
}
|
|
|
|
/**
|
|
* The delegate class that acts as a "Promise-like" for Post.
|
|
* 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__PostClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
|
readonly [Symbol.toStringTag]: "PrismaPromise"
|
|
author<T extends UserDefaultArgs<ExtArgs> = {}>(args?: Subset<T, UserDefaultArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
|
/**
|
|
* 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 Post model
|
|
*/
|
|
interface PostFieldRefs {
|
|
readonly id: FieldRef<"Post", 'Int'>
|
|
readonly title: FieldRef<"Post", 'String'>
|
|
readonly content: FieldRef<"Post", 'String'>
|
|
readonly published: FieldRef<"Post", 'Boolean'>
|
|
readonly authorId: FieldRef<"Post", 'Int'>
|
|
readonly createdAt: FieldRef<"Post", 'DateTime'>
|
|
readonly updatedAt: FieldRef<"Post", 'DateTime'>
|
|
}
|
|
|
|
|
|
// Custom InputTypes
|
|
/**
|
|
* Post findUnique
|
|
*/
|
|
export type PostFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Post
|
|
*/
|
|
select?: PostSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the Post
|
|
*/
|
|
omit?: PostOmit<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: PostInclude<ExtArgs> | null
|
|
/**
|
|
* Filter, which Post to fetch.
|
|
*/
|
|
where: PostWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* Post findUniqueOrThrow
|
|
*/
|
|
export type PostFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Post
|
|
*/
|
|
select?: PostSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the Post
|
|
*/
|
|
omit?: PostOmit<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: PostInclude<ExtArgs> | null
|
|
/**
|
|
* Filter, which Post to fetch.
|
|
*/
|
|
where: PostWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* Post findFirst
|
|
*/
|
|
export type PostFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Post
|
|
*/
|
|
select?: PostSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the Post
|
|
*/
|
|
omit?: PostOmit<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: PostInclude<ExtArgs> | null
|
|
/**
|
|
* Filter, which Post to fetch.
|
|
*/
|
|
where?: PostWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of Posts to fetch.
|
|
*/
|
|
orderBy?: PostOrderByWithRelationInput | PostOrderByWithRelationInput[]
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for searching for Posts.
|
|
*/
|
|
cursor?: PostWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Posts 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` Posts.
|
|
*/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
|
*
|
|
* Filter by unique combinations of Posts.
|
|
*/
|
|
distinct?: PostScalarFieldEnum | PostScalarFieldEnum[]
|
|
}
|
|
|
|
/**
|
|
* Post findFirstOrThrow
|
|
*/
|
|
export type PostFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Post
|
|
*/
|
|
select?: PostSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the Post
|
|
*/
|
|
omit?: PostOmit<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: PostInclude<ExtArgs> | null
|
|
/**
|
|
* Filter, which Post to fetch.
|
|
*/
|
|
where?: PostWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of Posts to fetch.
|
|
*/
|
|
orderBy?: PostOrderByWithRelationInput | PostOrderByWithRelationInput[]
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for searching for Posts.
|
|
*/
|
|
cursor?: PostWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Posts 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` Posts.
|
|
*/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
|
*
|
|
* Filter by unique combinations of Posts.
|
|
*/
|
|
distinct?: PostScalarFieldEnum | PostScalarFieldEnum[]
|
|
}
|
|
|
|
/**
|
|
* Post findMany
|
|
*/
|
|
export type PostFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Post
|
|
*/
|
|
select?: PostSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the Post
|
|
*/
|
|
omit?: PostOmit<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: PostInclude<ExtArgs> | null
|
|
/**
|
|
* Filter, which Posts to fetch.
|
|
*/
|
|
where?: PostWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of Posts to fetch.
|
|
*/
|
|
orderBy?: PostOrderByWithRelationInput | PostOrderByWithRelationInput[]
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for listing Posts.
|
|
*/
|
|
cursor?: PostWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Posts 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` Posts.
|
|
*/
|
|
skip?: number
|
|
distinct?: PostScalarFieldEnum | PostScalarFieldEnum[]
|
|
}
|
|
|
|
/**
|
|
* Post create
|
|
*/
|
|
export type PostCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Post
|
|
*/
|
|
select?: PostSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the Post
|
|
*/
|
|
omit?: PostOmit<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: PostInclude<ExtArgs> | null
|
|
/**
|
|
* The data needed to create a Post.
|
|
*/
|
|
data: XOR<PostCreateInput, PostUncheckedCreateInput>
|
|
}
|
|
|
|
/**
|
|
* Post createMany
|
|
*/
|
|
export type PostCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* The data used to create many Posts.
|
|
*/
|
|
data: PostCreateManyInput | PostCreateManyInput[]
|
|
}
|
|
|
|
/**
|
|
* Post createManyAndReturn
|
|
*/
|
|
export type PostCreateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Post
|
|
*/
|
|
select?: PostSelectCreateManyAndReturn<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the Post
|
|
*/
|
|
omit?: PostOmit<ExtArgs> | null
|
|
/**
|
|
* The data used to create many Posts.
|
|
*/
|
|
data: PostCreateManyInput | PostCreateManyInput[]
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: PostIncludeCreateManyAndReturn<ExtArgs> | null
|
|
}
|
|
|
|
/**
|
|
* Post update
|
|
*/
|
|
export type PostUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Post
|
|
*/
|
|
select?: PostSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the Post
|
|
*/
|
|
omit?: PostOmit<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: PostInclude<ExtArgs> | null
|
|
/**
|
|
* The data needed to update a Post.
|
|
*/
|
|
data: XOR<PostUpdateInput, PostUncheckedUpdateInput>
|
|
/**
|
|
* Choose, which Post to update.
|
|
*/
|
|
where: PostWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* Post updateMany
|
|
*/
|
|
export type PostUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* The data used to update Posts.
|
|
*/
|
|
data: XOR<PostUpdateManyMutationInput, PostUncheckedUpdateManyInput>
|
|
/**
|
|
* Filter which Posts to update
|
|
*/
|
|
where?: PostWhereInput
|
|
/**
|
|
* Limit how many Posts to update.
|
|
*/
|
|
limit?: number
|
|
}
|
|
|
|
/**
|
|
* Post updateManyAndReturn
|
|
*/
|
|
export type PostUpdateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Post
|
|
*/
|
|
select?: PostSelectUpdateManyAndReturn<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the Post
|
|
*/
|
|
omit?: PostOmit<ExtArgs> | null
|
|
/**
|
|
* The data used to update Posts.
|
|
*/
|
|
data: XOR<PostUpdateManyMutationInput, PostUncheckedUpdateManyInput>
|
|
/**
|
|
* Filter which Posts to update
|
|
*/
|
|
where?: PostWhereInput
|
|
/**
|
|
* Limit how many Posts to update.
|
|
*/
|
|
limit?: number
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: PostIncludeUpdateManyAndReturn<ExtArgs> | null
|
|
}
|
|
|
|
/**
|
|
* Post upsert
|
|
*/
|
|
export type PostUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Post
|
|
*/
|
|
select?: PostSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the Post
|
|
*/
|
|
omit?: PostOmit<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: PostInclude<ExtArgs> | null
|
|
/**
|
|
* The filter to search for the Post to update in case it exists.
|
|
*/
|
|
where: PostWhereUniqueInput
|
|
/**
|
|
* In case the Post found by the `where` argument doesn't exist, create a new Post with this data.
|
|
*/
|
|
create: XOR<PostCreateInput, PostUncheckedCreateInput>
|
|
/**
|
|
* In case the Post was found with the provided `where` argument, update it with this data.
|
|
*/
|
|
update: XOR<PostUpdateInput, PostUncheckedUpdateInput>
|
|
}
|
|
|
|
/**
|
|
* Post delete
|
|
*/
|
|
export type PostDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Post
|
|
*/
|
|
select?: PostSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the Post
|
|
*/
|
|
omit?: PostOmit<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: PostInclude<ExtArgs> | null
|
|
/**
|
|
* Filter which Post to delete.
|
|
*/
|
|
where: PostWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* Post deleteMany
|
|
*/
|
|
export type PostDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Filter which Posts to delete
|
|
*/
|
|
where?: PostWhereInput
|
|
/**
|
|
* Limit how many Posts to delete.
|
|
*/
|
|
limit?: number
|
|
}
|
|
|
|
/**
|
|
* Post without action
|
|
*/
|
|
export type PostDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Post
|
|
*/
|
|
select?: PostSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the Post
|
|
*/
|
|
omit?: PostOmit<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: PostInclude<ExtArgs> | null
|
|
}
|
|
|
|
|
|
/**
|
|
* Enums
|
|
*/
|
|
|
|
export const TransactionIsolationLevel: {
|
|
Serializable: 'Serializable'
|
|
};
|
|
|
|
export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel]
|
|
|
|
|
|
export const UserScalarFieldEnum: {
|
|
id: 'id',
|
|
userId: 'userId',
|
|
email: 'email',
|
|
name: 'name',
|
|
role: 'role',
|
|
username: 'username',
|
|
avatar: 'avatar',
|
|
password: 'password',
|
|
birthdate: 'birthdate',
|
|
registeredAt: 'registeredAt',
|
|
createdAt: 'createdAt',
|
|
updatedAt: 'updatedAt'
|
|
};
|
|
|
|
export type UserScalarFieldEnum = (typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum]
|
|
|
|
|
|
export const ProfileScalarFieldEnum: {
|
|
id: 'id',
|
|
bio: 'bio',
|
|
avatar: 'avatar',
|
|
userId: 'userId'
|
|
};
|
|
|
|
export type ProfileScalarFieldEnum = (typeof ProfileScalarFieldEnum)[keyof typeof ProfileScalarFieldEnum]
|
|
|
|
|
|
export const PostScalarFieldEnum: {
|
|
id: 'id',
|
|
title: 'title',
|
|
content: 'content',
|
|
published: 'published',
|
|
authorId: 'authorId',
|
|
createdAt: 'createdAt',
|
|
updatedAt: 'updatedAt'
|
|
};
|
|
|
|
export type PostScalarFieldEnum = (typeof PostScalarFieldEnum)[keyof typeof PostScalarFieldEnum]
|
|
|
|
|
|
export const SortOrder: {
|
|
asc: 'asc',
|
|
desc: 'desc'
|
|
};
|
|
|
|
export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder]
|
|
|
|
|
|
export const NullsOrder: {
|
|
first: 'first',
|
|
last: 'last'
|
|
};
|
|
|
|
export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder]
|
|
|
|
|
|
/**
|
|
* Field references
|
|
*/
|
|
|
|
|
|
/**
|
|
* Reference to a field of type 'Int'
|
|
*/
|
|
export type IntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int'>
|
|
|
|
|
|
|
|
/**
|
|
* Reference to a field of type 'String'
|
|
*/
|
|
export type StringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String'>
|
|
|
|
|
|
|
|
/**
|
|
* Reference to a field of type 'Role'
|
|
*/
|
|
export type EnumRoleFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Role'>
|
|
|
|
|
|
|
|
/**
|
|
* Reference to a field of type 'DateTime'
|
|
*/
|
|
export type DateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime'>
|
|
|
|
|
|
|
|
/**
|
|
* 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'>
|
|
|
|
/**
|
|
* Deep Input Types
|
|
*/
|
|
|
|
|
|
export type UserWhereInput = {
|
|
AND?: UserWhereInput | UserWhereInput[]
|
|
OR?: UserWhereInput[]
|
|
NOT?: UserWhereInput | UserWhereInput[]
|
|
id?: IntFilter<"User"> | number
|
|
userId?: StringFilter<"User"> | string
|
|
email?: StringFilter<"User"> | string
|
|
name?: StringNullableFilter<"User"> | string | null
|
|
role?: EnumRoleFilter<"User"> | $Enums.Role
|
|
username?: StringFilter<"User"> | string
|
|
avatar?: StringNullableFilter<"User"> | string | null
|
|
password?: StringFilter<"User"> | string
|
|
birthdate?: DateTimeNullableFilter<"User"> | Date | string | null
|
|
registeredAt?: DateTimeNullableFilter<"User"> | Date | string | null
|
|
createdAt?: DateTimeFilter<"User"> | Date | string
|
|
updatedAt?: DateTimeFilter<"User"> | Date | string
|
|
posts?: PostListRelationFilter
|
|
profile?: XOR<ProfileNullableScalarRelationFilter, ProfileWhereInput> | null
|
|
}
|
|
|
|
export type UserOrderByWithRelationInput = {
|
|
id?: SortOrder
|
|
userId?: SortOrder
|
|
email?: SortOrder
|
|
name?: SortOrderInput | SortOrder
|
|
role?: SortOrder
|
|
username?: SortOrder
|
|
avatar?: SortOrderInput | SortOrder
|
|
password?: SortOrder
|
|
birthdate?: SortOrderInput | SortOrder
|
|
registeredAt?: SortOrderInput | SortOrder
|
|
createdAt?: SortOrder
|
|
updatedAt?: SortOrder
|
|
posts?: PostOrderByRelationAggregateInput
|
|
profile?: ProfileOrderByWithRelationInput
|
|
}
|
|
|
|
export type UserWhereUniqueInput = Prisma.AtLeast<{
|
|
id?: number
|
|
userId?: string
|
|
email?: string
|
|
username?: string
|
|
AND?: UserWhereInput | UserWhereInput[]
|
|
OR?: UserWhereInput[]
|
|
NOT?: UserWhereInput | UserWhereInput[]
|
|
name?: StringNullableFilter<"User"> | string | null
|
|
role?: EnumRoleFilter<"User"> | $Enums.Role
|
|
avatar?: StringNullableFilter<"User"> | string | null
|
|
password?: StringFilter<"User"> | string
|
|
birthdate?: DateTimeNullableFilter<"User"> | Date | string | null
|
|
registeredAt?: DateTimeNullableFilter<"User"> | Date | string | null
|
|
createdAt?: DateTimeFilter<"User"> | Date | string
|
|
updatedAt?: DateTimeFilter<"User"> | Date | string
|
|
posts?: PostListRelationFilter
|
|
profile?: XOR<ProfileNullableScalarRelationFilter, ProfileWhereInput> | null
|
|
}, "id" | "userId" | "email" | "username">
|
|
|
|
export type UserOrderByWithAggregationInput = {
|
|
id?: SortOrder
|
|
userId?: SortOrder
|
|
email?: SortOrder
|
|
name?: SortOrderInput | SortOrder
|
|
role?: SortOrder
|
|
username?: SortOrder
|
|
avatar?: SortOrderInput | SortOrder
|
|
password?: SortOrder
|
|
birthdate?: SortOrderInput | SortOrder
|
|
registeredAt?: SortOrderInput | SortOrder
|
|
createdAt?: SortOrder
|
|
updatedAt?: SortOrder
|
|
_count?: UserCountOrderByAggregateInput
|
|
_avg?: UserAvgOrderByAggregateInput
|
|
_max?: UserMaxOrderByAggregateInput
|
|
_min?: UserMinOrderByAggregateInput
|
|
_sum?: UserSumOrderByAggregateInput
|
|
}
|
|
|
|
export type UserScalarWhereWithAggregatesInput = {
|
|
AND?: UserScalarWhereWithAggregatesInput | UserScalarWhereWithAggregatesInput[]
|
|
OR?: UserScalarWhereWithAggregatesInput[]
|
|
NOT?: UserScalarWhereWithAggregatesInput | UserScalarWhereWithAggregatesInput[]
|
|
id?: IntWithAggregatesFilter<"User"> | number
|
|
userId?: StringWithAggregatesFilter<"User"> | string
|
|
email?: StringWithAggregatesFilter<"User"> | string
|
|
name?: StringNullableWithAggregatesFilter<"User"> | string | null
|
|
role?: EnumRoleWithAggregatesFilter<"User"> | $Enums.Role
|
|
username?: StringWithAggregatesFilter<"User"> | string
|
|
avatar?: StringNullableWithAggregatesFilter<"User"> | string | null
|
|
password?: StringWithAggregatesFilter<"User"> | string
|
|
birthdate?: DateTimeNullableWithAggregatesFilter<"User"> | Date | string | null
|
|
registeredAt?: DateTimeNullableWithAggregatesFilter<"User"> | Date | string | null
|
|
createdAt?: DateTimeWithAggregatesFilter<"User"> | Date | string
|
|
updatedAt?: DateTimeWithAggregatesFilter<"User"> | Date | string
|
|
}
|
|
|
|
export type ProfileWhereInput = {
|
|
AND?: ProfileWhereInput | ProfileWhereInput[]
|
|
OR?: ProfileWhereInput[]
|
|
NOT?: ProfileWhereInput | ProfileWhereInput[]
|
|
id?: IntFilter<"Profile"> | number
|
|
bio?: StringFilter<"Profile"> | string
|
|
avatar?: StringNullableFilter<"Profile"> | string | null
|
|
userId?: StringFilter<"Profile"> | string
|
|
user?: XOR<UserScalarRelationFilter, UserWhereInput>
|
|
}
|
|
|
|
export type ProfileOrderByWithRelationInput = {
|
|
id?: SortOrder
|
|
bio?: SortOrder
|
|
avatar?: SortOrderInput | SortOrder
|
|
userId?: SortOrder
|
|
user?: UserOrderByWithRelationInput
|
|
}
|
|
|
|
export type ProfileWhereUniqueInput = Prisma.AtLeast<{
|
|
id?: number
|
|
userId?: string
|
|
AND?: ProfileWhereInput | ProfileWhereInput[]
|
|
OR?: ProfileWhereInput[]
|
|
NOT?: ProfileWhereInput | ProfileWhereInput[]
|
|
bio?: StringFilter<"Profile"> | string
|
|
avatar?: StringNullableFilter<"Profile"> | string | null
|
|
user?: XOR<UserScalarRelationFilter, UserWhereInput>
|
|
}, "id" | "userId">
|
|
|
|
export type ProfileOrderByWithAggregationInput = {
|
|
id?: SortOrder
|
|
bio?: SortOrder
|
|
avatar?: SortOrderInput | SortOrder
|
|
userId?: SortOrder
|
|
_count?: ProfileCountOrderByAggregateInput
|
|
_avg?: ProfileAvgOrderByAggregateInput
|
|
_max?: ProfileMaxOrderByAggregateInput
|
|
_min?: ProfileMinOrderByAggregateInput
|
|
_sum?: ProfileSumOrderByAggregateInput
|
|
}
|
|
|
|
export type ProfileScalarWhereWithAggregatesInput = {
|
|
AND?: ProfileScalarWhereWithAggregatesInput | ProfileScalarWhereWithAggregatesInput[]
|
|
OR?: ProfileScalarWhereWithAggregatesInput[]
|
|
NOT?: ProfileScalarWhereWithAggregatesInput | ProfileScalarWhereWithAggregatesInput[]
|
|
id?: IntWithAggregatesFilter<"Profile"> | number
|
|
bio?: StringWithAggregatesFilter<"Profile"> | string
|
|
avatar?: StringNullableWithAggregatesFilter<"Profile"> | string | null
|
|
userId?: StringWithAggregatesFilter<"Profile"> | string
|
|
}
|
|
|
|
export type PostWhereInput = {
|
|
AND?: PostWhereInput | PostWhereInput[]
|
|
OR?: PostWhereInput[]
|
|
NOT?: PostWhereInput | PostWhereInput[]
|
|
id?: IntFilter<"Post"> | number
|
|
title?: StringFilter<"Post"> | string
|
|
content?: StringNullableFilter<"Post"> | string | null
|
|
published?: BoolFilter<"Post"> | boolean
|
|
authorId?: IntFilter<"Post"> | number
|
|
createdAt?: DateTimeFilter<"Post"> | Date | string
|
|
updatedAt?: DateTimeFilter<"Post"> | Date | string
|
|
author?: XOR<UserScalarRelationFilter, UserWhereInput>
|
|
}
|
|
|
|
export type PostOrderByWithRelationInput = {
|
|
id?: SortOrder
|
|
title?: SortOrder
|
|
content?: SortOrderInput | SortOrder
|
|
published?: SortOrder
|
|
authorId?: SortOrder
|
|
createdAt?: SortOrder
|
|
updatedAt?: SortOrder
|
|
author?: UserOrderByWithRelationInput
|
|
}
|
|
|
|
export type PostWhereUniqueInput = Prisma.AtLeast<{
|
|
id?: number
|
|
AND?: PostWhereInput | PostWhereInput[]
|
|
OR?: PostWhereInput[]
|
|
NOT?: PostWhereInput | PostWhereInput[]
|
|
title?: StringFilter<"Post"> | string
|
|
content?: StringNullableFilter<"Post"> | string | null
|
|
published?: BoolFilter<"Post"> | boolean
|
|
authorId?: IntFilter<"Post"> | number
|
|
createdAt?: DateTimeFilter<"Post"> | Date | string
|
|
updatedAt?: DateTimeFilter<"Post"> | Date | string
|
|
author?: XOR<UserScalarRelationFilter, UserWhereInput>
|
|
}, "id">
|
|
|
|
export type PostOrderByWithAggregationInput = {
|
|
id?: SortOrder
|
|
title?: SortOrder
|
|
content?: SortOrderInput | SortOrder
|
|
published?: SortOrder
|
|
authorId?: SortOrder
|
|
createdAt?: SortOrder
|
|
updatedAt?: SortOrder
|
|
_count?: PostCountOrderByAggregateInput
|
|
_avg?: PostAvgOrderByAggregateInput
|
|
_max?: PostMaxOrderByAggregateInput
|
|
_min?: PostMinOrderByAggregateInput
|
|
_sum?: PostSumOrderByAggregateInput
|
|
}
|
|
|
|
export type PostScalarWhereWithAggregatesInput = {
|
|
AND?: PostScalarWhereWithAggregatesInput | PostScalarWhereWithAggregatesInput[]
|
|
OR?: PostScalarWhereWithAggregatesInput[]
|
|
NOT?: PostScalarWhereWithAggregatesInput | PostScalarWhereWithAggregatesInput[]
|
|
id?: IntWithAggregatesFilter<"Post"> | number
|
|
title?: StringWithAggregatesFilter<"Post"> | string
|
|
content?: StringNullableWithAggregatesFilter<"Post"> | string | null
|
|
published?: BoolWithAggregatesFilter<"Post"> | boolean
|
|
authorId?: IntWithAggregatesFilter<"Post"> | number
|
|
createdAt?: DateTimeWithAggregatesFilter<"Post"> | Date | string
|
|
updatedAt?: DateTimeWithAggregatesFilter<"Post"> | Date | string
|
|
}
|
|
|
|
export type UserCreateInput = {
|
|
userId: string
|
|
email: string
|
|
name?: string | null
|
|
role?: $Enums.Role
|
|
username: string
|
|
avatar?: string | null
|
|
password: string
|
|
birthdate?: Date | string | null
|
|
registeredAt?: Date | string | null
|
|
createdAt?: Date | string
|
|
updatedAt?: Date | string
|
|
posts?: PostCreateNestedManyWithoutAuthorInput
|
|
profile?: ProfileCreateNestedOneWithoutUserInput
|
|
}
|
|
|
|
export type UserUncheckedCreateInput = {
|
|
id?: number
|
|
userId: string
|
|
email: string
|
|
name?: string | null
|
|
role?: $Enums.Role
|
|
username: string
|
|
avatar?: string | null
|
|
password: string
|
|
birthdate?: Date | string | null
|
|
registeredAt?: Date | string | null
|
|
createdAt?: Date | string
|
|
updatedAt?: Date | string
|
|
posts?: PostUncheckedCreateNestedManyWithoutAuthorInput
|
|
profile?: ProfileUncheckedCreateNestedOneWithoutUserInput
|
|
}
|
|
|
|
export type UserUpdateInput = {
|
|
userId?: StringFieldUpdateOperationsInput | string
|
|
email?: StringFieldUpdateOperationsInput | string
|
|
name?: NullableStringFieldUpdateOperationsInput | string | null
|
|
role?: EnumRoleFieldUpdateOperationsInput | $Enums.Role
|
|
username?: StringFieldUpdateOperationsInput | string
|
|
avatar?: NullableStringFieldUpdateOperationsInput | string | null
|
|
password?: StringFieldUpdateOperationsInput | string
|
|
birthdate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
registeredAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
posts?: PostUpdateManyWithoutAuthorNestedInput
|
|
profile?: ProfileUpdateOneWithoutUserNestedInput
|
|
}
|
|
|
|
export type UserUncheckedUpdateInput = {
|
|
id?: IntFieldUpdateOperationsInput | number
|
|
userId?: StringFieldUpdateOperationsInput | string
|
|
email?: StringFieldUpdateOperationsInput | string
|
|
name?: NullableStringFieldUpdateOperationsInput | string | null
|
|
role?: EnumRoleFieldUpdateOperationsInput | $Enums.Role
|
|
username?: StringFieldUpdateOperationsInput | string
|
|
avatar?: NullableStringFieldUpdateOperationsInput | string | null
|
|
password?: StringFieldUpdateOperationsInput | string
|
|
birthdate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
registeredAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
posts?: PostUncheckedUpdateManyWithoutAuthorNestedInput
|
|
profile?: ProfileUncheckedUpdateOneWithoutUserNestedInput
|
|
}
|
|
|
|
export type UserCreateManyInput = {
|
|
id?: number
|
|
userId: string
|
|
email: string
|
|
name?: string | null
|
|
role?: $Enums.Role
|
|
username: string
|
|
avatar?: string | null
|
|
password: string
|
|
birthdate?: Date | string | null
|
|
registeredAt?: Date | string | null
|
|
createdAt?: Date | string
|
|
updatedAt?: Date | string
|
|
}
|
|
|
|
export type UserUpdateManyMutationInput = {
|
|
userId?: StringFieldUpdateOperationsInput | string
|
|
email?: StringFieldUpdateOperationsInput | string
|
|
name?: NullableStringFieldUpdateOperationsInput | string | null
|
|
role?: EnumRoleFieldUpdateOperationsInput | $Enums.Role
|
|
username?: StringFieldUpdateOperationsInput | string
|
|
avatar?: NullableStringFieldUpdateOperationsInput | string | null
|
|
password?: StringFieldUpdateOperationsInput | string
|
|
birthdate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
registeredAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
}
|
|
|
|
export type UserUncheckedUpdateManyInput = {
|
|
id?: IntFieldUpdateOperationsInput | number
|
|
userId?: StringFieldUpdateOperationsInput | string
|
|
email?: StringFieldUpdateOperationsInput | string
|
|
name?: NullableStringFieldUpdateOperationsInput | string | null
|
|
role?: EnumRoleFieldUpdateOperationsInput | $Enums.Role
|
|
username?: StringFieldUpdateOperationsInput | string
|
|
avatar?: NullableStringFieldUpdateOperationsInput | string | null
|
|
password?: StringFieldUpdateOperationsInput | string
|
|
birthdate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
registeredAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
}
|
|
|
|
export type ProfileCreateInput = {
|
|
bio: string
|
|
avatar?: string | null
|
|
user: UserCreateNestedOneWithoutProfileInput
|
|
}
|
|
|
|
export type ProfileUncheckedCreateInput = {
|
|
id?: number
|
|
bio: string
|
|
avatar?: string | null
|
|
userId: string
|
|
}
|
|
|
|
export type ProfileUpdateInput = {
|
|
bio?: StringFieldUpdateOperationsInput | string
|
|
avatar?: NullableStringFieldUpdateOperationsInput | string | null
|
|
user?: UserUpdateOneRequiredWithoutProfileNestedInput
|
|
}
|
|
|
|
export type ProfileUncheckedUpdateInput = {
|
|
id?: IntFieldUpdateOperationsInput | number
|
|
bio?: StringFieldUpdateOperationsInput | string
|
|
avatar?: NullableStringFieldUpdateOperationsInput | string | null
|
|
userId?: StringFieldUpdateOperationsInput | string
|
|
}
|
|
|
|
export type ProfileCreateManyInput = {
|
|
id?: number
|
|
bio: string
|
|
avatar?: string | null
|
|
userId: string
|
|
}
|
|
|
|
export type ProfileUpdateManyMutationInput = {
|
|
bio?: StringFieldUpdateOperationsInput | string
|
|
avatar?: NullableStringFieldUpdateOperationsInput | string | null
|
|
}
|
|
|
|
export type ProfileUncheckedUpdateManyInput = {
|
|
id?: IntFieldUpdateOperationsInput | number
|
|
bio?: StringFieldUpdateOperationsInput | string
|
|
avatar?: NullableStringFieldUpdateOperationsInput | string | null
|
|
userId?: StringFieldUpdateOperationsInput | string
|
|
}
|
|
|
|
export type PostCreateInput = {
|
|
title: string
|
|
content?: string | null
|
|
published?: boolean
|
|
createdAt?: Date | string
|
|
updatedAt?: Date | string
|
|
author: UserCreateNestedOneWithoutPostsInput
|
|
}
|
|
|
|
export type PostUncheckedCreateInput = {
|
|
id?: number
|
|
title: string
|
|
content?: string | null
|
|
published?: boolean
|
|
authorId: number
|
|
createdAt?: Date | string
|
|
updatedAt?: Date | string
|
|
}
|
|
|
|
export type PostUpdateInput = {
|
|
title?: StringFieldUpdateOperationsInput | string
|
|
content?: NullableStringFieldUpdateOperationsInput | string | null
|
|
published?: BoolFieldUpdateOperationsInput | boolean
|
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
author?: UserUpdateOneRequiredWithoutPostsNestedInput
|
|
}
|
|
|
|
export type PostUncheckedUpdateInput = {
|
|
id?: IntFieldUpdateOperationsInput | number
|
|
title?: StringFieldUpdateOperationsInput | string
|
|
content?: NullableStringFieldUpdateOperationsInput | string | null
|
|
published?: BoolFieldUpdateOperationsInput | boolean
|
|
authorId?: IntFieldUpdateOperationsInput | number
|
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
}
|
|
|
|
export type PostCreateManyInput = {
|
|
id?: number
|
|
title: string
|
|
content?: string | null
|
|
published?: boolean
|
|
authorId: number
|
|
createdAt?: Date | string
|
|
updatedAt?: Date | string
|
|
}
|
|
|
|
export type PostUpdateManyMutationInput = {
|
|
title?: StringFieldUpdateOperationsInput | string
|
|
content?: NullableStringFieldUpdateOperationsInput | string | null
|
|
published?: BoolFieldUpdateOperationsInput | boolean
|
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
}
|
|
|
|
export type PostUncheckedUpdateManyInput = {
|
|
id?: IntFieldUpdateOperationsInput | number
|
|
title?: StringFieldUpdateOperationsInput | string
|
|
content?: NullableStringFieldUpdateOperationsInput | string | null
|
|
published?: BoolFieldUpdateOperationsInput | boolean
|
|
authorId?: IntFieldUpdateOperationsInput | number
|
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
}
|
|
|
|
export type IntFilter<$PrismaModel = never> = {
|
|
equals?: number | IntFieldRefInput<$PrismaModel>
|
|
in?: number[]
|
|
notIn?: number[]
|
|
lt?: number | IntFieldRefInput<$PrismaModel>
|
|
lte?: number | IntFieldRefInput<$PrismaModel>
|
|
gt?: number | IntFieldRefInput<$PrismaModel>
|
|
gte?: number | IntFieldRefInput<$PrismaModel>
|
|
not?: NestedIntFilter<$PrismaModel> | number
|
|
}
|
|
|
|
export type StringFilter<$PrismaModel = never> = {
|
|
equals?: string | StringFieldRefInput<$PrismaModel>
|
|
in?: string[]
|
|
notIn?: string[]
|
|
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 StringNullableFilter<$PrismaModel = never> = {
|
|
equals?: string | StringFieldRefInput<$PrismaModel> | null
|
|
in?: string[] | null
|
|
notIn?: string[] | 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 EnumRoleFilter<$PrismaModel = never> = {
|
|
equals?: $Enums.Role | EnumRoleFieldRefInput<$PrismaModel>
|
|
in?: $Enums.Role[]
|
|
notIn?: $Enums.Role[]
|
|
not?: NestedEnumRoleFilter<$PrismaModel> | $Enums.Role
|
|
}
|
|
|
|
export type DateTimeNullableFilter<$PrismaModel = never> = {
|
|
equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null
|
|
in?: Date[] | string[] | null
|
|
notIn?: Date[] | string[] | 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 DateTimeFilter<$PrismaModel = never> = {
|
|
equals?: Date | string | DateTimeFieldRefInput<$PrismaModel>
|
|
in?: Date[] | string[]
|
|
notIn?: Date[] | string[]
|
|
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 PostListRelationFilter = {
|
|
every?: PostWhereInput
|
|
some?: PostWhereInput
|
|
none?: PostWhereInput
|
|
}
|
|
|
|
export type ProfileNullableScalarRelationFilter = {
|
|
is?: ProfileWhereInput | null
|
|
isNot?: ProfileWhereInput | null
|
|
}
|
|
|
|
export type SortOrderInput = {
|
|
sort: SortOrder
|
|
nulls?: NullsOrder
|
|
}
|
|
|
|
export type PostOrderByRelationAggregateInput = {
|
|
_count?: SortOrder
|
|
}
|
|
|
|
export type UserCountOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
userId?: SortOrder
|
|
email?: SortOrder
|
|
name?: SortOrder
|
|
role?: SortOrder
|
|
username?: SortOrder
|
|
avatar?: SortOrder
|
|
password?: SortOrder
|
|
birthdate?: SortOrder
|
|
registeredAt?: SortOrder
|
|
createdAt?: SortOrder
|
|
updatedAt?: SortOrder
|
|
}
|
|
|
|
export type UserAvgOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
}
|
|
|
|
export type UserMaxOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
userId?: SortOrder
|
|
email?: SortOrder
|
|
name?: SortOrder
|
|
role?: SortOrder
|
|
username?: SortOrder
|
|
avatar?: SortOrder
|
|
password?: SortOrder
|
|
birthdate?: SortOrder
|
|
registeredAt?: SortOrder
|
|
createdAt?: SortOrder
|
|
updatedAt?: SortOrder
|
|
}
|
|
|
|
export type UserMinOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
userId?: SortOrder
|
|
email?: SortOrder
|
|
name?: SortOrder
|
|
role?: SortOrder
|
|
username?: SortOrder
|
|
avatar?: SortOrder
|
|
password?: SortOrder
|
|
birthdate?: SortOrder
|
|
registeredAt?: SortOrder
|
|
createdAt?: SortOrder
|
|
updatedAt?: SortOrder
|
|
}
|
|
|
|
export type UserSumOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
}
|
|
|
|
export type IntWithAggregatesFilter<$PrismaModel = never> = {
|
|
equals?: number | IntFieldRefInput<$PrismaModel>
|
|
in?: number[]
|
|
notIn?: number[]
|
|
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 StringWithAggregatesFilter<$PrismaModel = never> = {
|
|
equals?: string | StringFieldRefInput<$PrismaModel>
|
|
in?: string[]
|
|
notIn?: string[]
|
|
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 StringNullableWithAggregatesFilter<$PrismaModel = never> = {
|
|
equals?: string | StringFieldRefInput<$PrismaModel> | null
|
|
in?: string[] | null
|
|
notIn?: string[] | 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 EnumRoleWithAggregatesFilter<$PrismaModel = never> = {
|
|
equals?: $Enums.Role | EnumRoleFieldRefInput<$PrismaModel>
|
|
in?: $Enums.Role[]
|
|
notIn?: $Enums.Role[]
|
|
not?: NestedEnumRoleWithAggregatesFilter<$PrismaModel> | $Enums.Role
|
|
_count?: NestedIntFilter<$PrismaModel>
|
|
_min?: NestedEnumRoleFilter<$PrismaModel>
|
|
_max?: NestedEnumRoleFilter<$PrismaModel>
|
|
}
|
|
|
|
export type DateTimeNullableWithAggregatesFilter<$PrismaModel = never> = {
|
|
equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null
|
|
in?: Date[] | string[] | null
|
|
notIn?: Date[] | string[] | 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 DateTimeWithAggregatesFilter<$PrismaModel = never> = {
|
|
equals?: Date | string | DateTimeFieldRefInput<$PrismaModel>
|
|
in?: Date[] | string[]
|
|
notIn?: Date[] | string[]
|
|
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 UserScalarRelationFilter = {
|
|
is?: UserWhereInput
|
|
isNot?: UserWhereInput
|
|
}
|
|
|
|
export type ProfileCountOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
bio?: SortOrder
|
|
avatar?: SortOrder
|
|
userId?: SortOrder
|
|
}
|
|
|
|
export type ProfileAvgOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
}
|
|
|
|
export type ProfileMaxOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
bio?: SortOrder
|
|
avatar?: SortOrder
|
|
userId?: SortOrder
|
|
}
|
|
|
|
export type ProfileMinOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
bio?: SortOrder
|
|
avatar?: SortOrder
|
|
userId?: SortOrder
|
|
}
|
|
|
|
export type ProfileSumOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
}
|
|
|
|
export type BoolFilter<$PrismaModel = never> = {
|
|
equals?: boolean | BooleanFieldRefInput<$PrismaModel>
|
|
not?: NestedBoolFilter<$PrismaModel> | boolean
|
|
}
|
|
|
|
export type PostCountOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
title?: SortOrder
|
|
content?: SortOrder
|
|
published?: SortOrder
|
|
authorId?: SortOrder
|
|
createdAt?: SortOrder
|
|
updatedAt?: SortOrder
|
|
}
|
|
|
|
export type PostAvgOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
authorId?: SortOrder
|
|
}
|
|
|
|
export type PostMaxOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
title?: SortOrder
|
|
content?: SortOrder
|
|
published?: SortOrder
|
|
authorId?: SortOrder
|
|
createdAt?: SortOrder
|
|
updatedAt?: SortOrder
|
|
}
|
|
|
|
export type PostMinOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
title?: SortOrder
|
|
content?: SortOrder
|
|
published?: SortOrder
|
|
authorId?: SortOrder
|
|
createdAt?: SortOrder
|
|
updatedAt?: SortOrder
|
|
}
|
|
|
|
export type PostSumOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
authorId?: 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 PostCreateNestedManyWithoutAuthorInput = {
|
|
create?: XOR<PostCreateWithoutAuthorInput, PostUncheckedCreateWithoutAuthorInput> | PostCreateWithoutAuthorInput[] | PostUncheckedCreateWithoutAuthorInput[]
|
|
connectOrCreate?: PostCreateOrConnectWithoutAuthorInput | PostCreateOrConnectWithoutAuthorInput[]
|
|
createMany?: PostCreateManyAuthorInputEnvelope
|
|
connect?: PostWhereUniqueInput | PostWhereUniqueInput[]
|
|
}
|
|
|
|
export type ProfileCreateNestedOneWithoutUserInput = {
|
|
create?: XOR<ProfileCreateWithoutUserInput, ProfileUncheckedCreateWithoutUserInput>
|
|
connectOrCreate?: ProfileCreateOrConnectWithoutUserInput
|
|
connect?: ProfileWhereUniqueInput
|
|
}
|
|
|
|
export type PostUncheckedCreateNestedManyWithoutAuthorInput = {
|
|
create?: XOR<PostCreateWithoutAuthorInput, PostUncheckedCreateWithoutAuthorInput> | PostCreateWithoutAuthorInput[] | PostUncheckedCreateWithoutAuthorInput[]
|
|
connectOrCreate?: PostCreateOrConnectWithoutAuthorInput | PostCreateOrConnectWithoutAuthorInput[]
|
|
createMany?: PostCreateManyAuthorInputEnvelope
|
|
connect?: PostWhereUniqueInput | PostWhereUniqueInput[]
|
|
}
|
|
|
|
export type ProfileUncheckedCreateNestedOneWithoutUserInput = {
|
|
create?: XOR<ProfileCreateWithoutUserInput, ProfileUncheckedCreateWithoutUserInput>
|
|
connectOrCreate?: ProfileCreateOrConnectWithoutUserInput
|
|
connect?: ProfileWhereUniqueInput
|
|
}
|
|
|
|
export type StringFieldUpdateOperationsInput = {
|
|
set?: string
|
|
}
|
|
|
|
export type NullableStringFieldUpdateOperationsInput = {
|
|
set?: string | null
|
|
}
|
|
|
|
export type EnumRoleFieldUpdateOperationsInput = {
|
|
set?: $Enums.Role
|
|
}
|
|
|
|
export type NullableDateTimeFieldUpdateOperationsInput = {
|
|
set?: Date | string | null
|
|
}
|
|
|
|
export type DateTimeFieldUpdateOperationsInput = {
|
|
set?: Date | string
|
|
}
|
|
|
|
export type PostUpdateManyWithoutAuthorNestedInput = {
|
|
create?: XOR<PostCreateWithoutAuthorInput, PostUncheckedCreateWithoutAuthorInput> | PostCreateWithoutAuthorInput[] | PostUncheckedCreateWithoutAuthorInput[]
|
|
connectOrCreate?: PostCreateOrConnectWithoutAuthorInput | PostCreateOrConnectWithoutAuthorInput[]
|
|
upsert?: PostUpsertWithWhereUniqueWithoutAuthorInput | PostUpsertWithWhereUniqueWithoutAuthorInput[]
|
|
createMany?: PostCreateManyAuthorInputEnvelope
|
|
set?: PostWhereUniqueInput | PostWhereUniqueInput[]
|
|
disconnect?: PostWhereUniqueInput | PostWhereUniqueInput[]
|
|
delete?: PostWhereUniqueInput | PostWhereUniqueInput[]
|
|
connect?: PostWhereUniqueInput | PostWhereUniqueInput[]
|
|
update?: PostUpdateWithWhereUniqueWithoutAuthorInput | PostUpdateWithWhereUniqueWithoutAuthorInput[]
|
|
updateMany?: PostUpdateManyWithWhereWithoutAuthorInput | PostUpdateManyWithWhereWithoutAuthorInput[]
|
|
deleteMany?: PostScalarWhereInput | PostScalarWhereInput[]
|
|
}
|
|
|
|
export type ProfileUpdateOneWithoutUserNestedInput = {
|
|
create?: XOR<ProfileCreateWithoutUserInput, ProfileUncheckedCreateWithoutUserInput>
|
|
connectOrCreate?: ProfileCreateOrConnectWithoutUserInput
|
|
upsert?: ProfileUpsertWithoutUserInput
|
|
disconnect?: ProfileWhereInput | boolean
|
|
delete?: ProfileWhereInput | boolean
|
|
connect?: ProfileWhereUniqueInput
|
|
update?: XOR<XOR<ProfileUpdateToOneWithWhereWithoutUserInput, ProfileUpdateWithoutUserInput>, ProfileUncheckedUpdateWithoutUserInput>
|
|
}
|
|
|
|
export type IntFieldUpdateOperationsInput = {
|
|
set?: number
|
|
increment?: number
|
|
decrement?: number
|
|
multiply?: number
|
|
divide?: number
|
|
}
|
|
|
|
export type PostUncheckedUpdateManyWithoutAuthorNestedInput = {
|
|
create?: XOR<PostCreateWithoutAuthorInput, PostUncheckedCreateWithoutAuthorInput> | PostCreateWithoutAuthorInput[] | PostUncheckedCreateWithoutAuthorInput[]
|
|
connectOrCreate?: PostCreateOrConnectWithoutAuthorInput | PostCreateOrConnectWithoutAuthorInput[]
|
|
upsert?: PostUpsertWithWhereUniqueWithoutAuthorInput | PostUpsertWithWhereUniqueWithoutAuthorInput[]
|
|
createMany?: PostCreateManyAuthorInputEnvelope
|
|
set?: PostWhereUniqueInput | PostWhereUniqueInput[]
|
|
disconnect?: PostWhereUniqueInput | PostWhereUniqueInput[]
|
|
delete?: PostWhereUniqueInput | PostWhereUniqueInput[]
|
|
connect?: PostWhereUniqueInput | PostWhereUniqueInput[]
|
|
update?: PostUpdateWithWhereUniqueWithoutAuthorInput | PostUpdateWithWhereUniqueWithoutAuthorInput[]
|
|
updateMany?: PostUpdateManyWithWhereWithoutAuthorInput | PostUpdateManyWithWhereWithoutAuthorInput[]
|
|
deleteMany?: PostScalarWhereInput | PostScalarWhereInput[]
|
|
}
|
|
|
|
export type ProfileUncheckedUpdateOneWithoutUserNestedInput = {
|
|
create?: XOR<ProfileCreateWithoutUserInput, ProfileUncheckedCreateWithoutUserInput>
|
|
connectOrCreate?: ProfileCreateOrConnectWithoutUserInput
|
|
upsert?: ProfileUpsertWithoutUserInput
|
|
disconnect?: ProfileWhereInput | boolean
|
|
delete?: ProfileWhereInput | boolean
|
|
connect?: ProfileWhereUniqueInput
|
|
update?: XOR<XOR<ProfileUpdateToOneWithWhereWithoutUserInput, ProfileUpdateWithoutUserInput>, ProfileUncheckedUpdateWithoutUserInput>
|
|
}
|
|
|
|
export type UserCreateNestedOneWithoutProfileInput = {
|
|
create?: XOR<UserCreateWithoutProfileInput, UserUncheckedCreateWithoutProfileInput>
|
|
connectOrCreate?: UserCreateOrConnectWithoutProfileInput
|
|
connect?: UserWhereUniqueInput
|
|
}
|
|
|
|
export type UserUpdateOneRequiredWithoutProfileNestedInput = {
|
|
create?: XOR<UserCreateWithoutProfileInput, UserUncheckedCreateWithoutProfileInput>
|
|
connectOrCreate?: UserCreateOrConnectWithoutProfileInput
|
|
upsert?: UserUpsertWithoutProfileInput
|
|
connect?: UserWhereUniqueInput
|
|
update?: XOR<XOR<UserUpdateToOneWithWhereWithoutProfileInput, UserUpdateWithoutProfileInput>, UserUncheckedUpdateWithoutProfileInput>
|
|
}
|
|
|
|
export type UserCreateNestedOneWithoutPostsInput = {
|
|
create?: XOR<UserCreateWithoutPostsInput, UserUncheckedCreateWithoutPostsInput>
|
|
connectOrCreate?: UserCreateOrConnectWithoutPostsInput
|
|
connect?: UserWhereUniqueInput
|
|
}
|
|
|
|
export type BoolFieldUpdateOperationsInput = {
|
|
set?: boolean
|
|
}
|
|
|
|
export type UserUpdateOneRequiredWithoutPostsNestedInput = {
|
|
create?: XOR<UserCreateWithoutPostsInput, UserUncheckedCreateWithoutPostsInput>
|
|
connectOrCreate?: UserCreateOrConnectWithoutPostsInput
|
|
upsert?: UserUpsertWithoutPostsInput
|
|
connect?: UserWhereUniqueInput
|
|
update?: XOR<XOR<UserUpdateToOneWithWhereWithoutPostsInput, UserUpdateWithoutPostsInput>, UserUncheckedUpdateWithoutPostsInput>
|
|
}
|
|
|
|
export type NestedIntFilter<$PrismaModel = never> = {
|
|
equals?: number | IntFieldRefInput<$PrismaModel>
|
|
in?: number[]
|
|
notIn?: number[]
|
|
lt?: number | IntFieldRefInput<$PrismaModel>
|
|
lte?: number | IntFieldRefInput<$PrismaModel>
|
|
gt?: number | IntFieldRefInput<$PrismaModel>
|
|
gte?: number | IntFieldRefInput<$PrismaModel>
|
|
not?: NestedIntFilter<$PrismaModel> | number
|
|
}
|
|
|
|
export type NestedStringFilter<$PrismaModel = never> = {
|
|
equals?: string | StringFieldRefInput<$PrismaModel>
|
|
in?: string[]
|
|
notIn?: string[]
|
|
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[] | null
|
|
notIn?: string[] | 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 NestedEnumRoleFilter<$PrismaModel = never> = {
|
|
equals?: $Enums.Role | EnumRoleFieldRefInput<$PrismaModel>
|
|
in?: $Enums.Role[]
|
|
notIn?: $Enums.Role[]
|
|
not?: NestedEnumRoleFilter<$PrismaModel> | $Enums.Role
|
|
}
|
|
|
|
export type NestedDateTimeNullableFilter<$PrismaModel = never> = {
|
|
equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null
|
|
in?: Date[] | string[] | null
|
|
notIn?: Date[] | string[] | 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 NestedDateTimeFilter<$PrismaModel = never> = {
|
|
equals?: Date | string | DateTimeFieldRefInput<$PrismaModel>
|
|
in?: Date[] | string[]
|
|
notIn?: Date[] | string[]
|
|
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 NestedIntWithAggregatesFilter<$PrismaModel = never> = {
|
|
equals?: number | IntFieldRefInput<$PrismaModel>
|
|
in?: number[]
|
|
notIn?: number[]
|
|
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[]
|
|
notIn?: number[]
|
|
lt?: number | FloatFieldRefInput<$PrismaModel>
|
|
lte?: number | FloatFieldRefInput<$PrismaModel>
|
|
gt?: number | FloatFieldRefInput<$PrismaModel>
|
|
gte?: number | FloatFieldRefInput<$PrismaModel>
|
|
not?: NestedFloatFilter<$PrismaModel> | number
|
|
}
|
|
|
|
export type NestedStringWithAggregatesFilter<$PrismaModel = never> = {
|
|
equals?: string | StringFieldRefInput<$PrismaModel>
|
|
in?: string[]
|
|
notIn?: string[]
|
|
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 NestedStringNullableWithAggregatesFilter<$PrismaModel = never> = {
|
|
equals?: string | StringFieldRefInput<$PrismaModel> | null
|
|
in?: string[] | null
|
|
notIn?: string[] | 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[] | null
|
|
notIn?: number[] | null
|
|
lt?: number | IntFieldRefInput<$PrismaModel>
|
|
lte?: number | IntFieldRefInput<$PrismaModel>
|
|
gt?: number | IntFieldRefInput<$PrismaModel>
|
|
gte?: number | IntFieldRefInput<$PrismaModel>
|
|
not?: NestedIntNullableFilter<$PrismaModel> | number | null
|
|
}
|
|
|
|
export type NestedEnumRoleWithAggregatesFilter<$PrismaModel = never> = {
|
|
equals?: $Enums.Role | EnumRoleFieldRefInput<$PrismaModel>
|
|
in?: $Enums.Role[]
|
|
notIn?: $Enums.Role[]
|
|
not?: NestedEnumRoleWithAggregatesFilter<$PrismaModel> | $Enums.Role
|
|
_count?: NestedIntFilter<$PrismaModel>
|
|
_min?: NestedEnumRoleFilter<$PrismaModel>
|
|
_max?: NestedEnumRoleFilter<$PrismaModel>
|
|
}
|
|
|
|
export type NestedDateTimeNullableWithAggregatesFilter<$PrismaModel = never> = {
|
|
equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null
|
|
in?: Date[] | string[] | null
|
|
notIn?: Date[] | string[] | 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 NestedDateTimeWithAggregatesFilter<$PrismaModel = never> = {
|
|
equals?: Date | string | DateTimeFieldRefInput<$PrismaModel>
|
|
in?: Date[] | string[]
|
|
notIn?: Date[] | string[]
|
|
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 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 PostCreateWithoutAuthorInput = {
|
|
title: string
|
|
content?: string | null
|
|
published?: boolean
|
|
createdAt?: Date | string
|
|
updatedAt?: Date | string
|
|
}
|
|
|
|
export type PostUncheckedCreateWithoutAuthorInput = {
|
|
id?: number
|
|
title: string
|
|
content?: string | null
|
|
published?: boolean
|
|
createdAt?: Date | string
|
|
updatedAt?: Date | string
|
|
}
|
|
|
|
export type PostCreateOrConnectWithoutAuthorInput = {
|
|
where: PostWhereUniqueInput
|
|
create: XOR<PostCreateWithoutAuthorInput, PostUncheckedCreateWithoutAuthorInput>
|
|
}
|
|
|
|
export type PostCreateManyAuthorInputEnvelope = {
|
|
data: PostCreateManyAuthorInput | PostCreateManyAuthorInput[]
|
|
}
|
|
|
|
export type ProfileCreateWithoutUserInput = {
|
|
bio: string
|
|
avatar?: string | null
|
|
}
|
|
|
|
export type ProfileUncheckedCreateWithoutUserInput = {
|
|
id?: number
|
|
bio: string
|
|
avatar?: string | null
|
|
}
|
|
|
|
export type ProfileCreateOrConnectWithoutUserInput = {
|
|
where: ProfileWhereUniqueInput
|
|
create: XOR<ProfileCreateWithoutUserInput, ProfileUncheckedCreateWithoutUserInput>
|
|
}
|
|
|
|
export type PostUpsertWithWhereUniqueWithoutAuthorInput = {
|
|
where: PostWhereUniqueInput
|
|
update: XOR<PostUpdateWithoutAuthorInput, PostUncheckedUpdateWithoutAuthorInput>
|
|
create: XOR<PostCreateWithoutAuthorInput, PostUncheckedCreateWithoutAuthorInput>
|
|
}
|
|
|
|
export type PostUpdateWithWhereUniqueWithoutAuthorInput = {
|
|
where: PostWhereUniqueInput
|
|
data: XOR<PostUpdateWithoutAuthorInput, PostUncheckedUpdateWithoutAuthorInput>
|
|
}
|
|
|
|
export type PostUpdateManyWithWhereWithoutAuthorInput = {
|
|
where: PostScalarWhereInput
|
|
data: XOR<PostUpdateManyMutationInput, PostUncheckedUpdateManyWithoutAuthorInput>
|
|
}
|
|
|
|
export type PostScalarWhereInput = {
|
|
AND?: PostScalarWhereInput | PostScalarWhereInput[]
|
|
OR?: PostScalarWhereInput[]
|
|
NOT?: PostScalarWhereInput | PostScalarWhereInput[]
|
|
id?: IntFilter<"Post"> | number
|
|
title?: StringFilter<"Post"> | string
|
|
content?: StringNullableFilter<"Post"> | string | null
|
|
published?: BoolFilter<"Post"> | boolean
|
|
authorId?: IntFilter<"Post"> | number
|
|
createdAt?: DateTimeFilter<"Post"> | Date | string
|
|
updatedAt?: DateTimeFilter<"Post"> | Date | string
|
|
}
|
|
|
|
export type ProfileUpsertWithoutUserInput = {
|
|
update: XOR<ProfileUpdateWithoutUserInput, ProfileUncheckedUpdateWithoutUserInput>
|
|
create: XOR<ProfileCreateWithoutUserInput, ProfileUncheckedCreateWithoutUserInput>
|
|
where?: ProfileWhereInput
|
|
}
|
|
|
|
export type ProfileUpdateToOneWithWhereWithoutUserInput = {
|
|
where?: ProfileWhereInput
|
|
data: XOR<ProfileUpdateWithoutUserInput, ProfileUncheckedUpdateWithoutUserInput>
|
|
}
|
|
|
|
export type ProfileUpdateWithoutUserInput = {
|
|
bio?: StringFieldUpdateOperationsInput | string
|
|
avatar?: NullableStringFieldUpdateOperationsInput | string | null
|
|
}
|
|
|
|
export type ProfileUncheckedUpdateWithoutUserInput = {
|
|
id?: IntFieldUpdateOperationsInput | number
|
|
bio?: StringFieldUpdateOperationsInput | string
|
|
avatar?: NullableStringFieldUpdateOperationsInput | string | null
|
|
}
|
|
|
|
export type UserCreateWithoutProfileInput = {
|
|
userId: string
|
|
email: string
|
|
name?: string | null
|
|
role?: $Enums.Role
|
|
username: string
|
|
avatar?: string | null
|
|
password: string
|
|
birthdate?: Date | string | null
|
|
registeredAt?: Date | string | null
|
|
createdAt?: Date | string
|
|
updatedAt?: Date | string
|
|
posts?: PostCreateNestedManyWithoutAuthorInput
|
|
}
|
|
|
|
export type UserUncheckedCreateWithoutProfileInput = {
|
|
id?: number
|
|
userId: string
|
|
email: string
|
|
name?: string | null
|
|
role?: $Enums.Role
|
|
username: string
|
|
avatar?: string | null
|
|
password: string
|
|
birthdate?: Date | string | null
|
|
registeredAt?: Date | string | null
|
|
createdAt?: Date | string
|
|
updatedAt?: Date | string
|
|
posts?: PostUncheckedCreateNestedManyWithoutAuthorInput
|
|
}
|
|
|
|
export type UserCreateOrConnectWithoutProfileInput = {
|
|
where: UserWhereUniqueInput
|
|
create: XOR<UserCreateWithoutProfileInput, UserUncheckedCreateWithoutProfileInput>
|
|
}
|
|
|
|
export type UserUpsertWithoutProfileInput = {
|
|
update: XOR<UserUpdateWithoutProfileInput, UserUncheckedUpdateWithoutProfileInput>
|
|
create: XOR<UserCreateWithoutProfileInput, UserUncheckedCreateWithoutProfileInput>
|
|
where?: UserWhereInput
|
|
}
|
|
|
|
export type UserUpdateToOneWithWhereWithoutProfileInput = {
|
|
where?: UserWhereInput
|
|
data: XOR<UserUpdateWithoutProfileInput, UserUncheckedUpdateWithoutProfileInput>
|
|
}
|
|
|
|
export type UserUpdateWithoutProfileInput = {
|
|
userId?: StringFieldUpdateOperationsInput | string
|
|
email?: StringFieldUpdateOperationsInput | string
|
|
name?: NullableStringFieldUpdateOperationsInput | string | null
|
|
role?: EnumRoleFieldUpdateOperationsInput | $Enums.Role
|
|
username?: StringFieldUpdateOperationsInput | string
|
|
avatar?: NullableStringFieldUpdateOperationsInput | string | null
|
|
password?: StringFieldUpdateOperationsInput | string
|
|
birthdate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
registeredAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
posts?: PostUpdateManyWithoutAuthorNestedInput
|
|
}
|
|
|
|
export type UserUncheckedUpdateWithoutProfileInput = {
|
|
id?: IntFieldUpdateOperationsInput | number
|
|
userId?: StringFieldUpdateOperationsInput | string
|
|
email?: StringFieldUpdateOperationsInput | string
|
|
name?: NullableStringFieldUpdateOperationsInput | string | null
|
|
role?: EnumRoleFieldUpdateOperationsInput | $Enums.Role
|
|
username?: StringFieldUpdateOperationsInput | string
|
|
avatar?: NullableStringFieldUpdateOperationsInput | string | null
|
|
password?: StringFieldUpdateOperationsInput | string
|
|
birthdate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
registeredAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
posts?: PostUncheckedUpdateManyWithoutAuthorNestedInput
|
|
}
|
|
|
|
export type UserCreateWithoutPostsInput = {
|
|
userId: string
|
|
email: string
|
|
name?: string | null
|
|
role?: $Enums.Role
|
|
username: string
|
|
avatar?: string | null
|
|
password: string
|
|
birthdate?: Date | string | null
|
|
registeredAt?: Date | string | null
|
|
createdAt?: Date | string
|
|
updatedAt?: Date | string
|
|
profile?: ProfileCreateNestedOneWithoutUserInput
|
|
}
|
|
|
|
export type UserUncheckedCreateWithoutPostsInput = {
|
|
id?: number
|
|
userId: string
|
|
email: string
|
|
name?: string | null
|
|
role?: $Enums.Role
|
|
username: string
|
|
avatar?: string | null
|
|
password: string
|
|
birthdate?: Date | string | null
|
|
registeredAt?: Date | string | null
|
|
createdAt?: Date | string
|
|
updatedAt?: Date | string
|
|
profile?: ProfileUncheckedCreateNestedOneWithoutUserInput
|
|
}
|
|
|
|
export type UserCreateOrConnectWithoutPostsInput = {
|
|
where: UserWhereUniqueInput
|
|
create: XOR<UserCreateWithoutPostsInput, UserUncheckedCreateWithoutPostsInput>
|
|
}
|
|
|
|
export type UserUpsertWithoutPostsInput = {
|
|
update: XOR<UserUpdateWithoutPostsInput, UserUncheckedUpdateWithoutPostsInput>
|
|
create: XOR<UserCreateWithoutPostsInput, UserUncheckedCreateWithoutPostsInput>
|
|
where?: UserWhereInput
|
|
}
|
|
|
|
export type UserUpdateToOneWithWhereWithoutPostsInput = {
|
|
where?: UserWhereInput
|
|
data: XOR<UserUpdateWithoutPostsInput, UserUncheckedUpdateWithoutPostsInput>
|
|
}
|
|
|
|
export type UserUpdateWithoutPostsInput = {
|
|
userId?: StringFieldUpdateOperationsInput | string
|
|
email?: StringFieldUpdateOperationsInput | string
|
|
name?: NullableStringFieldUpdateOperationsInput | string | null
|
|
role?: EnumRoleFieldUpdateOperationsInput | $Enums.Role
|
|
username?: StringFieldUpdateOperationsInput | string
|
|
avatar?: NullableStringFieldUpdateOperationsInput | string | null
|
|
password?: StringFieldUpdateOperationsInput | string
|
|
birthdate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
registeredAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
profile?: ProfileUpdateOneWithoutUserNestedInput
|
|
}
|
|
|
|
export type UserUncheckedUpdateWithoutPostsInput = {
|
|
id?: IntFieldUpdateOperationsInput | number
|
|
userId?: StringFieldUpdateOperationsInput | string
|
|
email?: StringFieldUpdateOperationsInput | string
|
|
name?: NullableStringFieldUpdateOperationsInput | string | null
|
|
role?: EnumRoleFieldUpdateOperationsInput | $Enums.Role
|
|
username?: StringFieldUpdateOperationsInput | string
|
|
avatar?: NullableStringFieldUpdateOperationsInput | string | null
|
|
password?: StringFieldUpdateOperationsInput | string
|
|
birthdate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
registeredAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
profile?: ProfileUncheckedUpdateOneWithoutUserNestedInput
|
|
}
|
|
|
|
export type PostCreateManyAuthorInput = {
|
|
id?: number
|
|
title: string
|
|
content?: string | null
|
|
published?: boolean
|
|
createdAt?: Date | string
|
|
updatedAt?: Date | string
|
|
}
|
|
|
|
export type PostUpdateWithoutAuthorInput = {
|
|
title?: StringFieldUpdateOperationsInput | string
|
|
content?: NullableStringFieldUpdateOperationsInput | string | null
|
|
published?: BoolFieldUpdateOperationsInput | boolean
|
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
}
|
|
|
|
export type PostUncheckedUpdateWithoutAuthorInput = {
|
|
id?: IntFieldUpdateOperationsInput | number
|
|
title?: StringFieldUpdateOperationsInput | string
|
|
content?: NullableStringFieldUpdateOperationsInput | string | null
|
|
published?: BoolFieldUpdateOperationsInput | boolean
|
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
}
|
|
|
|
export type PostUncheckedUpdateManyWithoutAuthorInput = {
|
|
id?: IntFieldUpdateOperationsInput | number
|
|
title?: StringFieldUpdateOperationsInput | string
|
|
content?: NullableStringFieldUpdateOperationsInput | string | null
|
|
published?: BoolFieldUpdateOperationsInput | boolean
|
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
* Batch Payload for updateMany & deleteMany & createMany
|
|
*/
|
|
|
|
export type BatchPayload = {
|
|
count: number
|
|
}
|
|
|
|
/**
|
|
* DMMF
|
|
*/
|
|
export const dmmf: runtime.BaseDMMF
|
|
} |