Files
Lucky_Wheel/apps/api/release/node_modules/.prisma/client/index.d.ts
T

21784 lines
798 KiB
TypeScript

/**
* Client
**/
import * as runtime from '@prisma/client/runtime/library.js';
import $Types = runtime.Types // general types
import $Public = runtime.Types.Public
import $Utils = runtime.Types.Utils
import $Extensions = runtime.Types.Extensions
import $Result = runtime.Types.Result
export type PrismaPromise<T> = $Public.PrismaPromise<T>
/**
* Model Admin
*
*/
export type Admin = $Result.DefaultSelection<Prisma.$AdminPayload>
/**
* Model User
*
*/
export type User = $Result.DefaultSelection<Prisma.$UserPayload>
/**
* Model OtpCode
*
*/
export type OtpCode = $Result.DefaultSelection<Prisma.$OtpCodePayload>
/**
* Model Campaign
*
*/
export type Campaign = $Result.DefaultSelection<Prisma.$CampaignPayload>
/**
* Model Prize
*
*/
export type Prize = $Result.DefaultSelection<Prisma.$PrizePayload>
/**
* Model UserCampaign
*
*/
export type UserCampaign = $Result.DefaultSelection<Prisma.$UserCampaignPayload>
/**
* Model ChanceTransaction
*
*/
export type ChanceTransaction = $Result.DefaultSelection<Prisma.$ChanceTransactionPayload>
/**
* Model Spin
*
*/
export type Spin = $Result.DefaultSelection<Prisma.$SpinPayload>
/**
* Model UserPrize
*
*/
export type UserPrize = $Result.DefaultSelection<Prisma.$UserPrizePayload>
/**
* Model SmsLog
*
*/
export type SmsLog = $Result.DefaultSelection<Prisma.$SmsLogPayload>
/**
* Model AdminLog
*
*/
export type AdminLog = $Result.DefaultSelection<Prisma.$AdminLogPayload>
/**
* Enums
*/
export namespace $Enums {
export const AdminRole: {
SUPER_ADMIN: 'SUPER_ADMIN',
OPERATOR: 'OPERATOR',
SUPPORT: 'SUPPORT'
};
export type AdminRole = (typeof AdminRole)[keyof typeof AdminRole]
export const AdminStatus: {
ACTIVE: 'ACTIVE',
DISABLED: 'DISABLED'
};
export type AdminStatus = (typeof AdminStatus)[keyof typeof AdminStatus]
export const UserStatus: {
ACTIVE: 'ACTIVE',
BLOCKED: 'BLOCKED'
};
export type UserStatus = (typeof UserStatus)[keyof typeof UserStatus]
export const CampaignStatus: {
DRAFT: 'DRAFT',
ACTIVE: 'ACTIVE',
PAUSED: 'PAUSED',
FINISHED: 'FINISHED'
};
export type CampaignStatus = (typeof CampaignStatus)[keyof typeof CampaignStatus]
export const WheelDesign: {
CLASSIC_CASINO: 'CLASSIC_CASINO',
NEON_CYBER: 'NEON_CYBER',
MINIMAL_FLAT: 'MINIMAL_FLAT',
LUXURY_GOLD: 'LUXURY_GOLD',
PLAYFUL_CARTOON: 'PLAYFUL_CARTOON'
};
export type WheelDesign = (typeof WheelDesign)[keyof typeof WheelDesign]
export const PrizeType: {
PHYSICAL: 'PHYSICAL',
DISCOUNT_CODE: 'DISCOUNT_CODE',
CREDIT: 'CREDIT',
CASH: 'CASH',
NO_PRIZE: 'NO_PRIZE',
OTHER: 'OTHER'
};
export type PrizeType = (typeof PrizeType)[keyof typeof PrizeType]
export const StockType: {
LIMITED: 'LIMITED',
UNLIMITED: 'UNLIMITED'
};
export type StockType = (typeof StockType)[keyof typeof StockType]
export const PrizeStatus: {
ACTIVE: 'ACTIVE',
INACTIVE: 'INACTIVE'
};
export type PrizeStatus = (typeof PrizeStatus)[keyof typeof PrizeStatus]
export const ChanceTxnType: {
SIGNUP_BONUS: 'SIGNUP_BONUS',
ADMIN_ADJUSTMENT: 'ADMIN_ADJUSTMENT',
SPIN_CONSUME: 'SPIN_CONSUME',
CAMPAIGN_BONUS: 'CAMPAIGN_BONUS',
REFUND: 'REFUND'
};
export type ChanceTxnType = (typeof ChanceTxnType)[keyof typeof ChanceTxnType]
export const SpinStatus: {
SUCCESS: 'SUCCESS',
FAILED: 'FAILED',
DUPLICATE: 'DUPLICATE'
};
export type SpinStatus = (typeof SpinStatus)[keyof typeof SpinStatus]
export const UserPrizeStatus: {
NEW: 'NEW',
CONTACTED: 'CONTACTED',
DELIVERED: 'DELIVERED',
ACTIVE_CODE: 'ACTIVE_CODE',
USED: 'USED',
EXPIRED: 'EXPIRED'
};
export type UserPrizeStatus = (typeof UserPrizeStatus)[keyof typeof UserPrizeStatus]
export const SmsType: {
OTP: 'OTP',
WINNING: 'WINNING',
NO_PRIZE: 'NO_PRIZE',
PRIZE_REMINDER: 'PRIZE_REMINDER'
};
export type SmsType = (typeof SmsType)[keyof typeof SmsType]
export const SmsStatus: {
PENDING: 'PENDING',
SENT: 'SENT',
FAILED: 'FAILED'
};
export type SmsStatus = (typeof SmsStatus)[keyof typeof SmsStatus]
}
export type AdminRole = $Enums.AdminRole
export const AdminRole: typeof $Enums.AdminRole
export type AdminStatus = $Enums.AdminStatus
export const AdminStatus: typeof $Enums.AdminStatus
export type UserStatus = $Enums.UserStatus
export const UserStatus: typeof $Enums.UserStatus
export type CampaignStatus = $Enums.CampaignStatus
export const CampaignStatus: typeof $Enums.CampaignStatus
export type WheelDesign = $Enums.WheelDesign
export const WheelDesign: typeof $Enums.WheelDesign
export type PrizeType = $Enums.PrizeType
export const PrizeType: typeof $Enums.PrizeType
export type StockType = $Enums.StockType
export const StockType: typeof $Enums.StockType
export type PrizeStatus = $Enums.PrizeStatus
export const PrizeStatus: typeof $Enums.PrizeStatus
export type ChanceTxnType = $Enums.ChanceTxnType
export const ChanceTxnType: typeof $Enums.ChanceTxnType
export type SpinStatus = $Enums.SpinStatus
export const SpinStatus: typeof $Enums.SpinStatus
export type UserPrizeStatus = $Enums.UserPrizeStatus
export const UserPrizeStatus: typeof $Enums.UserPrizeStatus
export type SmsType = $Enums.SmsType
export const SmsType: typeof $Enums.SmsType
export type SmsStatus = $Enums.SmsStatus
export const SmsStatus: typeof $Enums.SmsStatus
/**
* ## Prisma Client ʲˢ
*
* Type-safe database client for TypeScript & Node.js
* @example
* ```
* const prisma = new PrismaClient()
* // Fetch zero or more Admins
* const admins = await prisma.admin.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 Admins
* const admins = await prisma.admin.findMany()
* ```
*
*
* Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client).
*/
constructor(optionsArg ?: Prisma.Subset<ClientOptions, Prisma.PrismaClientOptions>);
$on<V extends U>(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): void;
/**
* Connect with the database
*/
$connect(): $Utils.JsPromise<void>;
/**
* Disconnect from the database
*/
$disconnect(): $Utils.JsPromise<void>;
/**
* Add a middleware
* @deprecated since 4.16.0. For new code, prefer client extensions instead.
* @see https://pris.ly/d/extensions
*/
$use(cb: Prisma.Middleware): void
/**
* Executes a prepared raw query and returns the number of affected rows.
* @example
* ```
* const result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`
* ```
*
* Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
*/
$executeRaw<T = unknown>(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise<number>;
/**
* Executes a raw query and returns the number of affected rows.
* Susceptible to SQL injections, see documentation.
* @example
* ```
* const result = await prisma.$executeRawUnsafe('UPDATE User SET cool = $1 WHERE email = $2 ;', true, 'user@email.com')
* ```
*
* Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
*/
$executeRawUnsafe<T = unknown>(query: string, ...values: any[]): Prisma.PrismaPromise<number>;
/**
* Performs a prepared raw query and returns the `SELECT` data.
* @example
* ```
* const result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`
* ```
*
* Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
*/
$queryRaw<T = unknown>(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise<T>;
/**
* Performs a raw query and returns the `SELECT` data.
* Susceptible to SQL injections, see documentation.
* @example
* ```
* const result = await prisma.$queryRawUnsafe('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'user@email.com')
* ```
*
* Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
*/
$queryRawUnsafe<T = unknown>(query: string, ...values: any[]): Prisma.PrismaPromise<T>;
/**
* Allows the running of a sequence of read/write operations that are guaranteed to either succeed or fail as a whole.
* @example
* ```
* const [george, bob, alice] = await prisma.$transaction([
* prisma.user.create({ data: { name: 'George' } }),
* prisma.user.create({ data: { name: 'Bob' } }),
* prisma.user.create({ data: { name: 'Alice' } }),
* ])
* ```
*
* Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client/transactions).
*/
$transaction<P extends Prisma.PrismaPromise<any>[]>(arg: [...P], options?: { isolationLevel?: Prisma.TransactionIsolationLevel }): $Utils.JsPromise<runtime.Types.Utils.UnwrapTuple<P>>
$transaction<R>(fn: (prisma: Omit<PrismaClient, runtime.ITXClientDenyList>) => $Utils.JsPromise<R>, options?: { maxWait?: number, timeout?: number, isolationLevel?: Prisma.TransactionIsolationLevel }): $Utils.JsPromise<R>
$extends: $Extensions.ExtendsHook<"extends", Prisma.TypeMapCb, ExtArgs>
/**
* `prisma.admin`: Exposes CRUD operations for the **Admin** model.
* Example usage:
* ```ts
* // Fetch zero or more Admins
* const admins = await prisma.admin.findMany()
* ```
*/
get admin(): Prisma.AdminDelegate<ExtArgs>;
/**
* `prisma.user`: Exposes CRUD operations for the **User** model.
* Example usage:
* ```ts
* // Fetch zero or more Users
* const users = await prisma.user.findMany()
* ```
*/
get user(): Prisma.UserDelegate<ExtArgs>;
/**
* `prisma.otpCode`: Exposes CRUD operations for the **OtpCode** model.
* Example usage:
* ```ts
* // Fetch zero or more OtpCodes
* const otpCodes = await prisma.otpCode.findMany()
* ```
*/
get otpCode(): Prisma.OtpCodeDelegate<ExtArgs>;
/**
* `prisma.campaign`: Exposes CRUD operations for the **Campaign** model.
* Example usage:
* ```ts
* // Fetch zero or more Campaigns
* const campaigns = await prisma.campaign.findMany()
* ```
*/
get campaign(): Prisma.CampaignDelegate<ExtArgs>;
/**
* `prisma.prize`: Exposes CRUD operations for the **Prize** model.
* Example usage:
* ```ts
* // Fetch zero or more Prizes
* const prizes = await prisma.prize.findMany()
* ```
*/
get prize(): Prisma.PrizeDelegate<ExtArgs>;
/**
* `prisma.userCampaign`: Exposes CRUD operations for the **UserCampaign** model.
* Example usage:
* ```ts
* // Fetch zero or more UserCampaigns
* const userCampaigns = await prisma.userCampaign.findMany()
* ```
*/
get userCampaign(): Prisma.UserCampaignDelegate<ExtArgs>;
/**
* `prisma.chanceTransaction`: Exposes CRUD operations for the **ChanceTransaction** model.
* Example usage:
* ```ts
* // Fetch zero or more ChanceTransactions
* const chanceTransactions = await prisma.chanceTransaction.findMany()
* ```
*/
get chanceTransaction(): Prisma.ChanceTransactionDelegate<ExtArgs>;
/**
* `prisma.spin`: Exposes CRUD operations for the **Spin** model.
* Example usage:
* ```ts
* // Fetch zero or more Spins
* const spins = await prisma.spin.findMany()
* ```
*/
get spin(): Prisma.SpinDelegate<ExtArgs>;
/**
* `prisma.userPrize`: Exposes CRUD operations for the **UserPrize** model.
* Example usage:
* ```ts
* // Fetch zero or more UserPrizes
* const userPrizes = await prisma.userPrize.findMany()
* ```
*/
get userPrize(): Prisma.UserPrizeDelegate<ExtArgs>;
/**
* `prisma.smsLog`: Exposes CRUD operations for the **SmsLog** model.
* Example usage:
* ```ts
* // Fetch zero or more SmsLogs
* const smsLogs = await prisma.smsLog.findMany()
* ```
*/
get smsLog(): Prisma.SmsLogDelegate<ExtArgs>;
/**
* `prisma.adminLog`: Exposes CRUD operations for the **AdminLog** model.
* Example usage:
* ```ts
* // Fetch zero or more AdminLogs
* const adminLogs = await prisma.adminLog.findMany()
* ```
*/
get adminLog(): Prisma.AdminLogDelegate<ExtArgs>;
}
export namespace Prisma {
export import DMMF = runtime.DMMF
export type PrismaPromise<T> = $Public.PrismaPromise<T>
/**
* Validator
*/
export import validator = runtime.Public.validator
/**
* Prisma Errors
*/
export import PrismaClientKnownRequestError = runtime.PrismaClientKnownRequestError
export import PrismaClientUnknownRequestError = runtime.PrismaClientUnknownRequestError
export import PrismaClientRustPanicError = runtime.PrismaClientRustPanicError
export import PrismaClientInitializationError = runtime.PrismaClientInitializationError
export import PrismaClientValidationError = runtime.PrismaClientValidationError
export import NotFoundError = runtime.NotFoundError
/**
* Re-export of sql-template-tag
*/
export import sql = runtime.sqltag
export import empty = runtime.empty
export import join = runtime.join
export import raw = runtime.raw
export import Sql = runtime.Sql
/**
* Decimal.js
*/
export import Decimal = runtime.Decimal
export type DecimalJsLike = runtime.DecimalJsLike
/**
* Metrics
*/
export type Metrics = runtime.Metrics
export type Metric<T> = runtime.Metric<T>
export type MetricHistogram = runtime.MetricHistogram
export type MetricHistogramBucket = runtime.MetricHistogramBucket
/**
* Extensions
*/
export import Extension = $Extensions.UserArgs
export import getExtensionContext = runtime.Extensions.getExtensionContext
export import Args = $Public.Args
export import Payload = $Public.Payload
export import Result = $Public.Result
export import Exact = $Public.Exact
/**
* Prisma Client JS version: 5.22.0
* Query Engine version: 605197351a3c8bdd595af2d2a9bc3025bca48ea2
*/
export type PrismaVersion = {
client: string
}
export const prismaVersion: PrismaVersion
/**
* Utility Types
*/
export import JsonObject = runtime.JsonObject
export import JsonArray = runtime.JsonArray
export import JsonValue = runtime.JsonValue
export import InputJsonObject = runtime.InputJsonObject
export import InputJsonArray = runtime.InputJsonArray
export import InputJsonValue = runtime.InputJsonValue
/**
* Types of the values used to represent different kinds of `null` values when working with JSON fields.
*
* @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
*/
namespace NullTypes {
/**
* Type of `Prisma.DbNull`.
*
* You cannot use other instances of this class. Please use the `Prisma.DbNull` value.
*
* @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
*/
class DbNull {
private DbNull: never
private constructor()
}
/**
* Type of `Prisma.JsonNull`.
*
* You cannot use other instances of this class. Please use the `Prisma.JsonNull` value.
*
* @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
*/
class JsonNull {
private JsonNull: never
private constructor()
}
/**
* Type of `Prisma.AnyNull`.
*
* You cannot use other instances of this class. Please use the `Prisma.AnyNull` value.
*
* @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
*/
class AnyNull {
private AnyNull: never
private constructor()
}
}
/**
* Helper for filtering JSON entries that have `null` on the database (empty on the db)
*
* @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
*/
export const DbNull: NullTypes.DbNull
/**
* Helper for filtering JSON entries that have JSON `null` values (not empty on the db)
*
* @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
*/
export const JsonNull: NullTypes.JsonNull
/**
* Helper for filtering JSON entries that are `Prisma.DbNull` or `Prisma.JsonNull`
*
* @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
*/
export const AnyNull: NullTypes.AnyNull
type SelectAndInclude = {
select: any
include: any
}
type SelectAndOmit = {
select: any
omit: any
}
/**
* Get the type of the value, that the Promise holds.
*/
export type PromiseType<T extends PromiseLike<any>> = T extends PromiseLike<infer U> ? U : T;
/**
* Get the return type of a function which returns a Promise.
*/
export type PromiseReturnType<T extends (...args: any) => $Utils.JsPromise<any>> = PromiseType<ReturnType<T>>
/**
* From T, pick a set of properties whose keys are in the union K
*/
type Prisma__Pick<T, K extends keyof T> = {
[P in K]: T[P];
};
export type Enumerable<T> = T | Array<T>;
export type RequiredKeys<T> = {
[K in keyof T]-?: {} extends Prisma__Pick<T, K> ? never : K
}[keyof T]
export type TruthyKeys<T> = keyof {
[K in keyof T as T[K] extends false | undefined | null ? never : K]: K
}
export type TrueKeys<T> = TruthyKeys<Prisma__Pick<T, RequiredKeys<T>>>
/**
* Subset
* @desc From `T` pick properties that exist in `U`. Simple version of Intersection
*/
export type Subset<T, U> = {
[key in keyof T]: key extends keyof U ? T[key] : never;
};
/**
* SelectSubset
* @desc From `T` pick properties that exist in `U`. Simple version of Intersection.
* Additionally, it validates, if both select and include are present. If the case, it errors.
*/
export type SelectSubset<T, U> = {
[key in keyof T]: key extends keyof U ? T[key] : never
} &
(T extends SelectAndInclude
? 'Please either choose `select` or `include`.'
: T extends SelectAndOmit
? 'Please either choose `select` or `omit`.'
: {})
/**
* Subset + Intersection
* @desc From `T` pick properties that exist in `U` and intersect `K`
*/
export type SubsetIntersection<T, U, K> = {
[key in keyof T]: key extends keyof U ? T[key] : never
} &
K
type Without<T, U> = { [P in Exclude<keyof T, keyof U>]?: never };
/**
* XOR is needed to have a real mutually exclusive union type
* https://stackoverflow.com/questions/42123407/does-typescript-support-mutually-exclusive-types
*/
type XOR<T, U> =
T extends object ?
U extends object ?
(Without<T, U> & U) | (Without<U, T> & T)
: U : T
/**
* Is T a Record?
*/
type IsObject<T extends any> = T extends Array<any>
? False
: T extends Date
? False
: T extends Uint8Array
? False
: T extends BigInt
? False
: T extends object
? True
: False
/**
* If it's T[], return T
*/
export type UnEnumerate<T extends unknown> = T extends Array<infer U> ? U : T
/**
* From ts-toolbelt
*/
type __Either<O extends object, K extends Key> = Omit<O, K> &
{
// Merge all but K
[P in K]: Prisma__Pick<O, P & keyof O> // With K possibilities
}[K]
type EitherStrict<O extends object, K extends Key> = Strict<__Either<O, K>>
type EitherLoose<O extends object, K extends Key> = ComputeRaw<__Either<O, K>>
type _Either<
O extends object,
K extends Key,
strict extends Boolean
> = {
1: EitherStrict<O, K>
0: EitherLoose<O, K>
}[strict]
type Either<
O extends object,
K extends Key,
strict extends Boolean = 1
> = O extends unknown ? _Either<O, K, strict> : never
export type Union = any
type PatchUndefined<O extends object, O1 extends object> = {
[K in keyof O]: O[K] extends undefined ? At<O1, K> : O[K]
} & {}
/** Helper Types for "Merge" **/
export type IntersectOf<U extends Union> = (
U extends unknown ? (k: U) => void : never
) extends (k: infer I) => void
? I
: never
export type Overwrite<O extends object, O1 extends object> = {
[K in keyof O]: K extends keyof O1 ? O1[K] : O[K];
} & {};
type _Merge<U extends object> = IntersectOf<Overwrite<U, {
[K in keyof U]-?: At<U, K>;
}>>;
type Key = string | number | symbol;
type AtBasic<O extends object, K extends Key> = K extends keyof O ? O[K] : never;
type AtStrict<O extends object, K extends Key> = O[K & keyof O];
type AtLoose<O extends object, K extends Key> = O extends unknown ? AtStrict<O, K> : never;
export type At<O extends object, K extends Key, strict extends Boolean = 1> = {
1: AtStrict<O, K>;
0: AtLoose<O, K>;
}[strict];
export type ComputeRaw<A extends any> = A extends Function ? A : {
[K in keyof A]: A[K];
} & {};
export type OptionalFlat<O> = {
[K in keyof O]?: O[K];
} & {};
type _Record<K extends keyof any, T> = {
[P in K]: T;
};
// cause typescript not to expand types and preserve names
type NoExpand<T> = T extends unknown ? T : never;
// this type assumes the passed object is entirely optional
type AtLeast<O extends object, K extends string> = NoExpand<
O extends unknown
? | (K extends keyof O ? { [P in K]: O[P] } & O : O)
| {[P in keyof O as P extends K ? K : never]-?: O[P]} & O
: never>;
type _Strict<U, _U = U> = U extends unknown ? U & OptionalFlat<_Record<Exclude<Keys<_U>, keyof U>, never>> : never;
export type Strict<U extends object> = ComputeRaw<_Strict<U>>;
/** End Helper Types for "Merge" **/
export type Merge<U extends object> = ComputeRaw<_Merge<Strict<U>>>;
/**
A [[Boolean]]
*/
export type Boolean = True | False
// /**
// 1
// */
export type True = 1
/**
0
*/
export type False = 0
export type Not<B extends Boolean> = {
0: 1
1: 0
}[B]
export type Extends<A1 extends any, A2 extends any> = [A1] extends [never]
? 0 // anything `never` is false
: A1 extends A2
? 1
: 0
export type Has<U extends Union, U1 extends Union> = Not<
Extends<Exclude<U1, U>, U1>
>
export type Or<B1 extends Boolean, B2 extends Boolean> = {
0: {
0: 0
1: 1
}
1: {
0: 1
1: 1
}
}[B1][B2]
export type Keys<U extends Union> = U extends unknown ? keyof U : never
type Cast<A, B> = A extends B ? A : B;
export const type: unique symbol;
/**
* Used by group by
*/
export type GetScalarType<T, O> = O extends object ? {
[P in keyof T]: P extends keyof O
? O[P]
: never
} : never
type FieldPaths<
T,
U = Omit<T, '_avg' | '_sum' | '_count' | '_min' | '_max'>
> = IsObject<T> extends True ? U : T
type GetHavingFields<T> = {
[K in keyof T]: Or<
Or<Extends<'OR', K>, Extends<'AND', K>>,
Extends<'NOT', K>
> extends True
? // infer is only needed to not hit TS limit
// based on the brilliant idea of Pierre-Antoine Mills
// https://github.com/microsoft/TypeScript/issues/30188#issuecomment-478938437
T[K] extends infer TK
? GetHavingFields<UnEnumerate<TK> extends object ? Merge<UnEnumerate<TK>> : never>
: never
: {} extends FieldPaths<T[K]>
? never
: K
}[keyof T]
/**
* Convert tuple to union
*/
type _TupleToUnion<T> = T extends (infer E)[] ? E : never
type TupleToUnion<K extends readonly any[]> = _TupleToUnion<K>
type MaybeTupleToUnion<T> = T extends any[] ? TupleToUnion<T> : T
/**
* Like `Pick`, but additionally can also accept an array of keys
*/
type PickEnumerable<T, K extends Enumerable<keyof T> | keyof T> = Prisma__Pick<T, MaybeTupleToUnion<K>>
/**
* Exclude all keys with underscores
*/
type ExcludeUnderscoreKeys<T extends string> = T extends `_${string}` ? never : T
export type FieldRef<Model, FieldType> = runtime.FieldRef<Model, FieldType>
type FieldRefInputType<Model, FieldType> = Model extends never ? never : FieldRef<Model, FieldType>
export const ModelName: {
Admin: 'Admin',
User: 'User',
OtpCode: 'OtpCode',
Campaign: 'Campaign',
Prize: 'Prize',
UserCampaign: 'UserCampaign',
ChanceTransaction: 'ChanceTransaction',
Spin: 'Spin',
UserPrize: 'UserPrize',
SmsLog: 'SmsLog',
AdminLog: 'AdminLog'
};
export type ModelName = (typeof ModelName)[keyof typeof ModelName]
export type Datasources = {
db?: Datasource
}
interface TypeMapCb extends $Utils.Fn<{extArgs: $Extensions.InternalArgs, clientOptions: PrismaClientOptions }, $Utils.Record<string, any>> {
returns: Prisma.TypeMap<this['params']['extArgs'], this['params']['clientOptions']>
}
export type TypeMap<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, ClientOptions = {}> = {
meta: {
modelProps: "admin" | "user" | "otpCode" | "campaign" | "prize" | "userCampaign" | "chanceTransaction" | "spin" | "userPrize" | "smsLog" | "adminLog"
txIsolationLevel: Prisma.TransactionIsolationLevel
}
model: {
Admin: {
payload: Prisma.$AdminPayload<ExtArgs>
fields: Prisma.AdminFieldRefs
operations: {
findUnique: {
args: Prisma.AdminFindUniqueArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$AdminPayload> | null
}
findUniqueOrThrow: {
args: Prisma.AdminFindUniqueOrThrowArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$AdminPayload>
}
findFirst: {
args: Prisma.AdminFindFirstArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$AdminPayload> | null
}
findFirstOrThrow: {
args: Prisma.AdminFindFirstOrThrowArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$AdminPayload>
}
findMany: {
args: Prisma.AdminFindManyArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$AdminPayload>[]
}
create: {
args: Prisma.AdminCreateArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$AdminPayload>
}
createMany: {
args: Prisma.AdminCreateManyArgs<ExtArgs>
result: BatchPayload
}
createManyAndReturn: {
args: Prisma.AdminCreateManyAndReturnArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$AdminPayload>[]
}
delete: {
args: Prisma.AdminDeleteArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$AdminPayload>
}
update: {
args: Prisma.AdminUpdateArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$AdminPayload>
}
deleteMany: {
args: Prisma.AdminDeleteManyArgs<ExtArgs>
result: BatchPayload
}
updateMany: {
args: Prisma.AdminUpdateManyArgs<ExtArgs>
result: BatchPayload
}
upsert: {
args: Prisma.AdminUpsertArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$AdminPayload>
}
aggregate: {
args: Prisma.AdminAggregateArgs<ExtArgs>
result: $Utils.Optional<AggregateAdmin>
}
groupBy: {
args: Prisma.AdminGroupByArgs<ExtArgs>
result: $Utils.Optional<AdminGroupByOutputType>[]
}
count: {
args: Prisma.AdminCountArgs<ExtArgs>
result: $Utils.Optional<AdminCountAggregateOutputType> | number
}
}
}
User: {
payload: Prisma.$UserPayload<ExtArgs>
fields: Prisma.UserFieldRefs
operations: {
findUnique: {
args: Prisma.UserFindUniqueArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$UserPayload> | null
}
findUniqueOrThrow: {
args: Prisma.UserFindUniqueOrThrowArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$UserPayload>
}
findFirst: {
args: Prisma.UserFindFirstArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$UserPayload> | null
}
findFirstOrThrow: {
args: Prisma.UserFindFirstOrThrowArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$UserPayload>
}
findMany: {
args: Prisma.UserFindManyArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$UserPayload>[]
}
create: {
args: Prisma.UserCreateArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$UserPayload>
}
createMany: {
args: Prisma.UserCreateManyArgs<ExtArgs>
result: BatchPayload
}
createManyAndReturn: {
args: Prisma.UserCreateManyAndReturnArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$UserPayload>[]
}
delete: {
args: Prisma.UserDeleteArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$UserPayload>
}
update: {
args: Prisma.UserUpdateArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$UserPayload>
}
deleteMany: {
args: Prisma.UserDeleteManyArgs<ExtArgs>
result: BatchPayload
}
updateMany: {
args: Prisma.UserUpdateManyArgs<ExtArgs>
result: BatchPayload
}
upsert: {
args: Prisma.UserUpsertArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$UserPayload>
}
aggregate: {
args: Prisma.UserAggregateArgs<ExtArgs>
result: $Utils.Optional<AggregateUser>
}
groupBy: {
args: Prisma.UserGroupByArgs<ExtArgs>
result: $Utils.Optional<UserGroupByOutputType>[]
}
count: {
args: Prisma.UserCountArgs<ExtArgs>
result: $Utils.Optional<UserCountAggregateOutputType> | number
}
}
}
OtpCode: {
payload: Prisma.$OtpCodePayload<ExtArgs>
fields: Prisma.OtpCodeFieldRefs
operations: {
findUnique: {
args: Prisma.OtpCodeFindUniqueArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$OtpCodePayload> | null
}
findUniqueOrThrow: {
args: Prisma.OtpCodeFindUniqueOrThrowArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$OtpCodePayload>
}
findFirst: {
args: Prisma.OtpCodeFindFirstArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$OtpCodePayload> | null
}
findFirstOrThrow: {
args: Prisma.OtpCodeFindFirstOrThrowArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$OtpCodePayload>
}
findMany: {
args: Prisma.OtpCodeFindManyArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$OtpCodePayload>[]
}
create: {
args: Prisma.OtpCodeCreateArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$OtpCodePayload>
}
createMany: {
args: Prisma.OtpCodeCreateManyArgs<ExtArgs>
result: BatchPayload
}
createManyAndReturn: {
args: Prisma.OtpCodeCreateManyAndReturnArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$OtpCodePayload>[]
}
delete: {
args: Prisma.OtpCodeDeleteArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$OtpCodePayload>
}
update: {
args: Prisma.OtpCodeUpdateArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$OtpCodePayload>
}
deleteMany: {
args: Prisma.OtpCodeDeleteManyArgs<ExtArgs>
result: BatchPayload
}
updateMany: {
args: Prisma.OtpCodeUpdateManyArgs<ExtArgs>
result: BatchPayload
}
upsert: {
args: Prisma.OtpCodeUpsertArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$OtpCodePayload>
}
aggregate: {
args: Prisma.OtpCodeAggregateArgs<ExtArgs>
result: $Utils.Optional<AggregateOtpCode>
}
groupBy: {
args: Prisma.OtpCodeGroupByArgs<ExtArgs>
result: $Utils.Optional<OtpCodeGroupByOutputType>[]
}
count: {
args: Prisma.OtpCodeCountArgs<ExtArgs>
result: $Utils.Optional<OtpCodeCountAggregateOutputType> | number
}
}
}
Campaign: {
payload: Prisma.$CampaignPayload<ExtArgs>
fields: Prisma.CampaignFieldRefs
operations: {
findUnique: {
args: Prisma.CampaignFindUniqueArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$CampaignPayload> | null
}
findUniqueOrThrow: {
args: Prisma.CampaignFindUniqueOrThrowArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$CampaignPayload>
}
findFirst: {
args: Prisma.CampaignFindFirstArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$CampaignPayload> | null
}
findFirstOrThrow: {
args: Prisma.CampaignFindFirstOrThrowArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$CampaignPayload>
}
findMany: {
args: Prisma.CampaignFindManyArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$CampaignPayload>[]
}
create: {
args: Prisma.CampaignCreateArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$CampaignPayload>
}
createMany: {
args: Prisma.CampaignCreateManyArgs<ExtArgs>
result: BatchPayload
}
createManyAndReturn: {
args: Prisma.CampaignCreateManyAndReturnArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$CampaignPayload>[]
}
delete: {
args: Prisma.CampaignDeleteArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$CampaignPayload>
}
update: {
args: Prisma.CampaignUpdateArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$CampaignPayload>
}
deleteMany: {
args: Prisma.CampaignDeleteManyArgs<ExtArgs>
result: BatchPayload
}
updateMany: {
args: Prisma.CampaignUpdateManyArgs<ExtArgs>
result: BatchPayload
}
upsert: {
args: Prisma.CampaignUpsertArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$CampaignPayload>
}
aggregate: {
args: Prisma.CampaignAggregateArgs<ExtArgs>
result: $Utils.Optional<AggregateCampaign>
}
groupBy: {
args: Prisma.CampaignGroupByArgs<ExtArgs>
result: $Utils.Optional<CampaignGroupByOutputType>[]
}
count: {
args: Prisma.CampaignCountArgs<ExtArgs>
result: $Utils.Optional<CampaignCountAggregateOutputType> | number
}
}
}
Prize: {
payload: Prisma.$PrizePayload<ExtArgs>
fields: Prisma.PrizeFieldRefs
operations: {
findUnique: {
args: Prisma.PrizeFindUniqueArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$PrizePayload> | null
}
findUniqueOrThrow: {
args: Prisma.PrizeFindUniqueOrThrowArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$PrizePayload>
}
findFirst: {
args: Prisma.PrizeFindFirstArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$PrizePayload> | null
}
findFirstOrThrow: {
args: Prisma.PrizeFindFirstOrThrowArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$PrizePayload>
}
findMany: {
args: Prisma.PrizeFindManyArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$PrizePayload>[]
}
create: {
args: Prisma.PrizeCreateArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$PrizePayload>
}
createMany: {
args: Prisma.PrizeCreateManyArgs<ExtArgs>
result: BatchPayload
}
createManyAndReturn: {
args: Prisma.PrizeCreateManyAndReturnArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$PrizePayload>[]
}
delete: {
args: Prisma.PrizeDeleteArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$PrizePayload>
}
update: {
args: Prisma.PrizeUpdateArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$PrizePayload>
}
deleteMany: {
args: Prisma.PrizeDeleteManyArgs<ExtArgs>
result: BatchPayload
}
updateMany: {
args: Prisma.PrizeUpdateManyArgs<ExtArgs>
result: BatchPayload
}
upsert: {
args: Prisma.PrizeUpsertArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$PrizePayload>
}
aggregate: {
args: Prisma.PrizeAggregateArgs<ExtArgs>
result: $Utils.Optional<AggregatePrize>
}
groupBy: {
args: Prisma.PrizeGroupByArgs<ExtArgs>
result: $Utils.Optional<PrizeGroupByOutputType>[]
}
count: {
args: Prisma.PrizeCountArgs<ExtArgs>
result: $Utils.Optional<PrizeCountAggregateOutputType> | number
}
}
}
UserCampaign: {
payload: Prisma.$UserCampaignPayload<ExtArgs>
fields: Prisma.UserCampaignFieldRefs
operations: {
findUnique: {
args: Prisma.UserCampaignFindUniqueArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$UserCampaignPayload> | null
}
findUniqueOrThrow: {
args: Prisma.UserCampaignFindUniqueOrThrowArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$UserCampaignPayload>
}
findFirst: {
args: Prisma.UserCampaignFindFirstArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$UserCampaignPayload> | null
}
findFirstOrThrow: {
args: Prisma.UserCampaignFindFirstOrThrowArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$UserCampaignPayload>
}
findMany: {
args: Prisma.UserCampaignFindManyArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$UserCampaignPayload>[]
}
create: {
args: Prisma.UserCampaignCreateArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$UserCampaignPayload>
}
createMany: {
args: Prisma.UserCampaignCreateManyArgs<ExtArgs>
result: BatchPayload
}
createManyAndReturn: {
args: Prisma.UserCampaignCreateManyAndReturnArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$UserCampaignPayload>[]
}
delete: {
args: Prisma.UserCampaignDeleteArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$UserCampaignPayload>
}
update: {
args: Prisma.UserCampaignUpdateArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$UserCampaignPayload>
}
deleteMany: {
args: Prisma.UserCampaignDeleteManyArgs<ExtArgs>
result: BatchPayload
}
updateMany: {
args: Prisma.UserCampaignUpdateManyArgs<ExtArgs>
result: BatchPayload
}
upsert: {
args: Prisma.UserCampaignUpsertArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$UserCampaignPayload>
}
aggregate: {
args: Prisma.UserCampaignAggregateArgs<ExtArgs>
result: $Utils.Optional<AggregateUserCampaign>
}
groupBy: {
args: Prisma.UserCampaignGroupByArgs<ExtArgs>
result: $Utils.Optional<UserCampaignGroupByOutputType>[]
}
count: {
args: Prisma.UserCampaignCountArgs<ExtArgs>
result: $Utils.Optional<UserCampaignCountAggregateOutputType> | number
}
}
}
ChanceTransaction: {
payload: Prisma.$ChanceTransactionPayload<ExtArgs>
fields: Prisma.ChanceTransactionFieldRefs
operations: {
findUnique: {
args: Prisma.ChanceTransactionFindUniqueArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$ChanceTransactionPayload> | null
}
findUniqueOrThrow: {
args: Prisma.ChanceTransactionFindUniqueOrThrowArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$ChanceTransactionPayload>
}
findFirst: {
args: Prisma.ChanceTransactionFindFirstArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$ChanceTransactionPayload> | null
}
findFirstOrThrow: {
args: Prisma.ChanceTransactionFindFirstOrThrowArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$ChanceTransactionPayload>
}
findMany: {
args: Prisma.ChanceTransactionFindManyArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$ChanceTransactionPayload>[]
}
create: {
args: Prisma.ChanceTransactionCreateArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$ChanceTransactionPayload>
}
createMany: {
args: Prisma.ChanceTransactionCreateManyArgs<ExtArgs>
result: BatchPayload
}
createManyAndReturn: {
args: Prisma.ChanceTransactionCreateManyAndReturnArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$ChanceTransactionPayload>[]
}
delete: {
args: Prisma.ChanceTransactionDeleteArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$ChanceTransactionPayload>
}
update: {
args: Prisma.ChanceTransactionUpdateArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$ChanceTransactionPayload>
}
deleteMany: {
args: Prisma.ChanceTransactionDeleteManyArgs<ExtArgs>
result: BatchPayload
}
updateMany: {
args: Prisma.ChanceTransactionUpdateManyArgs<ExtArgs>
result: BatchPayload
}
upsert: {
args: Prisma.ChanceTransactionUpsertArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$ChanceTransactionPayload>
}
aggregate: {
args: Prisma.ChanceTransactionAggregateArgs<ExtArgs>
result: $Utils.Optional<AggregateChanceTransaction>
}
groupBy: {
args: Prisma.ChanceTransactionGroupByArgs<ExtArgs>
result: $Utils.Optional<ChanceTransactionGroupByOutputType>[]
}
count: {
args: Prisma.ChanceTransactionCountArgs<ExtArgs>
result: $Utils.Optional<ChanceTransactionCountAggregateOutputType> | number
}
}
}
Spin: {
payload: Prisma.$SpinPayload<ExtArgs>
fields: Prisma.SpinFieldRefs
operations: {
findUnique: {
args: Prisma.SpinFindUniqueArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$SpinPayload> | null
}
findUniqueOrThrow: {
args: Prisma.SpinFindUniqueOrThrowArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$SpinPayload>
}
findFirst: {
args: Prisma.SpinFindFirstArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$SpinPayload> | null
}
findFirstOrThrow: {
args: Prisma.SpinFindFirstOrThrowArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$SpinPayload>
}
findMany: {
args: Prisma.SpinFindManyArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$SpinPayload>[]
}
create: {
args: Prisma.SpinCreateArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$SpinPayload>
}
createMany: {
args: Prisma.SpinCreateManyArgs<ExtArgs>
result: BatchPayload
}
createManyAndReturn: {
args: Prisma.SpinCreateManyAndReturnArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$SpinPayload>[]
}
delete: {
args: Prisma.SpinDeleteArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$SpinPayload>
}
update: {
args: Prisma.SpinUpdateArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$SpinPayload>
}
deleteMany: {
args: Prisma.SpinDeleteManyArgs<ExtArgs>
result: BatchPayload
}
updateMany: {
args: Prisma.SpinUpdateManyArgs<ExtArgs>
result: BatchPayload
}
upsert: {
args: Prisma.SpinUpsertArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$SpinPayload>
}
aggregate: {
args: Prisma.SpinAggregateArgs<ExtArgs>
result: $Utils.Optional<AggregateSpin>
}
groupBy: {
args: Prisma.SpinGroupByArgs<ExtArgs>
result: $Utils.Optional<SpinGroupByOutputType>[]
}
count: {
args: Prisma.SpinCountArgs<ExtArgs>
result: $Utils.Optional<SpinCountAggregateOutputType> | number
}
}
}
UserPrize: {
payload: Prisma.$UserPrizePayload<ExtArgs>
fields: Prisma.UserPrizeFieldRefs
operations: {
findUnique: {
args: Prisma.UserPrizeFindUniqueArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$UserPrizePayload> | null
}
findUniqueOrThrow: {
args: Prisma.UserPrizeFindUniqueOrThrowArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$UserPrizePayload>
}
findFirst: {
args: Prisma.UserPrizeFindFirstArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$UserPrizePayload> | null
}
findFirstOrThrow: {
args: Prisma.UserPrizeFindFirstOrThrowArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$UserPrizePayload>
}
findMany: {
args: Prisma.UserPrizeFindManyArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$UserPrizePayload>[]
}
create: {
args: Prisma.UserPrizeCreateArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$UserPrizePayload>
}
createMany: {
args: Prisma.UserPrizeCreateManyArgs<ExtArgs>
result: BatchPayload
}
createManyAndReturn: {
args: Prisma.UserPrizeCreateManyAndReturnArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$UserPrizePayload>[]
}
delete: {
args: Prisma.UserPrizeDeleteArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$UserPrizePayload>
}
update: {
args: Prisma.UserPrizeUpdateArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$UserPrizePayload>
}
deleteMany: {
args: Prisma.UserPrizeDeleteManyArgs<ExtArgs>
result: BatchPayload
}
updateMany: {
args: Prisma.UserPrizeUpdateManyArgs<ExtArgs>
result: BatchPayload
}
upsert: {
args: Prisma.UserPrizeUpsertArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$UserPrizePayload>
}
aggregate: {
args: Prisma.UserPrizeAggregateArgs<ExtArgs>
result: $Utils.Optional<AggregateUserPrize>
}
groupBy: {
args: Prisma.UserPrizeGroupByArgs<ExtArgs>
result: $Utils.Optional<UserPrizeGroupByOutputType>[]
}
count: {
args: Prisma.UserPrizeCountArgs<ExtArgs>
result: $Utils.Optional<UserPrizeCountAggregateOutputType> | number
}
}
}
SmsLog: {
payload: Prisma.$SmsLogPayload<ExtArgs>
fields: Prisma.SmsLogFieldRefs
operations: {
findUnique: {
args: Prisma.SmsLogFindUniqueArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$SmsLogPayload> | null
}
findUniqueOrThrow: {
args: Prisma.SmsLogFindUniqueOrThrowArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$SmsLogPayload>
}
findFirst: {
args: Prisma.SmsLogFindFirstArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$SmsLogPayload> | null
}
findFirstOrThrow: {
args: Prisma.SmsLogFindFirstOrThrowArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$SmsLogPayload>
}
findMany: {
args: Prisma.SmsLogFindManyArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$SmsLogPayload>[]
}
create: {
args: Prisma.SmsLogCreateArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$SmsLogPayload>
}
createMany: {
args: Prisma.SmsLogCreateManyArgs<ExtArgs>
result: BatchPayload
}
createManyAndReturn: {
args: Prisma.SmsLogCreateManyAndReturnArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$SmsLogPayload>[]
}
delete: {
args: Prisma.SmsLogDeleteArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$SmsLogPayload>
}
update: {
args: Prisma.SmsLogUpdateArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$SmsLogPayload>
}
deleteMany: {
args: Prisma.SmsLogDeleteManyArgs<ExtArgs>
result: BatchPayload
}
updateMany: {
args: Prisma.SmsLogUpdateManyArgs<ExtArgs>
result: BatchPayload
}
upsert: {
args: Prisma.SmsLogUpsertArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$SmsLogPayload>
}
aggregate: {
args: Prisma.SmsLogAggregateArgs<ExtArgs>
result: $Utils.Optional<AggregateSmsLog>
}
groupBy: {
args: Prisma.SmsLogGroupByArgs<ExtArgs>
result: $Utils.Optional<SmsLogGroupByOutputType>[]
}
count: {
args: Prisma.SmsLogCountArgs<ExtArgs>
result: $Utils.Optional<SmsLogCountAggregateOutputType> | number
}
}
}
AdminLog: {
payload: Prisma.$AdminLogPayload<ExtArgs>
fields: Prisma.AdminLogFieldRefs
operations: {
findUnique: {
args: Prisma.AdminLogFindUniqueArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$AdminLogPayload> | null
}
findUniqueOrThrow: {
args: Prisma.AdminLogFindUniqueOrThrowArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$AdminLogPayload>
}
findFirst: {
args: Prisma.AdminLogFindFirstArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$AdminLogPayload> | null
}
findFirstOrThrow: {
args: Prisma.AdminLogFindFirstOrThrowArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$AdminLogPayload>
}
findMany: {
args: Prisma.AdminLogFindManyArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$AdminLogPayload>[]
}
create: {
args: Prisma.AdminLogCreateArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$AdminLogPayload>
}
createMany: {
args: Prisma.AdminLogCreateManyArgs<ExtArgs>
result: BatchPayload
}
createManyAndReturn: {
args: Prisma.AdminLogCreateManyAndReturnArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$AdminLogPayload>[]
}
delete: {
args: Prisma.AdminLogDeleteArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$AdminLogPayload>
}
update: {
args: Prisma.AdminLogUpdateArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$AdminLogPayload>
}
deleteMany: {
args: Prisma.AdminLogDeleteManyArgs<ExtArgs>
result: BatchPayload
}
updateMany: {
args: Prisma.AdminLogUpdateManyArgs<ExtArgs>
result: BatchPayload
}
upsert: {
args: Prisma.AdminLogUpsertArgs<ExtArgs>
result: $Utils.PayloadToResult<Prisma.$AdminLogPayload>
}
aggregate: {
args: Prisma.AdminLogAggregateArgs<ExtArgs>
result: $Utils.Optional<AggregateAdminLog>
}
groupBy: {
args: Prisma.AdminLogGroupByArgs<ExtArgs>
result: $Utils.Optional<AdminLogGroupByOutputType>[]
}
count: {
args: Prisma.AdminLogCountArgs<ExtArgs>
result: $Utils.Optional<AdminLogCountAggregateOutputType> | number
}
}
}
}
} & {
other: {
payload: any
operations: {
$executeRaw: {
args: [query: TemplateStringsArray | Prisma.Sql, ...values: any[]],
result: any
}
$executeRawUnsafe: {
args: [query: string, ...values: any[]],
result: any
}
$queryRaw: {
args: [query: TemplateStringsArray | Prisma.Sql, ...values: any[]],
result: any
}
$queryRawUnsafe: {
args: [query: string, ...values: any[]],
result: any
}
}
}
}
export const defineExtension: $Extensions.ExtendsHook<"define", Prisma.TypeMapCb, $Extensions.DefaultArgs>
export type DefaultPrismaClient = PrismaClient
export type ErrorFormat = 'pretty' | 'colorless' | 'minimal'
export interface PrismaClientOptions {
/**
* Overwrites the datasource url from your schema.prisma file
*/
datasources?: Datasources
/**
* Overwrites the datasource url from your schema.prisma file
*/
datasourceUrl?: string
/**
* @default "colorless"
*/
errorFormat?: ErrorFormat
/**
* @example
* ```
* // Defaults to stdout
* log: ['query', 'info', 'warn', 'error']
*
* // Emit as events
* log: [
* { emit: 'stdout', level: 'query' },
* { emit: 'stdout', level: 'info' },
* { emit: 'stdout', level: 'warn' }
* { emit: 'stdout', level: 'error' }
* ]
* ```
* Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/logging#the-log-option).
*/
log?: (LogLevel | LogDefinition)[]
/**
* The default values for transactionOptions
* maxWait ?= 2000
* timeout ?= 5000
*/
transactionOptions?: {
maxWait?: number
timeout?: number
isolationLevel?: Prisma.TransactionIsolationLevel
}
}
/* Types for Logging */
export type LogLevel = 'info' | 'query' | 'warn' | 'error'
export type LogDefinition = {
level: LogLevel
emit: 'stdout' | 'event'
}
export type GetLogType<T extends LogLevel | LogDefinition> = T extends LogDefinition ? T['emit'] extends 'event' ? T['level'] : never : never
export type GetEvents<T extends any> = T extends Array<LogLevel | LogDefinition> ?
GetLogType<T[0]> | GetLogType<T[1]> | GetLogType<T[2]> | GetLogType<T[3]>
: never
export type QueryEvent = {
timestamp: Date
query: string
params: string
duration: number
target: string
}
export type LogEvent = {
timestamp: Date
message: string
target: string
}
/* End Types for Logging */
export type PrismaAction =
| 'findUnique'
| 'findUniqueOrThrow'
| 'findMany'
| 'findFirst'
| 'findFirstOrThrow'
| 'create'
| 'createMany'
| 'createManyAndReturn'
| 'update'
| 'updateMany'
| 'upsert'
| 'delete'
| 'deleteMany'
| 'executeRaw'
| 'queryRaw'
| 'aggregate'
| 'count'
| 'runCommandRaw'
| 'findRaw'
| 'groupBy'
/**
* These options are being passed into the middleware as "params"
*/
export type MiddlewareParams = {
model?: ModelName
action: PrismaAction
args: any
dataPath: string[]
runInTransaction: boolean
}
/**
* The `T` type makes sure, that the `return proceed` is not forgotten in the middleware implementation
*/
export type Middleware<T = any> = (
params: MiddlewareParams,
next: (params: MiddlewareParams) => $Utils.JsPromise<T>,
) => $Utils.JsPromise<T>
// tested in getLogLevel.test.ts
export function getLogLevel(log: Array<LogLevel | LogDefinition>): LogLevel | undefined;
/**
* `PrismaClient` proxy available in interactive transactions.
*/
export type TransactionClient = Omit<Prisma.DefaultPrismaClient, runtime.ITXClientDenyList>
export type Datasource = {
url?: string
}
/**
* Count Types
*/
/**
* Count Type AdminCountOutputType
*/
export type AdminCountOutputType = {
auditLogs: number
chanceTxns: number
}
export type AdminCountOutputTypeSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
auditLogs?: boolean | AdminCountOutputTypeCountAuditLogsArgs
chanceTxns?: boolean | AdminCountOutputTypeCountChanceTxnsArgs
}
// Custom InputTypes
/**
* AdminCountOutputType without action
*/
export type AdminCountOutputTypeDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the AdminCountOutputType
*/
select?: AdminCountOutputTypeSelect<ExtArgs> | null
}
/**
* AdminCountOutputType without action
*/
export type AdminCountOutputTypeCountAuditLogsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
where?: AdminLogWhereInput
}
/**
* AdminCountOutputType without action
*/
export type AdminCountOutputTypeCountChanceTxnsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
where?: ChanceTransactionWhereInput
}
/**
* Count Type UserCountOutputType
*/
export type UserCountOutputType = {
userCampaigns: number
chanceTransactions: number
spins: number
userPrizes: number
otpCodes: number
smsLogs: number
}
export type UserCountOutputTypeSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
userCampaigns?: boolean | UserCountOutputTypeCountUserCampaignsArgs
chanceTransactions?: boolean | UserCountOutputTypeCountChanceTransactionsArgs
spins?: boolean | UserCountOutputTypeCountSpinsArgs
userPrizes?: boolean | UserCountOutputTypeCountUserPrizesArgs
otpCodes?: boolean | UserCountOutputTypeCountOtpCodesArgs
smsLogs?: boolean | UserCountOutputTypeCountSmsLogsArgs
}
// 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 UserCountOutputTypeCountUserCampaignsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
where?: UserCampaignWhereInput
}
/**
* UserCountOutputType without action
*/
export type UserCountOutputTypeCountChanceTransactionsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
where?: ChanceTransactionWhereInput
}
/**
* UserCountOutputType without action
*/
export type UserCountOutputTypeCountSpinsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
where?: SpinWhereInput
}
/**
* UserCountOutputType without action
*/
export type UserCountOutputTypeCountUserPrizesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
where?: UserPrizeWhereInput
}
/**
* UserCountOutputType without action
*/
export type UserCountOutputTypeCountOtpCodesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
where?: OtpCodeWhereInput
}
/**
* UserCountOutputType without action
*/
export type UserCountOutputTypeCountSmsLogsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
where?: SmsLogWhereInput
}
/**
* Count Type CampaignCountOutputType
*/
export type CampaignCountOutputType = {
prizes: number
userCampaigns: number
chanceTxns: number
spins: number
userPrizes: number
}
export type CampaignCountOutputTypeSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
prizes?: boolean | CampaignCountOutputTypeCountPrizesArgs
userCampaigns?: boolean | CampaignCountOutputTypeCountUserCampaignsArgs
chanceTxns?: boolean | CampaignCountOutputTypeCountChanceTxnsArgs
spins?: boolean | CampaignCountOutputTypeCountSpinsArgs
userPrizes?: boolean | CampaignCountOutputTypeCountUserPrizesArgs
}
// Custom InputTypes
/**
* CampaignCountOutputType without action
*/
export type CampaignCountOutputTypeDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the CampaignCountOutputType
*/
select?: CampaignCountOutputTypeSelect<ExtArgs> | null
}
/**
* CampaignCountOutputType without action
*/
export type CampaignCountOutputTypeCountPrizesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
where?: PrizeWhereInput
}
/**
* CampaignCountOutputType without action
*/
export type CampaignCountOutputTypeCountUserCampaignsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
where?: UserCampaignWhereInput
}
/**
* CampaignCountOutputType without action
*/
export type CampaignCountOutputTypeCountChanceTxnsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
where?: ChanceTransactionWhereInput
}
/**
* CampaignCountOutputType without action
*/
export type CampaignCountOutputTypeCountSpinsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
where?: SpinWhereInput
}
/**
* CampaignCountOutputType without action
*/
export type CampaignCountOutputTypeCountUserPrizesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
where?: UserPrizeWhereInput
}
/**
* Count Type PrizeCountOutputType
*/
export type PrizeCountOutputType = {
spins: number
userPrizes: number
}
export type PrizeCountOutputTypeSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
spins?: boolean | PrizeCountOutputTypeCountSpinsArgs
userPrizes?: boolean | PrizeCountOutputTypeCountUserPrizesArgs
}
// Custom InputTypes
/**
* PrizeCountOutputType without action
*/
export type PrizeCountOutputTypeDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the PrizeCountOutputType
*/
select?: PrizeCountOutputTypeSelect<ExtArgs> | null
}
/**
* PrizeCountOutputType without action
*/
export type PrizeCountOutputTypeCountSpinsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
where?: SpinWhereInput
}
/**
* PrizeCountOutputType without action
*/
export type PrizeCountOutputTypeCountUserPrizesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
where?: UserPrizeWhereInput
}
/**
* Models
*/
/**
* Model Admin
*/
export type AggregateAdmin = {
_count: AdminCountAggregateOutputType | null
_min: AdminMinAggregateOutputType | null
_max: AdminMaxAggregateOutputType | null
}
export type AdminMinAggregateOutputType = {
id: string | null
name: string | null
mobile: string | null
email: string | null
passwordHash: string | null
role: $Enums.AdminRole | null
status: $Enums.AdminStatus | null
createdAt: Date | null
updatedAt: Date | null
}
export type AdminMaxAggregateOutputType = {
id: string | null
name: string | null
mobile: string | null
email: string | null
passwordHash: string | null
role: $Enums.AdminRole | null
status: $Enums.AdminStatus | null
createdAt: Date | null
updatedAt: Date | null
}
export type AdminCountAggregateOutputType = {
id: number
name: number
mobile: number
email: number
passwordHash: number
role: number
status: number
createdAt: number
updatedAt: number
_all: number
}
export type AdminMinAggregateInputType = {
id?: true
name?: true
mobile?: true
email?: true
passwordHash?: true
role?: true
status?: true
createdAt?: true
updatedAt?: true
}
export type AdminMaxAggregateInputType = {
id?: true
name?: true
mobile?: true
email?: true
passwordHash?: true
role?: true
status?: true
createdAt?: true
updatedAt?: true
}
export type AdminCountAggregateInputType = {
id?: true
name?: true
mobile?: true
email?: true
passwordHash?: true
role?: true
status?: true
createdAt?: true
updatedAt?: true
_all?: true
}
export type AdminAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Filter which Admin to aggregate.
*/
where?: AdminWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of Admins to fetch.
*/
orderBy?: AdminOrderByWithRelationInput | AdminOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the start position
*/
cursor?: AdminWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` Admins from the position of the cursor.
*/
take?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Skip the first `n` Admins.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Count returned Admins
**/
_count?: true | AdminCountAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the minimum value
**/
_min?: AdminMinAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the maximum value
**/
_max?: AdminMaxAggregateInputType
}
export type GetAdminAggregateType<T extends AdminAggregateArgs> = {
[P in keyof T & keyof AggregateAdmin]: P extends '_count' | 'count'
? T[P] extends true
? number
: GetScalarType<T[P], AggregateAdmin[P]>
: GetScalarType<T[P], AggregateAdmin[P]>
}
export type AdminGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
where?: AdminWhereInput
orderBy?: AdminOrderByWithAggregationInput | AdminOrderByWithAggregationInput[]
by: AdminScalarFieldEnum[] | AdminScalarFieldEnum
having?: AdminScalarWhereWithAggregatesInput
take?: number
skip?: number
_count?: AdminCountAggregateInputType | true
_min?: AdminMinAggregateInputType
_max?: AdminMaxAggregateInputType
}
export type AdminGroupByOutputType = {
id: string
name: string
mobile: string
email: string
passwordHash: string
role: $Enums.AdminRole
status: $Enums.AdminStatus
createdAt: Date
updatedAt: Date
_count: AdminCountAggregateOutputType | null
_min: AdminMinAggregateOutputType | null
_max: AdminMaxAggregateOutputType | null
}
type GetAdminGroupByPayload<T extends AdminGroupByArgs> = Prisma.PrismaPromise<
Array<
PickEnumerable<AdminGroupByOutputType, T['by']> &
{
[P in ((keyof T) & (keyof AdminGroupByOutputType))]: P extends '_count'
? T[P] extends boolean
? number
: GetScalarType<T[P], AdminGroupByOutputType[P]>
: GetScalarType<T[P], AdminGroupByOutputType[P]>
}
>
>
export type AdminSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
id?: boolean
name?: boolean
mobile?: boolean
email?: boolean
passwordHash?: boolean
role?: boolean
status?: boolean
createdAt?: boolean
updatedAt?: boolean
auditLogs?: boolean | Admin$auditLogsArgs<ExtArgs>
chanceTxns?: boolean | Admin$chanceTxnsArgs<ExtArgs>
_count?: boolean | AdminCountOutputTypeDefaultArgs<ExtArgs>
}, ExtArgs["result"]["admin"]>
export type AdminSelectCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
id?: boolean
name?: boolean
mobile?: boolean
email?: boolean
passwordHash?: boolean
role?: boolean
status?: boolean
createdAt?: boolean
updatedAt?: boolean
}, ExtArgs["result"]["admin"]>
export type AdminSelectScalar = {
id?: boolean
name?: boolean
mobile?: boolean
email?: boolean
passwordHash?: boolean
role?: boolean
status?: boolean
createdAt?: boolean
updatedAt?: boolean
}
export type AdminInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
auditLogs?: boolean | Admin$auditLogsArgs<ExtArgs>
chanceTxns?: boolean | Admin$chanceTxnsArgs<ExtArgs>
_count?: boolean | AdminCountOutputTypeDefaultArgs<ExtArgs>
}
export type AdminIncludeCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {}
export type $AdminPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
name: "Admin"
objects: {
auditLogs: Prisma.$AdminLogPayload<ExtArgs>[]
chanceTxns: Prisma.$ChanceTransactionPayload<ExtArgs>[]
}
scalars: $Extensions.GetPayloadResult<{
id: string
name: string
mobile: string
email: string
passwordHash: string
role: $Enums.AdminRole
status: $Enums.AdminStatus
createdAt: Date
updatedAt: Date
}, ExtArgs["result"]["admin"]>
composites: {}
}
type AdminGetPayload<S extends boolean | null | undefined | AdminDefaultArgs> = $Result.GetResult<Prisma.$AdminPayload, S>
type AdminCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
Omit<AdminFindManyArgs, 'select' | 'include' | 'distinct'> & {
select?: AdminCountAggregateInputType | true
}
export interface AdminDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> {
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['Admin'], meta: { name: 'Admin' } }
/**
* Find zero or one Admin that matches the filter.
* @param {AdminFindUniqueArgs} args - Arguments to find a Admin
* @example
* // Get one Admin
* const admin = await prisma.admin.findUnique({
* where: {
* // ... provide filter here
* }
* })
*/
findUnique<T extends AdminFindUniqueArgs>(args: SelectSubset<T, AdminFindUniqueArgs<ExtArgs>>): Prisma__AdminClient<$Result.GetResult<Prisma.$AdminPayload<ExtArgs>, T, "findUnique"> | null, null, ExtArgs>
/**
* Find one Admin that matches the filter or throw an error with `error.code='P2025'`
* if no matches were found.
* @param {AdminFindUniqueOrThrowArgs} args - Arguments to find a Admin
* @example
* // Get one Admin
* const admin = await prisma.admin.findUniqueOrThrow({
* where: {
* // ... provide filter here
* }
* })
*/
findUniqueOrThrow<T extends AdminFindUniqueOrThrowArgs>(args: SelectSubset<T, AdminFindUniqueOrThrowArgs<ExtArgs>>): Prisma__AdminClient<$Result.GetResult<Prisma.$AdminPayload<ExtArgs>, T, "findUniqueOrThrow">, never, ExtArgs>
/**
* Find the first Admin that matches the filter.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {AdminFindFirstArgs} args - Arguments to find a Admin
* @example
* // Get one Admin
* const admin = await prisma.admin.findFirst({
* where: {
* // ... provide filter here
* }
* })
*/
findFirst<T extends AdminFindFirstArgs>(args?: SelectSubset<T, AdminFindFirstArgs<ExtArgs>>): Prisma__AdminClient<$Result.GetResult<Prisma.$AdminPayload<ExtArgs>, T, "findFirst"> | null, null, ExtArgs>
/**
* Find the first Admin 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 {AdminFindFirstOrThrowArgs} args - Arguments to find a Admin
* @example
* // Get one Admin
* const admin = await prisma.admin.findFirstOrThrow({
* where: {
* // ... provide filter here
* }
* })
*/
findFirstOrThrow<T extends AdminFindFirstOrThrowArgs>(args?: SelectSubset<T, AdminFindFirstOrThrowArgs<ExtArgs>>): Prisma__AdminClient<$Result.GetResult<Prisma.$AdminPayload<ExtArgs>, T, "findFirstOrThrow">, never, ExtArgs>
/**
* Find zero or more Admins that matches the filter.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {AdminFindManyArgs} args - Arguments to filter and select certain fields only.
* @example
* // Get all Admins
* const admins = await prisma.admin.findMany()
*
* // Get first 10 Admins
* const admins = await prisma.admin.findMany({ take: 10 })
*
* // Only select the `id`
* const adminWithIdOnly = await prisma.admin.findMany({ select: { id: true } })
*
*/
findMany<T extends AdminFindManyArgs>(args?: SelectSubset<T, AdminFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$AdminPayload<ExtArgs>, T, "findMany">>
/**
* Create a Admin.
* @param {AdminCreateArgs} args - Arguments to create a Admin.
* @example
* // Create one Admin
* const Admin = await prisma.admin.create({
* data: {
* // ... data to create a Admin
* }
* })
*
*/
create<T extends AdminCreateArgs>(args: SelectSubset<T, AdminCreateArgs<ExtArgs>>): Prisma__AdminClient<$Result.GetResult<Prisma.$AdminPayload<ExtArgs>, T, "create">, never, ExtArgs>
/**
* Create many Admins.
* @param {AdminCreateManyArgs} args - Arguments to create many Admins.
* @example
* // Create many Admins
* const admin = await prisma.admin.createMany({
* data: [
* // ... provide data here
* ]
* })
*
*/
createMany<T extends AdminCreateManyArgs>(args?: SelectSubset<T, AdminCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
/**
* Create many Admins and returns the data saved in the database.
* @param {AdminCreateManyAndReturnArgs} args - Arguments to create many Admins.
* @example
* // Create many Admins
* const admin = await prisma.admin.createManyAndReturn({
* data: [
* // ... provide data here
* ]
* })
*
* // Create many Admins and only return the `id`
* const adminWithIdOnly = await prisma.admin.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 AdminCreateManyAndReturnArgs>(args?: SelectSubset<T, AdminCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$AdminPayload<ExtArgs>, T, "createManyAndReturn">>
/**
* Delete a Admin.
* @param {AdminDeleteArgs} args - Arguments to delete one Admin.
* @example
* // Delete one Admin
* const Admin = await prisma.admin.delete({
* where: {
* // ... filter to delete one Admin
* }
* })
*
*/
delete<T extends AdminDeleteArgs>(args: SelectSubset<T, AdminDeleteArgs<ExtArgs>>): Prisma__AdminClient<$Result.GetResult<Prisma.$AdminPayload<ExtArgs>, T, "delete">, never, ExtArgs>
/**
* Update one Admin.
* @param {AdminUpdateArgs} args - Arguments to update one Admin.
* @example
* // Update one Admin
* const admin = await prisma.admin.update({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
*/
update<T extends AdminUpdateArgs>(args: SelectSubset<T, AdminUpdateArgs<ExtArgs>>): Prisma__AdminClient<$Result.GetResult<Prisma.$AdminPayload<ExtArgs>, T, "update">, never, ExtArgs>
/**
* Delete zero or more Admins.
* @param {AdminDeleteManyArgs} args - Arguments to filter Admins to delete.
* @example
* // Delete a few Admins
* const { count } = await prisma.admin.deleteMany({
* where: {
* // ... provide filter here
* }
* })
*
*/
deleteMany<T extends AdminDeleteManyArgs>(args?: SelectSubset<T, AdminDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
/**
* Update zero or more Admins.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {AdminUpdateManyArgs} args - Arguments to update one or more rows.
* @example
* // Update many Admins
* const admin = await prisma.admin.updateMany({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
*/
updateMany<T extends AdminUpdateManyArgs>(args: SelectSubset<T, AdminUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
/**
* Create or update one Admin.
* @param {AdminUpsertArgs} args - Arguments to update or create a Admin.
* @example
* // Update or create a Admin
* const admin = await prisma.admin.upsert({
* create: {
* // ... data to create a Admin
* },
* update: {
* // ... in case it already exists, update
* },
* where: {
* // ... the filter for the Admin we want to update
* }
* })
*/
upsert<T extends AdminUpsertArgs>(args: SelectSubset<T, AdminUpsertArgs<ExtArgs>>): Prisma__AdminClient<$Result.GetResult<Prisma.$AdminPayload<ExtArgs>, T, "upsert">, never, ExtArgs>
/**
* Count the number of Admins.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {AdminCountArgs} args - Arguments to filter Admins to count.
* @example
* // Count the number of Admins
* const count = await prisma.admin.count({
* where: {
* // ... the filter for the Admins we want to count
* }
* })
**/
count<T extends AdminCountArgs>(
args?: Subset<T, AdminCountArgs>,
): Prisma.PrismaPromise<
T extends $Utils.Record<'select', any>
? T['select'] extends true
? number
: GetScalarType<T['select'], AdminCountAggregateOutputType>
: number
>
/**
* Allows you to perform aggregations operations on a Admin.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {AdminAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
* @example
* // Ordered by age ascending
* // Where email contains prisma.io
* // Limited to the 10 users
* const aggregations = await prisma.user.aggregate({
* _avg: {
* age: true,
* },
* where: {
* email: {
* contains: "prisma.io",
* },
* },
* orderBy: {
* age: "asc",
* },
* take: 10,
* })
**/
aggregate<T extends AdminAggregateArgs>(args: Subset<T, AdminAggregateArgs>): Prisma.PrismaPromise<GetAdminAggregateType<T>>
/**
* Group by Admin.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {AdminGroupByArgs} args - Group by arguments.
* @example
* // Group by city, order by createdAt, get count
* const result = await prisma.user.groupBy({
* by: ['city', 'createdAt'],
* orderBy: {
* createdAt: true
* },
* _count: {
* _all: true
* },
* })
*
**/
groupBy<
T extends AdminGroupByArgs,
HasSelectOrTake extends Or<
Extends<'skip', Keys<T>>,
Extends<'take', Keys<T>>
>,
OrderByArg extends True extends HasSelectOrTake
? { orderBy: AdminGroupByArgs['orderBy'] }
: { orderBy?: AdminGroupByArgs['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, AdminGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetAdminGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
/**
* Fields of the Admin model
*/
readonly fields: AdminFieldRefs;
}
/**
* The delegate class that acts as a "Promise-like" for Admin.
* Why is this prefixed with `Prisma__`?
* Because we want to prevent naming conflicts as mentioned in
* https://github.com/prisma/prisma-client-js/issues/707
*/
export interface Prisma__AdminClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> extends Prisma.PrismaPromise<T> {
readonly [Symbol.toStringTag]: "PrismaPromise"
auditLogs<T extends Admin$auditLogsArgs<ExtArgs> = {}>(args?: Subset<T, Admin$auditLogsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$AdminLogPayload<ExtArgs>, T, "findMany"> | Null>
chanceTxns<T extends Admin$chanceTxnsArgs<ExtArgs> = {}>(args?: Subset<T, Admin$chanceTxnsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$ChanceTransactionPayload<ExtArgs>, T, "findMany"> | Null>
/**
* Attaches callbacks for the resolution and/or rejection of the Promise.
* @param onfulfilled The callback to execute when the Promise is resolved.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of which ever callback is executed.
*/
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): $Utils.JsPromise<TResult1 | TResult2>
/**
* Attaches a callback for only the rejection of the Promise.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of the callback.
*/
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): $Utils.JsPromise<T | TResult>
/**
* Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
* resolved value cannot be modified from the callback.
* @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
* @returns A Promise for the completion of the callback.
*/
finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise<T>
}
/**
* Fields of the Admin model
*/
interface AdminFieldRefs {
readonly id: FieldRef<"Admin", 'String'>
readonly name: FieldRef<"Admin", 'String'>
readonly mobile: FieldRef<"Admin", 'String'>
readonly email: FieldRef<"Admin", 'String'>
readonly passwordHash: FieldRef<"Admin", 'String'>
readonly role: FieldRef<"Admin", 'AdminRole'>
readonly status: FieldRef<"Admin", 'AdminStatus'>
readonly createdAt: FieldRef<"Admin", 'DateTime'>
readonly updatedAt: FieldRef<"Admin", 'DateTime'>
}
// Custom InputTypes
/**
* Admin findUnique
*/
export type AdminFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Admin
*/
select?: AdminSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: AdminInclude<ExtArgs> | null
/**
* Filter, which Admin to fetch.
*/
where: AdminWhereUniqueInput
}
/**
* Admin findUniqueOrThrow
*/
export type AdminFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Admin
*/
select?: AdminSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: AdminInclude<ExtArgs> | null
/**
* Filter, which Admin to fetch.
*/
where: AdminWhereUniqueInput
}
/**
* Admin findFirst
*/
export type AdminFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Admin
*/
select?: AdminSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: AdminInclude<ExtArgs> | null
/**
* Filter, which Admin to fetch.
*/
where?: AdminWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of Admins to fetch.
*/
orderBy?: AdminOrderByWithRelationInput | AdminOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for searching for Admins.
*/
cursor?: AdminWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` Admins from the position of the cursor.
*/
take?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Skip the first `n` Admins.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of Admins.
*/
distinct?: AdminScalarFieldEnum | AdminScalarFieldEnum[]
}
/**
* Admin findFirstOrThrow
*/
export type AdminFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Admin
*/
select?: AdminSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: AdminInclude<ExtArgs> | null
/**
* Filter, which Admin to fetch.
*/
where?: AdminWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of Admins to fetch.
*/
orderBy?: AdminOrderByWithRelationInput | AdminOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for searching for Admins.
*/
cursor?: AdminWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` Admins from the position of the cursor.
*/
take?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Skip the first `n` Admins.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of Admins.
*/
distinct?: AdminScalarFieldEnum | AdminScalarFieldEnum[]
}
/**
* Admin findMany
*/
export type AdminFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Admin
*/
select?: AdminSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: AdminInclude<ExtArgs> | null
/**
* Filter, which Admins to fetch.
*/
where?: AdminWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of Admins to fetch.
*/
orderBy?: AdminOrderByWithRelationInput | AdminOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for listing Admins.
*/
cursor?: AdminWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` Admins from the position of the cursor.
*/
take?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Skip the first `n` Admins.
*/
skip?: number
distinct?: AdminScalarFieldEnum | AdminScalarFieldEnum[]
}
/**
* Admin create
*/
export type AdminCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Admin
*/
select?: AdminSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: AdminInclude<ExtArgs> | null
/**
* The data needed to create a Admin.
*/
data: XOR<AdminCreateInput, AdminUncheckedCreateInput>
}
/**
* Admin createMany
*/
export type AdminCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* The data used to create many Admins.
*/
data: AdminCreateManyInput | AdminCreateManyInput[]
skipDuplicates?: boolean
}
/**
* Admin createManyAndReturn
*/
export type AdminCreateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Admin
*/
select?: AdminSelectCreateManyAndReturn<ExtArgs> | null
/**
* The data used to create many Admins.
*/
data: AdminCreateManyInput | AdminCreateManyInput[]
skipDuplicates?: boolean
}
/**
* Admin update
*/
export type AdminUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Admin
*/
select?: AdminSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: AdminInclude<ExtArgs> | null
/**
* The data needed to update a Admin.
*/
data: XOR<AdminUpdateInput, AdminUncheckedUpdateInput>
/**
* Choose, which Admin to update.
*/
where: AdminWhereUniqueInput
}
/**
* Admin updateMany
*/
export type AdminUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* The data used to update Admins.
*/
data: XOR<AdminUpdateManyMutationInput, AdminUncheckedUpdateManyInput>
/**
* Filter which Admins to update
*/
where?: AdminWhereInput
}
/**
* Admin upsert
*/
export type AdminUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Admin
*/
select?: AdminSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: AdminInclude<ExtArgs> | null
/**
* The filter to search for the Admin to update in case it exists.
*/
where: AdminWhereUniqueInput
/**
* In case the Admin found by the `where` argument doesn't exist, create a new Admin with this data.
*/
create: XOR<AdminCreateInput, AdminUncheckedCreateInput>
/**
* In case the Admin was found with the provided `where` argument, update it with this data.
*/
update: XOR<AdminUpdateInput, AdminUncheckedUpdateInput>
}
/**
* Admin delete
*/
export type AdminDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Admin
*/
select?: AdminSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: AdminInclude<ExtArgs> | null
/**
* Filter which Admin to delete.
*/
where: AdminWhereUniqueInput
}
/**
* Admin deleteMany
*/
export type AdminDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Filter which Admins to delete
*/
where?: AdminWhereInput
}
/**
* Admin.auditLogs
*/
export type Admin$auditLogsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the AdminLog
*/
select?: AdminLogSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: AdminLogInclude<ExtArgs> | null
where?: AdminLogWhereInput
orderBy?: AdminLogOrderByWithRelationInput | AdminLogOrderByWithRelationInput[]
cursor?: AdminLogWhereUniqueInput
take?: number
skip?: number
distinct?: AdminLogScalarFieldEnum | AdminLogScalarFieldEnum[]
}
/**
* Admin.chanceTxns
*/
export type Admin$chanceTxnsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the ChanceTransaction
*/
select?: ChanceTransactionSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: ChanceTransactionInclude<ExtArgs> | null
where?: ChanceTransactionWhereInput
orderBy?: ChanceTransactionOrderByWithRelationInput | ChanceTransactionOrderByWithRelationInput[]
cursor?: ChanceTransactionWhereUniqueInput
take?: number
skip?: number
distinct?: ChanceTransactionScalarFieldEnum | ChanceTransactionScalarFieldEnum[]
}
/**
* Admin without action
*/
export type AdminDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Admin
*/
select?: AdminSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: AdminInclude<ExtArgs> | null
}
/**
* Model User
*/
export type AggregateUser = {
_count: UserCountAggregateOutputType | null
_min: UserMinAggregateOutputType | null
_max: UserMaxAggregateOutputType | null
}
export type UserMinAggregateOutputType = {
id: string | null
mobile: string | null
name: string | null
status: $Enums.UserStatus | null
lastLoginAt: Date | null
createdAt: Date | null
updatedAt: Date | null
}
export type UserMaxAggregateOutputType = {
id: string | null
mobile: string | null
name: string | null
status: $Enums.UserStatus | null
lastLoginAt: Date | null
createdAt: Date | null
updatedAt: Date | null
}
export type UserCountAggregateOutputType = {
id: number
mobile: number
name: number
status: number
lastLoginAt: number
createdAt: number
updatedAt: number
_all: number
}
export type UserMinAggregateInputType = {
id?: true
mobile?: true
name?: true
status?: true
lastLoginAt?: true
createdAt?: true
updatedAt?: true
}
export type UserMaxAggregateInputType = {
id?: true
mobile?: true
name?: true
status?: true
lastLoginAt?: true
createdAt?: true
updatedAt?: true
}
export type UserCountAggregateInputType = {
id?: true
mobile?: true
name?: true
status?: true
lastLoginAt?: true
createdAt?: true
updatedAt?: true
_all?: true
}
export type UserAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Filter which User to aggregate.
*/
where?: UserWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of Users to fetch.
*/
orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the start position
*/
cursor?: UserWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` Users from the position of the cursor.
*/
take?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Skip the first `n` Users.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Count returned Users
**/
_count?: true | UserCountAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the minimum value
**/
_min?: UserMinAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the maximum value
**/
_max?: UserMaxAggregateInputType
}
export type GetUserAggregateType<T extends UserAggregateArgs> = {
[P in keyof T & keyof AggregateUser]: P extends '_count' | 'count'
? T[P] extends true
? number
: GetScalarType<T[P], AggregateUser[P]>
: GetScalarType<T[P], AggregateUser[P]>
}
export type UserGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
where?: UserWhereInput
orderBy?: UserOrderByWithAggregationInput | UserOrderByWithAggregationInput[]
by: UserScalarFieldEnum[] | UserScalarFieldEnum
having?: UserScalarWhereWithAggregatesInput
take?: number
skip?: number
_count?: UserCountAggregateInputType | true
_min?: UserMinAggregateInputType
_max?: UserMaxAggregateInputType
}
export type UserGroupByOutputType = {
id: string
mobile: string
name: string | null
status: $Enums.UserStatus
lastLoginAt: Date | null
createdAt: Date
updatedAt: Date
_count: UserCountAggregateOutputType | null
_min: UserMinAggregateOutputType | null
_max: UserMaxAggregateOutputType | null
}
type GetUserGroupByPayload<T extends UserGroupByArgs> = Prisma.PrismaPromise<
Array<
PickEnumerable<UserGroupByOutputType, T['by']> &
{
[P in ((keyof T) & (keyof UserGroupByOutputType))]: P extends '_count'
? T[P] extends boolean
? number
: GetScalarType<T[P], UserGroupByOutputType[P]>
: GetScalarType<T[P], UserGroupByOutputType[P]>
}
>
>
export type UserSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
id?: boolean
mobile?: boolean
name?: boolean
status?: boolean
lastLoginAt?: boolean
createdAt?: boolean
updatedAt?: boolean
userCampaigns?: boolean | User$userCampaignsArgs<ExtArgs>
chanceTransactions?: boolean | User$chanceTransactionsArgs<ExtArgs>
spins?: boolean | User$spinsArgs<ExtArgs>
userPrizes?: boolean | User$userPrizesArgs<ExtArgs>
otpCodes?: boolean | User$otpCodesArgs<ExtArgs>
smsLogs?: boolean | User$smsLogsArgs<ExtArgs>
_count?: boolean | UserCountOutputTypeDefaultArgs<ExtArgs>
}, ExtArgs["result"]["user"]>
export type UserSelectCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
id?: boolean
mobile?: boolean
name?: boolean
status?: boolean
lastLoginAt?: boolean
createdAt?: boolean
updatedAt?: boolean
}, ExtArgs["result"]["user"]>
export type UserSelectScalar = {
id?: boolean
mobile?: boolean
name?: boolean
status?: boolean
lastLoginAt?: boolean
createdAt?: boolean
updatedAt?: boolean
}
export type UserInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
userCampaigns?: boolean | User$userCampaignsArgs<ExtArgs>
chanceTransactions?: boolean | User$chanceTransactionsArgs<ExtArgs>
spins?: boolean | User$spinsArgs<ExtArgs>
userPrizes?: boolean | User$userPrizesArgs<ExtArgs>
otpCodes?: boolean | User$otpCodesArgs<ExtArgs>
smsLogs?: boolean | User$smsLogsArgs<ExtArgs>
_count?: boolean | UserCountOutputTypeDefaultArgs<ExtArgs>
}
export type UserIncludeCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {}
export type $UserPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
name: "User"
objects: {
userCampaigns: Prisma.$UserCampaignPayload<ExtArgs>[]
chanceTransactions: Prisma.$ChanceTransactionPayload<ExtArgs>[]
spins: Prisma.$SpinPayload<ExtArgs>[]
userPrizes: Prisma.$UserPrizePayload<ExtArgs>[]
otpCodes: Prisma.$OtpCodePayload<ExtArgs>[]
smsLogs: Prisma.$SmsLogPayload<ExtArgs>[]
}
scalars: $Extensions.GetPayloadResult<{
id: string
mobile: string
name: string | null
status: $Enums.UserStatus
lastLoginAt: 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'> & {
select?: UserCountAggregateInputType | true
}
export interface UserDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> {
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['User'], meta: { name: 'User' } }
/**
* Find zero or one User that matches the filter.
* @param {UserFindUniqueArgs} args - Arguments to find a User
* @example
* // Get one User
* const user = await prisma.user.findUnique({
* where: {
* // ... provide filter here
* }
* })
*/
findUnique<T extends UserFindUniqueArgs>(args: SelectSubset<T, UserFindUniqueArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findUnique"> | null, null, ExtArgs>
/**
* Find one User that matches the filter or throw an error with `error.code='P2025'`
* if no matches were found.
* @param {UserFindUniqueOrThrowArgs} args - Arguments to find a User
* @example
* // Get one User
* const user = await prisma.user.findUniqueOrThrow({
* where: {
* // ... provide filter here
* }
* })
*/
findUniqueOrThrow<T extends UserFindUniqueOrThrowArgs>(args: SelectSubset<T, UserFindUniqueOrThrowArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findUniqueOrThrow">, never, ExtArgs>
/**
* Find the first User that matches the filter.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {UserFindFirstArgs} args - Arguments to find a User
* @example
* // Get one User
* const user = await prisma.user.findFirst({
* where: {
* // ... provide filter here
* }
* })
*/
findFirst<T extends UserFindFirstArgs>(args?: SelectSubset<T, UserFindFirstArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findFirst"> | null, null, ExtArgs>
/**
* Find the first User that matches the filter or
* throw `PrismaKnownClientError` with `P2025` code if no matches were found.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {UserFindFirstOrThrowArgs} args - Arguments to find a User
* @example
* // Get one User
* const user = await prisma.user.findFirstOrThrow({
* where: {
* // ... provide filter here
* }
* })
*/
findFirstOrThrow<T extends UserFindFirstOrThrowArgs>(args?: SelectSubset<T, UserFindFirstOrThrowArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findFirstOrThrow">, never, ExtArgs>
/**
* Find zero or more Users that matches the filter.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {UserFindManyArgs} args - Arguments to filter and select certain fields only.
* @example
* // Get all Users
* const users = await prisma.user.findMany()
*
* // Get first 10 Users
* const users = await prisma.user.findMany({ take: 10 })
*
* // Only select the `id`
* const userWithIdOnly = await prisma.user.findMany({ select: { id: true } })
*
*/
findMany<T extends UserFindManyArgs>(args?: SelectSubset<T, UserFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findMany">>
/**
* Create a User.
* @param {UserCreateArgs} args - Arguments to create a User.
* @example
* // Create one User
* const User = await prisma.user.create({
* data: {
* // ... data to create a User
* }
* })
*
*/
create<T extends UserCreateArgs>(args: SelectSubset<T, UserCreateArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "create">, never, ExtArgs>
/**
* Create many Users.
* @param {UserCreateManyArgs} args - Arguments to create many Users.
* @example
* // Create many Users
* const user = await prisma.user.createMany({
* data: [
* // ... provide data here
* ]
* })
*
*/
createMany<T extends UserCreateManyArgs>(args?: SelectSubset<T, UserCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
/**
* Create many Users and returns the data saved in the database.
* @param {UserCreateManyAndReturnArgs} args - Arguments to create many Users.
* @example
* // Create many Users
* const user = await prisma.user.createManyAndReturn({
* data: [
* // ... provide data here
* ]
* })
*
* // Create many Users and only return the `id`
* const userWithIdOnly = await prisma.user.createManyAndReturn({
* select: { id: true },
* data: [
* // ... provide data here
* ]
* })
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
*
*/
createManyAndReturn<T extends UserCreateManyAndReturnArgs>(args?: SelectSubset<T, UserCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "createManyAndReturn">>
/**
* Delete a User.
* @param {UserDeleteArgs} args - Arguments to delete one User.
* @example
* // Delete one User
* const User = await prisma.user.delete({
* where: {
* // ... filter to delete one User
* }
* })
*
*/
delete<T extends UserDeleteArgs>(args: SelectSubset<T, UserDeleteArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "delete">, never, ExtArgs>
/**
* Update one User.
* @param {UserUpdateArgs} args - Arguments to update one User.
* @example
* // Update one User
* const user = await prisma.user.update({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
*/
update<T extends UserUpdateArgs>(args: SelectSubset<T, UserUpdateArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "update">, never, ExtArgs>
/**
* Delete zero or more Users.
* @param {UserDeleteManyArgs} args - Arguments to filter Users to delete.
* @example
* // Delete a few Users
* const { count } = await prisma.user.deleteMany({
* where: {
* // ... provide filter here
* }
* })
*
*/
deleteMany<T extends UserDeleteManyArgs>(args?: SelectSubset<T, UserDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
/**
* Update zero or more Users.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {UserUpdateManyArgs} args - Arguments to update one or more rows.
* @example
* // Update many Users
* const user = await prisma.user.updateMany({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
*/
updateMany<T extends UserUpdateManyArgs>(args: SelectSubset<T, UserUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
/**
* Create or update one User.
* @param {UserUpsertArgs} args - Arguments to update or create a User.
* @example
* // Update or create a User
* const user = await prisma.user.upsert({
* create: {
* // ... data to create a User
* },
* update: {
* // ... in case it already exists, update
* },
* where: {
* // ... the filter for the User we want to update
* }
* })
*/
upsert<T extends UserUpsertArgs>(args: SelectSubset<T, UserUpsertArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "upsert">, never, ExtArgs>
/**
* Count the number of Users.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {UserCountArgs} args - Arguments to filter Users to count.
* @example
* // Count the number of Users
* const count = await prisma.user.count({
* where: {
* // ... the filter for the Users we want to count
* }
* })
**/
count<T extends UserCountArgs>(
args?: Subset<T, UserCountArgs>,
): Prisma.PrismaPromise<
T extends $Utils.Record<'select', any>
? T['select'] extends true
? number
: GetScalarType<T['select'], UserCountAggregateOutputType>
: number
>
/**
* Allows you to perform aggregations operations on a User.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {UserAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
* @example
* // Ordered by age ascending
* // Where email contains prisma.io
* // Limited to the 10 users
* const aggregations = await prisma.user.aggregate({
* _avg: {
* age: true,
* },
* where: {
* email: {
* contains: "prisma.io",
* },
* },
* orderBy: {
* age: "asc",
* },
* take: 10,
* })
**/
aggregate<T extends UserAggregateArgs>(args: Subset<T, UserAggregateArgs>): Prisma.PrismaPromise<GetUserAggregateType<T>>
/**
* Group by User.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {UserGroupByArgs} args - Group by arguments.
* @example
* // Group by city, order by createdAt, get count
* const result = await prisma.user.groupBy({
* by: ['city', 'createdAt'],
* orderBy: {
* createdAt: true
* },
* _count: {
* _all: true
* },
* })
*
**/
groupBy<
T extends UserGroupByArgs,
HasSelectOrTake extends Or<
Extends<'skip', Keys<T>>,
Extends<'take', Keys<T>>
>,
OrderByArg extends True extends HasSelectOrTake
? { orderBy: UserGroupByArgs['orderBy'] }
: { orderBy?: UserGroupByArgs['orderBy'] },
OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
ByFields extends MaybeTupleToUnion<T['by']>,
ByValid extends Has<ByFields, OrderFields>,
HavingFields extends GetHavingFields<T['having']>,
HavingValid extends Has<ByFields, HavingFields>,
ByEmpty extends T['by'] extends never[] ? True : False,
InputErrors extends ByEmpty extends True
? `Error: "by" must not be empty.`
: HavingValid extends False
? {
[P in HavingFields]: P extends ByFields
? never
: P extends string
? `Error: Field "${P}" used in "having" needs to be provided in "by".`
: [
Error,
'Field ',
P,
` in "having" needs to be provided in "by"`,
]
}[HavingFields]
: 'take' extends Keys<T>
? 'orderBy' extends Keys<T>
? ByValid extends True
? {}
: {
[P in OrderFields]: P extends ByFields
? never
: `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
}[OrderFields]
: 'Error: If you provide "take", you also need to provide "orderBy"'
: 'skip' extends Keys<T>
? 'orderBy' extends Keys<T>
? ByValid extends True
? {}
: {
[P in OrderFields]: P extends ByFields
? never
: `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
}[OrderFields]
: 'Error: If you provide "skip", you also need to provide "orderBy"'
: ByValid extends True
? {}
: {
[P in OrderFields]: P extends ByFields
? never
: `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
}[OrderFields]
>(args: SubsetIntersection<T, UserGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetUserGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
/**
* Fields of the User model
*/
readonly fields: UserFieldRefs;
}
/**
* The delegate class that acts as a "Promise-like" for User.
* Why is this prefixed with `Prisma__`?
* Because we want to prevent naming conflicts as mentioned in
* https://github.com/prisma/prisma-client-js/issues/707
*/
export interface Prisma__UserClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> extends Prisma.PrismaPromise<T> {
readonly [Symbol.toStringTag]: "PrismaPromise"
userCampaigns<T extends User$userCampaignsArgs<ExtArgs> = {}>(args?: Subset<T, User$userCampaignsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$UserCampaignPayload<ExtArgs>, T, "findMany"> | Null>
chanceTransactions<T extends User$chanceTransactionsArgs<ExtArgs> = {}>(args?: Subset<T, User$chanceTransactionsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$ChanceTransactionPayload<ExtArgs>, T, "findMany"> | Null>
spins<T extends User$spinsArgs<ExtArgs> = {}>(args?: Subset<T, User$spinsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$SpinPayload<ExtArgs>, T, "findMany"> | Null>
userPrizes<T extends User$userPrizesArgs<ExtArgs> = {}>(args?: Subset<T, User$userPrizesArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$UserPrizePayload<ExtArgs>, T, "findMany"> | Null>
otpCodes<T extends User$otpCodesArgs<ExtArgs> = {}>(args?: Subset<T, User$otpCodesArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$OtpCodePayload<ExtArgs>, T, "findMany"> | Null>
smsLogs<T extends User$smsLogsArgs<ExtArgs> = {}>(args?: Subset<T, User$smsLogsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$SmsLogPayload<ExtArgs>, T, "findMany"> | Null>
/**
* Attaches callbacks for the resolution and/or rejection of the Promise.
* @param onfulfilled The callback to execute when the Promise is resolved.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of which ever callback is executed.
*/
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): $Utils.JsPromise<TResult1 | TResult2>
/**
* Attaches a callback for only the rejection of the Promise.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of the callback.
*/
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): $Utils.JsPromise<T | TResult>
/**
* Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
* resolved value cannot be modified from the callback.
* @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
* @returns A Promise for the completion of the callback.
*/
finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise<T>
}
/**
* Fields of the User model
*/
interface UserFieldRefs {
readonly id: FieldRef<"User", 'String'>
readonly mobile: FieldRef<"User", 'String'>
readonly name: FieldRef<"User", 'String'>
readonly status: FieldRef<"User", 'UserStatus'>
readonly lastLoginAt: 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
/**
* Choose, which related nodes to fetch as well
*/
include?: UserInclude<ExtArgs> | null
/**
* Filter, which User to fetch.
*/
where: UserWhereUniqueInput
}
/**
* User findUniqueOrThrow
*/
export type UserFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the User
*/
select?: UserSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: UserInclude<ExtArgs> | null
/**
* Filter, which User to fetch.
*/
where: UserWhereUniqueInput
}
/**
* User findFirst
*/
export type UserFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the User
*/
select?: UserSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: UserInclude<ExtArgs> | null
/**
* Filter, which User to fetch.
*/
where?: UserWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of Users to fetch.
*/
orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for searching for Users.
*/
cursor?: UserWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` Users from the position of the cursor.
*/
take?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Skip the first `n` Users.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of Users.
*/
distinct?: UserScalarFieldEnum | UserScalarFieldEnum[]
}
/**
* User findFirstOrThrow
*/
export type UserFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the User
*/
select?: UserSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: UserInclude<ExtArgs> | null
/**
* Filter, which User to fetch.
*/
where?: UserWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of Users to fetch.
*/
orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for searching for Users.
*/
cursor?: UserWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` Users from the position of the cursor.
*/
take?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Skip the first `n` Users.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of Users.
*/
distinct?: UserScalarFieldEnum | UserScalarFieldEnum[]
}
/**
* User findMany
*/
export type UserFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the User
*/
select?: UserSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: UserInclude<ExtArgs> | null
/**
* Filter, which Users to fetch.
*/
where?: UserWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of Users to fetch.
*/
orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for listing Users.
*/
cursor?: UserWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` Users from the position of the cursor.
*/
take?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Skip the first `n` Users.
*/
skip?: number
distinct?: UserScalarFieldEnum | UserScalarFieldEnum[]
}
/**
* User create
*/
export type UserCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the User
*/
select?: UserSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: UserInclude<ExtArgs> | null
/**
* The data needed to create a User.
*/
data: XOR<UserCreateInput, UserUncheckedCreateInput>
}
/**
* User createMany
*/
export type UserCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* The data used to create many Users.
*/
data: UserCreateManyInput | UserCreateManyInput[]
skipDuplicates?: boolean
}
/**
* User createManyAndReturn
*/
export type UserCreateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the User
*/
select?: UserSelectCreateManyAndReturn<ExtArgs> | null
/**
* The data used to create many Users.
*/
data: UserCreateManyInput | UserCreateManyInput[]
skipDuplicates?: boolean
}
/**
* User update
*/
export type UserUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the User
*/
select?: UserSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: UserInclude<ExtArgs> | null
/**
* The data needed to update a User.
*/
data: XOR<UserUpdateInput, UserUncheckedUpdateInput>
/**
* Choose, which User to update.
*/
where: UserWhereUniqueInput
}
/**
* User updateMany
*/
export type UserUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* The data used to update Users.
*/
data: XOR<UserUpdateManyMutationInput, UserUncheckedUpdateManyInput>
/**
* Filter which Users to update
*/
where?: UserWhereInput
}
/**
* User upsert
*/
export type UserUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the User
*/
select?: UserSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: UserInclude<ExtArgs> | null
/**
* The filter to search for the User to update in case it exists.
*/
where: UserWhereUniqueInput
/**
* In case the User found by the `where` argument doesn't exist, create a new User with this data.
*/
create: XOR<UserCreateInput, UserUncheckedCreateInput>
/**
* In case the User was found with the provided `where` argument, update it with this data.
*/
update: XOR<UserUpdateInput, UserUncheckedUpdateInput>
}
/**
* User delete
*/
export type UserDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the User
*/
select?: UserSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: UserInclude<ExtArgs> | null
/**
* Filter which User to delete.
*/
where: UserWhereUniqueInput
}
/**
* User deleteMany
*/
export type UserDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Filter which Users to delete
*/
where?: UserWhereInput
}
/**
* User.userCampaigns
*/
export type User$userCampaignsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the UserCampaign
*/
select?: UserCampaignSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: UserCampaignInclude<ExtArgs> | null
where?: UserCampaignWhereInput
orderBy?: UserCampaignOrderByWithRelationInput | UserCampaignOrderByWithRelationInput[]
cursor?: UserCampaignWhereUniqueInput
take?: number
skip?: number
distinct?: UserCampaignScalarFieldEnum | UserCampaignScalarFieldEnum[]
}
/**
* User.chanceTransactions
*/
export type User$chanceTransactionsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the ChanceTransaction
*/
select?: ChanceTransactionSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: ChanceTransactionInclude<ExtArgs> | null
where?: ChanceTransactionWhereInput
orderBy?: ChanceTransactionOrderByWithRelationInput | ChanceTransactionOrderByWithRelationInput[]
cursor?: ChanceTransactionWhereUniqueInput
take?: number
skip?: number
distinct?: ChanceTransactionScalarFieldEnum | ChanceTransactionScalarFieldEnum[]
}
/**
* User.spins
*/
export type User$spinsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Spin
*/
select?: SpinSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: SpinInclude<ExtArgs> | null
where?: SpinWhereInput
orderBy?: SpinOrderByWithRelationInput | SpinOrderByWithRelationInput[]
cursor?: SpinWhereUniqueInput
take?: number
skip?: number
distinct?: SpinScalarFieldEnum | SpinScalarFieldEnum[]
}
/**
* User.userPrizes
*/
export type User$userPrizesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the UserPrize
*/
select?: UserPrizeSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: UserPrizeInclude<ExtArgs> | null
where?: UserPrizeWhereInput
orderBy?: UserPrizeOrderByWithRelationInput | UserPrizeOrderByWithRelationInput[]
cursor?: UserPrizeWhereUniqueInput
take?: number
skip?: number
distinct?: UserPrizeScalarFieldEnum | UserPrizeScalarFieldEnum[]
}
/**
* User.otpCodes
*/
export type User$otpCodesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the OtpCode
*/
select?: OtpCodeSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: OtpCodeInclude<ExtArgs> | null
where?: OtpCodeWhereInput
orderBy?: OtpCodeOrderByWithRelationInput | OtpCodeOrderByWithRelationInput[]
cursor?: OtpCodeWhereUniqueInput
take?: number
skip?: number
distinct?: OtpCodeScalarFieldEnum | OtpCodeScalarFieldEnum[]
}
/**
* User.smsLogs
*/
export type User$smsLogsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the SmsLog
*/
select?: SmsLogSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: SmsLogInclude<ExtArgs> | null
where?: SmsLogWhereInput
orderBy?: SmsLogOrderByWithRelationInput | SmsLogOrderByWithRelationInput[]
cursor?: SmsLogWhereUniqueInput
take?: number
skip?: number
distinct?: SmsLogScalarFieldEnum | SmsLogScalarFieldEnum[]
}
/**
* User without action
*/
export type UserDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the User
*/
select?: UserSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: UserInclude<ExtArgs> | null
}
/**
* Model OtpCode
*/
export type AggregateOtpCode = {
_count: OtpCodeCountAggregateOutputType | null
_avg: OtpCodeAvgAggregateOutputType | null
_sum: OtpCodeSumAggregateOutputType | null
_min: OtpCodeMinAggregateOutputType | null
_max: OtpCodeMaxAggregateOutputType | null
}
export type OtpCodeAvgAggregateOutputType = {
attempts: number | null
}
export type OtpCodeSumAggregateOutputType = {
attempts: number | null
}
export type OtpCodeMinAggregateOutputType = {
id: string | null
mobile: string | null
code: string | null
userId: string | null
attempts: number | null
consumed: boolean | null
expiresAt: Date | null
createdAt: Date | null
}
export type OtpCodeMaxAggregateOutputType = {
id: string | null
mobile: string | null
code: string | null
userId: string | null
attempts: number | null
consumed: boolean | null
expiresAt: Date | null
createdAt: Date | null
}
export type OtpCodeCountAggregateOutputType = {
id: number
mobile: number
code: number
userId: number
attempts: number
consumed: number
expiresAt: number
createdAt: number
_all: number
}
export type OtpCodeAvgAggregateInputType = {
attempts?: true
}
export type OtpCodeSumAggregateInputType = {
attempts?: true
}
export type OtpCodeMinAggregateInputType = {
id?: true
mobile?: true
code?: true
userId?: true
attempts?: true
consumed?: true
expiresAt?: true
createdAt?: true
}
export type OtpCodeMaxAggregateInputType = {
id?: true
mobile?: true
code?: true
userId?: true
attempts?: true
consumed?: true
expiresAt?: true
createdAt?: true
}
export type OtpCodeCountAggregateInputType = {
id?: true
mobile?: true
code?: true
userId?: true
attempts?: true
consumed?: true
expiresAt?: true
createdAt?: true
_all?: true
}
export type OtpCodeAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Filter which OtpCode to aggregate.
*/
where?: OtpCodeWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of OtpCodes to fetch.
*/
orderBy?: OtpCodeOrderByWithRelationInput | OtpCodeOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the start position
*/
cursor?: OtpCodeWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` OtpCodes 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` OtpCodes.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Count returned OtpCodes
**/
_count?: true | OtpCodeCountAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to average
**/
_avg?: OtpCodeAvgAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to sum
**/
_sum?: OtpCodeSumAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the minimum value
**/
_min?: OtpCodeMinAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the maximum value
**/
_max?: OtpCodeMaxAggregateInputType
}
export type GetOtpCodeAggregateType<T extends OtpCodeAggregateArgs> = {
[P in keyof T & keyof AggregateOtpCode]: P extends '_count' | 'count'
? T[P] extends true
? number
: GetScalarType<T[P], AggregateOtpCode[P]>
: GetScalarType<T[P], AggregateOtpCode[P]>
}
export type OtpCodeGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
where?: OtpCodeWhereInput
orderBy?: OtpCodeOrderByWithAggregationInput | OtpCodeOrderByWithAggregationInput[]
by: OtpCodeScalarFieldEnum[] | OtpCodeScalarFieldEnum
having?: OtpCodeScalarWhereWithAggregatesInput
take?: number
skip?: number
_count?: OtpCodeCountAggregateInputType | true
_avg?: OtpCodeAvgAggregateInputType
_sum?: OtpCodeSumAggregateInputType
_min?: OtpCodeMinAggregateInputType
_max?: OtpCodeMaxAggregateInputType
}
export type OtpCodeGroupByOutputType = {
id: string
mobile: string
code: string
userId: string | null
attempts: number
consumed: boolean
expiresAt: Date
createdAt: Date
_count: OtpCodeCountAggregateOutputType | null
_avg: OtpCodeAvgAggregateOutputType | null
_sum: OtpCodeSumAggregateOutputType | null
_min: OtpCodeMinAggregateOutputType | null
_max: OtpCodeMaxAggregateOutputType | null
}
type GetOtpCodeGroupByPayload<T extends OtpCodeGroupByArgs> = Prisma.PrismaPromise<
Array<
PickEnumerable<OtpCodeGroupByOutputType, T['by']> &
{
[P in ((keyof T) & (keyof OtpCodeGroupByOutputType))]: P extends '_count'
? T[P] extends boolean
? number
: GetScalarType<T[P], OtpCodeGroupByOutputType[P]>
: GetScalarType<T[P], OtpCodeGroupByOutputType[P]>
}
>
>
export type OtpCodeSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
id?: boolean
mobile?: boolean
code?: boolean
userId?: boolean
attempts?: boolean
consumed?: boolean
expiresAt?: boolean
createdAt?: boolean
user?: boolean | OtpCode$userArgs<ExtArgs>
}, ExtArgs["result"]["otpCode"]>
export type OtpCodeSelectCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
id?: boolean
mobile?: boolean
code?: boolean
userId?: boolean
attempts?: boolean
consumed?: boolean
expiresAt?: boolean
createdAt?: boolean
user?: boolean | OtpCode$userArgs<ExtArgs>
}, ExtArgs["result"]["otpCode"]>
export type OtpCodeSelectScalar = {
id?: boolean
mobile?: boolean
code?: boolean
userId?: boolean
attempts?: boolean
consumed?: boolean
expiresAt?: boolean
createdAt?: boolean
}
export type OtpCodeInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
user?: boolean | OtpCode$userArgs<ExtArgs>
}
export type OtpCodeIncludeCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
user?: boolean | OtpCode$userArgs<ExtArgs>
}
export type $OtpCodePayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
name: "OtpCode"
objects: {
user: Prisma.$UserPayload<ExtArgs> | null
}
scalars: $Extensions.GetPayloadResult<{
id: string
mobile: string
code: string
userId: string | null
attempts: number
consumed: boolean
expiresAt: Date
createdAt: Date
}, ExtArgs["result"]["otpCode"]>
composites: {}
}
type OtpCodeGetPayload<S extends boolean | null | undefined | OtpCodeDefaultArgs> = $Result.GetResult<Prisma.$OtpCodePayload, S>
type OtpCodeCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
Omit<OtpCodeFindManyArgs, 'select' | 'include' | 'distinct'> & {
select?: OtpCodeCountAggregateInputType | true
}
export interface OtpCodeDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> {
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['OtpCode'], meta: { name: 'OtpCode' } }
/**
* Find zero or one OtpCode that matches the filter.
* @param {OtpCodeFindUniqueArgs} args - Arguments to find a OtpCode
* @example
* // Get one OtpCode
* const otpCode = await prisma.otpCode.findUnique({
* where: {
* // ... provide filter here
* }
* })
*/
findUnique<T extends OtpCodeFindUniqueArgs>(args: SelectSubset<T, OtpCodeFindUniqueArgs<ExtArgs>>): Prisma__OtpCodeClient<$Result.GetResult<Prisma.$OtpCodePayload<ExtArgs>, T, "findUnique"> | null, null, ExtArgs>
/**
* Find one OtpCode that matches the filter or throw an error with `error.code='P2025'`
* if no matches were found.
* @param {OtpCodeFindUniqueOrThrowArgs} args - Arguments to find a OtpCode
* @example
* // Get one OtpCode
* const otpCode = await prisma.otpCode.findUniqueOrThrow({
* where: {
* // ... provide filter here
* }
* })
*/
findUniqueOrThrow<T extends OtpCodeFindUniqueOrThrowArgs>(args: SelectSubset<T, OtpCodeFindUniqueOrThrowArgs<ExtArgs>>): Prisma__OtpCodeClient<$Result.GetResult<Prisma.$OtpCodePayload<ExtArgs>, T, "findUniqueOrThrow">, never, ExtArgs>
/**
* Find the first OtpCode 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 {OtpCodeFindFirstArgs} args - Arguments to find a OtpCode
* @example
* // Get one OtpCode
* const otpCode = await prisma.otpCode.findFirst({
* where: {
* // ... provide filter here
* }
* })
*/
findFirst<T extends OtpCodeFindFirstArgs>(args?: SelectSubset<T, OtpCodeFindFirstArgs<ExtArgs>>): Prisma__OtpCodeClient<$Result.GetResult<Prisma.$OtpCodePayload<ExtArgs>, T, "findFirst"> | null, null, ExtArgs>
/**
* Find the first OtpCode 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 {OtpCodeFindFirstOrThrowArgs} args - Arguments to find a OtpCode
* @example
* // Get one OtpCode
* const otpCode = await prisma.otpCode.findFirstOrThrow({
* where: {
* // ... provide filter here
* }
* })
*/
findFirstOrThrow<T extends OtpCodeFindFirstOrThrowArgs>(args?: SelectSubset<T, OtpCodeFindFirstOrThrowArgs<ExtArgs>>): Prisma__OtpCodeClient<$Result.GetResult<Prisma.$OtpCodePayload<ExtArgs>, T, "findFirstOrThrow">, never, ExtArgs>
/**
* Find zero or more OtpCodes 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 {OtpCodeFindManyArgs} args - Arguments to filter and select certain fields only.
* @example
* // Get all OtpCodes
* const otpCodes = await prisma.otpCode.findMany()
*
* // Get first 10 OtpCodes
* const otpCodes = await prisma.otpCode.findMany({ take: 10 })
*
* // Only select the `id`
* const otpCodeWithIdOnly = await prisma.otpCode.findMany({ select: { id: true } })
*
*/
findMany<T extends OtpCodeFindManyArgs>(args?: SelectSubset<T, OtpCodeFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$OtpCodePayload<ExtArgs>, T, "findMany">>
/**
* Create a OtpCode.
* @param {OtpCodeCreateArgs} args - Arguments to create a OtpCode.
* @example
* // Create one OtpCode
* const OtpCode = await prisma.otpCode.create({
* data: {
* // ... data to create a OtpCode
* }
* })
*
*/
create<T extends OtpCodeCreateArgs>(args: SelectSubset<T, OtpCodeCreateArgs<ExtArgs>>): Prisma__OtpCodeClient<$Result.GetResult<Prisma.$OtpCodePayload<ExtArgs>, T, "create">, never, ExtArgs>
/**
* Create many OtpCodes.
* @param {OtpCodeCreateManyArgs} args - Arguments to create many OtpCodes.
* @example
* // Create many OtpCodes
* const otpCode = await prisma.otpCode.createMany({
* data: [
* // ... provide data here
* ]
* })
*
*/
createMany<T extends OtpCodeCreateManyArgs>(args?: SelectSubset<T, OtpCodeCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
/**
* Create many OtpCodes and returns the data saved in the database.
* @param {OtpCodeCreateManyAndReturnArgs} args - Arguments to create many OtpCodes.
* @example
* // Create many OtpCodes
* const otpCode = await prisma.otpCode.createManyAndReturn({
* data: [
* // ... provide data here
* ]
* })
*
* // Create many OtpCodes and only return the `id`
* const otpCodeWithIdOnly = await prisma.otpCode.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 OtpCodeCreateManyAndReturnArgs>(args?: SelectSubset<T, OtpCodeCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$OtpCodePayload<ExtArgs>, T, "createManyAndReturn">>
/**
* Delete a OtpCode.
* @param {OtpCodeDeleteArgs} args - Arguments to delete one OtpCode.
* @example
* // Delete one OtpCode
* const OtpCode = await prisma.otpCode.delete({
* where: {
* // ... filter to delete one OtpCode
* }
* })
*
*/
delete<T extends OtpCodeDeleteArgs>(args: SelectSubset<T, OtpCodeDeleteArgs<ExtArgs>>): Prisma__OtpCodeClient<$Result.GetResult<Prisma.$OtpCodePayload<ExtArgs>, T, "delete">, never, ExtArgs>
/**
* Update one OtpCode.
* @param {OtpCodeUpdateArgs} args - Arguments to update one OtpCode.
* @example
* // Update one OtpCode
* const otpCode = await prisma.otpCode.update({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
*/
update<T extends OtpCodeUpdateArgs>(args: SelectSubset<T, OtpCodeUpdateArgs<ExtArgs>>): Prisma__OtpCodeClient<$Result.GetResult<Prisma.$OtpCodePayload<ExtArgs>, T, "update">, never, ExtArgs>
/**
* Delete zero or more OtpCodes.
* @param {OtpCodeDeleteManyArgs} args - Arguments to filter OtpCodes to delete.
* @example
* // Delete a few OtpCodes
* const { count } = await prisma.otpCode.deleteMany({
* where: {
* // ... provide filter here
* }
* })
*
*/
deleteMany<T extends OtpCodeDeleteManyArgs>(args?: SelectSubset<T, OtpCodeDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
/**
* Update zero or more OtpCodes.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {OtpCodeUpdateManyArgs} args - Arguments to update one or more rows.
* @example
* // Update many OtpCodes
* const otpCode = await prisma.otpCode.updateMany({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
*/
updateMany<T extends OtpCodeUpdateManyArgs>(args: SelectSubset<T, OtpCodeUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
/**
* Create or update one OtpCode.
* @param {OtpCodeUpsertArgs} args - Arguments to update or create a OtpCode.
* @example
* // Update or create a OtpCode
* const otpCode = await prisma.otpCode.upsert({
* create: {
* // ... data to create a OtpCode
* },
* update: {
* // ... in case it already exists, update
* },
* where: {
* // ... the filter for the OtpCode we want to update
* }
* })
*/
upsert<T extends OtpCodeUpsertArgs>(args: SelectSubset<T, OtpCodeUpsertArgs<ExtArgs>>): Prisma__OtpCodeClient<$Result.GetResult<Prisma.$OtpCodePayload<ExtArgs>, T, "upsert">, never, ExtArgs>
/**
* Count the number of OtpCodes.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {OtpCodeCountArgs} args - Arguments to filter OtpCodes to count.
* @example
* // Count the number of OtpCodes
* const count = await prisma.otpCode.count({
* where: {
* // ... the filter for the OtpCodes we want to count
* }
* })
**/
count<T extends OtpCodeCountArgs>(
args?: Subset<T, OtpCodeCountArgs>,
): Prisma.PrismaPromise<
T extends $Utils.Record<'select', any>
? T['select'] extends true
? number
: GetScalarType<T['select'], OtpCodeCountAggregateOutputType>
: number
>
/**
* Allows you to perform aggregations operations on a OtpCode.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {OtpCodeAggregateArgs} 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 OtpCodeAggregateArgs>(args: Subset<T, OtpCodeAggregateArgs>): Prisma.PrismaPromise<GetOtpCodeAggregateType<T>>
/**
* Group by OtpCode.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {OtpCodeGroupByArgs} 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 OtpCodeGroupByArgs,
HasSelectOrTake extends Or<
Extends<'skip', Keys<T>>,
Extends<'take', Keys<T>>
>,
OrderByArg extends True extends HasSelectOrTake
? { orderBy: OtpCodeGroupByArgs['orderBy'] }
: { orderBy?: OtpCodeGroupByArgs['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, OtpCodeGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetOtpCodeGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
/**
* Fields of the OtpCode model
*/
readonly fields: OtpCodeFieldRefs;
}
/**
* The delegate class that acts as a "Promise-like" for OtpCode.
* 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__OtpCodeClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> extends Prisma.PrismaPromise<T> {
readonly [Symbol.toStringTag]: "PrismaPromise"
user<T extends OtpCode$userArgs<ExtArgs> = {}>(args?: Subset<T, OtpCode$userArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findUniqueOrThrow"> | null, null, ExtArgs>
/**
* Attaches callbacks for the resolution and/or rejection of the Promise.
* @param onfulfilled The callback to execute when the Promise is resolved.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of which ever callback is executed.
*/
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): $Utils.JsPromise<TResult1 | TResult2>
/**
* Attaches a callback for only the rejection of the Promise.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of the callback.
*/
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): $Utils.JsPromise<T | TResult>
/**
* Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
* resolved value cannot be modified from the callback.
* @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
* @returns A Promise for the completion of the callback.
*/
finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise<T>
}
/**
* Fields of the OtpCode model
*/
interface OtpCodeFieldRefs {
readonly id: FieldRef<"OtpCode", 'String'>
readonly mobile: FieldRef<"OtpCode", 'String'>
readonly code: FieldRef<"OtpCode", 'String'>
readonly userId: FieldRef<"OtpCode", 'String'>
readonly attempts: FieldRef<"OtpCode", 'Int'>
readonly consumed: FieldRef<"OtpCode", 'Boolean'>
readonly expiresAt: FieldRef<"OtpCode", 'DateTime'>
readonly createdAt: FieldRef<"OtpCode", 'DateTime'>
}
// Custom InputTypes
/**
* OtpCode findUnique
*/
export type OtpCodeFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the OtpCode
*/
select?: OtpCodeSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: OtpCodeInclude<ExtArgs> | null
/**
* Filter, which OtpCode to fetch.
*/
where: OtpCodeWhereUniqueInput
}
/**
* OtpCode findUniqueOrThrow
*/
export type OtpCodeFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the OtpCode
*/
select?: OtpCodeSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: OtpCodeInclude<ExtArgs> | null
/**
* Filter, which OtpCode to fetch.
*/
where: OtpCodeWhereUniqueInput
}
/**
* OtpCode findFirst
*/
export type OtpCodeFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the OtpCode
*/
select?: OtpCodeSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: OtpCodeInclude<ExtArgs> | null
/**
* Filter, which OtpCode to fetch.
*/
where?: OtpCodeWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of OtpCodes to fetch.
*/
orderBy?: OtpCodeOrderByWithRelationInput | OtpCodeOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for searching for OtpCodes.
*/
cursor?: OtpCodeWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` OtpCodes 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` OtpCodes.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of OtpCodes.
*/
distinct?: OtpCodeScalarFieldEnum | OtpCodeScalarFieldEnum[]
}
/**
* OtpCode findFirstOrThrow
*/
export type OtpCodeFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the OtpCode
*/
select?: OtpCodeSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: OtpCodeInclude<ExtArgs> | null
/**
* Filter, which OtpCode to fetch.
*/
where?: OtpCodeWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of OtpCodes to fetch.
*/
orderBy?: OtpCodeOrderByWithRelationInput | OtpCodeOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for searching for OtpCodes.
*/
cursor?: OtpCodeWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` OtpCodes 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` OtpCodes.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of OtpCodes.
*/
distinct?: OtpCodeScalarFieldEnum | OtpCodeScalarFieldEnum[]
}
/**
* OtpCode findMany
*/
export type OtpCodeFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the OtpCode
*/
select?: OtpCodeSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: OtpCodeInclude<ExtArgs> | null
/**
* Filter, which OtpCodes to fetch.
*/
where?: OtpCodeWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of OtpCodes to fetch.
*/
orderBy?: OtpCodeOrderByWithRelationInput | OtpCodeOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for listing OtpCodes.
*/
cursor?: OtpCodeWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` OtpCodes 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` OtpCodes.
*/
skip?: number
distinct?: OtpCodeScalarFieldEnum | OtpCodeScalarFieldEnum[]
}
/**
* OtpCode create
*/
export type OtpCodeCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the OtpCode
*/
select?: OtpCodeSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: OtpCodeInclude<ExtArgs> | null
/**
* The data needed to create a OtpCode.
*/
data: XOR<OtpCodeCreateInput, OtpCodeUncheckedCreateInput>
}
/**
* OtpCode createMany
*/
export type OtpCodeCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* The data used to create many OtpCodes.
*/
data: OtpCodeCreateManyInput | OtpCodeCreateManyInput[]
skipDuplicates?: boolean
}
/**
* OtpCode createManyAndReturn
*/
export type OtpCodeCreateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the OtpCode
*/
select?: OtpCodeSelectCreateManyAndReturn<ExtArgs> | null
/**
* The data used to create many OtpCodes.
*/
data: OtpCodeCreateManyInput | OtpCodeCreateManyInput[]
skipDuplicates?: boolean
/**
* Choose, which related nodes to fetch as well
*/
include?: OtpCodeIncludeCreateManyAndReturn<ExtArgs> | null
}
/**
* OtpCode update
*/
export type OtpCodeUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the OtpCode
*/
select?: OtpCodeSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: OtpCodeInclude<ExtArgs> | null
/**
* The data needed to update a OtpCode.
*/
data: XOR<OtpCodeUpdateInput, OtpCodeUncheckedUpdateInput>
/**
* Choose, which OtpCode to update.
*/
where: OtpCodeWhereUniqueInput
}
/**
* OtpCode updateMany
*/
export type OtpCodeUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* The data used to update OtpCodes.
*/
data: XOR<OtpCodeUpdateManyMutationInput, OtpCodeUncheckedUpdateManyInput>
/**
* Filter which OtpCodes to update
*/
where?: OtpCodeWhereInput
}
/**
* OtpCode upsert
*/
export type OtpCodeUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the OtpCode
*/
select?: OtpCodeSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: OtpCodeInclude<ExtArgs> | null
/**
* The filter to search for the OtpCode to update in case it exists.
*/
where: OtpCodeWhereUniqueInput
/**
* In case the OtpCode found by the `where` argument doesn't exist, create a new OtpCode with this data.
*/
create: XOR<OtpCodeCreateInput, OtpCodeUncheckedCreateInput>
/**
* In case the OtpCode was found with the provided `where` argument, update it with this data.
*/
update: XOR<OtpCodeUpdateInput, OtpCodeUncheckedUpdateInput>
}
/**
* OtpCode delete
*/
export type OtpCodeDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the OtpCode
*/
select?: OtpCodeSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: OtpCodeInclude<ExtArgs> | null
/**
* Filter which OtpCode to delete.
*/
where: OtpCodeWhereUniqueInput
}
/**
* OtpCode deleteMany
*/
export type OtpCodeDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Filter which OtpCodes to delete
*/
where?: OtpCodeWhereInput
}
/**
* OtpCode.user
*/
export type OtpCode$userArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the User
*/
select?: UserSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: UserInclude<ExtArgs> | null
where?: UserWhereInput
}
/**
* OtpCode without action
*/
export type OtpCodeDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the OtpCode
*/
select?: OtpCodeSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: OtpCodeInclude<ExtArgs> | null
}
/**
* Model Campaign
*/
export type AggregateCampaign = {
_count: CampaignCountAggregateOutputType | null
_avg: CampaignAvgAggregateOutputType | null
_sum: CampaignSumAggregateOutputType | null
_min: CampaignMinAggregateOutputType | null
_max: CampaignMaxAggregateOutputType | null
}
export type CampaignAvgAggregateOutputType = {
defaultChances: number | null
}
export type CampaignSumAggregateOutputType = {
defaultChances: number | null
}
export type CampaignMinAggregateOutputType = {
id: string | null
title: string | null
slug: string | null
description: string | null
image: string | null
banner: string | null
logo: string | null
startAt: Date | null
endAt: Date | null
status: $Enums.CampaignStatus | null
defaultChances: number | null
rules: string | null
ctaText: string | null
wheelDesign: $Enums.WheelDesign | null
createdAt: Date | null
updatedAt: Date | null
}
export type CampaignMaxAggregateOutputType = {
id: string | null
title: string | null
slug: string | null
description: string | null
image: string | null
banner: string | null
logo: string | null
startAt: Date | null
endAt: Date | null
status: $Enums.CampaignStatus | null
defaultChances: number | null
rules: string | null
ctaText: string | null
wheelDesign: $Enums.WheelDesign | null
createdAt: Date | null
updatedAt: Date | null
}
export type CampaignCountAggregateOutputType = {
id: number
title: number
slug: number
description: number
image: number
banner: number
logo: number
startAt: number
endAt: number
status: number
defaultChances: number
rules: number
ctaText: number
wheelDesign: number
settings: number
createdAt: number
updatedAt: number
_all: number
}
export type CampaignAvgAggregateInputType = {
defaultChances?: true
}
export type CampaignSumAggregateInputType = {
defaultChances?: true
}
export type CampaignMinAggregateInputType = {
id?: true
title?: true
slug?: true
description?: true
image?: true
banner?: true
logo?: true
startAt?: true
endAt?: true
status?: true
defaultChances?: true
rules?: true
ctaText?: true
wheelDesign?: true
createdAt?: true
updatedAt?: true
}
export type CampaignMaxAggregateInputType = {
id?: true
title?: true
slug?: true
description?: true
image?: true
banner?: true
logo?: true
startAt?: true
endAt?: true
status?: true
defaultChances?: true
rules?: true
ctaText?: true
wheelDesign?: true
createdAt?: true
updatedAt?: true
}
export type CampaignCountAggregateInputType = {
id?: true
title?: true
slug?: true
description?: true
image?: true
banner?: true
logo?: true
startAt?: true
endAt?: true
status?: true
defaultChances?: true
rules?: true
ctaText?: true
wheelDesign?: true
settings?: true
createdAt?: true
updatedAt?: true
_all?: true
}
export type CampaignAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Filter which Campaign to aggregate.
*/
where?: CampaignWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of Campaigns to fetch.
*/
orderBy?: CampaignOrderByWithRelationInput | CampaignOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the start position
*/
cursor?: CampaignWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` Campaigns 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` Campaigns.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Count returned Campaigns
**/
_count?: true | CampaignCountAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to average
**/
_avg?: CampaignAvgAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to sum
**/
_sum?: CampaignSumAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the minimum value
**/
_min?: CampaignMinAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the maximum value
**/
_max?: CampaignMaxAggregateInputType
}
export type GetCampaignAggregateType<T extends CampaignAggregateArgs> = {
[P in keyof T & keyof AggregateCampaign]: P extends '_count' | 'count'
? T[P] extends true
? number
: GetScalarType<T[P], AggregateCampaign[P]>
: GetScalarType<T[P], AggregateCampaign[P]>
}
export type CampaignGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
where?: CampaignWhereInput
orderBy?: CampaignOrderByWithAggregationInput | CampaignOrderByWithAggregationInput[]
by: CampaignScalarFieldEnum[] | CampaignScalarFieldEnum
having?: CampaignScalarWhereWithAggregatesInput
take?: number
skip?: number
_count?: CampaignCountAggregateInputType | true
_avg?: CampaignAvgAggregateInputType
_sum?: CampaignSumAggregateInputType
_min?: CampaignMinAggregateInputType
_max?: CampaignMaxAggregateInputType
}
export type CampaignGroupByOutputType = {
id: string
title: string
slug: string
description: string | null
image: string | null
banner: string | null
logo: string | null
startAt: Date
endAt: Date
status: $Enums.CampaignStatus
defaultChances: number
rules: string | null
ctaText: string | null
wheelDesign: $Enums.WheelDesign
settings: JsonValue | null
createdAt: Date
updatedAt: Date
_count: CampaignCountAggregateOutputType | null
_avg: CampaignAvgAggregateOutputType | null
_sum: CampaignSumAggregateOutputType | null
_min: CampaignMinAggregateOutputType | null
_max: CampaignMaxAggregateOutputType | null
}
type GetCampaignGroupByPayload<T extends CampaignGroupByArgs> = Prisma.PrismaPromise<
Array<
PickEnumerable<CampaignGroupByOutputType, T['by']> &
{
[P in ((keyof T) & (keyof CampaignGroupByOutputType))]: P extends '_count'
? T[P] extends boolean
? number
: GetScalarType<T[P], CampaignGroupByOutputType[P]>
: GetScalarType<T[P], CampaignGroupByOutputType[P]>
}
>
>
export type CampaignSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
id?: boolean
title?: boolean
slug?: boolean
description?: boolean
image?: boolean
banner?: boolean
logo?: boolean
startAt?: boolean
endAt?: boolean
status?: boolean
defaultChances?: boolean
rules?: boolean
ctaText?: boolean
wheelDesign?: boolean
settings?: boolean
createdAt?: boolean
updatedAt?: boolean
prizes?: boolean | Campaign$prizesArgs<ExtArgs>
userCampaigns?: boolean | Campaign$userCampaignsArgs<ExtArgs>
chanceTxns?: boolean | Campaign$chanceTxnsArgs<ExtArgs>
spins?: boolean | Campaign$spinsArgs<ExtArgs>
userPrizes?: boolean | Campaign$userPrizesArgs<ExtArgs>
_count?: boolean | CampaignCountOutputTypeDefaultArgs<ExtArgs>
}, ExtArgs["result"]["campaign"]>
export type CampaignSelectCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
id?: boolean
title?: boolean
slug?: boolean
description?: boolean
image?: boolean
banner?: boolean
logo?: boolean
startAt?: boolean
endAt?: boolean
status?: boolean
defaultChances?: boolean
rules?: boolean
ctaText?: boolean
wheelDesign?: boolean
settings?: boolean
createdAt?: boolean
updatedAt?: boolean
}, ExtArgs["result"]["campaign"]>
export type CampaignSelectScalar = {
id?: boolean
title?: boolean
slug?: boolean
description?: boolean
image?: boolean
banner?: boolean
logo?: boolean
startAt?: boolean
endAt?: boolean
status?: boolean
defaultChances?: boolean
rules?: boolean
ctaText?: boolean
wheelDesign?: boolean
settings?: boolean
createdAt?: boolean
updatedAt?: boolean
}
export type CampaignInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
prizes?: boolean | Campaign$prizesArgs<ExtArgs>
userCampaigns?: boolean | Campaign$userCampaignsArgs<ExtArgs>
chanceTxns?: boolean | Campaign$chanceTxnsArgs<ExtArgs>
spins?: boolean | Campaign$spinsArgs<ExtArgs>
userPrizes?: boolean | Campaign$userPrizesArgs<ExtArgs>
_count?: boolean | CampaignCountOutputTypeDefaultArgs<ExtArgs>
}
export type CampaignIncludeCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {}
export type $CampaignPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
name: "Campaign"
objects: {
prizes: Prisma.$PrizePayload<ExtArgs>[]
userCampaigns: Prisma.$UserCampaignPayload<ExtArgs>[]
chanceTxns: Prisma.$ChanceTransactionPayload<ExtArgs>[]
spins: Prisma.$SpinPayload<ExtArgs>[]
userPrizes: Prisma.$UserPrizePayload<ExtArgs>[]
}
scalars: $Extensions.GetPayloadResult<{
id: string
title: string
slug: string
description: string | null
image: string | null
banner: string | null
logo: string | null
startAt: Date
endAt: Date
status: $Enums.CampaignStatus
defaultChances: number
rules: string | null
ctaText: string | null
wheelDesign: $Enums.WheelDesign
settings: Prisma.JsonValue | null
createdAt: Date
updatedAt: Date
}, ExtArgs["result"]["campaign"]>
composites: {}
}
type CampaignGetPayload<S extends boolean | null | undefined | CampaignDefaultArgs> = $Result.GetResult<Prisma.$CampaignPayload, S>
type CampaignCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
Omit<CampaignFindManyArgs, 'select' | 'include' | 'distinct'> & {
select?: CampaignCountAggregateInputType | true
}
export interface CampaignDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> {
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['Campaign'], meta: { name: 'Campaign' } }
/**
* Find zero or one Campaign that matches the filter.
* @param {CampaignFindUniqueArgs} args - Arguments to find a Campaign
* @example
* // Get one Campaign
* const campaign = await prisma.campaign.findUnique({
* where: {
* // ... provide filter here
* }
* })
*/
findUnique<T extends CampaignFindUniqueArgs>(args: SelectSubset<T, CampaignFindUniqueArgs<ExtArgs>>): Prisma__CampaignClient<$Result.GetResult<Prisma.$CampaignPayload<ExtArgs>, T, "findUnique"> | null, null, ExtArgs>
/**
* Find one Campaign that matches the filter or throw an error with `error.code='P2025'`
* if no matches were found.
* @param {CampaignFindUniqueOrThrowArgs} args - Arguments to find a Campaign
* @example
* // Get one Campaign
* const campaign = await prisma.campaign.findUniqueOrThrow({
* where: {
* // ... provide filter here
* }
* })
*/
findUniqueOrThrow<T extends CampaignFindUniqueOrThrowArgs>(args: SelectSubset<T, CampaignFindUniqueOrThrowArgs<ExtArgs>>): Prisma__CampaignClient<$Result.GetResult<Prisma.$CampaignPayload<ExtArgs>, T, "findUniqueOrThrow">, never, ExtArgs>
/**
* Find the first Campaign 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 {CampaignFindFirstArgs} args - Arguments to find a Campaign
* @example
* // Get one Campaign
* const campaign = await prisma.campaign.findFirst({
* where: {
* // ... provide filter here
* }
* })
*/
findFirst<T extends CampaignFindFirstArgs>(args?: SelectSubset<T, CampaignFindFirstArgs<ExtArgs>>): Prisma__CampaignClient<$Result.GetResult<Prisma.$CampaignPayload<ExtArgs>, T, "findFirst"> | null, null, ExtArgs>
/**
* Find the first Campaign 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 {CampaignFindFirstOrThrowArgs} args - Arguments to find a Campaign
* @example
* // Get one Campaign
* const campaign = await prisma.campaign.findFirstOrThrow({
* where: {
* // ... provide filter here
* }
* })
*/
findFirstOrThrow<T extends CampaignFindFirstOrThrowArgs>(args?: SelectSubset<T, CampaignFindFirstOrThrowArgs<ExtArgs>>): Prisma__CampaignClient<$Result.GetResult<Prisma.$CampaignPayload<ExtArgs>, T, "findFirstOrThrow">, never, ExtArgs>
/**
* Find zero or more Campaigns 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 {CampaignFindManyArgs} args - Arguments to filter and select certain fields only.
* @example
* // Get all Campaigns
* const campaigns = await prisma.campaign.findMany()
*
* // Get first 10 Campaigns
* const campaigns = await prisma.campaign.findMany({ take: 10 })
*
* // Only select the `id`
* const campaignWithIdOnly = await prisma.campaign.findMany({ select: { id: true } })
*
*/
findMany<T extends CampaignFindManyArgs>(args?: SelectSubset<T, CampaignFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$CampaignPayload<ExtArgs>, T, "findMany">>
/**
* Create a Campaign.
* @param {CampaignCreateArgs} args - Arguments to create a Campaign.
* @example
* // Create one Campaign
* const Campaign = await prisma.campaign.create({
* data: {
* // ... data to create a Campaign
* }
* })
*
*/
create<T extends CampaignCreateArgs>(args: SelectSubset<T, CampaignCreateArgs<ExtArgs>>): Prisma__CampaignClient<$Result.GetResult<Prisma.$CampaignPayload<ExtArgs>, T, "create">, never, ExtArgs>
/**
* Create many Campaigns.
* @param {CampaignCreateManyArgs} args - Arguments to create many Campaigns.
* @example
* // Create many Campaigns
* const campaign = await prisma.campaign.createMany({
* data: [
* // ... provide data here
* ]
* })
*
*/
createMany<T extends CampaignCreateManyArgs>(args?: SelectSubset<T, CampaignCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
/**
* Create many Campaigns and returns the data saved in the database.
* @param {CampaignCreateManyAndReturnArgs} args - Arguments to create many Campaigns.
* @example
* // Create many Campaigns
* const campaign = await prisma.campaign.createManyAndReturn({
* data: [
* // ... provide data here
* ]
* })
*
* // Create many Campaigns and only return the `id`
* const campaignWithIdOnly = await prisma.campaign.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 CampaignCreateManyAndReturnArgs>(args?: SelectSubset<T, CampaignCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$CampaignPayload<ExtArgs>, T, "createManyAndReturn">>
/**
* Delete a Campaign.
* @param {CampaignDeleteArgs} args - Arguments to delete one Campaign.
* @example
* // Delete one Campaign
* const Campaign = await prisma.campaign.delete({
* where: {
* // ... filter to delete one Campaign
* }
* })
*
*/
delete<T extends CampaignDeleteArgs>(args: SelectSubset<T, CampaignDeleteArgs<ExtArgs>>): Prisma__CampaignClient<$Result.GetResult<Prisma.$CampaignPayload<ExtArgs>, T, "delete">, never, ExtArgs>
/**
* Update one Campaign.
* @param {CampaignUpdateArgs} args - Arguments to update one Campaign.
* @example
* // Update one Campaign
* const campaign = await prisma.campaign.update({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
*/
update<T extends CampaignUpdateArgs>(args: SelectSubset<T, CampaignUpdateArgs<ExtArgs>>): Prisma__CampaignClient<$Result.GetResult<Prisma.$CampaignPayload<ExtArgs>, T, "update">, never, ExtArgs>
/**
* Delete zero or more Campaigns.
* @param {CampaignDeleteManyArgs} args - Arguments to filter Campaigns to delete.
* @example
* // Delete a few Campaigns
* const { count } = await prisma.campaign.deleteMany({
* where: {
* // ... provide filter here
* }
* })
*
*/
deleteMany<T extends CampaignDeleteManyArgs>(args?: SelectSubset<T, CampaignDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
/**
* Update zero or more Campaigns.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {CampaignUpdateManyArgs} args - Arguments to update one or more rows.
* @example
* // Update many Campaigns
* const campaign = await prisma.campaign.updateMany({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
*/
updateMany<T extends CampaignUpdateManyArgs>(args: SelectSubset<T, CampaignUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
/**
* Create or update one Campaign.
* @param {CampaignUpsertArgs} args - Arguments to update or create a Campaign.
* @example
* // Update or create a Campaign
* const campaign = await prisma.campaign.upsert({
* create: {
* // ... data to create a Campaign
* },
* update: {
* // ... in case it already exists, update
* },
* where: {
* // ... the filter for the Campaign we want to update
* }
* })
*/
upsert<T extends CampaignUpsertArgs>(args: SelectSubset<T, CampaignUpsertArgs<ExtArgs>>): Prisma__CampaignClient<$Result.GetResult<Prisma.$CampaignPayload<ExtArgs>, T, "upsert">, never, ExtArgs>
/**
* Count the number of Campaigns.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {CampaignCountArgs} args - Arguments to filter Campaigns to count.
* @example
* // Count the number of Campaigns
* const count = await prisma.campaign.count({
* where: {
* // ... the filter for the Campaigns we want to count
* }
* })
**/
count<T extends CampaignCountArgs>(
args?: Subset<T, CampaignCountArgs>,
): Prisma.PrismaPromise<
T extends $Utils.Record<'select', any>
? T['select'] extends true
? number
: GetScalarType<T['select'], CampaignCountAggregateOutputType>
: number
>
/**
* Allows you to perform aggregations operations on a Campaign.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {CampaignAggregateArgs} 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 CampaignAggregateArgs>(args: Subset<T, CampaignAggregateArgs>): Prisma.PrismaPromise<GetCampaignAggregateType<T>>
/**
* Group by Campaign.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {CampaignGroupByArgs} 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 CampaignGroupByArgs,
HasSelectOrTake extends Or<
Extends<'skip', Keys<T>>,
Extends<'take', Keys<T>>
>,
OrderByArg extends True extends HasSelectOrTake
? { orderBy: CampaignGroupByArgs['orderBy'] }
: { orderBy?: CampaignGroupByArgs['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, CampaignGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetCampaignGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
/**
* Fields of the Campaign model
*/
readonly fields: CampaignFieldRefs;
}
/**
* The delegate class that acts as a "Promise-like" for Campaign.
* 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__CampaignClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> extends Prisma.PrismaPromise<T> {
readonly [Symbol.toStringTag]: "PrismaPromise"
prizes<T extends Campaign$prizesArgs<ExtArgs> = {}>(args?: Subset<T, Campaign$prizesArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$PrizePayload<ExtArgs>, T, "findMany"> | Null>
userCampaigns<T extends Campaign$userCampaignsArgs<ExtArgs> = {}>(args?: Subset<T, Campaign$userCampaignsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$UserCampaignPayload<ExtArgs>, T, "findMany"> | Null>
chanceTxns<T extends Campaign$chanceTxnsArgs<ExtArgs> = {}>(args?: Subset<T, Campaign$chanceTxnsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$ChanceTransactionPayload<ExtArgs>, T, "findMany"> | Null>
spins<T extends Campaign$spinsArgs<ExtArgs> = {}>(args?: Subset<T, Campaign$spinsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$SpinPayload<ExtArgs>, T, "findMany"> | Null>
userPrizes<T extends Campaign$userPrizesArgs<ExtArgs> = {}>(args?: Subset<T, Campaign$userPrizesArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$UserPrizePayload<ExtArgs>, T, "findMany"> | Null>
/**
* Attaches callbacks for the resolution and/or rejection of the Promise.
* @param onfulfilled The callback to execute when the Promise is resolved.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of which ever callback is executed.
*/
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): $Utils.JsPromise<TResult1 | TResult2>
/**
* Attaches a callback for only the rejection of the Promise.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of the callback.
*/
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): $Utils.JsPromise<T | TResult>
/**
* Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
* resolved value cannot be modified from the callback.
* @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
* @returns A Promise for the completion of the callback.
*/
finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise<T>
}
/**
* Fields of the Campaign model
*/
interface CampaignFieldRefs {
readonly id: FieldRef<"Campaign", 'String'>
readonly title: FieldRef<"Campaign", 'String'>
readonly slug: FieldRef<"Campaign", 'String'>
readonly description: FieldRef<"Campaign", 'String'>
readonly image: FieldRef<"Campaign", 'String'>
readonly banner: FieldRef<"Campaign", 'String'>
readonly logo: FieldRef<"Campaign", 'String'>
readonly startAt: FieldRef<"Campaign", 'DateTime'>
readonly endAt: FieldRef<"Campaign", 'DateTime'>
readonly status: FieldRef<"Campaign", 'CampaignStatus'>
readonly defaultChances: FieldRef<"Campaign", 'Int'>
readonly rules: FieldRef<"Campaign", 'String'>
readonly ctaText: FieldRef<"Campaign", 'String'>
readonly wheelDesign: FieldRef<"Campaign", 'WheelDesign'>
readonly settings: FieldRef<"Campaign", 'Json'>
readonly createdAt: FieldRef<"Campaign", 'DateTime'>
readonly updatedAt: FieldRef<"Campaign", 'DateTime'>
}
// Custom InputTypes
/**
* Campaign findUnique
*/
export type CampaignFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Campaign
*/
select?: CampaignSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: CampaignInclude<ExtArgs> | null
/**
* Filter, which Campaign to fetch.
*/
where: CampaignWhereUniqueInput
}
/**
* Campaign findUniqueOrThrow
*/
export type CampaignFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Campaign
*/
select?: CampaignSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: CampaignInclude<ExtArgs> | null
/**
* Filter, which Campaign to fetch.
*/
where: CampaignWhereUniqueInput
}
/**
* Campaign findFirst
*/
export type CampaignFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Campaign
*/
select?: CampaignSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: CampaignInclude<ExtArgs> | null
/**
* Filter, which Campaign to fetch.
*/
where?: CampaignWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of Campaigns to fetch.
*/
orderBy?: CampaignOrderByWithRelationInput | CampaignOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for searching for Campaigns.
*/
cursor?: CampaignWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` Campaigns 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` Campaigns.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of Campaigns.
*/
distinct?: CampaignScalarFieldEnum | CampaignScalarFieldEnum[]
}
/**
* Campaign findFirstOrThrow
*/
export type CampaignFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Campaign
*/
select?: CampaignSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: CampaignInclude<ExtArgs> | null
/**
* Filter, which Campaign to fetch.
*/
where?: CampaignWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of Campaigns to fetch.
*/
orderBy?: CampaignOrderByWithRelationInput | CampaignOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for searching for Campaigns.
*/
cursor?: CampaignWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` Campaigns 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` Campaigns.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of Campaigns.
*/
distinct?: CampaignScalarFieldEnum | CampaignScalarFieldEnum[]
}
/**
* Campaign findMany
*/
export type CampaignFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Campaign
*/
select?: CampaignSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: CampaignInclude<ExtArgs> | null
/**
* Filter, which Campaigns to fetch.
*/
where?: CampaignWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of Campaigns to fetch.
*/
orderBy?: CampaignOrderByWithRelationInput | CampaignOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for listing Campaigns.
*/
cursor?: CampaignWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` Campaigns 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` Campaigns.
*/
skip?: number
distinct?: CampaignScalarFieldEnum | CampaignScalarFieldEnum[]
}
/**
* Campaign create
*/
export type CampaignCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Campaign
*/
select?: CampaignSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: CampaignInclude<ExtArgs> | null
/**
* The data needed to create a Campaign.
*/
data: XOR<CampaignCreateInput, CampaignUncheckedCreateInput>
}
/**
* Campaign createMany
*/
export type CampaignCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* The data used to create many Campaigns.
*/
data: CampaignCreateManyInput | CampaignCreateManyInput[]
skipDuplicates?: boolean
}
/**
* Campaign createManyAndReturn
*/
export type CampaignCreateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Campaign
*/
select?: CampaignSelectCreateManyAndReturn<ExtArgs> | null
/**
* The data used to create many Campaigns.
*/
data: CampaignCreateManyInput | CampaignCreateManyInput[]
skipDuplicates?: boolean
}
/**
* Campaign update
*/
export type CampaignUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Campaign
*/
select?: CampaignSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: CampaignInclude<ExtArgs> | null
/**
* The data needed to update a Campaign.
*/
data: XOR<CampaignUpdateInput, CampaignUncheckedUpdateInput>
/**
* Choose, which Campaign to update.
*/
where: CampaignWhereUniqueInput
}
/**
* Campaign updateMany
*/
export type CampaignUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* The data used to update Campaigns.
*/
data: XOR<CampaignUpdateManyMutationInput, CampaignUncheckedUpdateManyInput>
/**
* Filter which Campaigns to update
*/
where?: CampaignWhereInput
}
/**
* Campaign upsert
*/
export type CampaignUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Campaign
*/
select?: CampaignSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: CampaignInclude<ExtArgs> | null
/**
* The filter to search for the Campaign to update in case it exists.
*/
where: CampaignWhereUniqueInput
/**
* In case the Campaign found by the `where` argument doesn't exist, create a new Campaign with this data.
*/
create: XOR<CampaignCreateInput, CampaignUncheckedCreateInput>
/**
* In case the Campaign was found with the provided `where` argument, update it with this data.
*/
update: XOR<CampaignUpdateInput, CampaignUncheckedUpdateInput>
}
/**
* Campaign delete
*/
export type CampaignDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Campaign
*/
select?: CampaignSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: CampaignInclude<ExtArgs> | null
/**
* Filter which Campaign to delete.
*/
where: CampaignWhereUniqueInput
}
/**
* Campaign deleteMany
*/
export type CampaignDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Filter which Campaigns to delete
*/
where?: CampaignWhereInput
}
/**
* Campaign.prizes
*/
export type Campaign$prizesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Prize
*/
select?: PrizeSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: PrizeInclude<ExtArgs> | null
where?: PrizeWhereInput
orderBy?: PrizeOrderByWithRelationInput | PrizeOrderByWithRelationInput[]
cursor?: PrizeWhereUniqueInput
take?: number
skip?: number
distinct?: PrizeScalarFieldEnum | PrizeScalarFieldEnum[]
}
/**
* Campaign.userCampaigns
*/
export type Campaign$userCampaignsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the UserCampaign
*/
select?: UserCampaignSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: UserCampaignInclude<ExtArgs> | null
where?: UserCampaignWhereInput
orderBy?: UserCampaignOrderByWithRelationInput | UserCampaignOrderByWithRelationInput[]
cursor?: UserCampaignWhereUniqueInput
take?: number
skip?: number
distinct?: UserCampaignScalarFieldEnum | UserCampaignScalarFieldEnum[]
}
/**
* Campaign.chanceTxns
*/
export type Campaign$chanceTxnsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the ChanceTransaction
*/
select?: ChanceTransactionSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: ChanceTransactionInclude<ExtArgs> | null
where?: ChanceTransactionWhereInput
orderBy?: ChanceTransactionOrderByWithRelationInput | ChanceTransactionOrderByWithRelationInput[]
cursor?: ChanceTransactionWhereUniqueInput
take?: number
skip?: number
distinct?: ChanceTransactionScalarFieldEnum | ChanceTransactionScalarFieldEnum[]
}
/**
* Campaign.spins
*/
export type Campaign$spinsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Spin
*/
select?: SpinSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: SpinInclude<ExtArgs> | null
where?: SpinWhereInput
orderBy?: SpinOrderByWithRelationInput | SpinOrderByWithRelationInput[]
cursor?: SpinWhereUniqueInput
take?: number
skip?: number
distinct?: SpinScalarFieldEnum | SpinScalarFieldEnum[]
}
/**
* Campaign.userPrizes
*/
export type Campaign$userPrizesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the UserPrize
*/
select?: UserPrizeSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: UserPrizeInclude<ExtArgs> | null
where?: UserPrizeWhereInput
orderBy?: UserPrizeOrderByWithRelationInput | UserPrizeOrderByWithRelationInput[]
cursor?: UserPrizeWhereUniqueInput
take?: number
skip?: number
distinct?: UserPrizeScalarFieldEnum | UserPrizeScalarFieldEnum[]
}
/**
* Campaign without action
*/
export type CampaignDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Campaign
*/
select?: CampaignSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: CampaignInclude<ExtArgs> | null
}
/**
* Model Prize
*/
export type AggregatePrize = {
_count: PrizeCountAggregateOutputType | null
_avg: PrizeAvgAggregateOutputType | null
_sum: PrizeSumAggregateOutputType | null
_min: PrizeMinAggregateOutputType | null
_max: PrizeMaxAggregateOutputType | null
}
export type PrizeAvgAggregateOutputType = {
initialStock: number | null
remainingStock: number | null
weight: number | null
sortOrder: number | null
}
export type PrizeSumAggregateOutputType = {
initialStock: number | null
remainingStock: number | null
weight: number | null
sortOrder: number | null
}
export type PrizeMinAggregateOutputType = {
id: string | null
campaignId: string | null
title: string | null
description: string | null
image: string | null
type: $Enums.PrizeType | null
stockType: $Enums.StockType | null
initialStock: number | null
remainingStock: number | null
weight: number | null
status: $Enums.PrizeStatus | null
sortOrder: number | null
segmentColor: string | null
expiresAt: Date | null
smsTemplate: string | null
createdAt: Date | null
updatedAt: Date | null
}
export type PrizeMaxAggregateOutputType = {
id: string | null
campaignId: string | null
title: string | null
description: string | null
image: string | null
type: $Enums.PrizeType | null
stockType: $Enums.StockType | null
initialStock: number | null
remainingStock: number | null
weight: number | null
status: $Enums.PrizeStatus | null
sortOrder: number | null
segmentColor: string | null
expiresAt: Date | null
smsTemplate: string | null
createdAt: Date | null
updatedAt: Date | null
}
export type PrizeCountAggregateOutputType = {
id: number
campaignId: number
title: number
description: number
image: number
type: number
stockType: number
initialStock: number
remainingStock: number
weight: number
status: number
sortOrder: number
segmentColor: number
expiresAt: number
smsTemplate: number
createdAt: number
updatedAt: number
_all: number
}
export type PrizeAvgAggregateInputType = {
initialStock?: true
remainingStock?: true
weight?: true
sortOrder?: true
}
export type PrizeSumAggregateInputType = {
initialStock?: true
remainingStock?: true
weight?: true
sortOrder?: true
}
export type PrizeMinAggregateInputType = {
id?: true
campaignId?: true
title?: true
description?: true
image?: true
type?: true
stockType?: true
initialStock?: true
remainingStock?: true
weight?: true
status?: true
sortOrder?: true
segmentColor?: true
expiresAt?: true
smsTemplate?: true
createdAt?: true
updatedAt?: true
}
export type PrizeMaxAggregateInputType = {
id?: true
campaignId?: true
title?: true
description?: true
image?: true
type?: true
stockType?: true
initialStock?: true
remainingStock?: true
weight?: true
status?: true
sortOrder?: true
segmentColor?: true
expiresAt?: true
smsTemplate?: true
createdAt?: true
updatedAt?: true
}
export type PrizeCountAggregateInputType = {
id?: true
campaignId?: true
title?: true
description?: true
image?: true
type?: true
stockType?: true
initialStock?: true
remainingStock?: true
weight?: true
status?: true
sortOrder?: true
segmentColor?: true
expiresAt?: true
smsTemplate?: true
createdAt?: true
updatedAt?: true
_all?: true
}
export type PrizeAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Filter which Prize to aggregate.
*/
where?: PrizeWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of Prizes to fetch.
*/
orderBy?: PrizeOrderByWithRelationInput | PrizeOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the start position
*/
cursor?: PrizeWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` Prizes 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` Prizes.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Count returned Prizes
**/
_count?: true | PrizeCountAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to average
**/
_avg?: PrizeAvgAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to sum
**/
_sum?: PrizeSumAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the minimum value
**/
_min?: PrizeMinAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the maximum value
**/
_max?: PrizeMaxAggregateInputType
}
export type GetPrizeAggregateType<T extends PrizeAggregateArgs> = {
[P in keyof T & keyof AggregatePrize]: P extends '_count' | 'count'
? T[P] extends true
? number
: GetScalarType<T[P], AggregatePrize[P]>
: GetScalarType<T[P], AggregatePrize[P]>
}
export type PrizeGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
where?: PrizeWhereInput
orderBy?: PrizeOrderByWithAggregationInput | PrizeOrderByWithAggregationInput[]
by: PrizeScalarFieldEnum[] | PrizeScalarFieldEnum
having?: PrizeScalarWhereWithAggregatesInput
take?: number
skip?: number
_count?: PrizeCountAggregateInputType | true
_avg?: PrizeAvgAggregateInputType
_sum?: PrizeSumAggregateInputType
_min?: PrizeMinAggregateInputType
_max?: PrizeMaxAggregateInputType
}
export type PrizeGroupByOutputType = {
id: string
campaignId: string
title: string
description: string | null
image: string | null
type: $Enums.PrizeType
stockType: $Enums.StockType
initialStock: number | null
remainingStock: number | null
weight: number
status: $Enums.PrizeStatus
sortOrder: number
segmentColor: string
expiresAt: Date | null
smsTemplate: string | null
createdAt: Date
updatedAt: Date
_count: PrizeCountAggregateOutputType | null
_avg: PrizeAvgAggregateOutputType | null
_sum: PrizeSumAggregateOutputType | null
_min: PrizeMinAggregateOutputType | null
_max: PrizeMaxAggregateOutputType | null
}
type GetPrizeGroupByPayload<T extends PrizeGroupByArgs> = Prisma.PrismaPromise<
Array<
PickEnumerable<PrizeGroupByOutputType, T['by']> &
{
[P in ((keyof T) & (keyof PrizeGroupByOutputType))]: P extends '_count'
? T[P] extends boolean
? number
: GetScalarType<T[P], PrizeGroupByOutputType[P]>
: GetScalarType<T[P], PrizeGroupByOutputType[P]>
}
>
>
export type PrizeSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
id?: boolean
campaignId?: boolean
title?: boolean
description?: boolean
image?: boolean
type?: boolean
stockType?: boolean
initialStock?: boolean
remainingStock?: boolean
weight?: boolean
status?: boolean
sortOrder?: boolean
segmentColor?: boolean
expiresAt?: boolean
smsTemplate?: boolean
createdAt?: boolean
updatedAt?: boolean
campaign?: boolean | CampaignDefaultArgs<ExtArgs>
spins?: boolean | Prize$spinsArgs<ExtArgs>
userPrizes?: boolean | Prize$userPrizesArgs<ExtArgs>
_count?: boolean | PrizeCountOutputTypeDefaultArgs<ExtArgs>
}, ExtArgs["result"]["prize"]>
export type PrizeSelectCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
id?: boolean
campaignId?: boolean
title?: boolean
description?: boolean
image?: boolean
type?: boolean
stockType?: boolean
initialStock?: boolean
remainingStock?: boolean
weight?: boolean
status?: boolean
sortOrder?: boolean
segmentColor?: boolean
expiresAt?: boolean
smsTemplate?: boolean
createdAt?: boolean
updatedAt?: boolean
campaign?: boolean | CampaignDefaultArgs<ExtArgs>
}, ExtArgs["result"]["prize"]>
export type PrizeSelectScalar = {
id?: boolean
campaignId?: boolean
title?: boolean
description?: boolean
image?: boolean
type?: boolean
stockType?: boolean
initialStock?: boolean
remainingStock?: boolean
weight?: boolean
status?: boolean
sortOrder?: boolean
segmentColor?: boolean
expiresAt?: boolean
smsTemplate?: boolean
createdAt?: boolean
updatedAt?: boolean
}
export type PrizeInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
campaign?: boolean | CampaignDefaultArgs<ExtArgs>
spins?: boolean | Prize$spinsArgs<ExtArgs>
userPrizes?: boolean | Prize$userPrizesArgs<ExtArgs>
_count?: boolean | PrizeCountOutputTypeDefaultArgs<ExtArgs>
}
export type PrizeIncludeCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
campaign?: boolean | CampaignDefaultArgs<ExtArgs>
}
export type $PrizePayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
name: "Prize"
objects: {
campaign: Prisma.$CampaignPayload<ExtArgs>
spins: Prisma.$SpinPayload<ExtArgs>[]
userPrizes: Prisma.$UserPrizePayload<ExtArgs>[]
}
scalars: $Extensions.GetPayloadResult<{
id: string
campaignId: string
title: string
description: string | null
image: string | null
type: $Enums.PrizeType
stockType: $Enums.StockType
initialStock: number | null
remainingStock: number | null
weight: number
status: $Enums.PrizeStatus
sortOrder: number
segmentColor: string
expiresAt: Date | null
smsTemplate: string | null
createdAt: Date
updatedAt: Date
}, ExtArgs["result"]["prize"]>
composites: {}
}
type PrizeGetPayload<S extends boolean | null | undefined | PrizeDefaultArgs> = $Result.GetResult<Prisma.$PrizePayload, S>
type PrizeCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
Omit<PrizeFindManyArgs, 'select' | 'include' | 'distinct'> & {
select?: PrizeCountAggregateInputType | true
}
export interface PrizeDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> {
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['Prize'], meta: { name: 'Prize' } }
/**
* Find zero or one Prize that matches the filter.
* @param {PrizeFindUniqueArgs} args - Arguments to find a Prize
* @example
* // Get one Prize
* const prize = await prisma.prize.findUnique({
* where: {
* // ... provide filter here
* }
* })
*/
findUnique<T extends PrizeFindUniqueArgs>(args: SelectSubset<T, PrizeFindUniqueArgs<ExtArgs>>): Prisma__PrizeClient<$Result.GetResult<Prisma.$PrizePayload<ExtArgs>, T, "findUnique"> | null, null, ExtArgs>
/**
* Find one Prize that matches the filter or throw an error with `error.code='P2025'`
* if no matches were found.
* @param {PrizeFindUniqueOrThrowArgs} args - Arguments to find a Prize
* @example
* // Get one Prize
* const prize = await prisma.prize.findUniqueOrThrow({
* where: {
* // ... provide filter here
* }
* })
*/
findUniqueOrThrow<T extends PrizeFindUniqueOrThrowArgs>(args: SelectSubset<T, PrizeFindUniqueOrThrowArgs<ExtArgs>>): Prisma__PrizeClient<$Result.GetResult<Prisma.$PrizePayload<ExtArgs>, T, "findUniqueOrThrow">, never, ExtArgs>
/**
* Find the first Prize 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 {PrizeFindFirstArgs} args - Arguments to find a Prize
* @example
* // Get one Prize
* const prize = await prisma.prize.findFirst({
* where: {
* // ... provide filter here
* }
* })
*/
findFirst<T extends PrizeFindFirstArgs>(args?: SelectSubset<T, PrizeFindFirstArgs<ExtArgs>>): Prisma__PrizeClient<$Result.GetResult<Prisma.$PrizePayload<ExtArgs>, T, "findFirst"> | null, null, ExtArgs>
/**
* Find the first Prize 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 {PrizeFindFirstOrThrowArgs} args - Arguments to find a Prize
* @example
* // Get one Prize
* const prize = await prisma.prize.findFirstOrThrow({
* where: {
* // ... provide filter here
* }
* })
*/
findFirstOrThrow<T extends PrizeFindFirstOrThrowArgs>(args?: SelectSubset<T, PrizeFindFirstOrThrowArgs<ExtArgs>>): Prisma__PrizeClient<$Result.GetResult<Prisma.$PrizePayload<ExtArgs>, T, "findFirstOrThrow">, never, ExtArgs>
/**
* Find zero or more Prizes 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 {PrizeFindManyArgs} args - Arguments to filter and select certain fields only.
* @example
* // Get all Prizes
* const prizes = await prisma.prize.findMany()
*
* // Get first 10 Prizes
* const prizes = await prisma.prize.findMany({ take: 10 })
*
* // Only select the `id`
* const prizeWithIdOnly = await prisma.prize.findMany({ select: { id: true } })
*
*/
findMany<T extends PrizeFindManyArgs>(args?: SelectSubset<T, PrizeFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$PrizePayload<ExtArgs>, T, "findMany">>
/**
* Create a Prize.
* @param {PrizeCreateArgs} args - Arguments to create a Prize.
* @example
* // Create one Prize
* const Prize = await prisma.prize.create({
* data: {
* // ... data to create a Prize
* }
* })
*
*/
create<T extends PrizeCreateArgs>(args: SelectSubset<T, PrizeCreateArgs<ExtArgs>>): Prisma__PrizeClient<$Result.GetResult<Prisma.$PrizePayload<ExtArgs>, T, "create">, never, ExtArgs>
/**
* Create many Prizes.
* @param {PrizeCreateManyArgs} args - Arguments to create many Prizes.
* @example
* // Create many Prizes
* const prize = await prisma.prize.createMany({
* data: [
* // ... provide data here
* ]
* })
*
*/
createMany<T extends PrizeCreateManyArgs>(args?: SelectSubset<T, PrizeCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
/**
* Create many Prizes and returns the data saved in the database.
* @param {PrizeCreateManyAndReturnArgs} args - Arguments to create many Prizes.
* @example
* // Create many Prizes
* const prize = await prisma.prize.createManyAndReturn({
* data: [
* // ... provide data here
* ]
* })
*
* // Create many Prizes and only return the `id`
* const prizeWithIdOnly = await prisma.prize.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 PrizeCreateManyAndReturnArgs>(args?: SelectSubset<T, PrizeCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$PrizePayload<ExtArgs>, T, "createManyAndReturn">>
/**
* Delete a Prize.
* @param {PrizeDeleteArgs} args - Arguments to delete one Prize.
* @example
* // Delete one Prize
* const Prize = await prisma.prize.delete({
* where: {
* // ... filter to delete one Prize
* }
* })
*
*/
delete<T extends PrizeDeleteArgs>(args: SelectSubset<T, PrizeDeleteArgs<ExtArgs>>): Prisma__PrizeClient<$Result.GetResult<Prisma.$PrizePayload<ExtArgs>, T, "delete">, never, ExtArgs>
/**
* Update one Prize.
* @param {PrizeUpdateArgs} args - Arguments to update one Prize.
* @example
* // Update one Prize
* const prize = await prisma.prize.update({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
*/
update<T extends PrizeUpdateArgs>(args: SelectSubset<T, PrizeUpdateArgs<ExtArgs>>): Prisma__PrizeClient<$Result.GetResult<Prisma.$PrizePayload<ExtArgs>, T, "update">, never, ExtArgs>
/**
* Delete zero or more Prizes.
* @param {PrizeDeleteManyArgs} args - Arguments to filter Prizes to delete.
* @example
* // Delete a few Prizes
* const { count } = await prisma.prize.deleteMany({
* where: {
* // ... provide filter here
* }
* })
*
*/
deleteMany<T extends PrizeDeleteManyArgs>(args?: SelectSubset<T, PrizeDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
/**
* Update zero or more Prizes.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {PrizeUpdateManyArgs} args - Arguments to update one or more rows.
* @example
* // Update many Prizes
* const prize = await prisma.prize.updateMany({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
*/
updateMany<T extends PrizeUpdateManyArgs>(args: SelectSubset<T, PrizeUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
/**
* Create or update one Prize.
* @param {PrizeUpsertArgs} args - Arguments to update or create a Prize.
* @example
* // Update or create a Prize
* const prize = await prisma.prize.upsert({
* create: {
* // ... data to create a Prize
* },
* update: {
* // ... in case it already exists, update
* },
* where: {
* // ... the filter for the Prize we want to update
* }
* })
*/
upsert<T extends PrizeUpsertArgs>(args: SelectSubset<T, PrizeUpsertArgs<ExtArgs>>): Prisma__PrizeClient<$Result.GetResult<Prisma.$PrizePayload<ExtArgs>, T, "upsert">, never, ExtArgs>
/**
* Count the number of Prizes.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {PrizeCountArgs} args - Arguments to filter Prizes to count.
* @example
* // Count the number of Prizes
* const count = await prisma.prize.count({
* where: {
* // ... the filter for the Prizes we want to count
* }
* })
**/
count<T extends PrizeCountArgs>(
args?: Subset<T, PrizeCountArgs>,
): Prisma.PrismaPromise<
T extends $Utils.Record<'select', any>
? T['select'] extends true
? number
: GetScalarType<T['select'], PrizeCountAggregateOutputType>
: number
>
/**
* Allows you to perform aggregations operations on a Prize.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {PrizeAggregateArgs} 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 PrizeAggregateArgs>(args: Subset<T, PrizeAggregateArgs>): Prisma.PrismaPromise<GetPrizeAggregateType<T>>
/**
* Group by Prize.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {PrizeGroupByArgs} 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 PrizeGroupByArgs,
HasSelectOrTake extends Or<
Extends<'skip', Keys<T>>,
Extends<'take', Keys<T>>
>,
OrderByArg extends True extends HasSelectOrTake
? { orderBy: PrizeGroupByArgs['orderBy'] }
: { orderBy?: PrizeGroupByArgs['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, PrizeGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetPrizeGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
/**
* Fields of the Prize model
*/
readonly fields: PrizeFieldRefs;
}
/**
* The delegate class that acts as a "Promise-like" for Prize.
* 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__PrizeClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> extends Prisma.PrismaPromise<T> {
readonly [Symbol.toStringTag]: "PrismaPromise"
campaign<T extends CampaignDefaultArgs<ExtArgs> = {}>(args?: Subset<T, CampaignDefaultArgs<ExtArgs>>): Prisma__CampaignClient<$Result.GetResult<Prisma.$CampaignPayload<ExtArgs>, T, "findUniqueOrThrow"> | Null, Null, ExtArgs>
spins<T extends Prize$spinsArgs<ExtArgs> = {}>(args?: Subset<T, Prize$spinsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$SpinPayload<ExtArgs>, T, "findMany"> | Null>
userPrizes<T extends Prize$userPrizesArgs<ExtArgs> = {}>(args?: Subset<T, Prize$userPrizesArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$UserPrizePayload<ExtArgs>, T, "findMany"> | Null>
/**
* Attaches callbacks for the resolution and/or rejection of the Promise.
* @param onfulfilled The callback to execute when the Promise is resolved.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of which ever callback is executed.
*/
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): $Utils.JsPromise<TResult1 | TResult2>
/**
* Attaches a callback for only the rejection of the Promise.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of the callback.
*/
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): $Utils.JsPromise<T | TResult>
/**
* Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
* resolved value cannot be modified from the callback.
* @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
* @returns A Promise for the completion of the callback.
*/
finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise<T>
}
/**
* Fields of the Prize model
*/
interface PrizeFieldRefs {
readonly id: FieldRef<"Prize", 'String'>
readonly campaignId: FieldRef<"Prize", 'String'>
readonly title: FieldRef<"Prize", 'String'>
readonly description: FieldRef<"Prize", 'String'>
readonly image: FieldRef<"Prize", 'String'>
readonly type: FieldRef<"Prize", 'PrizeType'>
readonly stockType: FieldRef<"Prize", 'StockType'>
readonly initialStock: FieldRef<"Prize", 'Int'>
readonly remainingStock: FieldRef<"Prize", 'Int'>
readonly weight: FieldRef<"Prize", 'Int'>
readonly status: FieldRef<"Prize", 'PrizeStatus'>
readonly sortOrder: FieldRef<"Prize", 'Int'>
readonly segmentColor: FieldRef<"Prize", 'String'>
readonly expiresAt: FieldRef<"Prize", 'DateTime'>
readonly smsTemplate: FieldRef<"Prize", 'String'>
readonly createdAt: FieldRef<"Prize", 'DateTime'>
readonly updatedAt: FieldRef<"Prize", 'DateTime'>
}
// Custom InputTypes
/**
* Prize findUnique
*/
export type PrizeFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Prize
*/
select?: PrizeSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: PrizeInclude<ExtArgs> | null
/**
* Filter, which Prize to fetch.
*/
where: PrizeWhereUniqueInput
}
/**
* Prize findUniqueOrThrow
*/
export type PrizeFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Prize
*/
select?: PrizeSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: PrizeInclude<ExtArgs> | null
/**
* Filter, which Prize to fetch.
*/
where: PrizeWhereUniqueInput
}
/**
* Prize findFirst
*/
export type PrizeFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Prize
*/
select?: PrizeSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: PrizeInclude<ExtArgs> | null
/**
* Filter, which Prize to fetch.
*/
where?: PrizeWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of Prizes to fetch.
*/
orderBy?: PrizeOrderByWithRelationInput | PrizeOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for searching for Prizes.
*/
cursor?: PrizeWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` Prizes 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` Prizes.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of Prizes.
*/
distinct?: PrizeScalarFieldEnum | PrizeScalarFieldEnum[]
}
/**
* Prize findFirstOrThrow
*/
export type PrizeFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Prize
*/
select?: PrizeSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: PrizeInclude<ExtArgs> | null
/**
* Filter, which Prize to fetch.
*/
where?: PrizeWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of Prizes to fetch.
*/
orderBy?: PrizeOrderByWithRelationInput | PrizeOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for searching for Prizes.
*/
cursor?: PrizeWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` Prizes 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` Prizes.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of Prizes.
*/
distinct?: PrizeScalarFieldEnum | PrizeScalarFieldEnum[]
}
/**
* Prize findMany
*/
export type PrizeFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Prize
*/
select?: PrizeSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: PrizeInclude<ExtArgs> | null
/**
* Filter, which Prizes to fetch.
*/
where?: PrizeWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of Prizes to fetch.
*/
orderBy?: PrizeOrderByWithRelationInput | PrizeOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for listing Prizes.
*/
cursor?: PrizeWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` Prizes 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` Prizes.
*/
skip?: number
distinct?: PrizeScalarFieldEnum | PrizeScalarFieldEnum[]
}
/**
* Prize create
*/
export type PrizeCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Prize
*/
select?: PrizeSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: PrizeInclude<ExtArgs> | null
/**
* The data needed to create a Prize.
*/
data: XOR<PrizeCreateInput, PrizeUncheckedCreateInput>
}
/**
* Prize createMany
*/
export type PrizeCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* The data used to create many Prizes.
*/
data: PrizeCreateManyInput | PrizeCreateManyInput[]
skipDuplicates?: boolean
}
/**
* Prize createManyAndReturn
*/
export type PrizeCreateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Prize
*/
select?: PrizeSelectCreateManyAndReturn<ExtArgs> | null
/**
* The data used to create many Prizes.
*/
data: PrizeCreateManyInput | PrizeCreateManyInput[]
skipDuplicates?: boolean
/**
* Choose, which related nodes to fetch as well
*/
include?: PrizeIncludeCreateManyAndReturn<ExtArgs> | null
}
/**
* Prize update
*/
export type PrizeUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Prize
*/
select?: PrizeSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: PrizeInclude<ExtArgs> | null
/**
* The data needed to update a Prize.
*/
data: XOR<PrizeUpdateInput, PrizeUncheckedUpdateInput>
/**
* Choose, which Prize to update.
*/
where: PrizeWhereUniqueInput
}
/**
* Prize updateMany
*/
export type PrizeUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* The data used to update Prizes.
*/
data: XOR<PrizeUpdateManyMutationInput, PrizeUncheckedUpdateManyInput>
/**
* Filter which Prizes to update
*/
where?: PrizeWhereInput
}
/**
* Prize upsert
*/
export type PrizeUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Prize
*/
select?: PrizeSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: PrizeInclude<ExtArgs> | null
/**
* The filter to search for the Prize to update in case it exists.
*/
where: PrizeWhereUniqueInput
/**
* In case the Prize found by the `where` argument doesn't exist, create a new Prize with this data.
*/
create: XOR<PrizeCreateInput, PrizeUncheckedCreateInput>
/**
* In case the Prize was found with the provided `where` argument, update it with this data.
*/
update: XOR<PrizeUpdateInput, PrizeUncheckedUpdateInput>
}
/**
* Prize delete
*/
export type PrizeDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Prize
*/
select?: PrizeSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: PrizeInclude<ExtArgs> | null
/**
* Filter which Prize to delete.
*/
where: PrizeWhereUniqueInput
}
/**
* Prize deleteMany
*/
export type PrizeDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Filter which Prizes to delete
*/
where?: PrizeWhereInput
}
/**
* Prize.spins
*/
export type Prize$spinsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Spin
*/
select?: SpinSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: SpinInclude<ExtArgs> | null
where?: SpinWhereInput
orderBy?: SpinOrderByWithRelationInput | SpinOrderByWithRelationInput[]
cursor?: SpinWhereUniqueInput
take?: number
skip?: number
distinct?: SpinScalarFieldEnum | SpinScalarFieldEnum[]
}
/**
* Prize.userPrizes
*/
export type Prize$userPrizesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the UserPrize
*/
select?: UserPrizeSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: UserPrizeInclude<ExtArgs> | null
where?: UserPrizeWhereInput
orderBy?: UserPrizeOrderByWithRelationInput | UserPrizeOrderByWithRelationInput[]
cursor?: UserPrizeWhereUniqueInput
take?: number
skip?: number
distinct?: UserPrizeScalarFieldEnum | UserPrizeScalarFieldEnum[]
}
/**
* Prize without action
*/
export type PrizeDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Prize
*/
select?: PrizeSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: PrizeInclude<ExtArgs> | null
}
/**
* Model UserCampaign
*/
export type AggregateUserCampaign = {
_count: UserCampaignCountAggregateOutputType | null
_avg: UserCampaignAvgAggregateOutputType | null
_sum: UserCampaignSumAggregateOutputType | null
_min: UserCampaignMinAggregateOutputType | null
_max: UserCampaignMaxAggregateOutputType | null
}
export type UserCampaignAvgAggregateOutputType = {
totalChances: number | null
usedChances: number | null
}
export type UserCampaignSumAggregateOutputType = {
totalChances: number | null
usedChances: number | null
}
export type UserCampaignMinAggregateOutputType = {
id: string | null
userId: string | null
campaignId: string | null
totalChances: number | null
usedChances: number | null
createdAt: Date | null
updatedAt: Date | null
}
export type UserCampaignMaxAggregateOutputType = {
id: string | null
userId: string | null
campaignId: string | null
totalChances: number | null
usedChances: number | null
createdAt: Date | null
updatedAt: Date | null
}
export type UserCampaignCountAggregateOutputType = {
id: number
userId: number
campaignId: number
totalChances: number
usedChances: number
createdAt: number
updatedAt: number
_all: number
}
export type UserCampaignAvgAggregateInputType = {
totalChances?: true
usedChances?: true
}
export type UserCampaignSumAggregateInputType = {
totalChances?: true
usedChances?: true
}
export type UserCampaignMinAggregateInputType = {
id?: true
userId?: true
campaignId?: true
totalChances?: true
usedChances?: true
createdAt?: true
updatedAt?: true
}
export type UserCampaignMaxAggregateInputType = {
id?: true
userId?: true
campaignId?: true
totalChances?: true
usedChances?: true
createdAt?: true
updatedAt?: true
}
export type UserCampaignCountAggregateInputType = {
id?: true
userId?: true
campaignId?: true
totalChances?: true
usedChances?: true
createdAt?: true
updatedAt?: true
_all?: true
}
export type UserCampaignAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Filter which UserCampaign to aggregate.
*/
where?: UserCampaignWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of UserCampaigns to fetch.
*/
orderBy?: UserCampaignOrderByWithRelationInput | UserCampaignOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the start position
*/
cursor?: UserCampaignWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` UserCampaigns 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` UserCampaigns.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Count returned UserCampaigns
**/
_count?: true | UserCampaignCountAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to average
**/
_avg?: UserCampaignAvgAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to sum
**/
_sum?: UserCampaignSumAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the minimum value
**/
_min?: UserCampaignMinAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the maximum value
**/
_max?: UserCampaignMaxAggregateInputType
}
export type GetUserCampaignAggregateType<T extends UserCampaignAggregateArgs> = {
[P in keyof T & keyof AggregateUserCampaign]: P extends '_count' | 'count'
? T[P] extends true
? number
: GetScalarType<T[P], AggregateUserCampaign[P]>
: GetScalarType<T[P], AggregateUserCampaign[P]>
}
export type UserCampaignGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
where?: UserCampaignWhereInput
orderBy?: UserCampaignOrderByWithAggregationInput | UserCampaignOrderByWithAggregationInput[]
by: UserCampaignScalarFieldEnum[] | UserCampaignScalarFieldEnum
having?: UserCampaignScalarWhereWithAggregatesInput
take?: number
skip?: number
_count?: UserCampaignCountAggregateInputType | true
_avg?: UserCampaignAvgAggregateInputType
_sum?: UserCampaignSumAggregateInputType
_min?: UserCampaignMinAggregateInputType
_max?: UserCampaignMaxAggregateInputType
}
export type UserCampaignGroupByOutputType = {
id: string
userId: string
campaignId: string
totalChances: number
usedChances: number
createdAt: Date
updatedAt: Date
_count: UserCampaignCountAggregateOutputType | null
_avg: UserCampaignAvgAggregateOutputType | null
_sum: UserCampaignSumAggregateOutputType | null
_min: UserCampaignMinAggregateOutputType | null
_max: UserCampaignMaxAggregateOutputType | null
}
type GetUserCampaignGroupByPayload<T extends UserCampaignGroupByArgs> = Prisma.PrismaPromise<
Array<
PickEnumerable<UserCampaignGroupByOutputType, T['by']> &
{
[P in ((keyof T) & (keyof UserCampaignGroupByOutputType))]: P extends '_count'
? T[P] extends boolean
? number
: GetScalarType<T[P], UserCampaignGroupByOutputType[P]>
: GetScalarType<T[P], UserCampaignGroupByOutputType[P]>
}
>
>
export type UserCampaignSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
id?: boolean
userId?: boolean
campaignId?: boolean
totalChances?: boolean
usedChances?: boolean
createdAt?: boolean
updatedAt?: boolean
user?: boolean | UserDefaultArgs<ExtArgs>
campaign?: boolean | CampaignDefaultArgs<ExtArgs>
}, ExtArgs["result"]["userCampaign"]>
export type UserCampaignSelectCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
id?: boolean
userId?: boolean
campaignId?: boolean
totalChances?: boolean
usedChances?: boolean
createdAt?: boolean
updatedAt?: boolean
user?: boolean | UserDefaultArgs<ExtArgs>
campaign?: boolean | CampaignDefaultArgs<ExtArgs>
}, ExtArgs["result"]["userCampaign"]>
export type UserCampaignSelectScalar = {
id?: boolean
userId?: boolean
campaignId?: boolean
totalChances?: boolean
usedChances?: boolean
createdAt?: boolean
updatedAt?: boolean
}
export type UserCampaignInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
user?: boolean | UserDefaultArgs<ExtArgs>
campaign?: boolean | CampaignDefaultArgs<ExtArgs>
}
export type UserCampaignIncludeCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
user?: boolean | UserDefaultArgs<ExtArgs>
campaign?: boolean | CampaignDefaultArgs<ExtArgs>
}
export type $UserCampaignPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
name: "UserCampaign"
objects: {
user: Prisma.$UserPayload<ExtArgs>
campaign: Prisma.$CampaignPayload<ExtArgs>
}
scalars: $Extensions.GetPayloadResult<{
id: string
userId: string
campaignId: string
totalChances: number
usedChances: number
createdAt: Date
updatedAt: Date
}, ExtArgs["result"]["userCampaign"]>
composites: {}
}
type UserCampaignGetPayload<S extends boolean | null | undefined | UserCampaignDefaultArgs> = $Result.GetResult<Prisma.$UserCampaignPayload, S>
type UserCampaignCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
Omit<UserCampaignFindManyArgs, 'select' | 'include' | 'distinct'> & {
select?: UserCampaignCountAggregateInputType | true
}
export interface UserCampaignDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> {
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['UserCampaign'], meta: { name: 'UserCampaign' } }
/**
* Find zero or one UserCampaign that matches the filter.
* @param {UserCampaignFindUniqueArgs} args - Arguments to find a UserCampaign
* @example
* // Get one UserCampaign
* const userCampaign = await prisma.userCampaign.findUnique({
* where: {
* // ... provide filter here
* }
* })
*/
findUnique<T extends UserCampaignFindUniqueArgs>(args: SelectSubset<T, UserCampaignFindUniqueArgs<ExtArgs>>): Prisma__UserCampaignClient<$Result.GetResult<Prisma.$UserCampaignPayload<ExtArgs>, T, "findUnique"> | null, null, ExtArgs>
/**
* Find one UserCampaign that matches the filter or throw an error with `error.code='P2025'`
* if no matches were found.
* @param {UserCampaignFindUniqueOrThrowArgs} args - Arguments to find a UserCampaign
* @example
* // Get one UserCampaign
* const userCampaign = await prisma.userCampaign.findUniqueOrThrow({
* where: {
* // ... provide filter here
* }
* })
*/
findUniqueOrThrow<T extends UserCampaignFindUniqueOrThrowArgs>(args: SelectSubset<T, UserCampaignFindUniqueOrThrowArgs<ExtArgs>>): Prisma__UserCampaignClient<$Result.GetResult<Prisma.$UserCampaignPayload<ExtArgs>, T, "findUniqueOrThrow">, never, ExtArgs>
/**
* Find the first UserCampaign 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 {UserCampaignFindFirstArgs} args - Arguments to find a UserCampaign
* @example
* // Get one UserCampaign
* const userCampaign = await prisma.userCampaign.findFirst({
* where: {
* // ... provide filter here
* }
* })
*/
findFirst<T extends UserCampaignFindFirstArgs>(args?: SelectSubset<T, UserCampaignFindFirstArgs<ExtArgs>>): Prisma__UserCampaignClient<$Result.GetResult<Prisma.$UserCampaignPayload<ExtArgs>, T, "findFirst"> | null, null, ExtArgs>
/**
* Find the first UserCampaign 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 {UserCampaignFindFirstOrThrowArgs} args - Arguments to find a UserCampaign
* @example
* // Get one UserCampaign
* const userCampaign = await prisma.userCampaign.findFirstOrThrow({
* where: {
* // ... provide filter here
* }
* })
*/
findFirstOrThrow<T extends UserCampaignFindFirstOrThrowArgs>(args?: SelectSubset<T, UserCampaignFindFirstOrThrowArgs<ExtArgs>>): Prisma__UserCampaignClient<$Result.GetResult<Prisma.$UserCampaignPayload<ExtArgs>, T, "findFirstOrThrow">, never, ExtArgs>
/**
* Find zero or more UserCampaigns 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 {UserCampaignFindManyArgs} args - Arguments to filter and select certain fields only.
* @example
* // Get all UserCampaigns
* const userCampaigns = await prisma.userCampaign.findMany()
*
* // Get first 10 UserCampaigns
* const userCampaigns = await prisma.userCampaign.findMany({ take: 10 })
*
* // Only select the `id`
* const userCampaignWithIdOnly = await prisma.userCampaign.findMany({ select: { id: true } })
*
*/
findMany<T extends UserCampaignFindManyArgs>(args?: SelectSubset<T, UserCampaignFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$UserCampaignPayload<ExtArgs>, T, "findMany">>
/**
* Create a UserCampaign.
* @param {UserCampaignCreateArgs} args - Arguments to create a UserCampaign.
* @example
* // Create one UserCampaign
* const UserCampaign = await prisma.userCampaign.create({
* data: {
* // ... data to create a UserCampaign
* }
* })
*
*/
create<T extends UserCampaignCreateArgs>(args: SelectSubset<T, UserCampaignCreateArgs<ExtArgs>>): Prisma__UserCampaignClient<$Result.GetResult<Prisma.$UserCampaignPayload<ExtArgs>, T, "create">, never, ExtArgs>
/**
* Create many UserCampaigns.
* @param {UserCampaignCreateManyArgs} args - Arguments to create many UserCampaigns.
* @example
* // Create many UserCampaigns
* const userCampaign = await prisma.userCampaign.createMany({
* data: [
* // ... provide data here
* ]
* })
*
*/
createMany<T extends UserCampaignCreateManyArgs>(args?: SelectSubset<T, UserCampaignCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
/**
* Create many UserCampaigns and returns the data saved in the database.
* @param {UserCampaignCreateManyAndReturnArgs} args - Arguments to create many UserCampaigns.
* @example
* // Create many UserCampaigns
* const userCampaign = await prisma.userCampaign.createManyAndReturn({
* data: [
* // ... provide data here
* ]
* })
*
* // Create many UserCampaigns and only return the `id`
* const userCampaignWithIdOnly = await prisma.userCampaign.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 UserCampaignCreateManyAndReturnArgs>(args?: SelectSubset<T, UserCampaignCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$UserCampaignPayload<ExtArgs>, T, "createManyAndReturn">>
/**
* Delete a UserCampaign.
* @param {UserCampaignDeleteArgs} args - Arguments to delete one UserCampaign.
* @example
* // Delete one UserCampaign
* const UserCampaign = await prisma.userCampaign.delete({
* where: {
* // ... filter to delete one UserCampaign
* }
* })
*
*/
delete<T extends UserCampaignDeleteArgs>(args: SelectSubset<T, UserCampaignDeleteArgs<ExtArgs>>): Prisma__UserCampaignClient<$Result.GetResult<Prisma.$UserCampaignPayload<ExtArgs>, T, "delete">, never, ExtArgs>
/**
* Update one UserCampaign.
* @param {UserCampaignUpdateArgs} args - Arguments to update one UserCampaign.
* @example
* // Update one UserCampaign
* const userCampaign = await prisma.userCampaign.update({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
*/
update<T extends UserCampaignUpdateArgs>(args: SelectSubset<T, UserCampaignUpdateArgs<ExtArgs>>): Prisma__UserCampaignClient<$Result.GetResult<Prisma.$UserCampaignPayload<ExtArgs>, T, "update">, never, ExtArgs>
/**
* Delete zero or more UserCampaigns.
* @param {UserCampaignDeleteManyArgs} args - Arguments to filter UserCampaigns to delete.
* @example
* // Delete a few UserCampaigns
* const { count } = await prisma.userCampaign.deleteMany({
* where: {
* // ... provide filter here
* }
* })
*
*/
deleteMany<T extends UserCampaignDeleteManyArgs>(args?: SelectSubset<T, UserCampaignDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
/**
* Update zero or more UserCampaigns.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {UserCampaignUpdateManyArgs} args - Arguments to update one or more rows.
* @example
* // Update many UserCampaigns
* const userCampaign = await prisma.userCampaign.updateMany({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
*/
updateMany<T extends UserCampaignUpdateManyArgs>(args: SelectSubset<T, UserCampaignUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
/**
* Create or update one UserCampaign.
* @param {UserCampaignUpsertArgs} args - Arguments to update or create a UserCampaign.
* @example
* // Update or create a UserCampaign
* const userCampaign = await prisma.userCampaign.upsert({
* create: {
* // ... data to create a UserCampaign
* },
* update: {
* // ... in case it already exists, update
* },
* where: {
* // ... the filter for the UserCampaign we want to update
* }
* })
*/
upsert<T extends UserCampaignUpsertArgs>(args: SelectSubset<T, UserCampaignUpsertArgs<ExtArgs>>): Prisma__UserCampaignClient<$Result.GetResult<Prisma.$UserCampaignPayload<ExtArgs>, T, "upsert">, never, ExtArgs>
/**
* Count the number of UserCampaigns.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {UserCampaignCountArgs} args - Arguments to filter UserCampaigns to count.
* @example
* // Count the number of UserCampaigns
* const count = await prisma.userCampaign.count({
* where: {
* // ... the filter for the UserCampaigns we want to count
* }
* })
**/
count<T extends UserCampaignCountArgs>(
args?: Subset<T, UserCampaignCountArgs>,
): Prisma.PrismaPromise<
T extends $Utils.Record<'select', any>
? T['select'] extends true
? number
: GetScalarType<T['select'], UserCampaignCountAggregateOutputType>
: number
>
/**
* Allows you to perform aggregations operations on a UserCampaign.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {UserCampaignAggregateArgs} 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 UserCampaignAggregateArgs>(args: Subset<T, UserCampaignAggregateArgs>): Prisma.PrismaPromise<GetUserCampaignAggregateType<T>>
/**
* Group by UserCampaign.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {UserCampaignGroupByArgs} 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 UserCampaignGroupByArgs,
HasSelectOrTake extends Or<
Extends<'skip', Keys<T>>,
Extends<'take', Keys<T>>
>,
OrderByArg extends True extends HasSelectOrTake
? { orderBy: UserCampaignGroupByArgs['orderBy'] }
: { orderBy?: UserCampaignGroupByArgs['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, UserCampaignGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetUserCampaignGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
/**
* Fields of the UserCampaign model
*/
readonly fields: UserCampaignFieldRefs;
}
/**
* The delegate class that acts as a "Promise-like" for UserCampaign.
* 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__UserCampaignClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> extends Prisma.PrismaPromise<T> {
readonly [Symbol.toStringTag]: "PrismaPromise"
user<T extends UserDefaultArgs<ExtArgs> = {}>(args?: Subset<T, UserDefaultArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findUniqueOrThrow"> | Null, Null, ExtArgs>
campaign<T extends CampaignDefaultArgs<ExtArgs> = {}>(args?: Subset<T, CampaignDefaultArgs<ExtArgs>>): Prisma__CampaignClient<$Result.GetResult<Prisma.$CampaignPayload<ExtArgs>, T, "findUniqueOrThrow"> | Null, Null, ExtArgs>
/**
* Attaches callbacks for the resolution and/or rejection of the Promise.
* @param onfulfilled The callback to execute when the Promise is resolved.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of which ever callback is executed.
*/
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): $Utils.JsPromise<TResult1 | TResult2>
/**
* Attaches a callback for only the rejection of the Promise.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of the callback.
*/
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): $Utils.JsPromise<T | TResult>
/**
* Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
* resolved value cannot be modified from the callback.
* @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
* @returns A Promise for the completion of the callback.
*/
finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise<T>
}
/**
* Fields of the UserCampaign model
*/
interface UserCampaignFieldRefs {
readonly id: FieldRef<"UserCampaign", 'String'>
readonly userId: FieldRef<"UserCampaign", 'String'>
readonly campaignId: FieldRef<"UserCampaign", 'String'>
readonly totalChances: FieldRef<"UserCampaign", 'Int'>
readonly usedChances: FieldRef<"UserCampaign", 'Int'>
readonly createdAt: FieldRef<"UserCampaign", 'DateTime'>
readonly updatedAt: FieldRef<"UserCampaign", 'DateTime'>
}
// Custom InputTypes
/**
* UserCampaign findUnique
*/
export type UserCampaignFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the UserCampaign
*/
select?: UserCampaignSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: UserCampaignInclude<ExtArgs> | null
/**
* Filter, which UserCampaign to fetch.
*/
where: UserCampaignWhereUniqueInput
}
/**
* UserCampaign findUniqueOrThrow
*/
export type UserCampaignFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the UserCampaign
*/
select?: UserCampaignSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: UserCampaignInclude<ExtArgs> | null
/**
* Filter, which UserCampaign to fetch.
*/
where: UserCampaignWhereUniqueInput
}
/**
* UserCampaign findFirst
*/
export type UserCampaignFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the UserCampaign
*/
select?: UserCampaignSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: UserCampaignInclude<ExtArgs> | null
/**
* Filter, which UserCampaign to fetch.
*/
where?: UserCampaignWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of UserCampaigns to fetch.
*/
orderBy?: UserCampaignOrderByWithRelationInput | UserCampaignOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for searching for UserCampaigns.
*/
cursor?: UserCampaignWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` UserCampaigns 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` UserCampaigns.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of UserCampaigns.
*/
distinct?: UserCampaignScalarFieldEnum | UserCampaignScalarFieldEnum[]
}
/**
* UserCampaign findFirstOrThrow
*/
export type UserCampaignFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the UserCampaign
*/
select?: UserCampaignSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: UserCampaignInclude<ExtArgs> | null
/**
* Filter, which UserCampaign to fetch.
*/
where?: UserCampaignWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of UserCampaigns to fetch.
*/
orderBy?: UserCampaignOrderByWithRelationInput | UserCampaignOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for searching for UserCampaigns.
*/
cursor?: UserCampaignWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` UserCampaigns 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` UserCampaigns.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of UserCampaigns.
*/
distinct?: UserCampaignScalarFieldEnum | UserCampaignScalarFieldEnum[]
}
/**
* UserCampaign findMany
*/
export type UserCampaignFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the UserCampaign
*/
select?: UserCampaignSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: UserCampaignInclude<ExtArgs> | null
/**
* Filter, which UserCampaigns to fetch.
*/
where?: UserCampaignWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of UserCampaigns to fetch.
*/
orderBy?: UserCampaignOrderByWithRelationInput | UserCampaignOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for listing UserCampaigns.
*/
cursor?: UserCampaignWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` UserCampaigns 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` UserCampaigns.
*/
skip?: number
distinct?: UserCampaignScalarFieldEnum | UserCampaignScalarFieldEnum[]
}
/**
* UserCampaign create
*/
export type UserCampaignCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the UserCampaign
*/
select?: UserCampaignSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: UserCampaignInclude<ExtArgs> | null
/**
* The data needed to create a UserCampaign.
*/
data: XOR<UserCampaignCreateInput, UserCampaignUncheckedCreateInput>
}
/**
* UserCampaign createMany
*/
export type UserCampaignCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* The data used to create many UserCampaigns.
*/
data: UserCampaignCreateManyInput | UserCampaignCreateManyInput[]
skipDuplicates?: boolean
}
/**
* UserCampaign createManyAndReturn
*/
export type UserCampaignCreateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the UserCampaign
*/
select?: UserCampaignSelectCreateManyAndReturn<ExtArgs> | null
/**
* The data used to create many UserCampaigns.
*/
data: UserCampaignCreateManyInput | UserCampaignCreateManyInput[]
skipDuplicates?: boolean
/**
* Choose, which related nodes to fetch as well
*/
include?: UserCampaignIncludeCreateManyAndReturn<ExtArgs> | null
}
/**
* UserCampaign update
*/
export type UserCampaignUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the UserCampaign
*/
select?: UserCampaignSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: UserCampaignInclude<ExtArgs> | null
/**
* The data needed to update a UserCampaign.
*/
data: XOR<UserCampaignUpdateInput, UserCampaignUncheckedUpdateInput>
/**
* Choose, which UserCampaign to update.
*/
where: UserCampaignWhereUniqueInput
}
/**
* UserCampaign updateMany
*/
export type UserCampaignUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* The data used to update UserCampaigns.
*/
data: XOR<UserCampaignUpdateManyMutationInput, UserCampaignUncheckedUpdateManyInput>
/**
* Filter which UserCampaigns to update
*/
where?: UserCampaignWhereInput
}
/**
* UserCampaign upsert
*/
export type UserCampaignUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the UserCampaign
*/
select?: UserCampaignSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: UserCampaignInclude<ExtArgs> | null
/**
* The filter to search for the UserCampaign to update in case it exists.
*/
where: UserCampaignWhereUniqueInput
/**
* In case the UserCampaign found by the `where` argument doesn't exist, create a new UserCampaign with this data.
*/
create: XOR<UserCampaignCreateInput, UserCampaignUncheckedCreateInput>
/**
* In case the UserCampaign was found with the provided `where` argument, update it with this data.
*/
update: XOR<UserCampaignUpdateInput, UserCampaignUncheckedUpdateInput>
}
/**
* UserCampaign delete
*/
export type UserCampaignDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the UserCampaign
*/
select?: UserCampaignSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: UserCampaignInclude<ExtArgs> | null
/**
* Filter which UserCampaign to delete.
*/
where: UserCampaignWhereUniqueInput
}
/**
* UserCampaign deleteMany
*/
export type UserCampaignDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Filter which UserCampaigns to delete
*/
where?: UserCampaignWhereInput
}
/**
* UserCampaign without action
*/
export type UserCampaignDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the UserCampaign
*/
select?: UserCampaignSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: UserCampaignInclude<ExtArgs> | null
}
/**
* Model ChanceTransaction
*/
export type AggregateChanceTransaction = {
_count: ChanceTransactionCountAggregateOutputType | null
_avg: ChanceTransactionAvgAggregateOutputType | null
_sum: ChanceTransactionSumAggregateOutputType | null
_min: ChanceTransactionMinAggregateOutputType | null
_max: ChanceTransactionMaxAggregateOutputType | null
}
export type ChanceTransactionAvgAggregateOutputType = {
amount: number | null
}
export type ChanceTransactionSumAggregateOutputType = {
amount: number | null
}
export type ChanceTransactionMinAggregateOutputType = {
id: string | null
userId: string | null
campaignId: string | null
amount: number | null
type: $Enums.ChanceTxnType | null
referenceType: string | null
referenceId: string | null
description: string | null
createdById: string | null
createdAt: Date | null
}
export type ChanceTransactionMaxAggregateOutputType = {
id: string | null
userId: string | null
campaignId: string | null
amount: number | null
type: $Enums.ChanceTxnType | null
referenceType: string | null
referenceId: string | null
description: string | null
createdById: string | null
createdAt: Date | null
}
export type ChanceTransactionCountAggregateOutputType = {
id: number
userId: number
campaignId: number
amount: number
type: number
referenceType: number
referenceId: number
description: number
createdById: number
createdAt: number
_all: number
}
export type ChanceTransactionAvgAggregateInputType = {
amount?: true
}
export type ChanceTransactionSumAggregateInputType = {
amount?: true
}
export type ChanceTransactionMinAggregateInputType = {
id?: true
userId?: true
campaignId?: true
amount?: true
type?: true
referenceType?: true
referenceId?: true
description?: true
createdById?: true
createdAt?: true
}
export type ChanceTransactionMaxAggregateInputType = {
id?: true
userId?: true
campaignId?: true
amount?: true
type?: true
referenceType?: true
referenceId?: true
description?: true
createdById?: true
createdAt?: true
}
export type ChanceTransactionCountAggregateInputType = {
id?: true
userId?: true
campaignId?: true
amount?: true
type?: true
referenceType?: true
referenceId?: true
description?: true
createdById?: true
createdAt?: true
_all?: true
}
export type ChanceTransactionAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Filter which ChanceTransaction to aggregate.
*/
where?: ChanceTransactionWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of ChanceTransactions to fetch.
*/
orderBy?: ChanceTransactionOrderByWithRelationInput | ChanceTransactionOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the start position
*/
cursor?: ChanceTransactionWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` ChanceTransactions 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` ChanceTransactions.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Count returned ChanceTransactions
**/
_count?: true | ChanceTransactionCountAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to average
**/
_avg?: ChanceTransactionAvgAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to sum
**/
_sum?: ChanceTransactionSumAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the minimum value
**/
_min?: ChanceTransactionMinAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the maximum value
**/
_max?: ChanceTransactionMaxAggregateInputType
}
export type GetChanceTransactionAggregateType<T extends ChanceTransactionAggregateArgs> = {
[P in keyof T & keyof AggregateChanceTransaction]: P extends '_count' | 'count'
? T[P] extends true
? number
: GetScalarType<T[P], AggregateChanceTransaction[P]>
: GetScalarType<T[P], AggregateChanceTransaction[P]>
}
export type ChanceTransactionGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
where?: ChanceTransactionWhereInput
orderBy?: ChanceTransactionOrderByWithAggregationInput | ChanceTransactionOrderByWithAggregationInput[]
by: ChanceTransactionScalarFieldEnum[] | ChanceTransactionScalarFieldEnum
having?: ChanceTransactionScalarWhereWithAggregatesInput
take?: number
skip?: number
_count?: ChanceTransactionCountAggregateInputType | true
_avg?: ChanceTransactionAvgAggregateInputType
_sum?: ChanceTransactionSumAggregateInputType
_min?: ChanceTransactionMinAggregateInputType
_max?: ChanceTransactionMaxAggregateInputType
}
export type ChanceTransactionGroupByOutputType = {
id: string
userId: string
campaignId: string
amount: number
type: $Enums.ChanceTxnType
referenceType: string | null
referenceId: string | null
description: string | null
createdById: string | null
createdAt: Date
_count: ChanceTransactionCountAggregateOutputType | null
_avg: ChanceTransactionAvgAggregateOutputType | null
_sum: ChanceTransactionSumAggregateOutputType | null
_min: ChanceTransactionMinAggregateOutputType | null
_max: ChanceTransactionMaxAggregateOutputType | null
}
type GetChanceTransactionGroupByPayload<T extends ChanceTransactionGroupByArgs> = Prisma.PrismaPromise<
Array<
PickEnumerable<ChanceTransactionGroupByOutputType, T['by']> &
{
[P in ((keyof T) & (keyof ChanceTransactionGroupByOutputType))]: P extends '_count'
? T[P] extends boolean
? number
: GetScalarType<T[P], ChanceTransactionGroupByOutputType[P]>
: GetScalarType<T[P], ChanceTransactionGroupByOutputType[P]>
}
>
>
export type ChanceTransactionSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
id?: boolean
userId?: boolean
campaignId?: boolean
amount?: boolean
type?: boolean
referenceType?: boolean
referenceId?: boolean
description?: boolean
createdById?: boolean
createdAt?: boolean
user?: boolean | UserDefaultArgs<ExtArgs>
campaign?: boolean | CampaignDefaultArgs<ExtArgs>
createdBy?: boolean | ChanceTransaction$createdByArgs<ExtArgs>
}, ExtArgs["result"]["chanceTransaction"]>
export type ChanceTransactionSelectCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
id?: boolean
userId?: boolean
campaignId?: boolean
amount?: boolean
type?: boolean
referenceType?: boolean
referenceId?: boolean
description?: boolean
createdById?: boolean
createdAt?: boolean
user?: boolean | UserDefaultArgs<ExtArgs>
campaign?: boolean | CampaignDefaultArgs<ExtArgs>
createdBy?: boolean | ChanceTransaction$createdByArgs<ExtArgs>
}, ExtArgs["result"]["chanceTransaction"]>
export type ChanceTransactionSelectScalar = {
id?: boolean
userId?: boolean
campaignId?: boolean
amount?: boolean
type?: boolean
referenceType?: boolean
referenceId?: boolean
description?: boolean
createdById?: boolean
createdAt?: boolean
}
export type ChanceTransactionInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
user?: boolean | UserDefaultArgs<ExtArgs>
campaign?: boolean | CampaignDefaultArgs<ExtArgs>
createdBy?: boolean | ChanceTransaction$createdByArgs<ExtArgs>
}
export type ChanceTransactionIncludeCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
user?: boolean | UserDefaultArgs<ExtArgs>
campaign?: boolean | CampaignDefaultArgs<ExtArgs>
createdBy?: boolean | ChanceTransaction$createdByArgs<ExtArgs>
}
export type $ChanceTransactionPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
name: "ChanceTransaction"
objects: {
user: Prisma.$UserPayload<ExtArgs>
campaign: Prisma.$CampaignPayload<ExtArgs>
createdBy: Prisma.$AdminPayload<ExtArgs> | null
}
scalars: $Extensions.GetPayloadResult<{
id: string
userId: string
campaignId: string
amount: number
type: $Enums.ChanceTxnType
referenceType: string | null
referenceId: string | null
description: string | null
createdById: string | null
createdAt: Date
}, ExtArgs["result"]["chanceTransaction"]>
composites: {}
}
type ChanceTransactionGetPayload<S extends boolean | null | undefined | ChanceTransactionDefaultArgs> = $Result.GetResult<Prisma.$ChanceTransactionPayload, S>
type ChanceTransactionCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
Omit<ChanceTransactionFindManyArgs, 'select' | 'include' | 'distinct'> & {
select?: ChanceTransactionCountAggregateInputType | true
}
export interface ChanceTransactionDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> {
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['ChanceTransaction'], meta: { name: 'ChanceTransaction' } }
/**
* Find zero or one ChanceTransaction that matches the filter.
* @param {ChanceTransactionFindUniqueArgs} args - Arguments to find a ChanceTransaction
* @example
* // Get one ChanceTransaction
* const chanceTransaction = await prisma.chanceTransaction.findUnique({
* where: {
* // ... provide filter here
* }
* })
*/
findUnique<T extends ChanceTransactionFindUniqueArgs>(args: SelectSubset<T, ChanceTransactionFindUniqueArgs<ExtArgs>>): Prisma__ChanceTransactionClient<$Result.GetResult<Prisma.$ChanceTransactionPayload<ExtArgs>, T, "findUnique"> | null, null, ExtArgs>
/**
* Find one ChanceTransaction that matches the filter or throw an error with `error.code='P2025'`
* if no matches were found.
* @param {ChanceTransactionFindUniqueOrThrowArgs} args - Arguments to find a ChanceTransaction
* @example
* // Get one ChanceTransaction
* const chanceTransaction = await prisma.chanceTransaction.findUniqueOrThrow({
* where: {
* // ... provide filter here
* }
* })
*/
findUniqueOrThrow<T extends ChanceTransactionFindUniqueOrThrowArgs>(args: SelectSubset<T, ChanceTransactionFindUniqueOrThrowArgs<ExtArgs>>): Prisma__ChanceTransactionClient<$Result.GetResult<Prisma.$ChanceTransactionPayload<ExtArgs>, T, "findUniqueOrThrow">, never, ExtArgs>
/**
* Find the first ChanceTransaction 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 {ChanceTransactionFindFirstArgs} args - Arguments to find a ChanceTransaction
* @example
* // Get one ChanceTransaction
* const chanceTransaction = await prisma.chanceTransaction.findFirst({
* where: {
* // ... provide filter here
* }
* })
*/
findFirst<T extends ChanceTransactionFindFirstArgs>(args?: SelectSubset<T, ChanceTransactionFindFirstArgs<ExtArgs>>): Prisma__ChanceTransactionClient<$Result.GetResult<Prisma.$ChanceTransactionPayload<ExtArgs>, T, "findFirst"> | null, null, ExtArgs>
/**
* Find the first ChanceTransaction 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 {ChanceTransactionFindFirstOrThrowArgs} args - Arguments to find a ChanceTransaction
* @example
* // Get one ChanceTransaction
* const chanceTransaction = await prisma.chanceTransaction.findFirstOrThrow({
* where: {
* // ... provide filter here
* }
* })
*/
findFirstOrThrow<T extends ChanceTransactionFindFirstOrThrowArgs>(args?: SelectSubset<T, ChanceTransactionFindFirstOrThrowArgs<ExtArgs>>): Prisma__ChanceTransactionClient<$Result.GetResult<Prisma.$ChanceTransactionPayload<ExtArgs>, T, "findFirstOrThrow">, never, ExtArgs>
/**
* Find zero or more ChanceTransactions 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 {ChanceTransactionFindManyArgs} args - Arguments to filter and select certain fields only.
* @example
* // Get all ChanceTransactions
* const chanceTransactions = await prisma.chanceTransaction.findMany()
*
* // Get first 10 ChanceTransactions
* const chanceTransactions = await prisma.chanceTransaction.findMany({ take: 10 })
*
* // Only select the `id`
* const chanceTransactionWithIdOnly = await prisma.chanceTransaction.findMany({ select: { id: true } })
*
*/
findMany<T extends ChanceTransactionFindManyArgs>(args?: SelectSubset<T, ChanceTransactionFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$ChanceTransactionPayload<ExtArgs>, T, "findMany">>
/**
* Create a ChanceTransaction.
* @param {ChanceTransactionCreateArgs} args - Arguments to create a ChanceTransaction.
* @example
* // Create one ChanceTransaction
* const ChanceTransaction = await prisma.chanceTransaction.create({
* data: {
* // ... data to create a ChanceTransaction
* }
* })
*
*/
create<T extends ChanceTransactionCreateArgs>(args: SelectSubset<T, ChanceTransactionCreateArgs<ExtArgs>>): Prisma__ChanceTransactionClient<$Result.GetResult<Prisma.$ChanceTransactionPayload<ExtArgs>, T, "create">, never, ExtArgs>
/**
* Create many ChanceTransactions.
* @param {ChanceTransactionCreateManyArgs} args - Arguments to create many ChanceTransactions.
* @example
* // Create many ChanceTransactions
* const chanceTransaction = await prisma.chanceTransaction.createMany({
* data: [
* // ... provide data here
* ]
* })
*
*/
createMany<T extends ChanceTransactionCreateManyArgs>(args?: SelectSubset<T, ChanceTransactionCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
/**
* Create many ChanceTransactions and returns the data saved in the database.
* @param {ChanceTransactionCreateManyAndReturnArgs} args - Arguments to create many ChanceTransactions.
* @example
* // Create many ChanceTransactions
* const chanceTransaction = await prisma.chanceTransaction.createManyAndReturn({
* data: [
* // ... provide data here
* ]
* })
*
* // Create many ChanceTransactions and only return the `id`
* const chanceTransactionWithIdOnly = await prisma.chanceTransaction.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 ChanceTransactionCreateManyAndReturnArgs>(args?: SelectSubset<T, ChanceTransactionCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$ChanceTransactionPayload<ExtArgs>, T, "createManyAndReturn">>
/**
* Delete a ChanceTransaction.
* @param {ChanceTransactionDeleteArgs} args - Arguments to delete one ChanceTransaction.
* @example
* // Delete one ChanceTransaction
* const ChanceTransaction = await prisma.chanceTransaction.delete({
* where: {
* // ... filter to delete one ChanceTransaction
* }
* })
*
*/
delete<T extends ChanceTransactionDeleteArgs>(args: SelectSubset<T, ChanceTransactionDeleteArgs<ExtArgs>>): Prisma__ChanceTransactionClient<$Result.GetResult<Prisma.$ChanceTransactionPayload<ExtArgs>, T, "delete">, never, ExtArgs>
/**
* Update one ChanceTransaction.
* @param {ChanceTransactionUpdateArgs} args - Arguments to update one ChanceTransaction.
* @example
* // Update one ChanceTransaction
* const chanceTransaction = await prisma.chanceTransaction.update({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
*/
update<T extends ChanceTransactionUpdateArgs>(args: SelectSubset<T, ChanceTransactionUpdateArgs<ExtArgs>>): Prisma__ChanceTransactionClient<$Result.GetResult<Prisma.$ChanceTransactionPayload<ExtArgs>, T, "update">, never, ExtArgs>
/**
* Delete zero or more ChanceTransactions.
* @param {ChanceTransactionDeleteManyArgs} args - Arguments to filter ChanceTransactions to delete.
* @example
* // Delete a few ChanceTransactions
* const { count } = await prisma.chanceTransaction.deleteMany({
* where: {
* // ... provide filter here
* }
* })
*
*/
deleteMany<T extends ChanceTransactionDeleteManyArgs>(args?: SelectSubset<T, ChanceTransactionDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
/**
* Update zero or more ChanceTransactions.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {ChanceTransactionUpdateManyArgs} args - Arguments to update one or more rows.
* @example
* // Update many ChanceTransactions
* const chanceTransaction = await prisma.chanceTransaction.updateMany({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
*/
updateMany<T extends ChanceTransactionUpdateManyArgs>(args: SelectSubset<T, ChanceTransactionUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
/**
* Create or update one ChanceTransaction.
* @param {ChanceTransactionUpsertArgs} args - Arguments to update or create a ChanceTransaction.
* @example
* // Update or create a ChanceTransaction
* const chanceTransaction = await prisma.chanceTransaction.upsert({
* create: {
* // ... data to create a ChanceTransaction
* },
* update: {
* // ... in case it already exists, update
* },
* where: {
* // ... the filter for the ChanceTransaction we want to update
* }
* })
*/
upsert<T extends ChanceTransactionUpsertArgs>(args: SelectSubset<T, ChanceTransactionUpsertArgs<ExtArgs>>): Prisma__ChanceTransactionClient<$Result.GetResult<Prisma.$ChanceTransactionPayload<ExtArgs>, T, "upsert">, never, ExtArgs>
/**
* Count the number of ChanceTransactions.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {ChanceTransactionCountArgs} args - Arguments to filter ChanceTransactions to count.
* @example
* // Count the number of ChanceTransactions
* const count = await prisma.chanceTransaction.count({
* where: {
* // ... the filter for the ChanceTransactions we want to count
* }
* })
**/
count<T extends ChanceTransactionCountArgs>(
args?: Subset<T, ChanceTransactionCountArgs>,
): Prisma.PrismaPromise<
T extends $Utils.Record<'select', any>
? T['select'] extends true
? number
: GetScalarType<T['select'], ChanceTransactionCountAggregateOutputType>
: number
>
/**
* Allows you to perform aggregations operations on a ChanceTransaction.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {ChanceTransactionAggregateArgs} 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 ChanceTransactionAggregateArgs>(args: Subset<T, ChanceTransactionAggregateArgs>): Prisma.PrismaPromise<GetChanceTransactionAggregateType<T>>
/**
* Group by ChanceTransaction.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {ChanceTransactionGroupByArgs} 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 ChanceTransactionGroupByArgs,
HasSelectOrTake extends Or<
Extends<'skip', Keys<T>>,
Extends<'take', Keys<T>>
>,
OrderByArg extends True extends HasSelectOrTake
? { orderBy: ChanceTransactionGroupByArgs['orderBy'] }
: { orderBy?: ChanceTransactionGroupByArgs['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, ChanceTransactionGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetChanceTransactionGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
/**
* Fields of the ChanceTransaction model
*/
readonly fields: ChanceTransactionFieldRefs;
}
/**
* The delegate class that acts as a "Promise-like" for ChanceTransaction.
* 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__ChanceTransactionClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> extends Prisma.PrismaPromise<T> {
readonly [Symbol.toStringTag]: "PrismaPromise"
user<T extends UserDefaultArgs<ExtArgs> = {}>(args?: Subset<T, UserDefaultArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findUniqueOrThrow"> | Null, Null, ExtArgs>
campaign<T extends CampaignDefaultArgs<ExtArgs> = {}>(args?: Subset<T, CampaignDefaultArgs<ExtArgs>>): Prisma__CampaignClient<$Result.GetResult<Prisma.$CampaignPayload<ExtArgs>, T, "findUniqueOrThrow"> | Null, Null, ExtArgs>
createdBy<T extends ChanceTransaction$createdByArgs<ExtArgs> = {}>(args?: Subset<T, ChanceTransaction$createdByArgs<ExtArgs>>): Prisma__AdminClient<$Result.GetResult<Prisma.$AdminPayload<ExtArgs>, T, "findUniqueOrThrow"> | null, null, ExtArgs>
/**
* Attaches callbacks for the resolution and/or rejection of the Promise.
* @param onfulfilled The callback to execute when the Promise is resolved.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of which ever callback is executed.
*/
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): $Utils.JsPromise<TResult1 | TResult2>
/**
* Attaches a callback for only the rejection of the Promise.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of the callback.
*/
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): $Utils.JsPromise<T | TResult>
/**
* Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
* resolved value cannot be modified from the callback.
* @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
* @returns A Promise for the completion of the callback.
*/
finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise<T>
}
/**
* Fields of the ChanceTransaction model
*/
interface ChanceTransactionFieldRefs {
readonly id: FieldRef<"ChanceTransaction", 'String'>
readonly userId: FieldRef<"ChanceTransaction", 'String'>
readonly campaignId: FieldRef<"ChanceTransaction", 'String'>
readonly amount: FieldRef<"ChanceTransaction", 'Int'>
readonly type: FieldRef<"ChanceTransaction", 'ChanceTxnType'>
readonly referenceType: FieldRef<"ChanceTransaction", 'String'>
readonly referenceId: FieldRef<"ChanceTransaction", 'String'>
readonly description: FieldRef<"ChanceTransaction", 'String'>
readonly createdById: FieldRef<"ChanceTransaction", 'String'>
readonly createdAt: FieldRef<"ChanceTransaction", 'DateTime'>
}
// Custom InputTypes
/**
* ChanceTransaction findUnique
*/
export type ChanceTransactionFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the ChanceTransaction
*/
select?: ChanceTransactionSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: ChanceTransactionInclude<ExtArgs> | null
/**
* Filter, which ChanceTransaction to fetch.
*/
where: ChanceTransactionWhereUniqueInput
}
/**
* ChanceTransaction findUniqueOrThrow
*/
export type ChanceTransactionFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the ChanceTransaction
*/
select?: ChanceTransactionSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: ChanceTransactionInclude<ExtArgs> | null
/**
* Filter, which ChanceTransaction to fetch.
*/
where: ChanceTransactionWhereUniqueInput
}
/**
* ChanceTransaction findFirst
*/
export type ChanceTransactionFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the ChanceTransaction
*/
select?: ChanceTransactionSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: ChanceTransactionInclude<ExtArgs> | null
/**
* Filter, which ChanceTransaction to fetch.
*/
where?: ChanceTransactionWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of ChanceTransactions to fetch.
*/
orderBy?: ChanceTransactionOrderByWithRelationInput | ChanceTransactionOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for searching for ChanceTransactions.
*/
cursor?: ChanceTransactionWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` ChanceTransactions 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` ChanceTransactions.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of ChanceTransactions.
*/
distinct?: ChanceTransactionScalarFieldEnum | ChanceTransactionScalarFieldEnum[]
}
/**
* ChanceTransaction findFirstOrThrow
*/
export type ChanceTransactionFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the ChanceTransaction
*/
select?: ChanceTransactionSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: ChanceTransactionInclude<ExtArgs> | null
/**
* Filter, which ChanceTransaction to fetch.
*/
where?: ChanceTransactionWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of ChanceTransactions to fetch.
*/
orderBy?: ChanceTransactionOrderByWithRelationInput | ChanceTransactionOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for searching for ChanceTransactions.
*/
cursor?: ChanceTransactionWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` ChanceTransactions 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` ChanceTransactions.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of ChanceTransactions.
*/
distinct?: ChanceTransactionScalarFieldEnum | ChanceTransactionScalarFieldEnum[]
}
/**
* ChanceTransaction findMany
*/
export type ChanceTransactionFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the ChanceTransaction
*/
select?: ChanceTransactionSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: ChanceTransactionInclude<ExtArgs> | null
/**
* Filter, which ChanceTransactions to fetch.
*/
where?: ChanceTransactionWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of ChanceTransactions to fetch.
*/
orderBy?: ChanceTransactionOrderByWithRelationInput | ChanceTransactionOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for listing ChanceTransactions.
*/
cursor?: ChanceTransactionWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` ChanceTransactions 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` ChanceTransactions.
*/
skip?: number
distinct?: ChanceTransactionScalarFieldEnum | ChanceTransactionScalarFieldEnum[]
}
/**
* ChanceTransaction create
*/
export type ChanceTransactionCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the ChanceTransaction
*/
select?: ChanceTransactionSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: ChanceTransactionInclude<ExtArgs> | null
/**
* The data needed to create a ChanceTransaction.
*/
data: XOR<ChanceTransactionCreateInput, ChanceTransactionUncheckedCreateInput>
}
/**
* ChanceTransaction createMany
*/
export type ChanceTransactionCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* The data used to create many ChanceTransactions.
*/
data: ChanceTransactionCreateManyInput | ChanceTransactionCreateManyInput[]
skipDuplicates?: boolean
}
/**
* ChanceTransaction createManyAndReturn
*/
export type ChanceTransactionCreateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the ChanceTransaction
*/
select?: ChanceTransactionSelectCreateManyAndReturn<ExtArgs> | null
/**
* The data used to create many ChanceTransactions.
*/
data: ChanceTransactionCreateManyInput | ChanceTransactionCreateManyInput[]
skipDuplicates?: boolean
/**
* Choose, which related nodes to fetch as well
*/
include?: ChanceTransactionIncludeCreateManyAndReturn<ExtArgs> | null
}
/**
* ChanceTransaction update
*/
export type ChanceTransactionUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the ChanceTransaction
*/
select?: ChanceTransactionSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: ChanceTransactionInclude<ExtArgs> | null
/**
* The data needed to update a ChanceTransaction.
*/
data: XOR<ChanceTransactionUpdateInput, ChanceTransactionUncheckedUpdateInput>
/**
* Choose, which ChanceTransaction to update.
*/
where: ChanceTransactionWhereUniqueInput
}
/**
* ChanceTransaction updateMany
*/
export type ChanceTransactionUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* The data used to update ChanceTransactions.
*/
data: XOR<ChanceTransactionUpdateManyMutationInput, ChanceTransactionUncheckedUpdateManyInput>
/**
* Filter which ChanceTransactions to update
*/
where?: ChanceTransactionWhereInput
}
/**
* ChanceTransaction upsert
*/
export type ChanceTransactionUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the ChanceTransaction
*/
select?: ChanceTransactionSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: ChanceTransactionInclude<ExtArgs> | null
/**
* The filter to search for the ChanceTransaction to update in case it exists.
*/
where: ChanceTransactionWhereUniqueInput
/**
* In case the ChanceTransaction found by the `where` argument doesn't exist, create a new ChanceTransaction with this data.
*/
create: XOR<ChanceTransactionCreateInput, ChanceTransactionUncheckedCreateInput>
/**
* In case the ChanceTransaction was found with the provided `where` argument, update it with this data.
*/
update: XOR<ChanceTransactionUpdateInput, ChanceTransactionUncheckedUpdateInput>
}
/**
* ChanceTransaction delete
*/
export type ChanceTransactionDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the ChanceTransaction
*/
select?: ChanceTransactionSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: ChanceTransactionInclude<ExtArgs> | null
/**
* Filter which ChanceTransaction to delete.
*/
where: ChanceTransactionWhereUniqueInput
}
/**
* ChanceTransaction deleteMany
*/
export type ChanceTransactionDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Filter which ChanceTransactions to delete
*/
where?: ChanceTransactionWhereInput
}
/**
* ChanceTransaction.createdBy
*/
export type ChanceTransaction$createdByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Admin
*/
select?: AdminSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: AdminInclude<ExtArgs> | null
where?: AdminWhereInput
}
/**
* ChanceTransaction without action
*/
export type ChanceTransactionDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the ChanceTransaction
*/
select?: ChanceTransactionSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: ChanceTransactionInclude<ExtArgs> | null
}
/**
* Model Spin
*/
export type AggregateSpin = {
_count: SpinCountAggregateOutputType | null
_min: SpinMinAggregateOutputType | null
_max: SpinMaxAggregateOutputType | null
}
export type SpinMinAggregateOutputType = {
id: string | null
userId: string | null
campaignId: string | null
prizeId: string | null
status: $Enums.SpinStatus | null
idempotencyKey: string | null
ip: string | null
userAgent: string | null
createdAt: Date | null
}
export type SpinMaxAggregateOutputType = {
id: string | null
userId: string | null
campaignId: string | null
prizeId: string | null
status: $Enums.SpinStatus | null
idempotencyKey: string | null
ip: string | null
userAgent: string | null
createdAt: Date | null
}
export type SpinCountAggregateOutputType = {
id: number
userId: number
campaignId: number
prizeId: number
status: number
idempotencyKey: number
ip: number
userAgent: number
createdAt: number
_all: number
}
export type SpinMinAggregateInputType = {
id?: true
userId?: true
campaignId?: true
prizeId?: true
status?: true
idempotencyKey?: true
ip?: true
userAgent?: true
createdAt?: true
}
export type SpinMaxAggregateInputType = {
id?: true
userId?: true
campaignId?: true
prizeId?: true
status?: true
idempotencyKey?: true
ip?: true
userAgent?: true
createdAt?: true
}
export type SpinCountAggregateInputType = {
id?: true
userId?: true
campaignId?: true
prizeId?: true
status?: true
idempotencyKey?: true
ip?: true
userAgent?: true
createdAt?: true
_all?: true
}
export type SpinAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Filter which Spin to aggregate.
*/
where?: SpinWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of Spins to fetch.
*/
orderBy?: SpinOrderByWithRelationInput | SpinOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the start position
*/
cursor?: SpinWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` Spins 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` Spins.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Count returned Spins
**/
_count?: true | SpinCountAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the minimum value
**/
_min?: SpinMinAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the maximum value
**/
_max?: SpinMaxAggregateInputType
}
export type GetSpinAggregateType<T extends SpinAggregateArgs> = {
[P in keyof T & keyof AggregateSpin]: P extends '_count' | 'count'
? T[P] extends true
? number
: GetScalarType<T[P], AggregateSpin[P]>
: GetScalarType<T[P], AggregateSpin[P]>
}
export type SpinGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
where?: SpinWhereInput
orderBy?: SpinOrderByWithAggregationInput | SpinOrderByWithAggregationInput[]
by: SpinScalarFieldEnum[] | SpinScalarFieldEnum
having?: SpinScalarWhereWithAggregatesInput
take?: number
skip?: number
_count?: SpinCountAggregateInputType | true
_min?: SpinMinAggregateInputType
_max?: SpinMaxAggregateInputType
}
export type SpinGroupByOutputType = {
id: string
userId: string
campaignId: string
prizeId: string | null
status: $Enums.SpinStatus
idempotencyKey: string
ip: string | null
userAgent: string | null
createdAt: Date
_count: SpinCountAggregateOutputType | null
_min: SpinMinAggregateOutputType | null
_max: SpinMaxAggregateOutputType | null
}
type GetSpinGroupByPayload<T extends SpinGroupByArgs> = Prisma.PrismaPromise<
Array<
PickEnumerable<SpinGroupByOutputType, T['by']> &
{
[P in ((keyof T) & (keyof SpinGroupByOutputType))]: P extends '_count'
? T[P] extends boolean
? number
: GetScalarType<T[P], SpinGroupByOutputType[P]>
: GetScalarType<T[P], SpinGroupByOutputType[P]>
}
>
>
export type SpinSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
id?: boolean
userId?: boolean
campaignId?: boolean
prizeId?: boolean
status?: boolean
idempotencyKey?: boolean
ip?: boolean
userAgent?: boolean
createdAt?: boolean
user?: boolean | UserDefaultArgs<ExtArgs>
campaign?: boolean | CampaignDefaultArgs<ExtArgs>
prize?: boolean | Spin$prizeArgs<ExtArgs>
userPrize?: boolean | Spin$userPrizeArgs<ExtArgs>
}, ExtArgs["result"]["spin"]>
export type SpinSelectCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
id?: boolean
userId?: boolean
campaignId?: boolean
prizeId?: boolean
status?: boolean
idempotencyKey?: boolean
ip?: boolean
userAgent?: boolean
createdAt?: boolean
user?: boolean | UserDefaultArgs<ExtArgs>
campaign?: boolean | CampaignDefaultArgs<ExtArgs>
prize?: boolean | Spin$prizeArgs<ExtArgs>
}, ExtArgs["result"]["spin"]>
export type SpinSelectScalar = {
id?: boolean
userId?: boolean
campaignId?: boolean
prizeId?: boolean
status?: boolean
idempotencyKey?: boolean
ip?: boolean
userAgent?: boolean
createdAt?: boolean
}
export type SpinInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
user?: boolean | UserDefaultArgs<ExtArgs>
campaign?: boolean | CampaignDefaultArgs<ExtArgs>
prize?: boolean | Spin$prizeArgs<ExtArgs>
userPrize?: boolean | Spin$userPrizeArgs<ExtArgs>
}
export type SpinIncludeCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
user?: boolean | UserDefaultArgs<ExtArgs>
campaign?: boolean | CampaignDefaultArgs<ExtArgs>
prize?: boolean | Spin$prizeArgs<ExtArgs>
}
export type $SpinPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
name: "Spin"
objects: {
user: Prisma.$UserPayload<ExtArgs>
campaign: Prisma.$CampaignPayload<ExtArgs>
prize: Prisma.$PrizePayload<ExtArgs> | null
userPrize: Prisma.$UserPrizePayload<ExtArgs> | null
}
scalars: $Extensions.GetPayloadResult<{
id: string
userId: string
campaignId: string
prizeId: string | null
status: $Enums.SpinStatus
idempotencyKey: string
ip: string | null
userAgent: string | null
createdAt: Date
}, ExtArgs["result"]["spin"]>
composites: {}
}
type SpinGetPayload<S extends boolean | null | undefined | SpinDefaultArgs> = $Result.GetResult<Prisma.$SpinPayload, S>
type SpinCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
Omit<SpinFindManyArgs, 'select' | 'include' | 'distinct'> & {
select?: SpinCountAggregateInputType | true
}
export interface SpinDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> {
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['Spin'], meta: { name: 'Spin' } }
/**
* Find zero or one Spin that matches the filter.
* @param {SpinFindUniqueArgs} args - Arguments to find a Spin
* @example
* // Get one Spin
* const spin = await prisma.spin.findUnique({
* where: {
* // ... provide filter here
* }
* })
*/
findUnique<T extends SpinFindUniqueArgs>(args: SelectSubset<T, SpinFindUniqueArgs<ExtArgs>>): Prisma__SpinClient<$Result.GetResult<Prisma.$SpinPayload<ExtArgs>, T, "findUnique"> | null, null, ExtArgs>
/**
* Find one Spin that matches the filter or throw an error with `error.code='P2025'`
* if no matches were found.
* @param {SpinFindUniqueOrThrowArgs} args - Arguments to find a Spin
* @example
* // Get one Spin
* const spin = await prisma.spin.findUniqueOrThrow({
* where: {
* // ... provide filter here
* }
* })
*/
findUniqueOrThrow<T extends SpinFindUniqueOrThrowArgs>(args: SelectSubset<T, SpinFindUniqueOrThrowArgs<ExtArgs>>): Prisma__SpinClient<$Result.GetResult<Prisma.$SpinPayload<ExtArgs>, T, "findUniqueOrThrow">, never, ExtArgs>
/**
* Find the first Spin 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 {SpinFindFirstArgs} args - Arguments to find a Spin
* @example
* // Get one Spin
* const spin = await prisma.spin.findFirst({
* where: {
* // ... provide filter here
* }
* })
*/
findFirst<T extends SpinFindFirstArgs>(args?: SelectSubset<T, SpinFindFirstArgs<ExtArgs>>): Prisma__SpinClient<$Result.GetResult<Prisma.$SpinPayload<ExtArgs>, T, "findFirst"> | null, null, ExtArgs>
/**
* Find the first Spin 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 {SpinFindFirstOrThrowArgs} args - Arguments to find a Spin
* @example
* // Get one Spin
* const spin = await prisma.spin.findFirstOrThrow({
* where: {
* // ... provide filter here
* }
* })
*/
findFirstOrThrow<T extends SpinFindFirstOrThrowArgs>(args?: SelectSubset<T, SpinFindFirstOrThrowArgs<ExtArgs>>): Prisma__SpinClient<$Result.GetResult<Prisma.$SpinPayload<ExtArgs>, T, "findFirstOrThrow">, never, ExtArgs>
/**
* Find zero or more Spins 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 {SpinFindManyArgs} args - Arguments to filter and select certain fields only.
* @example
* // Get all Spins
* const spins = await prisma.spin.findMany()
*
* // Get first 10 Spins
* const spins = await prisma.spin.findMany({ take: 10 })
*
* // Only select the `id`
* const spinWithIdOnly = await prisma.spin.findMany({ select: { id: true } })
*
*/
findMany<T extends SpinFindManyArgs>(args?: SelectSubset<T, SpinFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$SpinPayload<ExtArgs>, T, "findMany">>
/**
* Create a Spin.
* @param {SpinCreateArgs} args - Arguments to create a Spin.
* @example
* // Create one Spin
* const Spin = await prisma.spin.create({
* data: {
* // ... data to create a Spin
* }
* })
*
*/
create<T extends SpinCreateArgs>(args: SelectSubset<T, SpinCreateArgs<ExtArgs>>): Prisma__SpinClient<$Result.GetResult<Prisma.$SpinPayload<ExtArgs>, T, "create">, never, ExtArgs>
/**
* Create many Spins.
* @param {SpinCreateManyArgs} args - Arguments to create many Spins.
* @example
* // Create many Spins
* const spin = await prisma.spin.createMany({
* data: [
* // ... provide data here
* ]
* })
*
*/
createMany<T extends SpinCreateManyArgs>(args?: SelectSubset<T, SpinCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
/**
* Create many Spins and returns the data saved in the database.
* @param {SpinCreateManyAndReturnArgs} args - Arguments to create many Spins.
* @example
* // Create many Spins
* const spin = await prisma.spin.createManyAndReturn({
* data: [
* // ... provide data here
* ]
* })
*
* // Create many Spins and only return the `id`
* const spinWithIdOnly = await prisma.spin.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 SpinCreateManyAndReturnArgs>(args?: SelectSubset<T, SpinCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$SpinPayload<ExtArgs>, T, "createManyAndReturn">>
/**
* Delete a Spin.
* @param {SpinDeleteArgs} args - Arguments to delete one Spin.
* @example
* // Delete one Spin
* const Spin = await prisma.spin.delete({
* where: {
* // ... filter to delete one Spin
* }
* })
*
*/
delete<T extends SpinDeleteArgs>(args: SelectSubset<T, SpinDeleteArgs<ExtArgs>>): Prisma__SpinClient<$Result.GetResult<Prisma.$SpinPayload<ExtArgs>, T, "delete">, never, ExtArgs>
/**
* Update one Spin.
* @param {SpinUpdateArgs} args - Arguments to update one Spin.
* @example
* // Update one Spin
* const spin = await prisma.spin.update({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
*/
update<T extends SpinUpdateArgs>(args: SelectSubset<T, SpinUpdateArgs<ExtArgs>>): Prisma__SpinClient<$Result.GetResult<Prisma.$SpinPayload<ExtArgs>, T, "update">, never, ExtArgs>
/**
* Delete zero or more Spins.
* @param {SpinDeleteManyArgs} args - Arguments to filter Spins to delete.
* @example
* // Delete a few Spins
* const { count } = await prisma.spin.deleteMany({
* where: {
* // ... provide filter here
* }
* })
*
*/
deleteMany<T extends SpinDeleteManyArgs>(args?: SelectSubset<T, SpinDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
/**
* Update zero or more Spins.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {SpinUpdateManyArgs} args - Arguments to update one or more rows.
* @example
* // Update many Spins
* const spin = await prisma.spin.updateMany({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
*/
updateMany<T extends SpinUpdateManyArgs>(args: SelectSubset<T, SpinUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
/**
* Create or update one Spin.
* @param {SpinUpsertArgs} args - Arguments to update or create a Spin.
* @example
* // Update or create a Spin
* const spin = await prisma.spin.upsert({
* create: {
* // ... data to create a Spin
* },
* update: {
* // ... in case it already exists, update
* },
* where: {
* // ... the filter for the Spin we want to update
* }
* })
*/
upsert<T extends SpinUpsertArgs>(args: SelectSubset<T, SpinUpsertArgs<ExtArgs>>): Prisma__SpinClient<$Result.GetResult<Prisma.$SpinPayload<ExtArgs>, T, "upsert">, never, ExtArgs>
/**
* Count the number of Spins.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {SpinCountArgs} args - Arguments to filter Spins to count.
* @example
* // Count the number of Spins
* const count = await prisma.spin.count({
* where: {
* // ... the filter for the Spins we want to count
* }
* })
**/
count<T extends SpinCountArgs>(
args?: Subset<T, SpinCountArgs>,
): Prisma.PrismaPromise<
T extends $Utils.Record<'select', any>
? T['select'] extends true
? number
: GetScalarType<T['select'], SpinCountAggregateOutputType>
: number
>
/**
* Allows you to perform aggregations operations on a Spin.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {SpinAggregateArgs} 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 SpinAggregateArgs>(args: Subset<T, SpinAggregateArgs>): Prisma.PrismaPromise<GetSpinAggregateType<T>>
/**
* Group by Spin.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {SpinGroupByArgs} 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 SpinGroupByArgs,
HasSelectOrTake extends Or<
Extends<'skip', Keys<T>>,
Extends<'take', Keys<T>>
>,
OrderByArg extends True extends HasSelectOrTake
? { orderBy: SpinGroupByArgs['orderBy'] }
: { orderBy?: SpinGroupByArgs['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, SpinGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetSpinGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
/**
* Fields of the Spin model
*/
readonly fields: SpinFieldRefs;
}
/**
* The delegate class that acts as a "Promise-like" for Spin.
* 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__SpinClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> extends Prisma.PrismaPromise<T> {
readonly [Symbol.toStringTag]: "PrismaPromise"
user<T extends UserDefaultArgs<ExtArgs> = {}>(args?: Subset<T, UserDefaultArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findUniqueOrThrow"> | Null, Null, ExtArgs>
campaign<T extends CampaignDefaultArgs<ExtArgs> = {}>(args?: Subset<T, CampaignDefaultArgs<ExtArgs>>): Prisma__CampaignClient<$Result.GetResult<Prisma.$CampaignPayload<ExtArgs>, T, "findUniqueOrThrow"> | Null, Null, ExtArgs>
prize<T extends Spin$prizeArgs<ExtArgs> = {}>(args?: Subset<T, Spin$prizeArgs<ExtArgs>>): Prisma__PrizeClient<$Result.GetResult<Prisma.$PrizePayload<ExtArgs>, T, "findUniqueOrThrow"> | null, null, ExtArgs>
userPrize<T extends Spin$userPrizeArgs<ExtArgs> = {}>(args?: Subset<T, Spin$userPrizeArgs<ExtArgs>>): Prisma__UserPrizeClient<$Result.GetResult<Prisma.$UserPrizePayload<ExtArgs>, T, "findUniqueOrThrow"> | null, null, ExtArgs>
/**
* Attaches callbacks for the resolution and/or rejection of the Promise.
* @param onfulfilled The callback to execute when the Promise is resolved.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of which ever callback is executed.
*/
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): $Utils.JsPromise<TResult1 | TResult2>
/**
* Attaches a callback for only the rejection of the Promise.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of the callback.
*/
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): $Utils.JsPromise<T | TResult>
/**
* Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
* resolved value cannot be modified from the callback.
* @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
* @returns A Promise for the completion of the callback.
*/
finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise<T>
}
/**
* Fields of the Spin model
*/
interface SpinFieldRefs {
readonly id: FieldRef<"Spin", 'String'>
readonly userId: FieldRef<"Spin", 'String'>
readonly campaignId: FieldRef<"Spin", 'String'>
readonly prizeId: FieldRef<"Spin", 'String'>
readonly status: FieldRef<"Spin", 'SpinStatus'>
readonly idempotencyKey: FieldRef<"Spin", 'String'>
readonly ip: FieldRef<"Spin", 'String'>
readonly userAgent: FieldRef<"Spin", 'String'>
readonly createdAt: FieldRef<"Spin", 'DateTime'>
}
// Custom InputTypes
/**
* Spin findUnique
*/
export type SpinFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Spin
*/
select?: SpinSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: SpinInclude<ExtArgs> | null
/**
* Filter, which Spin to fetch.
*/
where: SpinWhereUniqueInput
}
/**
* Spin findUniqueOrThrow
*/
export type SpinFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Spin
*/
select?: SpinSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: SpinInclude<ExtArgs> | null
/**
* Filter, which Spin to fetch.
*/
where: SpinWhereUniqueInput
}
/**
* Spin findFirst
*/
export type SpinFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Spin
*/
select?: SpinSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: SpinInclude<ExtArgs> | null
/**
* Filter, which Spin to fetch.
*/
where?: SpinWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of Spins to fetch.
*/
orderBy?: SpinOrderByWithRelationInput | SpinOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for searching for Spins.
*/
cursor?: SpinWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` Spins 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` Spins.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of Spins.
*/
distinct?: SpinScalarFieldEnum | SpinScalarFieldEnum[]
}
/**
* Spin findFirstOrThrow
*/
export type SpinFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Spin
*/
select?: SpinSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: SpinInclude<ExtArgs> | null
/**
* Filter, which Spin to fetch.
*/
where?: SpinWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of Spins to fetch.
*/
orderBy?: SpinOrderByWithRelationInput | SpinOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for searching for Spins.
*/
cursor?: SpinWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` Spins 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` Spins.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of Spins.
*/
distinct?: SpinScalarFieldEnum | SpinScalarFieldEnum[]
}
/**
* Spin findMany
*/
export type SpinFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Spin
*/
select?: SpinSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: SpinInclude<ExtArgs> | null
/**
* Filter, which Spins to fetch.
*/
where?: SpinWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of Spins to fetch.
*/
orderBy?: SpinOrderByWithRelationInput | SpinOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for listing Spins.
*/
cursor?: SpinWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` Spins 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` Spins.
*/
skip?: number
distinct?: SpinScalarFieldEnum | SpinScalarFieldEnum[]
}
/**
* Spin create
*/
export type SpinCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Spin
*/
select?: SpinSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: SpinInclude<ExtArgs> | null
/**
* The data needed to create a Spin.
*/
data: XOR<SpinCreateInput, SpinUncheckedCreateInput>
}
/**
* Spin createMany
*/
export type SpinCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* The data used to create many Spins.
*/
data: SpinCreateManyInput | SpinCreateManyInput[]
skipDuplicates?: boolean
}
/**
* Spin createManyAndReturn
*/
export type SpinCreateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Spin
*/
select?: SpinSelectCreateManyAndReturn<ExtArgs> | null
/**
* The data used to create many Spins.
*/
data: SpinCreateManyInput | SpinCreateManyInput[]
skipDuplicates?: boolean
/**
* Choose, which related nodes to fetch as well
*/
include?: SpinIncludeCreateManyAndReturn<ExtArgs> | null
}
/**
* Spin update
*/
export type SpinUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Spin
*/
select?: SpinSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: SpinInclude<ExtArgs> | null
/**
* The data needed to update a Spin.
*/
data: XOR<SpinUpdateInput, SpinUncheckedUpdateInput>
/**
* Choose, which Spin to update.
*/
where: SpinWhereUniqueInput
}
/**
* Spin updateMany
*/
export type SpinUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* The data used to update Spins.
*/
data: XOR<SpinUpdateManyMutationInput, SpinUncheckedUpdateManyInput>
/**
* Filter which Spins to update
*/
where?: SpinWhereInput
}
/**
* Spin upsert
*/
export type SpinUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Spin
*/
select?: SpinSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: SpinInclude<ExtArgs> | null
/**
* The filter to search for the Spin to update in case it exists.
*/
where: SpinWhereUniqueInput
/**
* In case the Spin found by the `where` argument doesn't exist, create a new Spin with this data.
*/
create: XOR<SpinCreateInput, SpinUncheckedCreateInput>
/**
* In case the Spin was found with the provided `where` argument, update it with this data.
*/
update: XOR<SpinUpdateInput, SpinUncheckedUpdateInput>
}
/**
* Spin delete
*/
export type SpinDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Spin
*/
select?: SpinSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: SpinInclude<ExtArgs> | null
/**
* Filter which Spin to delete.
*/
where: SpinWhereUniqueInput
}
/**
* Spin deleteMany
*/
export type SpinDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Filter which Spins to delete
*/
where?: SpinWhereInput
}
/**
* Spin.prize
*/
export type Spin$prizeArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Prize
*/
select?: PrizeSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: PrizeInclude<ExtArgs> | null
where?: PrizeWhereInput
}
/**
* Spin.userPrize
*/
export type Spin$userPrizeArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the UserPrize
*/
select?: UserPrizeSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: UserPrizeInclude<ExtArgs> | null
where?: UserPrizeWhereInput
}
/**
* Spin without action
*/
export type SpinDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Spin
*/
select?: SpinSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: SpinInclude<ExtArgs> | null
}
/**
* Model UserPrize
*/
export type AggregateUserPrize = {
_count: UserPrizeCountAggregateOutputType | null
_min: UserPrizeMinAggregateOutputType | null
_max: UserPrizeMaxAggregateOutputType | null
}
export type UserPrizeMinAggregateOutputType = {
id: string | null
userId: string | null
campaignId: string | null
prizeId: string | null
spinId: string | null
code: string | null
status: $Enums.UserPrizeStatus | null
wonAt: Date | null
redeemedAt: Date | null
}
export type UserPrizeMaxAggregateOutputType = {
id: string | null
userId: string | null
campaignId: string | null
prizeId: string | null
spinId: string | null
code: string | null
status: $Enums.UserPrizeStatus | null
wonAt: Date | null
redeemedAt: Date | null
}
export type UserPrizeCountAggregateOutputType = {
id: number
userId: number
campaignId: number
prizeId: number
spinId: number
code: number
status: number
wonAt: number
redeemedAt: number
_all: number
}
export type UserPrizeMinAggregateInputType = {
id?: true
userId?: true
campaignId?: true
prizeId?: true
spinId?: true
code?: true
status?: true
wonAt?: true
redeemedAt?: true
}
export type UserPrizeMaxAggregateInputType = {
id?: true
userId?: true
campaignId?: true
prizeId?: true
spinId?: true
code?: true
status?: true
wonAt?: true
redeemedAt?: true
}
export type UserPrizeCountAggregateInputType = {
id?: true
userId?: true
campaignId?: true
prizeId?: true
spinId?: true
code?: true
status?: true
wonAt?: true
redeemedAt?: true
_all?: true
}
export type UserPrizeAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Filter which UserPrize to aggregate.
*/
where?: UserPrizeWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of UserPrizes to fetch.
*/
orderBy?: UserPrizeOrderByWithRelationInput | UserPrizeOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the start position
*/
cursor?: UserPrizeWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` UserPrizes 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` UserPrizes.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Count returned UserPrizes
**/
_count?: true | UserPrizeCountAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the minimum value
**/
_min?: UserPrizeMinAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the maximum value
**/
_max?: UserPrizeMaxAggregateInputType
}
export type GetUserPrizeAggregateType<T extends UserPrizeAggregateArgs> = {
[P in keyof T & keyof AggregateUserPrize]: P extends '_count' | 'count'
? T[P] extends true
? number
: GetScalarType<T[P], AggregateUserPrize[P]>
: GetScalarType<T[P], AggregateUserPrize[P]>
}
export type UserPrizeGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
where?: UserPrizeWhereInput
orderBy?: UserPrizeOrderByWithAggregationInput | UserPrizeOrderByWithAggregationInput[]
by: UserPrizeScalarFieldEnum[] | UserPrizeScalarFieldEnum
having?: UserPrizeScalarWhereWithAggregatesInput
take?: number
skip?: number
_count?: UserPrizeCountAggregateInputType | true
_min?: UserPrizeMinAggregateInputType
_max?: UserPrizeMaxAggregateInputType
}
export type UserPrizeGroupByOutputType = {
id: string
userId: string
campaignId: string
prizeId: string
spinId: string
code: string | null
status: $Enums.UserPrizeStatus
wonAt: Date
redeemedAt: Date | null
_count: UserPrizeCountAggregateOutputType | null
_min: UserPrizeMinAggregateOutputType | null
_max: UserPrizeMaxAggregateOutputType | null
}
type GetUserPrizeGroupByPayload<T extends UserPrizeGroupByArgs> = Prisma.PrismaPromise<
Array<
PickEnumerable<UserPrizeGroupByOutputType, T['by']> &
{
[P in ((keyof T) & (keyof UserPrizeGroupByOutputType))]: P extends '_count'
? T[P] extends boolean
? number
: GetScalarType<T[P], UserPrizeGroupByOutputType[P]>
: GetScalarType<T[P], UserPrizeGroupByOutputType[P]>
}
>
>
export type UserPrizeSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
id?: boolean
userId?: boolean
campaignId?: boolean
prizeId?: boolean
spinId?: boolean
code?: boolean
status?: boolean
wonAt?: boolean
redeemedAt?: boolean
user?: boolean | UserDefaultArgs<ExtArgs>
campaign?: boolean | CampaignDefaultArgs<ExtArgs>
prize?: boolean | PrizeDefaultArgs<ExtArgs>
spin?: boolean | SpinDefaultArgs<ExtArgs>
}, ExtArgs["result"]["userPrize"]>
export type UserPrizeSelectCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
id?: boolean
userId?: boolean
campaignId?: boolean
prizeId?: boolean
spinId?: boolean
code?: boolean
status?: boolean
wonAt?: boolean
redeemedAt?: boolean
user?: boolean | UserDefaultArgs<ExtArgs>
campaign?: boolean | CampaignDefaultArgs<ExtArgs>
prize?: boolean | PrizeDefaultArgs<ExtArgs>
spin?: boolean | SpinDefaultArgs<ExtArgs>
}, ExtArgs["result"]["userPrize"]>
export type UserPrizeSelectScalar = {
id?: boolean
userId?: boolean
campaignId?: boolean
prizeId?: boolean
spinId?: boolean
code?: boolean
status?: boolean
wonAt?: boolean
redeemedAt?: boolean
}
export type UserPrizeInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
user?: boolean | UserDefaultArgs<ExtArgs>
campaign?: boolean | CampaignDefaultArgs<ExtArgs>
prize?: boolean | PrizeDefaultArgs<ExtArgs>
spin?: boolean | SpinDefaultArgs<ExtArgs>
}
export type UserPrizeIncludeCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
user?: boolean | UserDefaultArgs<ExtArgs>
campaign?: boolean | CampaignDefaultArgs<ExtArgs>
prize?: boolean | PrizeDefaultArgs<ExtArgs>
spin?: boolean | SpinDefaultArgs<ExtArgs>
}
export type $UserPrizePayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
name: "UserPrize"
objects: {
user: Prisma.$UserPayload<ExtArgs>
campaign: Prisma.$CampaignPayload<ExtArgs>
prize: Prisma.$PrizePayload<ExtArgs>
spin: Prisma.$SpinPayload<ExtArgs>
}
scalars: $Extensions.GetPayloadResult<{
id: string
userId: string
campaignId: string
prizeId: string
spinId: string
code: string | null
status: $Enums.UserPrizeStatus
wonAt: Date
redeemedAt: Date | null
}, ExtArgs["result"]["userPrize"]>
composites: {}
}
type UserPrizeGetPayload<S extends boolean | null | undefined | UserPrizeDefaultArgs> = $Result.GetResult<Prisma.$UserPrizePayload, S>
type UserPrizeCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
Omit<UserPrizeFindManyArgs, 'select' | 'include' | 'distinct'> & {
select?: UserPrizeCountAggregateInputType | true
}
export interface UserPrizeDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> {
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['UserPrize'], meta: { name: 'UserPrize' } }
/**
* Find zero or one UserPrize that matches the filter.
* @param {UserPrizeFindUniqueArgs} args - Arguments to find a UserPrize
* @example
* // Get one UserPrize
* const userPrize = await prisma.userPrize.findUnique({
* where: {
* // ... provide filter here
* }
* })
*/
findUnique<T extends UserPrizeFindUniqueArgs>(args: SelectSubset<T, UserPrizeFindUniqueArgs<ExtArgs>>): Prisma__UserPrizeClient<$Result.GetResult<Prisma.$UserPrizePayload<ExtArgs>, T, "findUnique"> | null, null, ExtArgs>
/**
* Find one UserPrize that matches the filter or throw an error with `error.code='P2025'`
* if no matches were found.
* @param {UserPrizeFindUniqueOrThrowArgs} args - Arguments to find a UserPrize
* @example
* // Get one UserPrize
* const userPrize = await prisma.userPrize.findUniqueOrThrow({
* where: {
* // ... provide filter here
* }
* })
*/
findUniqueOrThrow<T extends UserPrizeFindUniqueOrThrowArgs>(args: SelectSubset<T, UserPrizeFindUniqueOrThrowArgs<ExtArgs>>): Prisma__UserPrizeClient<$Result.GetResult<Prisma.$UserPrizePayload<ExtArgs>, T, "findUniqueOrThrow">, never, ExtArgs>
/**
* Find the first UserPrize 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 {UserPrizeFindFirstArgs} args - Arguments to find a UserPrize
* @example
* // Get one UserPrize
* const userPrize = await prisma.userPrize.findFirst({
* where: {
* // ... provide filter here
* }
* })
*/
findFirst<T extends UserPrizeFindFirstArgs>(args?: SelectSubset<T, UserPrizeFindFirstArgs<ExtArgs>>): Prisma__UserPrizeClient<$Result.GetResult<Prisma.$UserPrizePayload<ExtArgs>, T, "findFirst"> | null, null, ExtArgs>
/**
* Find the first UserPrize 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 {UserPrizeFindFirstOrThrowArgs} args - Arguments to find a UserPrize
* @example
* // Get one UserPrize
* const userPrize = await prisma.userPrize.findFirstOrThrow({
* where: {
* // ... provide filter here
* }
* })
*/
findFirstOrThrow<T extends UserPrizeFindFirstOrThrowArgs>(args?: SelectSubset<T, UserPrizeFindFirstOrThrowArgs<ExtArgs>>): Prisma__UserPrizeClient<$Result.GetResult<Prisma.$UserPrizePayload<ExtArgs>, T, "findFirstOrThrow">, never, ExtArgs>
/**
* Find zero or more UserPrizes 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 {UserPrizeFindManyArgs} args - Arguments to filter and select certain fields only.
* @example
* // Get all UserPrizes
* const userPrizes = await prisma.userPrize.findMany()
*
* // Get first 10 UserPrizes
* const userPrizes = await prisma.userPrize.findMany({ take: 10 })
*
* // Only select the `id`
* const userPrizeWithIdOnly = await prisma.userPrize.findMany({ select: { id: true } })
*
*/
findMany<T extends UserPrizeFindManyArgs>(args?: SelectSubset<T, UserPrizeFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$UserPrizePayload<ExtArgs>, T, "findMany">>
/**
* Create a UserPrize.
* @param {UserPrizeCreateArgs} args - Arguments to create a UserPrize.
* @example
* // Create one UserPrize
* const UserPrize = await prisma.userPrize.create({
* data: {
* // ... data to create a UserPrize
* }
* })
*
*/
create<T extends UserPrizeCreateArgs>(args: SelectSubset<T, UserPrizeCreateArgs<ExtArgs>>): Prisma__UserPrizeClient<$Result.GetResult<Prisma.$UserPrizePayload<ExtArgs>, T, "create">, never, ExtArgs>
/**
* Create many UserPrizes.
* @param {UserPrizeCreateManyArgs} args - Arguments to create many UserPrizes.
* @example
* // Create many UserPrizes
* const userPrize = await prisma.userPrize.createMany({
* data: [
* // ... provide data here
* ]
* })
*
*/
createMany<T extends UserPrizeCreateManyArgs>(args?: SelectSubset<T, UserPrizeCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
/**
* Create many UserPrizes and returns the data saved in the database.
* @param {UserPrizeCreateManyAndReturnArgs} args - Arguments to create many UserPrizes.
* @example
* // Create many UserPrizes
* const userPrize = await prisma.userPrize.createManyAndReturn({
* data: [
* // ... provide data here
* ]
* })
*
* // Create many UserPrizes and only return the `id`
* const userPrizeWithIdOnly = await prisma.userPrize.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 UserPrizeCreateManyAndReturnArgs>(args?: SelectSubset<T, UserPrizeCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$UserPrizePayload<ExtArgs>, T, "createManyAndReturn">>
/**
* Delete a UserPrize.
* @param {UserPrizeDeleteArgs} args - Arguments to delete one UserPrize.
* @example
* // Delete one UserPrize
* const UserPrize = await prisma.userPrize.delete({
* where: {
* // ... filter to delete one UserPrize
* }
* })
*
*/
delete<T extends UserPrizeDeleteArgs>(args: SelectSubset<T, UserPrizeDeleteArgs<ExtArgs>>): Prisma__UserPrizeClient<$Result.GetResult<Prisma.$UserPrizePayload<ExtArgs>, T, "delete">, never, ExtArgs>
/**
* Update one UserPrize.
* @param {UserPrizeUpdateArgs} args - Arguments to update one UserPrize.
* @example
* // Update one UserPrize
* const userPrize = await prisma.userPrize.update({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
*/
update<T extends UserPrizeUpdateArgs>(args: SelectSubset<T, UserPrizeUpdateArgs<ExtArgs>>): Prisma__UserPrizeClient<$Result.GetResult<Prisma.$UserPrizePayload<ExtArgs>, T, "update">, never, ExtArgs>
/**
* Delete zero or more UserPrizes.
* @param {UserPrizeDeleteManyArgs} args - Arguments to filter UserPrizes to delete.
* @example
* // Delete a few UserPrizes
* const { count } = await prisma.userPrize.deleteMany({
* where: {
* // ... provide filter here
* }
* })
*
*/
deleteMany<T extends UserPrizeDeleteManyArgs>(args?: SelectSubset<T, UserPrizeDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
/**
* Update zero or more UserPrizes.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {UserPrizeUpdateManyArgs} args - Arguments to update one or more rows.
* @example
* // Update many UserPrizes
* const userPrize = await prisma.userPrize.updateMany({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
*/
updateMany<T extends UserPrizeUpdateManyArgs>(args: SelectSubset<T, UserPrizeUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
/**
* Create or update one UserPrize.
* @param {UserPrizeUpsertArgs} args - Arguments to update or create a UserPrize.
* @example
* // Update or create a UserPrize
* const userPrize = await prisma.userPrize.upsert({
* create: {
* // ... data to create a UserPrize
* },
* update: {
* // ... in case it already exists, update
* },
* where: {
* // ... the filter for the UserPrize we want to update
* }
* })
*/
upsert<T extends UserPrizeUpsertArgs>(args: SelectSubset<T, UserPrizeUpsertArgs<ExtArgs>>): Prisma__UserPrizeClient<$Result.GetResult<Prisma.$UserPrizePayload<ExtArgs>, T, "upsert">, never, ExtArgs>
/**
* Count the number of UserPrizes.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {UserPrizeCountArgs} args - Arguments to filter UserPrizes to count.
* @example
* // Count the number of UserPrizes
* const count = await prisma.userPrize.count({
* where: {
* // ... the filter for the UserPrizes we want to count
* }
* })
**/
count<T extends UserPrizeCountArgs>(
args?: Subset<T, UserPrizeCountArgs>,
): Prisma.PrismaPromise<
T extends $Utils.Record<'select', any>
? T['select'] extends true
? number
: GetScalarType<T['select'], UserPrizeCountAggregateOutputType>
: number
>
/**
* Allows you to perform aggregations operations on a UserPrize.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {UserPrizeAggregateArgs} 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 UserPrizeAggregateArgs>(args: Subset<T, UserPrizeAggregateArgs>): Prisma.PrismaPromise<GetUserPrizeAggregateType<T>>
/**
* Group by UserPrize.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {UserPrizeGroupByArgs} 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 UserPrizeGroupByArgs,
HasSelectOrTake extends Or<
Extends<'skip', Keys<T>>,
Extends<'take', Keys<T>>
>,
OrderByArg extends True extends HasSelectOrTake
? { orderBy: UserPrizeGroupByArgs['orderBy'] }
: { orderBy?: UserPrizeGroupByArgs['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, UserPrizeGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetUserPrizeGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
/**
* Fields of the UserPrize model
*/
readonly fields: UserPrizeFieldRefs;
}
/**
* The delegate class that acts as a "Promise-like" for UserPrize.
* 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__UserPrizeClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> extends Prisma.PrismaPromise<T> {
readonly [Symbol.toStringTag]: "PrismaPromise"
user<T extends UserDefaultArgs<ExtArgs> = {}>(args?: Subset<T, UserDefaultArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findUniqueOrThrow"> | Null, Null, ExtArgs>
campaign<T extends CampaignDefaultArgs<ExtArgs> = {}>(args?: Subset<T, CampaignDefaultArgs<ExtArgs>>): Prisma__CampaignClient<$Result.GetResult<Prisma.$CampaignPayload<ExtArgs>, T, "findUniqueOrThrow"> | Null, Null, ExtArgs>
prize<T extends PrizeDefaultArgs<ExtArgs> = {}>(args?: Subset<T, PrizeDefaultArgs<ExtArgs>>): Prisma__PrizeClient<$Result.GetResult<Prisma.$PrizePayload<ExtArgs>, T, "findUniqueOrThrow"> | Null, Null, ExtArgs>
spin<T extends SpinDefaultArgs<ExtArgs> = {}>(args?: Subset<T, SpinDefaultArgs<ExtArgs>>): Prisma__SpinClient<$Result.GetResult<Prisma.$SpinPayload<ExtArgs>, T, "findUniqueOrThrow"> | Null, Null, ExtArgs>
/**
* Attaches callbacks for the resolution and/or rejection of the Promise.
* @param onfulfilled The callback to execute when the Promise is resolved.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of which ever callback is executed.
*/
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): $Utils.JsPromise<TResult1 | TResult2>
/**
* Attaches a callback for only the rejection of the Promise.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of the callback.
*/
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): $Utils.JsPromise<T | TResult>
/**
* Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
* resolved value cannot be modified from the callback.
* @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
* @returns A Promise for the completion of the callback.
*/
finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise<T>
}
/**
* Fields of the UserPrize model
*/
interface UserPrizeFieldRefs {
readonly id: FieldRef<"UserPrize", 'String'>
readonly userId: FieldRef<"UserPrize", 'String'>
readonly campaignId: FieldRef<"UserPrize", 'String'>
readonly prizeId: FieldRef<"UserPrize", 'String'>
readonly spinId: FieldRef<"UserPrize", 'String'>
readonly code: FieldRef<"UserPrize", 'String'>
readonly status: FieldRef<"UserPrize", 'UserPrizeStatus'>
readonly wonAt: FieldRef<"UserPrize", 'DateTime'>
readonly redeemedAt: FieldRef<"UserPrize", 'DateTime'>
}
// Custom InputTypes
/**
* UserPrize findUnique
*/
export type UserPrizeFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the UserPrize
*/
select?: UserPrizeSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: UserPrizeInclude<ExtArgs> | null
/**
* Filter, which UserPrize to fetch.
*/
where: UserPrizeWhereUniqueInput
}
/**
* UserPrize findUniqueOrThrow
*/
export type UserPrizeFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the UserPrize
*/
select?: UserPrizeSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: UserPrizeInclude<ExtArgs> | null
/**
* Filter, which UserPrize to fetch.
*/
where: UserPrizeWhereUniqueInput
}
/**
* UserPrize findFirst
*/
export type UserPrizeFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the UserPrize
*/
select?: UserPrizeSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: UserPrizeInclude<ExtArgs> | null
/**
* Filter, which UserPrize to fetch.
*/
where?: UserPrizeWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of UserPrizes to fetch.
*/
orderBy?: UserPrizeOrderByWithRelationInput | UserPrizeOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for searching for UserPrizes.
*/
cursor?: UserPrizeWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` UserPrizes 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` UserPrizes.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of UserPrizes.
*/
distinct?: UserPrizeScalarFieldEnum | UserPrizeScalarFieldEnum[]
}
/**
* UserPrize findFirstOrThrow
*/
export type UserPrizeFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the UserPrize
*/
select?: UserPrizeSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: UserPrizeInclude<ExtArgs> | null
/**
* Filter, which UserPrize to fetch.
*/
where?: UserPrizeWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of UserPrizes to fetch.
*/
orderBy?: UserPrizeOrderByWithRelationInput | UserPrizeOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for searching for UserPrizes.
*/
cursor?: UserPrizeWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` UserPrizes 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` UserPrizes.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of UserPrizes.
*/
distinct?: UserPrizeScalarFieldEnum | UserPrizeScalarFieldEnum[]
}
/**
* UserPrize findMany
*/
export type UserPrizeFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the UserPrize
*/
select?: UserPrizeSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: UserPrizeInclude<ExtArgs> | null
/**
* Filter, which UserPrizes to fetch.
*/
where?: UserPrizeWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of UserPrizes to fetch.
*/
orderBy?: UserPrizeOrderByWithRelationInput | UserPrizeOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for listing UserPrizes.
*/
cursor?: UserPrizeWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` UserPrizes 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` UserPrizes.
*/
skip?: number
distinct?: UserPrizeScalarFieldEnum | UserPrizeScalarFieldEnum[]
}
/**
* UserPrize create
*/
export type UserPrizeCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the UserPrize
*/
select?: UserPrizeSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: UserPrizeInclude<ExtArgs> | null
/**
* The data needed to create a UserPrize.
*/
data: XOR<UserPrizeCreateInput, UserPrizeUncheckedCreateInput>
}
/**
* UserPrize createMany
*/
export type UserPrizeCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* The data used to create many UserPrizes.
*/
data: UserPrizeCreateManyInput | UserPrizeCreateManyInput[]
skipDuplicates?: boolean
}
/**
* UserPrize createManyAndReturn
*/
export type UserPrizeCreateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the UserPrize
*/
select?: UserPrizeSelectCreateManyAndReturn<ExtArgs> | null
/**
* The data used to create many UserPrizes.
*/
data: UserPrizeCreateManyInput | UserPrizeCreateManyInput[]
skipDuplicates?: boolean
/**
* Choose, which related nodes to fetch as well
*/
include?: UserPrizeIncludeCreateManyAndReturn<ExtArgs> | null
}
/**
* UserPrize update
*/
export type UserPrizeUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the UserPrize
*/
select?: UserPrizeSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: UserPrizeInclude<ExtArgs> | null
/**
* The data needed to update a UserPrize.
*/
data: XOR<UserPrizeUpdateInput, UserPrizeUncheckedUpdateInput>
/**
* Choose, which UserPrize to update.
*/
where: UserPrizeWhereUniqueInput
}
/**
* UserPrize updateMany
*/
export type UserPrizeUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* The data used to update UserPrizes.
*/
data: XOR<UserPrizeUpdateManyMutationInput, UserPrizeUncheckedUpdateManyInput>
/**
* Filter which UserPrizes to update
*/
where?: UserPrizeWhereInput
}
/**
* UserPrize upsert
*/
export type UserPrizeUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the UserPrize
*/
select?: UserPrizeSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: UserPrizeInclude<ExtArgs> | null
/**
* The filter to search for the UserPrize to update in case it exists.
*/
where: UserPrizeWhereUniqueInput
/**
* In case the UserPrize found by the `where` argument doesn't exist, create a new UserPrize with this data.
*/
create: XOR<UserPrizeCreateInput, UserPrizeUncheckedCreateInput>
/**
* In case the UserPrize was found with the provided `where` argument, update it with this data.
*/
update: XOR<UserPrizeUpdateInput, UserPrizeUncheckedUpdateInput>
}
/**
* UserPrize delete
*/
export type UserPrizeDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the UserPrize
*/
select?: UserPrizeSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: UserPrizeInclude<ExtArgs> | null
/**
* Filter which UserPrize to delete.
*/
where: UserPrizeWhereUniqueInput
}
/**
* UserPrize deleteMany
*/
export type UserPrizeDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Filter which UserPrizes to delete
*/
where?: UserPrizeWhereInput
}
/**
* UserPrize without action
*/
export type UserPrizeDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the UserPrize
*/
select?: UserPrizeSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: UserPrizeInclude<ExtArgs> | null
}
/**
* Model SmsLog
*/
export type AggregateSmsLog = {
_count: SmsLogCountAggregateOutputType | null
_min: SmsLogMinAggregateOutputType | null
_max: SmsLogMaxAggregateOutputType | null
}
export type SmsLogMinAggregateOutputType = {
id: string | null
userId: string | null
mobile: string | null
type: $Enums.SmsType | null
message: string | null
provider: string | null
status: $Enums.SmsStatus | null
createdAt: Date | null
}
export type SmsLogMaxAggregateOutputType = {
id: string | null
userId: string | null
mobile: string | null
type: $Enums.SmsType | null
message: string | null
provider: string | null
status: $Enums.SmsStatus | null
createdAt: Date | null
}
export type SmsLogCountAggregateOutputType = {
id: number
userId: number
mobile: number
type: number
message: number
provider: number
status: number
providerResponse: number
createdAt: number
_all: number
}
export type SmsLogMinAggregateInputType = {
id?: true
userId?: true
mobile?: true
type?: true
message?: true
provider?: true
status?: true
createdAt?: true
}
export type SmsLogMaxAggregateInputType = {
id?: true
userId?: true
mobile?: true
type?: true
message?: true
provider?: true
status?: true
createdAt?: true
}
export type SmsLogCountAggregateInputType = {
id?: true
userId?: true
mobile?: true
type?: true
message?: true
provider?: true
status?: true
providerResponse?: true
createdAt?: true
_all?: true
}
export type SmsLogAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Filter which SmsLog to aggregate.
*/
where?: SmsLogWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of SmsLogs to fetch.
*/
orderBy?: SmsLogOrderByWithRelationInput | SmsLogOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the start position
*/
cursor?: SmsLogWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` SmsLogs 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` SmsLogs.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Count returned SmsLogs
**/
_count?: true | SmsLogCountAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the minimum value
**/
_min?: SmsLogMinAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the maximum value
**/
_max?: SmsLogMaxAggregateInputType
}
export type GetSmsLogAggregateType<T extends SmsLogAggregateArgs> = {
[P in keyof T & keyof AggregateSmsLog]: P extends '_count' | 'count'
? T[P] extends true
? number
: GetScalarType<T[P], AggregateSmsLog[P]>
: GetScalarType<T[P], AggregateSmsLog[P]>
}
export type SmsLogGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
where?: SmsLogWhereInput
orderBy?: SmsLogOrderByWithAggregationInput | SmsLogOrderByWithAggregationInput[]
by: SmsLogScalarFieldEnum[] | SmsLogScalarFieldEnum
having?: SmsLogScalarWhereWithAggregatesInput
take?: number
skip?: number
_count?: SmsLogCountAggregateInputType | true
_min?: SmsLogMinAggregateInputType
_max?: SmsLogMaxAggregateInputType
}
export type SmsLogGroupByOutputType = {
id: string
userId: string | null
mobile: string
type: $Enums.SmsType
message: string
provider: string
status: $Enums.SmsStatus
providerResponse: JsonValue | null
createdAt: Date
_count: SmsLogCountAggregateOutputType | null
_min: SmsLogMinAggregateOutputType | null
_max: SmsLogMaxAggregateOutputType | null
}
type GetSmsLogGroupByPayload<T extends SmsLogGroupByArgs> = Prisma.PrismaPromise<
Array<
PickEnumerable<SmsLogGroupByOutputType, T['by']> &
{
[P in ((keyof T) & (keyof SmsLogGroupByOutputType))]: P extends '_count'
? T[P] extends boolean
? number
: GetScalarType<T[P], SmsLogGroupByOutputType[P]>
: GetScalarType<T[P], SmsLogGroupByOutputType[P]>
}
>
>
export type SmsLogSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
id?: boolean
userId?: boolean
mobile?: boolean
type?: boolean
message?: boolean
provider?: boolean
status?: boolean
providerResponse?: boolean
createdAt?: boolean
user?: boolean | SmsLog$userArgs<ExtArgs>
}, ExtArgs["result"]["smsLog"]>
export type SmsLogSelectCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
id?: boolean
userId?: boolean
mobile?: boolean
type?: boolean
message?: boolean
provider?: boolean
status?: boolean
providerResponse?: boolean
createdAt?: boolean
user?: boolean | SmsLog$userArgs<ExtArgs>
}, ExtArgs["result"]["smsLog"]>
export type SmsLogSelectScalar = {
id?: boolean
userId?: boolean
mobile?: boolean
type?: boolean
message?: boolean
provider?: boolean
status?: boolean
providerResponse?: boolean
createdAt?: boolean
}
export type SmsLogInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
user?: boolean | SmsLog$userArgs<ExtArgs>
}
export type SmsLogIncludeCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
user?: boolean | SmsLog$userArgs<ExtArgs>
}
export type $SmsLogPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
name: "SmsLog"
objects: {
user: Prisma.$UserPayload<ExtArgs> | null
}
scalars: $Extensions.GetPayloadResult<{
id: string
userId: string | null
mobile: string
type: $Enums.SmsType
message: string
provider: string
status: $Enums.SmsStatus
providerResponse: Prisma.JsonValue | null
createdAt: Date
}, ExtArgs["result"]["smsLog"]>
composites: {}
}
type SmsLogGetPayload<S extends boolean | null | undefined | SmsLogDefaultArgs> = $Result.GetResult<Prisma.$SmsLogPayload, S>
type SmsLogCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
Omit<SmsLogFindManyArgs, 'select' | 'include' | 'distinct'> & {
select?: SmsLogCountAggregateInputType | true
}
export interface SmsLogDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> {
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['SmsLog'], meta: { name: 'SmsLog' } }
/**
* Find zero or one SmsLog that matches the filter.
* @param {SmsLogFindUniqueArgs} args - Arguments to find a SmsLog
* @example
* // Get one SmsLog
* const smsLog = await prisma.smsLog.findUnique({
* where: {
* // ... provide filter here
* }
* })
*/
findUnique<T extends SmsLogFindUniqueArgs>(args: SelectSubset<T, SmsLogFindUniqueArgs<ExtArgs>>): Prisma__SmsLogClient<$Result.GetResult<Prisma.$SmsLogPayload<ExtArgs>, T, "findUnique"> | null, null, ExtArgs>
/**
* Find one SmsLog that matches the filter or throw an error with `error.code='P2025'`
* if no matches were found.
* @param {SmsLogFindUniqueOrThrowArgs} args - Arguments to find a SmsLog
* @example
* // Get one SmsLog
* const smsLog = await prisma.smsLog.findUniqueOrThrow({
* where: {
* // ... provide filter here
* }
* })
*/
findUniqueOrThrow<T extends SmsLogFindUniqueOrThrowArgs>(args: SelectSubset<T, SmsLogFindUniqueOrThrowArgs<ExtArgs>>): Prisma__SmsLogClient<$Result.GetResult<Prisma.$SmsLogPayload<ExtArgs>, T, "findUniqueOrThrow">, never, ExtArgs>
/**
* Find the first SmsLog 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 {SmsLogFindFirstArgs} args - Arguments to find a SmsLog
* @example
* // Get one SmsLog
* const smsLog = await prisma.smsLog.findFirst({
* where: {
* // ... provide filter here
* }
* })
*/
findFirst<T extends SmsLogFindFirstArgs>(args?: SelectSubset<T, SmsLogFindFirstArgs<ExtArgs>>): Prisma__SmsLogClient<$Result.GetResult<Prisma.$SmsLogPayload<ExtArgs>, T, "findFirst"> | null, null, ExtArgs>
/**
* Find the first SmsLog 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 {SmsLogFindFirstOrThrowArgs} args - Arguments to find a SmsLog
* @example
* // Get one SmsLog
* const smsLog = await prisma.smsLog.findFirstOrThrow({
* where: {
* // ... provide filter here
* }
* })
*/
findFirstOrThrow<T extends SmsLogFindFirstOrThrowArgs>(args?: SelectSubset<T, SmsLogFindFirstOrThrowArgs<ExtArgs>>): Prisma__SmsLogClient<$Result.GetResult<Prisma.$SmsLogPayload<ExtArgs>, T, "findFirstOrThrow">, never, ExtArgs>
/**
* Find zero or more SmsLogs 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 {SmsLogFindManyArgs} args - Arguments to filter and select certain fields only.
* @example
* // Get all SmsLogs
* const smsLogs = await prisma.smsLog.findMany()
*
* // Get first 10 SmsLogs
* const smsLogs = await prisma.smsLog.findMany({ take: 10 })
*
* // Only select the `id`
* const smsLogWithIdOnly = await prisma.smsLog.findMany({ select: { id: true } })
*
*/
findMany<T extends SmsLogFindManyArgs>(args?: SelectSubset<T, SmsLogFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$SmsLogPayload<ExtArgs>, T, "findMany">>
/**
* Create a SmsLog.
* @param {SmsLogCreateArgs} args - Arguments to create a SmsLog.
* @example
* // Create one SmsLog
* const SmsLog = await prisma.smsLog.create({
* data: {
* // ... data to create a SmsLog
* }
* })
*
*/
create<T extends SmsLogCreateArgs>(args: SelectSubset<T, SmsLogCreateArgs<ExtArgs>>): Prisma__SmsLogClient<$Result.GetResult<Prisma.$SmsLogPayload<ExtArgs>, T, "create">, never, ExtArgs>
/**
* Create many SmsLogs.
* @param {SmsLogCreateManyArgs} args - Arguments to create many SmsLogs.
* @example
* // Create many SmsLogs
* const smsLog = await prisma.smsLog.createMany({
* data: [
* // ... provide data here
* ]
* })
*
*/
createMany<T extends SmsLogCreateManyArgs>(args?: SelectSubset<T, SmsLogCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
/**
* Create many SmsLogs and returns the data saved in the database.
* @param {SmsLogCreateManyAndReturnArgs} args - Arguments to create many SmsLogs.
* @example
* // Create many SmsLogs
* const smsLog = await prisma.smsLog.createManyAndReturn({
* data: [
* // ... provide data here
* ]
* })
*
* // Create many SmsLogs and only return the `id`
* const smsLogWithIdOnly = await prisma.smsLog.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 SmsLogCreateManyAndReturnArgs>(args?: SelectSubset<T, SmsLogCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$SmsLogPayload<ExtArgs>, T, "createManyAndReturn">>
/**
* Delete a SmsLog.
* @param {SmsLogDeleteArgs} args - Arguments to delete one SmsLog.
* @example
* // Delete one SmsLog
* const SmsLog = await prisma.smsLog.delete({
* where: {
* // ... filter to delete one SmsLog
* }
* })
*
*/
delete<T extends SmsLogDeleteArgs>(args: SelectSubset<T, SmsLogDeleteArgs<ExtArgs>>): Prisma__SmsLogClient<$Result.GetResult<Prisma.$SmsLogPayload<ExtArgs>, T, "delete">, never, ExtArgs>
/**
* Update one SmsLog.
* @param {SmsLogUpdateArgs} args - Arguments to update one SmsLog.
* @example
* // Update one SmsLog
* const smsLog = await prisma.smsLog.update({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
*/
update<T extends SmsLogUpdateArgs>(args: SelectSubset<T, SmsLogUpdateArgs<ExtArgs>>): Prisma__SmsLogClient<$Result.GetResult<Prisma.$SmsLogPayload<ExtArgs>, T, "update">, never, ExtArgs>
/**
* Delete zero or more SmsLogs.
* @param {SmsLogDeleteManyArgs} args - Arguments to filter SmsLogs to delete.
* @example
* // Delete a few SmsLogs
* const { count } = await prisma.smsLog.deleteMany({
* where: {
* // ... provide filter here
* }
* })
*
*/
deleteMany<T extends SmsLogDeleteManyArgs>(args?: SelectSubset<T, SmsLogDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
/**
* Update zero or more SmsLogs.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {SmsLogUpdateManyArgs} args - Arguments to update one or more rows.
* @example
* // Update many SmsLogs
* const smsLog = await prisma.smsLog.updateMany({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
*/
updateMany<T extends SmsLogUpdateManyArgs>(args: SelectSubset<T, SmsLogUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
/**
* Create or update one SmsLog.
* @param {SmsLogUpsertArgs} args - Arguments to update or create a SmsLog.
* @example
* // Update or create a SmsLog
* const smsLog = await prisma.smsLog.upsert({
* create: {
* // ... data to create a SmsLog
* },
* update: {
* // ... in case it already exists, update
* },
* where: {
* // ... the filter for the SmsLog we want to update
* }
* })
*/
upsert<T extends SmsLogUpsertArgs>(args: SelectSubset<T, SmsLogUpsertArgs<ExtArgs>>): Prisma__SmsLogClient<$Result.GetResult<Prisma.$SmsLogPayload<ExtArgs>, T, "upsert">, never, ExtArgs>
/**
* Count the number of SmsLogs.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {SmsLogCountArgs} args - Arguments to filter SmsLogs to count.
* @example
* // Count the number of SmsLogs
* const count = await prisma.smsLog.count({
* where: {
* // ... the filter for the SmsLogs we want to count
* }
* })
**/
count<T extends SmsLogCountArgs>(
args?: Subset<T, SmsLogCountArgs>,
): Prisma.PrismaPromise<
T extends $Utils.Record<'select', any>
? T['select'] extends true
? number
: GetScalarType<T['select'], SmsLogCountAggregateOutputType>
: number
>
/**
* Allows you to perform aggregations operations on a SmsLog.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {SmsLogAggregateArgs} 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 SmsLogAggregateArgs>(args: Subset<T, SmsLogAggregateArgs>): Prisma.PrismaPromise<GetSmsLogAggregateType<T>>
/**
* Group by SmsLog.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {SmsLogGroupByArgs} 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 SmsLogGroupByArgs,
HasSelectOrTake extends Or<
Extends<'skip', Keys<T>>,
Extends<'take', Keys<T>>
>,
OrderByArg extends True extends HasSelectOrTake
? { orderBy: SmsLogGroupByArgs['orderBy'] }
: { orderBy?: SmsLogGroupByArgs['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, SmsLogGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetSmsLogGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
/**
* Fields of the SmsLog model
*/
readonly fields: SmsLogFieldRefs;
}
/**
* The delegate class that acts as a "Promise-like" for SmsLog.
* 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__SmsLogClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> extends Prisma.PrismaPromise<T> {
readonly [Symbol.toStringTag]: "PrismaPromise"
user<T extends SmsLog$userArgs<ExtArgs> = {}>(args?: Subset<T, SmsLog$userArgs<ExtArgs>>): Prisma__UserClient<$Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findUniqueOrThrow"> | null, null, ExtArgs>
/**
* Attaches callbacks for the resolution and/or rejection of the Promise.
* @param onfulfilled The callback to execute when the Promise is resolved.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of which ever callback is executed.
*/
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): $Utils.JsPromise<TResult1 | TResult2>
/**
* Attaches a callback for only the rejection of the Promise.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of the callback.
*/
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): $Utils.JsPromise<T | TResult>
/**
* Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
* resolved value cannot be modified from the callback.
* @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
* @returns A Promise for the completion of the callback.
*/
finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise<T>
}
/**
* Fields of the SmsLog model
*/
interface SmsLogFieldRefs {
readonly id: FieldRef<"SmsLog", 'String'>
readonly userId: FieldRef<"SmsLog", 'String'>
readonly mobile: FieldRef<"SmsLog", 'String'>
readonly type: FieldRef<"SmsLog", 'SmsType'>
readonly message: FieldRef<"SmsLog", 'String'>
readonly provider: FieldRef<"SmsLog", 'String'>
readonly status: FieldRef<"SmsLog", 'SmsStatus'>
readonly providerResponse: FieldRef<"SmsLog", 'Json'>
readonly createdAt: FieldRef<"SmsLog", 'DateTime'>
}
// Custom InputTypes
/**
* SmsLog findUnique
*/
export type SmsLogFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the SmsLog
*/
select?: SmsLogSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: SmsLogInclude<ExtArgs> | null
/**
* Filter, which SmsLog to fetch.
*/
where: SmsLogWhereUniqueInput
}
/**
* SmsLog findUniqueOrThrow
*/
export type SmsLogFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the SmsLog
*/
select?: SmsLogSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: SmsLogInclude<ExtArgs> | null
/**
* Filter, which SmsLog to fetch.
*/
where: SmsLogWhereUniqueInput
}
/**
* SmsLog findFirst
*/
export type SmsLogFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the SmsLog
*/
select?: SmsLogSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: SmsLogInclude<ExtArgs> | null
/**
* Filter, which SmsLog to fetch.
*/
where?: SmsLogWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of SmsLogs to fetch.
*/
orderBy?: SmsLogOrderByWithRelationInput | SmsLogOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for searching for SmsLogs.
*/
cursor?: SmsLogWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` SmsLogs 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` SmsLogs.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of SmsLogs.
*/
distinct?: SmsLogScalarFieldEnum | SmsLogScalarFieldEnum[]
}
/**
* SmsLog findFirstOrThrow
*/
export type SmsLogFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the SmsLog
*/
select?: SmsLogSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: SmsLogInclude<ExtArgs> | null
/**
* Filter, which SmsLog to fetch.
*/
where?: SmsLogWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of SmsLogs to fetch.
*/
orderBy?: SmsLogOrderByWithRelationInput | SmsLogOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for searching for SmsLogs.
*/
cursor?: SmsLogWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` SmsLogs 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` SmsLogs.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of SmsLogs.
*/
distinct?: SmsLogScalarFieldEnum | SmsLogScalarFieldEnum[]
}
/**
* SmsLog findMany
*/
export type SmsLogFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the SmsLog
*/
select?: SmsLogSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: SmsLogInclude<ExtArgs> | null
/**
* Filter, which SmsLogs to fetch.
*/
where?: SmsLogWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of SmsLogs to fetch.
*/
orderBy?: SmsLogOrderByWithRelationInput | SmsLogOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for listing SmsLogs.
*/
cursor?: SmsLogWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` SmsLogs 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` SmsLogs.
*/
skip?: number
distinct?: SmsLogScalarFieldEnum | SmsLogScalarFieldEnum[]
}
/**
* SmsLog create
*/
export type SmsLogCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the SmsLog
*/
select?: SmsLogSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: SmsLogInclude<ExtArgs> | null
/**
* The data needed to create a SmsLog.
*/
data: XOR<SmsLogCreateInput, SmsLogUncheckedCreateInput>
}
/**
* SmsLog createMany
*/
export type SmsLogCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* The data used to create many SmsLogs.
*/
data: SmsLogCreateManyInput | SmsLogCreateManyInput[]
skipDuplicates?: boolean
}
/**
* SmsLog createManyAndReturn
*/
export type SmsLogCreateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the SmsLog
*/
select?: SmsLogSelectCreateManyAndReturn<ExtArgs> | null
/**
* The data used to create many SmsLogs.
*/
data: SmsLogCreateManyInput | SmsLogCreateManyInput[]
skipDuplicates?: boolean
/**
* Choose, which related nodes to fetch as well
*/
include?: SmsLogIncludeCreateManyAndReturn<ExtArgs> | null
}
/**
* SmsLog update
*/
export type SmsLogUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the SmsLog
*/
select?: SmsLogSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: SmsLogInclude<ExtArgs> | null
/**
* The data needed to update a SmsLog.
*/
data: XOR<SmsLogUpdateInput, SmsLogUncheckedUpdateInput>
/**
* Choose, which SmsLog to update.
*/
where: SmsLogWhereUniqueInput
}
/**
* SmsLog updateMany
*/
export type SmsLogUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* The data used to update SmsLogs.
*/
data: XOR<SmsLogUpdateManyMutationInput, SmsLogUncheckedUpdateManyInput>
/**
* Filter which SmsLogs to update
*/
where?: SmsLogWhereInput
}
/**
* SmsLog upsert
*/
export type SmsLogUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the SmsLog
*/
select?: SmsLogSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: SmsLogInclude<ExtArgs> | null
/**
* The filter to search for the SmsLog to update in case it exists.
*/
where: SmsLogWhereUniqueInput
/**
* In case the SmsLog found by the `where` argument doesn't exist, create a new SmsLog with this data.
*/
create: XOR<SmsLogCreateInput, SmsLogUncheckedCreateInput>
/**
* In case the SmsLog was found with the provided `where` argument, update it with this data.
*/
update: XOR<SmsLogUpdateInput, SmsLogUncheckedUpdateInput>
}
/**
* SmsLog delete
*/
export type SmsLogDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the SmsLog
*/
select?: SmsLogSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: SmsLogInclude<ExtArgs> | null
/**
* Filter which SmsLog to delete.
*/
where: SmsLogWhereUniqueInput
}
/**
* SmsLog deleteMany
*/
export type SmsLogDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Filter which SmsLogs to delete
*/
where?: SmsLogWhereInput
}
/**
* SmsLog.user
*/
export type SmsLog$userArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the User
*/
select?: UserSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: UserInclude<ExtArgs> | null
where?: UserWhereInput
}
/**
* SmsLog without action
*/
export type SmsLogDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the SmsLog
*/
select?: SmsLogSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: SmsLogInclude<ExtArgs> | null
}
/**
* Model AdminLog
*/
export type AggregateAdminLog = {
_count: AdminLogCountAggregateOutputType | null
_min: AdminLogMinAggregateOutputType | null
_max: AdminLogMaxAggregateOutputType | null
}
export type AdminLogMinAggregateOutputType = {
id: string | null
adminId: string | null
action: string | null
entityType: string | null
entityId: string | null
ip: string | null
createdAt: Date | null
}
export type AdminLogMaxAggregateOutputType = {
id: string | null
adminId: string | null
action: string | null
entityType: string | null
entityId: string | null
ip: string | null
createdAt: Date | null
}
export type AdminLogCountAggregateOutputType = {
id: number
adminId: number
action: number
entityType: number
entityId: number
oldValue: number
newValue: number
ip: number
createdAt: number
_all: number
}
export type AdminLogMinAggregateInputType = {
id?: true
adminId?: true
action?: true
entityType?: true
entityId?: true
ip?: true
createdAt?: true
}
export type AdminLogMaxAggregateInputType = {
id?: true
adminId?: true
action?: true
entityType?: true
entityId?: true
ip?: true
createdAt?: true
}
export type AdminLogCountAggregateInputType = {
id?: true
adminId?: true
action?: true
entityType?: true
entityId?: true
oldValue?: true
newValue?: true
ip?: true
createdAt?: true
_all?: true
}
export type AdminLogAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Filter which AdminLog to aggregate.
*/
where?: AdminLogWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of AdminLogs to fetch.
*/
orderBy?: AdminLogOrderByWithRelationInput | AdminLogOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the start position
*/
cursor?: AdminLogWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` AdminLogs 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` AdminLogs.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Count returned AdminLogs
**/
_count?: true | AdminLogCountAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the minimum value
**/
_min?: AdminLogMinAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the maximum value
**/
_max?: AdminLogMaxAggregateInputType
}
export type GetAdminLogAggregateType<T extends AdminLogAggregateArgs> = {
[P in keyof T & keyof AggregateAdminLog]: P extends '_count' | 'count'
? T[P] extends true
? number
: GetScalarType<T[P], AggregateAdminLog[P]>
: GetScalarType<T[P], AggregateAdminLog[P]>
}
export type AdminLogGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
where?: AdminLogWhereInput
orderBy?: AdminLogOrderByWithAggregationInput | AdminLogOrderByWithAggregationInput[]
by: AdminLogScalarFieldEnum[] | AdminLogScalarFieldEnum
having?: AdminLogScalarWhereWithAggregatesInput
take?: number
skip?: number
_count?: AdminLogCountAggregateInputType | true
_min?: AdminLogMinAggregateInputType
_max?: AdminLogMaxAggregateInputType
}
export type AdminLogGroupByOutputType = {
id: string
adminId: string
action: string
entityType: string
entityId: string
oldValue: JsonValue | null
newValue: JsonValue | null
ip: string | null
createdAt: Date
_count: AdminLogCountAggregateOutputType | null
_min: AdminLogMinAggregateOutputType | null
_max: AdminLogMaxAggregateOutputType | null
}
type GetAdminLogGroupByPayload<T extends AdminLogGroupByArgs> = Prisma.PrismaPromise<
Array<
PickEnumerable<AdminLogGroupByOutputType, T['by']> &
{
[P in ((keyof T) & (keyof AdminLogGroupByOutputType))]: P extends '_count'
? T[P] extends boolean
? number
: GetScalarType<T[P], AdminLogGroupByOutputType[P]>
: GetScalarType<T[P], AdminLogGroupByOutputType[P]>
}
>
>
export type AdminLogSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
id?: boolean
adminId?: boolean
action?: boolean
entityType?: boolean
entityId?: boolean
oldValue?: boolean
newValue?: boolean
ip?: boolean
createdAt?: boolean
admin?: boolean | AdminDefaultArgs<ExtArgs>
}, ExtArgs["result"]["adminLog"]>
export type AdminLogSelectCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
id?: boolean
adminId?: boolean
action?: boolean
entityType?: boolean
entityId?: boolean
oldValue?: boolean
newValue?: boolean
ip?: boolean
createdAt?: boolean
admin?: boolean | AdminDefaultArgs<ExtArgs>
}, ExtArgs["result"]["adminLog"]>
export type AdminLogSelectScalar = {
id?: boolean
adminId?: boolean
action?: boolean
entityType?: boolean
entityId?: boolean
oldValue?: boolean
newValue?: boolean
ip?: boolean
createdAt?: boolean
}
export type AdminLogInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
admin?: boolean | AdminDefaultArgs<ExtArgs>
}
export type AdminLogIncludeCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
admin?: boolean | AdminDefaultArgs<ExtArgs>
}
export type $AdminLogPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
name: "AdminLog"
objects: {
admin: Prisma.$AdminPayload<ExtArgs>
}
scalars: $Extensions.GetPayloadResult<{
id: string
adminId: string
action: string
entityType: string
entityId: string
oldValue: Prisma.JsonValue | null
newValue: Prisma.JsonValue | null
ip: string | null
createdAt: Date
}, ExtArgs["result"]["adminLog"]>
composites: {}
}
type AdminLogGetPayload<S extends boolean | null | undefined | AdminLogDefaultArgs> = $Result.GetResult<Prisma.$AdminLogPayload, S>
type AdminLogCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
Omit<AdminLogFindManyArgs, 'select' | 'include' | 'distinct'> & {
select?: AdminLogCountAggregateInputType | true
}
export interface AdminLogDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> {
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['AdminLog'], meta: { name: 'AdminLog' } }
/**
* Find zero or one AdminLog that matches the filter.
* @param {AdminLogFindUniqueArgs} args - Arguments to find a AdminLog
* @example
* // Get one AdminLog
* const adminLog = await prisma.adminLog.findUnique({
* where: {
* // ... provide filter here
* }
* })
*/
findUnique<T extends AdminLogFindUniqueArgs>(args: SelectSubset<T, AdminLogFindUniqueArgs<ExtArgs>>): Prisma__AdminLogClient<$Result.GetResult<Prisma.$AdminLogPayload<ExtArgs>, T, "findUnique"> | null, null, ExtArgs>
/**
* Find one AdminLog that matches the filter or throw an error with `error.code='P2025'`
* if no matches were found.
* @param {AdminLogFindUniqueOrThrowArgs} args - Arguments to find a AdminLog
* @example
* // Get one AdminLog
* const adminLog = await prisma.adminLog.findUniqueOrThrow({
* where: {
* // ... provide filter here
* }
* })
*/
findUniqueOrThrow<T extends AdminLogFindUniqueOrThrowArgs>(args: SelectSubset<T, AdminLogFindUniqueOrThrowArgs<ExtArgs>>): Prisma__AdminLogClient<$Result.GetResult<Prisma.$AdminLogPayload<ExtArgs>, T, "findUniqueOrThrow">, never, ExtArgs>
/**
* Find the first AdminLog 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 {AdminLogFindFirstArgs} args - Arguments to find a AdminLog
* @example
* // Get one AdminLog
* const adminLog = await prisma.adminLog.findFirst({
* where: {
* // ... provide filter here
* }
* })
*/
findFirst<T extends AdminLogFindFirstArgs>(args?: SelectSubset<T, AdminLogFindFirstArgs<ExtArgs>>): Prisma__AdminLogClient<$Result.GetResult<Prisma.$AdminLogPayload<ExtArgs>, T, "findFirst"> | null, null, ExtArgs>
/**
* Find the first AdminLog 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 {AdminLogFindFirstOrThrowArgs} args - Arguments to find a AdminLog
* @example
* // Get one AdminLog
* const adminLog = await prisma.adminLog.findFirstOrThrow({
* where: {
* // ... provide filter here
* }
* })
*/
findFirstOrThrow<T extends AdminLogFindFirstOrThrowArgs>(args?: SelectSubset<T, AdminLogFindFirstOrThrowArgs<ExtArgs>>): Prisma__AdminLogClient<$Result.GetResult<Prisma.$AdminLogPayload<ExtArgs>, T, "findFirstOrThrow">, never, ExtArgs>
/**
* Find zero or more AdminLogs 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 {AdminLogFindManyArgs} args - Arguments to filter and select certain fields only.
* @example
* // Get all AdminLogs
* const adminLogs = await prisma.adminLog.findMany()
*
* // Get first 10 AdminLogs
* const adminLogs = await prisma.adminLog.findMany({ take: 10 })
*
* // Only select the `id`
* const adminLogWithIdOnly = await prisma.adminLog.findMany({ select: { id: true } })
*
*/
findMany<T extends AdminLogFindManyArgs>(args?: SelectSubset<T, AdminLogFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$AdminLogPayload<ExtArgs>, T, "findMany">>
/**
* Create a AdminLog.
* @param {AdminLogCreateArgs} args - Arguments to create a AdminLog.
* @example
* // Create one AdminLog
* const AdminLog = await prisma.adminLog.create({
* data: {
* // ... data to create a AdminLog
* }
* })
*
*/
create<T extends AdminLogCreateArgs>(args: SelectSubset<T, AdminLogCreateArgs<ExtArgs>>): Prisma__AdminLogClient<$Result.GetResult<Prisma.$AdminLogPayload<ExtArgs>, T, "create">, never, ExtArgs>
/**
* Create many AdminLogs.
* @param {AdminLogCreateManyArgs} args - Arguments to create many AdminLogs.
* @example
* // Create many AdminLogs
* const adminLog = await prisma.adminLog.createMany({
* data: [
* // ... provide data here
* ]
* })
*
*/
createMany<T extends AdminLogCreateManyArgs>(args?: SelectSubset<T, AdminLogCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
/**
* Create many AdminLogs and returns the data saved in the database.
* @param {AdminLogCreateManyAndReturnArgs} args - Arguments to create many AdminLogs.
* @example
* // Create many AdminLogs
* const adminLog = await prisma.adminLog.createManyAndReturn({
* data: [
* // ... provide data here
* ]
* })
*
* // Create many AdminLogs and only return the `id`
* const adminLogWithIdOnly = await prisma.adminLog.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 AdminLogCreateManyAndReturnArgs>(args?: SelectSubset<T, AdminLogCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$AdminLogPayload<ExtArgs>, T, "createManyAndReturn">>
/**
* Delete a AdminLog.
* @param {AdminLogDeleteArgs} args - Arguments to delete one AdminLog.
* @example
* // Delete one AdminLog
* const AdminLog = await prisma.adminLog.delete({
* where: {
* // ... filter to delete one AdminLog
* }
* })
*
*/
delete<T extends AdminLogDeleteArgs>(args: SelectSubset<T, AdminLogDeleteArgs<ExtArgs>>): Prisma__AdminLogClient<$Result.GetResult<Prisma.$AdminLogPayload<ExtArgs>, T, "delete">, never, ExtArgs>
/**
* Update one AdminLog.
* @param {AdminLogUpdateArgs} args - Arguments to update one AdminLog.
* @example
* // Update one AdminLog
* const adminLog = await prisma.adminLog.update({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
*/
update<T extends AdminLogUpdateArgs>(args: SelectSubset<T, AdminLogUpdateArgs<ExtArgs>>): Prisma__AdminLogClient<$Result.GetResult<Prisma.$AdminLogPayload<ExtArgs>, T, "update">, never, ExtArgs>
/**
* Delete zero or more AdminLogs.
* @param {AdminLogDeleteManyArgs} args - Arguments to filter AdminLogs to delete.
* @example
* // Delete a few AdminLogs
* const { count } = await prisma.adminLog.deleteMany({
* where: {
* // ... provide filter here
* }
* })
*
*/
deleteMany<T extends AdminLogDeleteManyArgs>(args?: SelectSubset<T, AdminLogDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
/**
* Update zero or more AdminLogs.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {AdminLogUpdateManyArgs} args - Arguments to update one or more rows.
* @example
* // Update many AdminLogs
* const adminLog = await prisma.adminLog.updateMany({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
*/
updateMany<T extends AdminLogUpdateManyArgs>(args: SelectSubset<T, AdminLogUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
/**
* Create or update one AdminLog.
* @param {AdminLogUpsertArgs} args - Arguments to update or create a AdminLog.
* @example
* // Update or create a AdminLog
* const adminLog = await prisma.adminLog.upsert({
* create: {
* // ... data to create a AdminLog
* },
* update: {
* // ... in case it already exists, update
* },
* where: {
* // ... the filter for the AdminLog we want to update
* }
* })
*/
upsert<T extends AdminLogUpsertArgs>(args: SelectSubset<T, AdminLogUpsertArgs<ExtArgs>>): Prisma__AdminLogClient<$Result.GetResult<Prisma.$AdminLogPayload<ExtArgs>, T, "upsert">, never, ExtArgs>
/**
* Count the number of AdminLogs.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {AdminLogCountArgs} args - Arguments to filter AdminLogs to count.
* @example
* // Count the number of AdminLogs
* const count = await prisma.adminLog.count({
* where: {
* // ... the filter for the AdminLogs we want to count
* }
* })
**/
count<T extends AdminLogCountArgs>(
args?: Subset<T, AdminLogCountArgs>,
): Prisma.PrismaPromise<
T extends $Utils.Record<'select', any>
? T['select'] extends true
? number
: GetScalarType<T['select'], AdminLogCountAggregateOutputType>
: number
>
/**
* Allows you to perform aggregations operations on a AdminLog.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {AdminLogAggregateArgs} 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 AdminLogAggregateArgs>(args: Subset<T, AdminLogAggregateArgs>): Prisma.PrismaPromise<GetAdminLogAggregateType<T>>
/**
* Group by AdminLog.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {AdminLogGroupByArgs} 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 AdminLogGroupByArgs,
HasSelectOrTake extends Or<
Extends<'skip', Keys<T>>,
Extends<'take', Keys<T>>
>,
OrderByArg extends True extends HasSelectOrTake
? { orderBy: AdminLogGroupByArgs['orderBy'] }
: { orderBy?: AdminLogGroupByArgs['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, AdminLogGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetAdminLogGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
/**
* Fields of the AdminLog model
*/
readonly fields: AdminLogFieldRefs;
}
/**
* The delegate class that acts as a "Promise-like" for AdminLog.
* 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__AdminLogClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> extends Prisma.PrismaPromise<T> {
readonly [Symbol.toStringTag]: "PrismaPromise"
admin<T extends AdminDefaultArgs<ExtArgs> = {}>(args?: Subset<T, AdminDefaultArgs<ExtArgs>>): Prisma__AdminClient<$Result.GetResult<Prisma.$AdminPayload<ExtArgs>, T, "findUniqueOrThrow"> | Null, Null, ExtArgs>
/**
* Attaches callbacks for the resolution and/or rejection of the Promise.
* @param onfulfilled The callback to execute when the Promise is resolved.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of which ever callback is executed.
*/
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): $Utils.JsPromise<TResult1 | TResult2>
/**
* Attaches a callback for only the rejection of the Promise.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of the callback.
*/
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): $Utils.JsPromise<T | TResult>
/**
* Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
* resolved value cannot be modified from the callback.
* @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
* @returns A Promise for the completion of the callback.
*/
finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise<T>
}
/**
* Fields of the AdminLog model
*/
interface AdminLogFieldRefs {
readonly id: FieldRef<"AdminLog", 'String'>
readonly adminId: FieldRef<"AdminLog", 'String'>
readonly action: FieldRef<"AdminLog", 'String'>
readonly entityType: FieldRef<"AdminLog", 'String'>
readonly entityId: FieldRef<"AdminLog", 'String'>
readonly oldValue: FieldRef<"AdminLog", 'Json'>
readonly newValue: FieldRef<"AdminLog", 'Json'>
readonly ip: FieldRef<"AdminLog", 'String'>
readonly createdAt: FieldRef<"AdminLog", 'DateTime'>
}
// Custom InputTypes
/**
* AdminLog findUnique
*/
export type AdminLogFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the AdminLog
*/
select?: AdminLogSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: AdminLogInclude<ExtArgs> | null
/**
* Filter, which AdminLog to fetch.
*/
where: AdminLogWhereUniqueInput
}
/**
* AdminLog findUniqueOrThrow
*/
export type AdminLogFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the AdminLog
*/
select?: AdminLogSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: AdminLogInclude<ExtArgs> | null
/**
* Filter, which AdminLog to fetch.
*/
where: AdminLogWhereUniqueInput
}
/**
* AdminLog findFirst
*/
export type AdminLogFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the AdminLog
*/
select?: AdminLogSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: AdminLogInclude<ExtArgs> | null
/**
* Filter, which AdminLog to fetch.
*/
where?: AdminLogWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of AdminLogs to fetch.
*/
orderBy?: AdminLogOrderByWithRelationInput | AdminLogOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for searching for AdminLogs.
*/
cursor?: AdminLogWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` AdminLogs 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` AdminLogs.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of AdminLogs.
*/
distinct?: AdminLogScalarFieldEnum | AdminLogScalarFieldEnum[]
}
/**
* AdminLog findFirstOrThrow
*/
export type AdminLogFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the AdminLog
*/
select?: AdminLogSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: AdminLogInclude<ExtArgs> | null
/**
* Filter, which AdminLog to fetch.
*/
where?: AdminLogWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of AdminLogs to fetch.
*/
orderBy?: AdminLogOrderByWithRelationInput | AdminLogOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for searching for AdminLogs.
*/
cursor?: AdminLogWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` AdminLogs 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` AdminLogs.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of AdminLogs.
*/
distinct?: AdminLogScalarFieldEnum | AdminLogScalarFieldEnum[]
}
/**
* AdminLog findMany
*/
export type AdminLogFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the AdminLog
*/
select?: AdminLogSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: AdminLogInclude<ExtArgs> | null
/**
* Filter, which AdminLogs to fetch.
*/
where?: AdminLogWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of AdminLogs to fetch.
*/
orderBy?: AdminLogOrderByWithRelationInput | AdminLogOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for listing AdminLogs.
*/
cursor?: AdminLogWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` AdminLogs 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` AdminLogs.
*/
skip?: number
distinct?: AdminLogScalarFieldEnum | AdminLogScalarFieldEnum[]
}
/**
* AdminLog create
*/
export type AdminLogCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the AdminLog
*/
select?: AdminLogSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: AdminLogInclude<ExtArgs> | null
/**
* The data needed to create a AdminLog.
*/
data: XOR<AdminLogCreateInput, AdminLogUncheckedCreateInput>
}
/**
* AdminLog createMany
*/
export type AdminLogCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* The data used to create many AdminLogs.
*/
data: AdminLogCreateManyInput | AdminLogCreateManyInput[]
skipDuplicates?: boolean
}
/**
* AdminLog createManyAndReturn
*/
export type AdminLogCreateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the AdminLog
*/
select?: AdminLogSelectCreateManyAndReturn<ExtArgs> | null
/**
* The data used to create many AdminLogs.
*/
data: AdminLogCreateManyInput | AdminLogCreateManyInput[]
skipDuplicates?: boolean
/**
* Choose, which related nodes to fetch as well
*/
include?: AdminLogIncludeCreateManyAndReturn<ExtArgs> | null
}
/**
* AdminLog update
*/
export type AdminLogUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the AdminLog
*/
select?: AdminLogSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: AdminLogInclude<ExtArgs> | null
/**
* The data needed to update a AdminLog.
*/
data: XOR<AdminLogUpdateInput, AdminLogUncheckedUpdateInput>
/**
* Choose, which AdminLog to update.
*/
where: AdminLogWhereUniqueInput
}
/**
* AdminLog updateMany
*/
export type AdminLogUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* The data used to update AdminLogs.
*/
data: XOR<AdminLogUpdateManyMutationInput, AdminLogUncheckedUpdateManyInput>
/**
* Filter which AdminLogs to update
*/
where?: AdminLogWhereInput
}
/**
* AdminLog upsert
*/
export type AdminLogUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the AdminLog
*/
select?: AdminLogSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: AdminLogInclude<ExtArgs> | null
/**
* The filter to search for the AdminLog to update in case it exists.
*/
where: AdminLogWhereUniqueInput
/**
* In case the AdminLog found by the `where` argument doesn't exist, create a new AdminLog with this data.
*/
create: XOR<AdminLogCreateInput, AdminLogUncheckedCreateInput>
/**
* In case the AdminLog was found with the provided `where` argument, update it with this data.
*/
update: XOR<AdminLogUpdateInput, AdminLogUncheckedUpdateInput>
}
/**
* AdminLog delete
*/
export type AdminLogDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the AdminLog
*/
select?: AdminLogSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: AdminLogInclude<ExtArgs> | null
/**
* Filter which AdminLog to delete.
*/
where: AdminLogWhereUniqueInput
}
/**
* AdminLog deleteMany
*/
export type AdminLogDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Filter which AdminLogs to delete
*/
where?: AdminLogWhereInput
}
/**
* AdminLog without action
*/
export type AdminLogDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the AdminLog
*/
select?: AdminLogSelect<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: AdminLogInclude<ExtArgs> | null
}
/**
* Enums
*/
export const TransactionIsolationLevel: {
ReadUncommitted: 'ReadUncommitted',
ReadCommitted: 'ReadCommitted',
RepeatableRead: 'RepeatableRead',
Serializable: 'Serializable'
};
export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel]
export const AdminScalarFieldEnum: {
id: 'id',
name: 'name',
mobile: 'mobile',
email: 'email',
passwordHash: 'passwordHash',
role: 'role',
status: 'status',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
export type AdminScalarFieldEnum = (typeof AdminScalarFieldEnum)[keyof typeof AdminScalarFieldEnum]
export const UserScalarFieldEnum: {
id: 'id',
mobile: 'mobile',
name: 'name',
status: 'status',
lastLoginAt: 'lastLoginAt',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
export type UserScalarFieldEnum = (typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum]
export const OtpCodeScalarFieldEnum: {
id: 'id',
mobile: 'mobile',
code: 'code',
userId: 'userId',
attempts: 'attempts',
consumed: 'consumed',
expiresAt: 'expiresAt',
createdAt: 'createdAt'
};
export type OtpCodeScalarFieldEnum = (typeof OtpCodeScalarFieldEnum)[keyof typeof OtpCodeScalarFieldEnum]
export const CampaignScalarFieldEnum: {
id: 'id',
title: 'title',
slug: 'slug',
description: 'description',
image: 'image',
banner: 'banner',
logo: 'logo',
startAt: 'startAt',
endAt: 'endAt',
status: 'status',
defaultChances: 'defaultChances',
rules: 'rules',
ctaText: 'ctaText',
wheelDesign: 'wheelDesign',
settings: 'settings',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
export type CampaignScalarFieldEnum = (typeof CampaignScalarFieldEnum)[keyof typeof CampaignScalarFieldEnum]
export const PrizeScalarFieldEnum: {
id: 'id',
campaignId: 'campaignId',
title: 'title',
description: 'description',
image: 'image',
type: 'type',
stockType: 'stockType',
initialStock: 'initialStock',
remainingStock: 'remainingStock',
weight: 'weight',
status: 'status',
sortOrder: 'sortOrder',
segmentColor: 'segmentColor',
expiresAt: 'expiresAt',
smsTemplate: 'smsTemplate',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
export type PrizeScalarFieldEnum = (typeof PrizeScalarFieldEnum)[keyof typeof PrizeScalarFieldEnum]
export const UserCampaignScalarFieldEnum: {
id: 'id',
userId: 'userId',
campaignId: 'campaignId',
totalChances: 'totalChances',
usedChances: 'usedChances',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
export type UserCampaignScalarFieldEnum = (typeof UserCampaignScalarFieldEnum)[keyof typeof UserCampaignScalarFieldEnum]
export const ChanceTransactionScalarFieldEnum: {
id: 'id',
userId: 'userId',
campaignId: 'campaignId',
amount: 'amount',
type: 'type',
referenceType: 'referenceType',
referenceId: 'referenceId',
description: 'description',
createdById: 'createdById',
createdAt: 'createdAt'
};
export type ChanceTransactionScalarFieldEnum = (typeof ChanceTransactionScalarFieldEnum)[keyof typeof ChanceTransactionScalarFieldEnum]
export const SpinScalarFieldEnum: {
id: 'id',
userId: 'userId',
campaignId: 'campaignId',
prizeId: 'prizeId',
status: 'status',
idempotencyKey: 'idempotencyKey',
ip: 'ip',
userAgent: 'userAgent',
createdAt: 'createdAt'
};
export type SpinScalarFieldEnum = (typeof SpinScalarFieldEnum)[keyof typeof SpinScalarFieldEnum]
export const UserPrizeScalarFieldEnum: {
id: 'id',
userId: 'userId',
campaignId: 'campaignId',
prizeId: 'prizeId',
spinId: 'spinId',
code: 'code',
status: 'status',
wonAt: 'wonAt',
redeemedAt: 'redeemedAt'
};
export type UserPrizeScalarFieldEnum = (typeof UserPrizeScalarFieldEnum)[keyof typeof UserPrizeScalarFieldEnum]
export const SmsLogScalarFieldEnum: {
id: 'id',
userId: 'userId',
mobile: 'mobile',
type: 'type',
message: 'message',
provider: 'provider',
status: 'status',
providerResponse: 'providerResponse',
createdAt: 'createdAt'
};
export type SmsLogScalarFieldEnum = (typeof SmsLogScalarFieldEnum)[keyof typeof SmsLogScalarFieldEnum]
export const AdminLogScalarFieldEnum: {
id: 'id',
adminId: 'adminId',
action: 'action',
entityType: 'entityType',
entityId: 'entityId',
oldValue: 'oldValue',
newValue: 'newValue',
ip: 'ip',
createdAt: 'createdAt'
};
export type AdminLogScalarFieldEnum = (typeof AdminLogScalarFieldEnum)[keyof typeof AdminLogScalarFieldEnum]
export const SortOrder: {
asc: 'asc',
desc: 'desc'
};
export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder]
export const NullableJsonNullValueInput: {
DbNull: typeof DbNull,
JsonNull: typeof JsonNull
};
export type NullableJsonNullValueInput = (typeof NullableJsonNullValueInput)[keyof typeof NullableJsonNullValueInput]
export const QueryMode: {
default: 'default',
insensitive: 'insensitive'
};
export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode]
export const NullsOrder: {
first: 'first',
last: 'last'
};
export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder]
export const JsonNullValueFilter: {
DbNull: typeof DbNull,
JsonNull: typeof JsonNull,
AnyNull: typeof AnyNull
};
export type JsonNullValueFilter = (typeof JsonNullValueFilter)[keyof typeof JsonNullValueFilter]
/**
* Field references
*/
/**
* Reference to a field of type 'String'
*/
export type StringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String'>
/**
* Reference to a field of type 'String[]'
*/
export type ListStringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String[]'>
/**
* Reference to a field of type 'AdminRole'
*/
export type EnumAdminRoleFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'AdminRole'>
/**
* Reference to a field of type 'AdminRole[]'
*/
export type ListEnumAdminRoleFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'AdminRole[]'>
/**
* Reference to a field of type 'AdminStatus'
*/
export type EnumAdminStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'AdminStatus'>
/**
* Reference to a field of type 'AdminStatus[]'
*/
export type ListEnumAdminStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'AdminStatus[]'>
/**
* Reference to a field of type 'DateTime'
*/
export type DateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime'>
/**
* Reference to a field of type 'DateTime[]'
*/
export type ListDateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime[]'>
/**
* Reference to a field of type 'UserStatus'
*/
export type EnumUserStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'UserStatus'>
/**
* Reference to a field of type 'UserStatus[]'
*/
export type ListEnumUserStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'UserStatus[]'>
/**
* Reference to a field of type 'Int'
*/
export type IntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int'>
/**
* Reference to a field of type 'Int[]'
*/
export type ListIntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int[]'>
/**
* Reference to a field of type 'Boolean'
*/
export type BooleanFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Boolean'>
/**
* Reference to a field of type 'CampaignStatus'
*/
export type EnumCampaignStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'CampaignStatus'>
/**
* Reference to a field of type 'CampaignStatus[]'
*/
export type ListEnumCampaignStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'CampaignStatus[]'>
/**
* Reference to a field of type 'WheelDesign'
*/
export type EnumWheelDesignFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'WheelDesign'>
/**
* Reference to a field of type 'WheelDesign[]'
*/
export type ListEnumWheelDesignFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'WheelDesign[]'>
/**
* Reference to a field of type 'Json'
*/
export type JsonFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Json'>
/**
* Reference to a field of type 'PrizeType'
*/
export type EnumPrizeTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'PrizeType'>
/**
* Reference to a field of type 'PrizeType[]'
*/
export type ListEnumPrizeTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'PrizeType[]'>
/**
* Reference to a field of type 'StockType'
*/
export type EnumStockTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'StockType'>
/**
* Reference to a field of type 'StockType[]'
*/
export type ListEnumStockTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'StockType[]'>
/**
* Reference to a field of type 'PrizeStatus'
*/
export type EnumPrizeStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'PrizeStatus'>
/**
* Reference to a field of type 'PrizeStatus[]'
*/
export type ListEnumPrizeStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'PrizeStatus[]'>
/**
* Reference to a field of type 'ChanceTxnType'
*/
export type EnumChanceTxnTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'ChanceTxnType'>
/**
* Reference to a field of type 'ChanceTxnType[]'
*/
export type ListEnumChanceTxnTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'ChanceTxnType[]'>
/**
* Reference to a field of type 'SpinStatus'
*/
export type EnumSpinStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'SpinStatus'>
/**
* Reference to a field of type 'SpinStatus[]'
*/
export type ListEnumSpinStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'SpinStatus[]'>
/**
* Reference to a field of type 'UserPrizeStatus'
*/
export type EnumUserPrizeStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'UserPrizeStatus'>
/**
* Reference to a field of type 'UserPrizeStatus[]'
*/
export type ListEnumUserPrizeStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'UserPrizeStatus[]'>
/**
* Reference to a field of type 'SmsType'
*/
export type EnumSmsTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'SmsType'>
/**
* Reference to a field of type 'SmsType[]'
*/
export type ListEnumSmsTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'SmsType[]'>
/**
* Reference to a field of type 'SmsStatus'
*/
export type EnumSmsStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'SmsStatus'>
/**
* Reference to a field of type 'SmsStatus[]'
*/
export type ListEnumSmsStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'SmsStatus[]'>
/**
* Reference to a field of type 'Float'
*/
export type FloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float'>
/**
* Reference to a field of type 'Float[]'
*/
export type ListFloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float[]'>
/**
* Deep Input Types
*/
export type AdminWhereInput = {
AND?: AdminWhereInput | AdminWhereInput[]
OR?: AdminWhereInput[]
NOT?: AdminWhereInput | AdminWhereInput[]
id?: StringFilter<"Admin"> | string
name?: StringFilter<"Admin"> | string
mobile?: StringFilter<"Admin"> | string
email?: StringFilter<"Admin"> | string
passwordHash?: StringFilter<"Admin"> | string
role?: EnumAdminRoleFilter<"Admin"> | $Enums.AdminRole
status?: EnumAdminStatusFilter<"Admin"> | $Enums.AdminStatus
createdAt?: DateTimeFilter<"Admin"> | Date | string
updatedAt?: DateTimeFilter<"Admin"> | Date | string
auditLogs?: AdminLogListRelationFilter
chanceTxns?: ChanceTransactionListRelationFilter
}
export type AdminOrderByWithRelationInput = {
id?: SortOrder
name?: SortOrder
mobile?: SortOrder
email?: SortOrder
passwordHash?: SortOrder
role?: SortOrder
status?: SortOrder
createdAt?: SortOrder
updatedAt?: SortOrder
auditLogs?: AdminLogOrderByRelationAggregateInput
chanceTxns?: ChanceTransactionOrderByRelationAggregateInput
}
export type AdminWhereUniqueInput = Prisma.AtLeast<{
id?: string
mobile?: string
email?: string
AND?: AdminWhereInput | AdminWhereInput[]
OR?: AdminWhereInput[]
NOT?: AdminWhereInput | AdminWhereInput[]
name?: StringFilter<"Admin"> | string
passwordHash?: StringFilter<"Admin"> | string
role?: EnumAdminRoleFilter<"Admin"> | $Enums.AdminRole
status?: EnumAdminStatusFilter<"Admin"> | $Enums.AdminStatus
createdAt?: DateTimeFilter<"Admin"> | Date | string
updatedAt?: DateTimeFilter<"Admin"> | Date | string
auditLogs?: AdminLogListRelationFilter
chanceTxns?: ChanceTransactionListRelationFilter
}, "id" | "mobile" | "email">
export type AdminOrderByWithAggregationInput = {
id?: SortOrder
name?: SortOrder
mobile?: SortOrder
email?: SortOrder
passwordHash?: SortOrder
role?: SortOrder
status?: SortOrder
createdAt?: SortOrder
updatedAt?: SortOrder
_count?: AdminCountOrderByAggregateInput
_max?: AdminMaxOrderByAggregateInput
_min?: AdminMinOrderByAggregateInput
}
export type AdminScalarWhereWithAggregatesInput = {
AND?: AdminScalarWhereWithAggregatesInput | AdminScalarWhereWithAggregatesInput[]
OR?: AdminScalarWhereWithAggregatesInput[]
NOT?: AdminScalarWhereWithAggregatesInput | AdminScalarWhereWithAggregatesInput[]
id?: StringWithAggregatesFilter<"Admin"> | string
name?: StringWithAggregatesFilter<"Admin"> | string
mobile?: StringWithAggregatesFilter<"Admin"> | string
email?: StringWithAggregatesFilter<"Admin"> | string
passwordHash?: StringWithAggregatesFilter<"Admin"> | string
role?: EnumAdminRoleWithAggregatesFilter<"Admin"> | $Enums.AdminRole
status?: EnumAdminStatusWithAggregatesFilter<"Admin"> | $Enums.AdminStatus
createdAt?: DateTimeWithAggregatesFilter<"Admin"> | Date | string
updatedAt?: DateTimeWithAggregatesFilter<"Admin"> | Date | string
}
export type UserWhereInput = {
AND?: UserWhereInput | UserWhereInput[]
OR?: UserWhereInput[]
NOT?: UserWhereInput | UserWhereInput[]
id?: StringFilter<"User"> | string
mobile?: StringFilter<"User"> | string
name?: StringNullableFilter<"User"> | string | null
status?: EnumUserStatusFilter<"User"> | $Enums.UserStatus
lastLoginAt?: DateTimeNullableFilter<"User"> | Date | string | null
createdAt?: DateTimeFilter<"User"> | Date | string
updatedAt?: DateTimeFilter<"User"> | Date | string
userCampaigns?: UserCampaignListRelationFilter
chanceTransactions?: ChanceTransactionListRelationFilter
spins?: SpinListRelationFilter
userPrizes?: UserPrizeListRelationFilter
otpCodes?: OtpCodeListRelationFilter
smsLogs?: SmsLogListRelationFilter
}
export type UserOrderByWithRelationInput = {
id?: SortOrder
mobile?: SortOrder
name?: SortOrderInput | SortOrder
status?: SortOrder
lastLoginAt?: SortOrderInput | SortOrder
createdAt?: SortOrder
updatedAt?: SortOrder
userCampaigns?: UserCampaignOrderByRelationAggregateInput
chanceTransactions?: ChanceTransactionOrderByRelationAggregateInput
spins?: SpinOrderByRelationAggregateInput
userPrizes?: UserPrizeOrderByRelationAggregateInput
otpCodes?: OtpCodeOrderByRelationAggregateInput
smsLogs?: SmsLogOrderByRelationAggregateInput
}
export type UserWhereUniqueInput = Prisma.AtLeast<{
id?: string
mobile?: string
AND?: UserWhereInput | UserWhereInput[]
OR?: UserWhereInput[]
NOT?: UserWhereInput | UserWhereInput[]
name?: StringNullableFilter<"User"> | string | null
status?: EnumUserStatusFilter<"User"> | $Enums.UserStatus
lastLoginAt?: DateTimeNullableFilter<"User"> | Date | string | null
createdAt?: DateTimeFilter<"User"> | Date | string
updatedAt?: DateTimeFilter<"User"> | Date | string
userCampaigns?: UserCampaignListRelationFilter
chanceTransactions?: ChanceTransactionListRelationFilter
spins?: SpinListRelationFilter
userPrizes?: UserPrizeListRelationFilter
otpCodes?: OtpCodeListRelationFilter
smsLogs?: SmsLogListRelationFilter
}, "id" | "mobile">
export type UserOrderByWithAggregationInput = {
id?: SortOrder
mobile?: SortOrder
name?: SortOrderInput | SortOrder
status?: SortOrder
lastLoginAt?: SortOrderInput | SortOrder
createdAt?: SortOrder
updatedAt?: SortOrder
_count?: UserCountOrderByAggregateInput
_max?: UserMaxOrderByAggregateInput
_min?: UserMinOrderByAggregateInput
}
export type UserScalarWhereWithAggregatesInput = {
AND?: UserScalarWhereWithAggregatesInput | UserScalarWhereWithAggregatesInput[]
OR?: UserScalarWhereWithAggregatesInput[]
NOT?: UserScalarWhereWithAggregatesInput | UserScalarWhereWithAggregatesInput[]
id?: StringWithAggregatesFilter<"User"> | string
mobile?: StringWithAggregatesFilter<"User"> | string
name?: StringNullableWithAggregatesFilter<"User"> | string | null
status?: EnumUserStatusWithAggregatesFilter<"User"> | $Enums.UserStatus
lastLoginAt?: DateTimeNullableWithAggregatesFilter<"User"> | Date | string | null
createdAt?: DateTimeWithAggregatesFilter<"User"> | Date | string
updatedAt?: DateTimeWithAggregatesFilter<"User"> | Date | string
}
export type OtpCodeWhereInput = {
AND?: OtpCodeWhereInput | OtpCodeWhereInput[]
OR?: OtpCodeWhereInput[]
NOT?: OtpCodeWhereInput | OtpCodeWhereInput[]
id?: StringFilter<"OtpCode"> | string
mobile?: StringFilter<"OtpCode"> | string
code?: StringFilter<"OtpCode"> | string
userId?: StringNullableFilter<"OtpCode"> | string | null
attempts?: IntFilter<"OtpCode"> | number
consumed?: BoolFilter<"OtpCode"> | boolean
expiresAt?: DateTimeFilter<"OtpCode"> | Date | string
createdAt?: DateTimeFilter<"OtpCode"> | Date | string
user?: XOR<UserNullableRelationFilter, UserWhereInput> | null
}
export type OtpCodeOrderByWithRelationInput = {
id?: SortOrder
mobile?: SortOrder
code?: SortOrder
userId?: SortOrderInput | SortOrder
attempts?: SortOrder
consumed?: SortOrder
expiresAt?: SortOrder
createdAt?: SortOrder
user?: UserOrderByWithRelationInput
}
export type OtpCodeWhereUniqueInput = Prisma.AtLeast<{
id?: string
AND?: OtpCodeWhereInput | OtpCodeWhereInput[]
OR?: OtpCodeWhereInput[]
NOT?: OtpCodeWhereInput | OtpCodeWhereInput[]
mobile?: StringFilter<"OtpCode"> | string
code?: StringFilter<"OtpCode"> | string
userId?: StringNullableFilter<"OtpCode"> | string | null
attempts?: IntFilter<"OtpCode"> | number
consumed?: BoolFilter<"OtpCode"> | boolean
expiresAt?: DateTimeFilter<"OtpCode"> | Date | string
createdAt?: DateTimeFilter<"OtpCode"> | Date | string
user?: XOR<UserNullableRelationFilter, UserWhereInput> | null
}, "id">
export type OtpCodeOrderByWithAggregationInput = {
id?: SortOrder
mobile?: SortOrder
code?: SortOrder
userId?: SortOrderInput | SortOrder
attempts?: SortOrder
consumed?: SortOrder
expiresAt?: SortOrder
createdAt?: SortOrder
_count?: OtpCodeCountOrderByAggregateInput
_avg?: OtpCodeAvgOrderByAggregateInput
_max?: OtpCodeMaxOrderByAggregateInput
_min?: OtpCodeMinOrderByAggregateInput
_sum?: OtpCodeSumOrderByAggregateInput
}
export type OtpCodeScalarWhereWithAggregatesInput = {
AND?: OtpCodeScalarWhereWithAggregatesInput | OtpCodeScalarWhereWithAggregatesInput[]
OR?: OtpCodeScalarWhereWithAggregatesInput[]
NOT?: OtpCodeScalarWhereWithAggregatesInput | OtpCodeScalarWhereWithAggregatesInput[]
id?: StringWithAggregatesFilter<"OtpCode"> | string
mobile?: StringWithAggregatesFilter<"OtpCode"> | string
code?: StringWithAggregatesFilter<"OtpCode"> | string
userId?: StringNullableWithAggregatesFilter<"OtpCode"> | string | null
attempts?: IntWithAggregatesFilter<"OtpCode"> | number
consumed?: BoolWithAggregatesFilter<"OtpCode"> | boolean
expiresAt?: DateTimeWithAggregatesFilter<"OtpCode"> | Date | string
createdAt?: DateTimeWithAggregatesFilter<"OtpCode"> | Date | string
}
export type CampaignWhereInput = {
AND?: CampaignWhereInput | CampaignWhereInput[]
OR?: CampaignWhereInput[]
NOT?: CampaignWhereInput | CampaignWhereInput[]
id?: StringFilter<"Campaign"> | string
title?: StringFilter<"Campaign"> | string
slug?: StringFilter<"Campaign"> | string
description?: StringNullableFilter<"Campaign"> | string | null
image?: StringNullableFilter<"Campaign"> | string | null
banner?: StringNullableFilter<"Campaign"> | string | null
logo?: StringNullableFilter<"Campaign"> | string | null
startAt?: DateTimeFilter<"Campaign"> | Date | string
endAt?: DateTimeFilter<"Campaign"> | Date | string
status?: EnumCampaignStatusFilter<"Campaign"> | $Enums.CampaignStatus
defaultChances?: IntFilter<"Campaign"> | number
rules?: StringNullableFilter<"Campaign"> | string | null
ctaText?: StringNullableFilter<"Campaign"> | string | null
wheelDesign?: EnumWheelDesignFilter<"Campaign"> | $Enums.WheelDesign
settings?: JsonNullableFilter<"Campaign">
createdAt?: DateTimeFilter<"Campaign"> | Date | string
updatedAt?: DateTimeFilter<"Campaign"> | Date | string
prizes?: PrizeListRelationFilter
userCampaigns?: UserCampaignListRelationFilter
chanceTxns?: ChanceTransactionListRelationFilter
spins?: SpinListRelationFilter
userPrizes?: UserPrizeListRelationFilter
}
export type CampaignOrderByWithRelationInput = {
id?: SortOrder
title?: SortOrder
slug?: SortOrder
description?: SortOrderInput | SortOrder
image?: SortOrderInput | SortOrder
banner?: SortOrderInput | SortOrder
logo?: SortOrderInput | SortOrder
startAt?: SortOrder
endAt?: SortOrder
status?: SortOrder
defaultChances?: SortOrder
rules?: SortOrderInput | SortOrder
ctaText?: SortOrderInput | SortOrder
wheelDesign?: SortOrder
settings?: SortOrderInput | SortOrder
createdAt?: SortOrder
updatedAt?: SortOrder
prizes?: PrizeOrderByRelationAggregateInput
userCampaigns?: UserCampaignOrderByRelationAggregateInput
chanceTxns?: ChanceTransactionOrderByRelationAggregateInput
spins?: SpinOrderByRelationAggregateInput
userPrizes?: UserPrizeOrderByRelationAggregateInput
}
export type CampaignWhereUniqueInput = Prisma.AtLeast<{
id?: string
slug?: string
AND?: CampaignWhereInput | CampaignWhereInput[]
OR?: CampaignWhereInput[]
NOT?: CampaignWhereInput | CampaignWhereInput[]
title?: StringFilter<"Campaign"> | string
description?: StringNullableFilter<"Campaign"> | string | null
image?: StringNullableFilter<"Campaign"> | string | null
banner?: StringNullableFilter<"Campaign"> | string | null
logo?: StringNullableFilter<"Campaign"> | string | null
startAt?: DateTimeFilter<"Campaign"> | Date | string
endAt?: DateTimeFilter<"Campaign"> | Date | string
status?: EnumCampaignStatusFilter<"Campaign"> | $Enums.CampaignStatus
defaultChances?: IntFilter<"Campaign"> | number
rules?: StringNullableFilter<"Campaign"> | string | null
ctaText?: StringNullableFilter<"Campaign"> | string | null
wheelDesign?: EnumWheelDesignFilter<"Campaign"> | $Enums.WheelDesign
settings?: JsonNullableFilter<"Campaign">
createdAt?: DateTimeFilter<"Campaign"> | Date | string
updatedAt?: DateTimeFilter<"Campaign"> | Date | string
prizes?: PrizeListRelationFilter
userCampaigns?: UserCampaignListRelationFilter
chanceTxns?: ChanceTransactionListRelationFilter
spins?: SpinListRelationFilter
userPrizes?: UserPrizeListRelationFilter
}, "id" | "slug">
export type CampaignOrderByWithAggregationInput = {
id?: SortOrder
title?: SortOrder
slug?: SortOrder
description?: SortOrderInput | SortOrder
image?: SortOrderInput | SortOrder
banner?: SortOrderInput | SortOrder
logo?: SortOrderInput | SortOrder
startAt?: SortOrder
endAt?: SortOrder
status?: SortOrder
defaultChances?: SortOrder
rules?: SortOrderInput | SortOrder
ctaText?: SortOrderInput | SortOrder
wheelDesign?: SortOrder
settings?: SortOrderInput | SortOrder
createdAt?: SortOrder
updatedAt?: SortOrder
_count?: CampaignCountOrderByAggregateInput
_avg?: CampaignAvgOrderByAggregateInput
_max?: CampaignMaxOrderByAggregateInput
_min?: CampaignMinOrderByAggregateInput
_sum?: CampaignSumOrderByAggregateInput
}
export type CampaignScalarWhereWithAggregatesInput = {
AND?: CampaignScalarWhereWithAggregatesInput | CampaignScalarWhereWithAggregatesInput[]
OR?: CampaignScalarWhereWithAggregatesInput[]
NOT?: CampaignScalarWhereWithAggregatesInput | CampaignScalarWhereWithAggregatesInput[]
id?: StringWithAggregatesFilter<"Campaign"> | string
title?: StringWithAggregatesFilter<"Campaign"> | string
slug?: StringWithAggregatesFilter<"Campaign"> | string
description?: StringNullableWithAggregatesFilter<"Campaign"> | string | null
image?: StringNullableWithAggregatesFilter<"Campaign"> | string | null
banner?: StringNullableWithAggregatesFilter<"Campaign"> | string | null
logo?: StringNullableWithAggregatesFilter<"Campaign"> | string | null
startAt?: DateTimeWithAggregatesFilter<"Campaign"> | Date | string
endAt?: DateTimeWithAggregatesFilter<"Campaign"> | Date | string
status?: EnumCampaignStatusWithAggregatesFilter<"Campaign"> | $Enums.CampaignStatus
defaultChances?: IntWithAggregatesFilter<"Campaign"> | number
rules?: StringNullableWithAggregatesFilter<"Campaign"> | string | null
ctaText?: StringNullableWithAggregatesFilter<"Campaign"> | string | null
wheelDesign?: EnumWheelDesignWithAggregatesFilter<"Campaign"> | $Enums.WheelDesign
settings?: JsonNullableWithAggregatesFilter<"Campaign">
createdAt?: DateTimeWithAggregatesFilter<"Campaign"> | Date | string
updatedAt?: DateTimeWithAggregatesFilter<"Campaign"> | Date | string
}
export type PrizeWhereInput = {
AND?: PrizeWhereInput | PrizeWhereInput[]
OR?: PrizeWhereInput[]
NOT?: PrizeWhereInput | PrizeWhereInput[]
id?: StringFilter<"Prize"> | string
campaignId?: StringFilter<"Prize"> | string
title?: StringFilter<"Prize"> | string
description?: StringNullableFilter<"Prize"> | string | null
image?: StringNullableFilter<"Prize"> | string | null
type?: EnumPrizeTypeFilter<"Prize"> | $Enums.PrizeType
stockType?: EnumStockTypeFilter<"Prize"> | $Enums.StockType
initialStock?: IntNullableFilter<"Prize"> | number | null
remainingStock?: IntNullableFilter<"Prize"> | number | null
weight?: IntFilter<"Prize"> | number
status?: EnumPrizeStatusFilter<"Prize"> | $Enums.PrizeStatus
sortOrder?: IntFilter<"Prize"> | number
segmentColor?: StringFilter<"Prize"> | string
expiresAt?: DateTimeNullableFilter<"Prize"> | Date | string | null
smsTemplate?: StringNullableFilter<"Prize"> | string | null
createdAt?: DateTimeFilter<"Prize"> | Date | string
updatedAt?: DateTimeFilter<"Prize"> | Date | string
campaign?: XOR<CampaignRelationFilter, CampaignWhereInput>
spins?: SpinListRelationFilter
userPrizes?: UserPrizeListRelationFilter
}
export type PrizeOrderByWithRelationInput = {
id?: SortOrder
campaignId?: SortOrder
title?: SortOrder
description?: SortOrderInput | SortOrder
image?: SortOrderInput | SortOrder
type?: SortOrder
stockType?: SortOrder
initialStock?: SortOrderInput | SortOrder
remainingStock?: SortOrderInput | SortOrder
weight?: SortOrder
status?: SortOrder
sortOrder?: SortOrder
segmentColor?: SortOrder
expiresAt?: SortOrderInput | SortOrder
smsTemplate?: SortOrderInput | SortOrder
createdAt?: SortOrder
updatedAt?: SortOrder
campaign?: CampaignOrderByWithRelationInput
spins?: SpinOrderByRelationAggregateInput
userPrizes?: UserPrizeOrderByRelationAggregateInput
}
export type PrizeWhereUniqueInput = Prisma.AtLeast<{
id?: string
AND?: PrizeWhereInput | PrizeWhereInput[]
OR?: PrizeWhereInput[]
NOT?: PrizeWhereInput | PrizeWhereInput[]
campaignId?: StringFilter<"Prize"> | string
title?: StringFilter<"Prize"> | string
description?: StringNullableFilter<"Prize"> | string | null
image?: StringNullableFilter<"Prize"> | string | null
type?: EnumPrizeTypeFilter<"Prize"> | $Enums.PrizeType
stockType?: EnumStockTypeFilter<"Prize"> | $Enums.StockType
initialStock?: IntNullableFilter<"Prize"> | number | null
remainingStock?: IntNullableFilter<"Prize"> | number | null
weight?: IntFilter<"Prize"> | number
status?: EnumPrizeStatusFilter<"Prize"> | $Enums.PrizeStatus
sortOrder?: IntFilter<"Prize"> | number
segmentColor?: StringFilter<"Prize"> | string
expiresAt?: DateTimeNullableFilter<"Prize"> | Date | string | null
smsTemplate?: StringNullableFilter<"Prize"> | string | null
createdAt?: DateTimeFilter<"Prize"> | Date | string
updatedAt?: DateTimeFilter<"Prize"> | Date | string
campaign?: XOR<CampaignRelationFilter, CampaignWhereInput>
spins?: SpinListRelationFilter
userPrizes?: UserPrizeListRelationFilter
}, "id">
export type PrizeOrderByWithAggregationInput = {
id?: SortOrder
campaignId?: SortOrder
title?: SortOrder
description?: SortOrderInput | SortOrder
image?: SortOrderInput | SortOrder
type?: SortOrder
stockType?: SortOrder
initialStock?: SortOrderInput | SortOrder
remainingStock?: SortOrderInput | SortOrder
weight?: SortOrder
status?: SortOrder
sortOrder?: SortOrder
segmentColor?: SortOrder
expiresAt?: SortOrderInput | SortOrder
smsTemplate?: SortOrderInput | SortOrder
createdAt?: SortOrder
updatedAt?: SortOrder
_count?: PrizeCountOrderByAggregateInput
_avg?: PrizeAvgOrderByAggregateInput
_max?: PrizeMaxOrderByAggregateInput
_min?: PrizeMinOrderByAggregateInput
_sum?: PrizeSumOrderByAggregateInput
}
export type PrizeScalarWhereWithAggregatesInput = {
AND?: PrizeScalarWhereWithAggregatesInput | PrizeScalarWhereWithAggregatesInput[]
OR?: PrizeScalarWhereWithAggregatesInput[]
NOT?: PrizeScalarWhereWithAggregatesInput | PrizeScalarWhereWithAggregatesInput[]
id?: StringWithAggregatesFilter<"Prize"> | string
campaignId?: StringWithAggregatesFilter<"Prize"> | string
title?: StringWithAggregatesFilter<"Prize"> | string
description?: StringNullableWithAggregatesFilter<"Prize"> | string | null
image?: StringNullableWithAggregatesFilter<"Prize"> | string | null
type?: EnumPrizeTypeWithAggregatesFilter<"Prize"> | $Enums.PrizeType
stockType?: EnumStockTypeWithAggregatesFilter<"Prize"> | $Enums.StockType
initialStock?: IntNullableWithAggregatesFilter<"Prize"> | number | null
remainingStock?: IntNullableWithAggregatesFilter<"Prize"> | number | null
weight?: IntWithAggregatesFilter<"Prize"> | number
status?: EnumPrizeStatusWithAggregatesFilter<"Prize"> | $Enums.PrizeStatus
sortOrder?: IntWithAggregatesFilter<"Prize"> | number
segmentColor?: StringWithAggregatesFilter<"Prize"> | string
expiresAt?: DateTimeNullableWithAggregatesFilter<"Prize"> | Date | string | null
smsTemplate?: StringNullableWithAggregatesFilter<"Prize"> | string | null
createdAt?: DateTimeWithAggregatesFilter<"Prize"> | Date | string
updatedAt?: DateTimeWithAggregatesFilter<"Prize"> | Date | string
}
export type UserCampaignWhereInput = {
AND?: UserCampaignWhereInput | UserCampaignWhereInput[]
OR?: UserCampaignWhereInput[]
NOT?: UserCampaignWhereInput | UserCampaignWhereInput[]
id?: StringFilter<"UserCampaign"> | string
userId?: StringFilter<"UserCampaign"> | string
campaignId?: StringFilter<"UserCampaign"> | string
totalChances?: IntFilter<"UserCampaign"> | number
usedChances?: IntFilter<"UserCampaign"> | number
createdAt?: DateTimeFilter<"UserCampaign"> | Date | string
updatedAt?: DateTimeFilter<"UserCampaign"> | Date | string
user?: XOR<UserRelationFilter, UserWhereInput>
campaign?: XOR<CampaignRelationFilter, CampaignWhereInput>
}
export type UserCampaignOrderByWithRelationInput = {
id?: SortOrder
userId?: SortOrder
campaignId?: SortOrder
totalChances?: SortOrder
usedChances?: SortOrder
createdAt?: SortOrder
updatedAt?: SortOrder
user?: UserOrderByWithRelationInput
campaign?: CampaignOrderByWithRelationInput
}
export type UserCampaignWhereUniqueInput = Prisma.AtLeast<{
id?: string
userId_campaignId?: UserCampaignUserIdCampaignIdCompoundUniqueInput
AND?: UserCampaignWhereInput | UserCampaignWhereInput[]
OR?: UserCampaignWhereInput[]
NOT?: UserCampaignWhereInput | UserCampaignWhereInput[]
userId?: StringFilter<"UserCampaign"> | string
campaignId?: StringFilter<"UserCampaign"> | string
totalChances?: IntFilter<"UserCampaign"> | number
usedChances?: IntFilter<"UserCampaign"> | number
createdAt?: DateTimeFilter<"UserCampaign"> | Date | string
updatedAt?: DateTimeFilter<"UserCampaign"> | Date | string
user?: XOR<UserRelationFilter, UserWhereInput>
campaign?: XOR<CampaignRelationFilter, CampaignWhereInput>
}, "id" | "userId_campaignId">
export type UserCampaignOrderByWithAggregationInput = {
id?: SortOrder
userId?: SortOrder
campaignId?: SortOrder
totalChances?: SortOrder
usedChances?: SortOrder
createdAt?: SortOrder
updatedAt?: SortOrder
_count?: UserCampaignCountOrderByAggregateInput
_avg?: UserCampaignAvgOrderByAggregateInput
_max?: UserCampaignMaxOrderByAggregateInput
_min?: UserCampaignMinOrderByAggregateInput
_sum?: UserCampaignSumOrderByAggregateInput
}
export type UserCampaignScalarWhereWithAggregatesInput = {
AND?: UserCampaignScalarWhereWithAggregatesInput | UserCampaignScalarWhereWithAggregatesInput[]
OR?: UserCampaignScalarWhereWithAggregatesInput[]
NOT?: UserCampaignScalarWhereWithAggregatesInput | UserCampaignScalarWhereWithAggregatesInput[]
id?: StringWithAggregatesFilter<"UserCampaign"> | string
userId?: StringWithAggregatesFilter<"UserCampaign"> | string
campaignId?: StringWithAggregatesFilter<"UserCampaign"> | string
totalChances?: IntWithAggregatesFilter<"UserCampaign"> | number
usedChances?: IntWithAggregatesFilter<"UserCampaign"> | number
createdAt?: DateTimeWithAggregatesFilter<"UserCampaign"> | Date | string
updatedAt?: DateTimeWithAggregatesFilter<"UserCampaign"> | Date | string
}
export type ChanceTransactionWhereInput = {
AND?: ChanceTransactionWhereInput | ChanceTransactionWhereInput[]
OR?: ChanceTransactionWhereInput[]
NOT?: ChanceTransactionWhereInput | ChanceTransactionWhereInput[]
id?: StringFilter<"ChanceTransaction"> | string
userId?: StringFilter<"ChanceTransaction"> | string
campaignId?: StringFilter<"ChanceTransaction"> | string
amount?: IntFilter<"ChanceTransaction"> | number
type?: EnumChanceTxnTypeFilter<"ChanceTransaction"> | $Enums.ChanceTxnType
referenceType?: StringNullableFilter<"ChanceTransaction"> | string | null
referenceId?: StringNullableFilter<"ChanceTransaction"> | string | null
description?: StringNullableFilter<"ChanceTransaction"> | string | null
createdById?: StringNullableFilter<"ChanceTransaction"> | string | null
createdAt?: DateTimeFilter<"ChanceTransaction"> | Date | string
user?: XOR<UserRelationFilter, UserWhereInput>
campaign?: XOR<CampaignRelationFilter, CampaignWhereInput>
createdBy?: XOR<AdminNullableRelationFilter, AdminWhereInput> | null
}
export type ChanceTransactionOrderByWithRelationInput = {
id?: SortOrder
userId?: SortOrder
campaignId?: SortOrder
amount?: SortOrder
type?: SortOrder
referenceType?: SortOrderInput | SortOrder
referenceId?: SortOrderInput | SortOrder
description?: SortOrderInput | SortOrder
createdById?: SortOrderInput | SortOrder
createdAt?: SortOrder
user?: UserOrderByWithRelationInput
campaign?: CampaignOrderByWithRelationInput
createdBy?: AdminOrderByWithRelationInput
}
export type ChanceTransactionWhereUniqueInput = Prisma.AtLeast<{
id?: string
AND?: ChanceTransactionWhereInput | ChanceTransactionWhereInput[]
OR?: ChanceTransactionWhereInput[]
NOT?: ChanceTransactionWhereInput | ChanceTransactionWhereInput[]
userId?: StringFilter<"ChanceTransaction"> | string
campaignId?: StringFilter<"ChanceTransaction"> | string
amount?: IntFilter<"ChanceTransaction"> | number
type?: EnumChanceTxnTypeFilter<"ChanceTransaction"> | $Enums.ChanceTxnType
referenceType?: StringNullableFilter<"ChanceTransaction"> | string | null
referenceId?: StringNullableFilter<"ChanceTransaction"> | string | null
description?: StringNullableFilter<"ChanceTransaction"> | string | null
createdById?: StringNullableFilter<"ChanceTransaction"> | string | null
createdAt?: DateTimeFilter<"ChanceTransaction"> | Date | string
user?: XOR<UserRelationFilter, UserWhereInput>
campaign?: XOR<CampaignRelationFilter, CampaignWhereInput>
createdBy?: XOR<AdminNullableRelationFilter, AdminWhereInput> | null
}, "id">
export type ChanceTransactionOrderByWithAggregationInput = {
id?: SortOrder
userId?: SortOrder
campaignId?: SortOrder
amount?: SortOrder
type?: SortOrder
referenceType?: SortOrderInput | SortOrder
referenceId?: SortOrderInput | SortOrder
description?: SortOrderInput | SortOrder
createdById?: SortOrderInput | SortOrder
createdAt?: SortOrder
_count?: ChanceTransactionCountOrderByAggregateInput
_avg?: ChanceTransactionAvgOrderByAggregateInput
_max?: ChanceTransactionMaxOrderByAggregateInput
_min?: ChanceTransactionMinOrderByAggregateInput
_sum?: ChanceTransactionSumOrderByAggregateInput
}
export type ChanceTransactionScalarWhereWithAggregatesInput = {
AND?: ChanceTransactionScalarWhereWithAggregatesInput | ChanceTransactionScalarWhereWithAggregatesInput[]
OR?: ChanceTransactionScalarWhereWithAggregatesInput[]
NOT?: ChanceTransactionScalarWhereWithAggregatesInput | ChanceTransactionScalarWhereWithAggregatesInput[]
id?: StringWithAggregatesFilter<"ChanceTransaction"> | string
userId?: StringWithAggregatesFilter<"ChanceTransaction"> | string
campaignId?: StringWithAggregatesFilter<"ChanceTransaction"> | string
amount?: IntWithAggregatesFilter<"ChanceTransaction"> | number
type?: EnumChanceTxnTypeWithAggregatesFilter<"ChanceTransaction"> | $Enums.ChanceTxnType
referenceType?: StringNullableWithAggregatesFilter<"ChanceTransaction"> | string | null
referenceId?: StringNullableWithAggregatesFilter<"ChanceTransaction"> | string | null
description?: StringNullableWithAggregatesFilter<"ChanceTransaction"> | string | null
createdById?: StringNullableWithAggregatesFilter<"ChanceTransaction"> | string | null
createdAt?: DateTimeWithAggregatesFilter<"ChanceTransaction"> | Date | string
}
export type SpinWhereInput = {
AND?: SpinWhereInput | SpinWhereInput[]
OR?: SpinWhereInput[]
NOT?: SpinWhereInput | SpinWhereInput[]
id?: StringFilter<"Spin"> | string
userId?: StringFilter<"Spin"> | string
campaignId?: StringFilter<"Spin"> | string
prizeId?: StringNullableFilter<"Spin"> | string | null
status?: EnumSpinStatusFilter<"Spin"> | $Enums.SpinStatus
idempotencyKey?: StringFilter<"Spin"> | string
ip?: StringNullableFilter<"Spin"> | string | null
userAgent?: StringNullableFilter<"Spin"> | string | null
createdAt?: DateTimeFilter<"Spin"> | Date | string
user?: XOR<UserRelationFilter, UserWhereInput>
campaign?: XOR<CampaignRelationFilter, CampaignWhereInput>
prize?: XOR<PrizeNullableRelationFilter, PrizeWhereInput> | null
userPrize?: XOR<UserPrizeNullableRelationFilter, UserPrizeWhereInput> | null
}
export type SpinOrderByWithRelationInput = {
id?: SortOrder
userId?: SortOrder
campaignId?: SortOrder
prizeId?: SortOrderInput | SortOrder
status?: SortOrder
idempotencyKey?: SortOrder
ip?: SortOrderInput | SortOrder
userAgent?: SortOrderInput | SortOrder
createdAt?: SortOrder
user?: UserOrderByWithRelationInput
campaign?: CampaignOrderByWithRelationInput
prize?: PrizeOrderByWithRelationInput
userPrize?: UserPrizeOrderByWithRelationInput
}
export type SpinWhereUniqueInput = Prisma.AtLeast<{
id?: string
idempotencyKey?: string
AND?: SpinWhereInput | SpinWhereInput[]
OR?: SpinWhereInput[]
NOT?: SpinWhereInput | SpinWhereInput[]
userId?: StringFilter<"Spin"> | string
campaignId?: StringFilter<"Spin"> | string
prizeId?: StringNullableFilter<"Spin"> | string | null
status?: EnumSpinStatusFilter<"Spin"> | $Enums.SpinStatus
ip?: StringNullableFilter<"Spin"> | string | null
userAgent?: StringNullableFilter<"Spin"> | string | null
createdAt?: DateTimeFilter<"Spin"> | Date | string
user?: XOR<UserRelationFilter, UserWhereInput>
campaign?: XOR<CampaignRelationFilter, CampaignWhereInput>
prize?: XOR<PrizeNullableRelationFilter, PrizeWhereInput> | null
userPrize?: XOR<UserPrizeNullableRelationFilter, UserPrizeWhereInput> | null
}, "id" | "idempotencyKey">
export type SpinOrderByWithAggregationInput = {
id?: SortOrder
userId?: SortOrder
campaignId?: SortOrder
prizeId?: SortOrderInput | SortOrder
status?: SortOrder
idempotencyKey?: SortOrder
ip?: SortOrderInput | SortOrder
userAgent?: SortOrderInput | SortOrder
createdAt?: SortOrder
_count?: SpinCountOrderByAggregateInput
_max?: SpinMaxOrderByAggregateInput
_min?: SpinMinOrderByAggregateInput
}
export type SpinScalarWhereWithAggregatesInput = {
AND?: SpinScalarWhereWithAggregatesInput | SpinScalarWhereWithAggregatesInput[]
OR?: SpinScalarWhereWithAggregatesInput[]
NOT?: SpinScalarWhereWithAggregatesInput | SpinScalarWhereWithAggregatesInput[]
id?: StringWithAggregatesFilter<"Spin"> | string
userId?: StringWithAggregatesFilter<"Spin"> | string
campaignId?: StringWithAggregatesFilter<"Spin"> | string
prizeId?: StringNullableWithAggregatesFilter<"Spin"> | string | null
status?: EnumSpinStatusWithAggregatesFilter<"Spin"> | $Enums.SpinStatus
idempotencyKey?: StringWithAggregatesFilter<"Spin"> | string
ip?: StringNullableWithAggregatesFilter<"Spin"> | string | null
userAgent?: StringNullableWithAggregatesFilter<"Spin"> | string | null
createdAt?: DateTimeWithAggregatesFilter<"Spin"> | Date | string
}
export type UserPrizeWhereInput = {
AND?: UserPrizeWhereInput | UserPrizeWhereInput[]
OR?: UserPrizeWhereInput[]
NOT?: UserPrizeWhereInput | UserPrizeWhereInput[]
id?: StringFilter<"UserPrize"> | string
userId?: StringFilter<"UserPrize"> | string
campaignId?: StringFilter<"UserPrize"> | string
prizeId?: StringFilter<"UserPrize"> | string
spinId?: StringFilter<"UserPrize"> | string
code?: StringNullableFilter<"UserPrize"> | string | null
status?: EnumUserPrizeStatusFilter<"UserPrize"> | $Enums.UserPrizeStatus
wonAt?: DateTimeFilter<"UserPrize"> | Date | string
redeemedAt?: DateTimeNullableFilter<"UserPrize"> | Date | string | null
user?: XOR<UserRelationFilter, UserWhereInput>
campaign?: XOR<CampaignRelationFilter, CampaignWhereInput>
prize?: XOR<PrizeRelationFilter, PrizeWhereInput>
spin?: XOR<SpinRelationFilter, SpinWhereInput>
}
export type UserPrizeOrderByWithRelationInput = {
id?: SortOrder
userId?: SortOrder
campaignId?: SortOrder
prizeId?: SortOrder
spinId?: SortOrder
code?: SortOrderInput | SortOrder
status?: SortOrder
wonAt?: SortOrder
redeemedAt?: SortOrderInput | SortOrder
user?: UserOrderByWithRelationInput
campaign?: CampaignOrderByWithRelationInput
prize?: PrizeOrderByWithRelationInput
spin?: SpinOrderByWithRelationInput
}
export type UserPrizeWhereUniqueInput = Prisma.AtLeast<{
id?: string
spinId?: string
code?: string
AND?: UserPrizeWhereInput | UserPrizeWhereInput[]
OR?: UserPrizeWhereInput[]
NOT?: UserPrizeWhereInput | UserPrizeWhereInput[]
userId?: StringFilter<"UserPrize"> | string
campaignId?: StringFilter<"UserPrize"> | string
prizeId?: StringFilter<"UserPrize"> | string
status?: EnumUserPrizeStatusFilter<"UserPrize"> | $Enums.UserPrizeStatus
wonAt?: DateTimeFilter<"UserPrize"> | Date | string
redeemedAt?: DateTimeNullableFilter<"UserPrize"> | Date | string | null
user?: XOR<UserRelationFilter, UserWhereInput>
campaign?: XOR<CampaignRelationFilter, CampaignWhereInput>
prize?: XOR<PrizeRelationFilter, PrizeWhereInput>
spin?: XOR<SpinRelationFilter, SpinWhereInput>
}, "id" | "spinId" | "code">
export type UserPrizeOrderByWithAggregationInput = {
id?: SortOrder
userId?: SortOrder
campaignId?: SortOrder
prizeId?: SortOrder
spinId?: SortOrder
code?: SortOrderInput | SortOrder
status?: SortOrder
wonAt?: SortOrder
redeemedAt?: SortOrderInput | SortOrder
_count?: UserPrizeCountOrderByAggregateInput
_max?: UserPrizeMaxOrderByAggregateInput
_min?: UserPrizeMinOrderByAggregateInput
}
export type UserPrizeScalarWhereWithAggregatesInput = {
AND?: UserPrizeScalarWhereWithAggregatesInput | UserPrizeScalarWhereWithAggregatesInput[]
OR?: UserPrizeScalarWhereWithAggregatesInput[]
NOT?: UserPrizeScalarWhereWithAggregatesInput | UserPrizeScalarWhereWithAggregatesInput[]
id?: StringWithAggregatesFilter<"UserPrize"> | string
userId?: StringWithAggregatesFilter<"UserPrize"> | string
campaignId?: StringWithAggregatesFilter<"UserPrize"> | string
prizeId?: StringWithAggregatesFilter<"UserPrize"> | string
spinId?: StringWithAggregatesFilter<"UserPrize"> | string
code?: StringNullableWithAggregatesFilter<"UserPrize"> | string | null
status?: EnumUserPrizeStatusWithAggregatesFilter<"UserPrize"> | $Enums.UserPrizeStatus
wonAt?: DateTimeWithAggregatesFilter<"UserPrize"> | Date | string
redeemedAt?: DateTimeNullableWithAggregatesFilter<"UserPrize"> | Date | string | null
}
export type SmsLogWhereInput = {
AND?: SmsLogWhereInput | SmsLogWhereInput[]
OR?: SmsLogWhereInput[]
NOT?: SmsLogWhereInput | SmsLogWhereInput[]
id?: StringFilter<"SmsLog"> | string
userId?: StringNullableFilter<"SmsLog"> | string | null
mobile?: StringFilter<"SmsLog"> | string
type?: EnumSmsTypeFilter<"SmsLog"> | $Enums.SmsType
message?: StringFilter<"SmsLog"> | string
provider?: StringFilter<"SmsLog"> | string
status?: EnumSmsStatusFilter<"SmsLog"> | $Enums.SmsStatus
providerResponse?: JsonNullableFilter<"SmsLog">
createdAt?: DateTimeFilter<"SmsLog"> | Date | string
user?: XOR<UserNullableRelationFilter, UserWhereInput> | null
}
export type SmsLogOrderByWithRelationInput = {
id?: SortOrder
userId?: SortOrderInput | SortOrder
mobile?: SortOrder
type?: SortOrder
message?: SortOrder
provider?: SortOrder
status?: SortOrder
providerResponse?: SortOrderInput | SortOrder
createdAt?: SortOrder
user?: UserOrderByWithRelationInput
}
export type SmsLogWhereUniqueInput = Prisma.AtLeast<{
id?: string
AND?: SmsLogWhereInput | SmsLogWhereInput[]
OR?: SmsLogWhereInput[]
NOT?: SmsLogWhereInput | SmsLogWhereInput[]
userId?: StringNullableFilter<"SmsLog"> | string | null
mobile?: StringFilter<"SmsLog"> | string
type?: EnumSmsTypeFilter<"SmsLog"> | $Enums.SmsType
message?: StringFilter<"SmsLog"> | string
provider?: StringFilter<"SmsLog"> | string
status?: EnumSmsStatusFilter<"SmsLog"> | $Enums.SmsStatus
providerResponse?: JsonNullableFilter<"SmsLog">
createdAt?: DateTimeFilter<"SmsLog"> | Date | string
user?: XOR<UserNullableRelationFilter, UserWhereInput> | null
}, "id">
export type SmsLogOrderByWithAggregationInput = {
id?: SortOrder
userId?: SortOrderInput | SortOrder
mobile?: SortOrder
type?: SortOrder
message?: SortOrder
provider?: SortOrder
status?: SortOrder
providerResponse?: SortOrderInput | SortOrder
createdAt?: SortOrder
_count?: SmsLogCountOrderByAggregateInput
_max?: SmsLogMaxOrderByAggregateInput
_min?: SmsLogMinOrderByAggregateInput
}
export type SmsLogScalarWhereWithAggregatesInput = {
AND?: SmsLogScalarWhereWithAggregatesInput | SmsLogScalarWhereWithAggregatesInput[]
OR?: SmsLogScalarWhereWithAggregatesInput[]
NOT?: SmsLogScalarWhereWithAggregatesInput | SmsLogScalarWhereWithAggregatesInput[]
id?: StringWithAggregatesFilter<"SmsLog"> | string
userId?: StringNullableWithAggregatesFilter<"SmsLog"> | string | null
mobile?: StringWithAggregatesFilter<"SmsLog"> | string
type?: EnumSmsTypeWithAggregatesFilter<"SmsLog"> | $Enums.SmsType
message?: StringWithAggregatesFilter<"SmsLog"> | string
provider?: StringWithAggregatesFilter<"SmsLog"> | string
status?: EnumSmsStatusWithAggregatesFilter<"SmsLog"> | $Enums.SmsStatus
providerResponse?: JsonNullableWithAggregatesFilter<"SmsLog">
createdAt?: DateTimeWithAggregatesFilter<"SmsLog"> | Date | string
}
export type AdminLogWhereInput = {
AND?: AdminLogWhereInput | AdminLogWhereInput[]
OR?: AdminLogWhereInput[]
NOT?: AdminLogWhereInput | AdminLogWhereInput[]
id?: StringFilter<"AdminLog"> | string
adminId?: StringFilter<"AdminLog"> | string
action?: StringFilter<"AdminLog"> | string
entityType?: StringFilter<"AdminLog"> | string
entityId?: StringFilter<"AdminLog"> | string
oldValue?: JsonNullableFilter<"AdminLog">
newValue?: JsonNullableFilter<"AdminLog">
ip?: StringNullableFilter<"AdminLog"> | string | null
createdAt?: DateTimeFilter<"AdminLog"> | Date | string
admin?: XOR<AdminRelationFilter, AdminWhereInput>
}
export type AdminLogOrderByWithRelationInput = {
id?: SortOrder
adminId?: SortOrder
action?: SortOrder
entityType?: SortOrder
entityId?: SortOrder
oldValue?: SortOrderInput | SortOrder
newValue?: SortOrderInput | SortOrder
ip?: SortOrderInput | SortOrder
createdAt?: SortOrder
admin?: AdminOrderByWithRelationInput
}
export type AdminLogWhereUniqueInput = Prisma.AtLeast<{
id?: string
AND?: AdminLogWhereInput | AdminLogWhereInput[]
OR?: AdminLogWhereInput[]
NOT?: AdminLogWhereInput | AdminLogWhereInput[]
adminId?: StringFilter<"AdminLog"> | string
action?: StringFilter<"AdminLog"> | string
entityType?: StringFilter<"AdminLog"> | string
entityId?: StringFilter<"AdminLog"> | string
oldValue?: JsonNullableFilter<"AdminLog">
newValue?: JsonNullableFilter<"AdminLog">
ip?: StringNullableFilter<"AdminLog"> | string | null
createdAt?: DateTimeFilter<"AdminLog"> | Date | string
admin?: XOR<AdminRelationFilter, AdminWhereInput>
}, "id">
export type AdminLogOrderByWithAggregationInput = {
id?: SortOrder
adminId?: SortOrder
action?: SortOrder
entityType?: SortOrder
entityId?: SortOrder
oldValue?: SortOrderInput | SortOrder
newValue?: SortOrderInput | SortOrder
ip?: SortOrderInput | SortOrder
createdAt?: SortOrder
_count?: AdminLogCountOrderByAggregateInput
_max?: AdminLogMaxOrderByAggregateInput
_min?: AdminLogMinOrderByAggregateInput
}
export type AdminLogScalarWhereWithAggregatesInput = {
AND?: AdminLogScalarWhereWithAggregatesInput | AdminLogScalarWhereWithAggregatesInput[]
OR?: AdminLogScalarWhereWithAggregatesInput[]
NOT?: AdminLogScalarWhereWithAggregatesInput | AdminLogScalarWhereWithAggregatesInput[]
id?: StringWithAggregatesFilter<"AdminLog"> | string
adminId?: StringWithAggregatesFilter<"AdminLog"> | string
action?: StringWithAggregatesFilter<"AdminLog"> | string
entityType?: StringWithAggregatesFilter<"AdminLog"> | string
entityId?: StringWithAggregatesFilter<"AdminLog"> | string
oldValue?: JsonNullableWithAggregatesFilter<"AdminLog">
newValue?: JsonNullableWithAggregatesFilter<"AdminLog">
ip?: StringNullableWithAggregatesFilter<"AdminLog"> | string | null
createdAt?: DateTimeWithAggregatesFilter<"AdminLog"> | Date | string
}
export type AdminCreateInput = {
id?: string
name: string
mobile: string
email: string
passwordHash: string
role?: $Enums.AdminRole
status?: $Enums.AdminStatus
createdAt?: Date | string
updatedAt?: Date | string
auditLogs?: AdminLogCreateNestedManyWithoutAdminInput
chanceTxns?: ChanceTransactionCreateNestedManyWithoutCreatedByInput
}
export type AdminUncheckedCreateInput = {
id?: string
name: string
mobile: string
email: string
passwordHash: string
role?: $Enums.AdminRole
status?: $Enums.AdminStatus
createdAt?: Date | string
updatedAt?: Date | string
auditLogs?: AdminLogUncheckedCreateNestedManyWithoutAdminInput
chanceTxns?: ChanceTransactionUncheckedCreateNestedManyWithoutCreatedByInput
}
export type AdminUpdateInput = {
id?: StringFieldUpdateOperationsInput | string
name?: StringFieldUpdateOperationsInput | string
mobile?: StringFieldUpdateOperationsInput | string
email?: StringFieldUpdateOperationsInput | string
passwordHash?: StringFieldUpdateOperationsInput | string
role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole
status?: EnumAdminStatusFieldUpdateOperationsInput | $Enums.AdminStatus
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
auditLogs?: AdminLogUpdateManyWithoutAdminNestedInput
chanceTxns?: ChanceTransactionUpdateManyWithoutCreatedByNestedInput
}
export type AdminUncheckedUpdateInput = {
id?: StringFieldUpdateOperationsInput | string
name?: StringFieldUpdateOperationsInput | string
mobile?: StringFieldUpdateOperationsInput | string
email?: StringFieldUpdateOperationsInput | string
passwordHash?: StringFieldUpdateOperationsInput | string
role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole
status?: EnumAdminStatusFieldUpdateOperationsInput | $Enums.AdminStatus
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
auditLogs?: AdminLogUncheckedUpdateManyWithoutAdminNestedInput
chanceTxns?: ChanceTransactionUncheckedUpdateManyWithoutCreatedByNestedInput
}
export type AdminCreateManyInput = {
id?: string
name: string
mobile: string
email: string
passwordHash: string
role?: $Enums.AdminRole
status?: $Enums.AdminStatus
createdAt?: Date | string
updatedAt?: Date | string
}
export type AdminUpdateManyMutationInput = {
id?: StringFieldUpdateOperationsInput | string
name?: StringFieldUpdateOperationsInput | string
mobile?: StringFieldUpdateOperationsInput | string
email?: StringFieldUpdateOperationsInput | string
passwordHash?: StringFieldUpdateOperationsInput | string
role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole
status?: EnumAdminStatusFieldUpdateOperationsInput | $Enums.AdminStatus
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type AdminUncheckedUpdateManyInput = {
id?: StringFieldUpdateOperationsInput | string
name?: StringFieldUpdateOperationsInput | string
mobile?: StringFieldUpdateOperationsInput | string
email?: StringFieldUpdateOperationsInput | string
passwordHash?: StringFieldUpdateOperationsInput | string
role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole
status?: EnumAdminStatusFieldUpdateOperationsInput | $Enums.AdminStatus
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type UserCreateInput = {
id?: string
mobile: string
name?: string | null
status?: $Enums.UserStatus
lastLoginAt?: Date | string | null
createdAt?: Date | string
updatedAt?: Date | string
userCampaigns?: UserCampaignCreateNestedManyWithoutUserInput
chanceTransactions?: ChanceTransactionCreateNestedManyWithoutUserInput
spins?: SpinCreateNestedManyWithoutUserInput
userPrizes?: UserPrizeCreateNestedManyWithoutUserInput
otpCodes?: OtpCodeCreateNestedManyWithoutUserInput
smsLogs?: SmsLogCreateNestedManyWithoutUserInput
}
export type UserUncheckedCreateInput = {
id?: string
mobile: string
name?: string | null
status?: $Enums.UserStatus
lastLoginAt?: Date | string | null
createdAt?: Date | string
updatedAt?: Date | string
userCampaigns?: UserCampaignUncheckedCreateNestedManyWithoutUserInput
chanceTransactions?: ChanceTransactionUncheckedCreateNestedManyWithoutUserInput
spins?: SpinUncheckedCreateNestedManyWithoutUserInput
userPrizes?: UserPrizeUncheckedCreateNestedManyWithoutUserInput
otpCodes?: OtpCodeUncheckedCreateNestedManyWithoutUserInput
smsLogs?: SmsLogUncheckedCreateNestedManyWithoutUserInput
}
export type UserUpdateInput = {
id?: StringFieldUpdateOperationsInput | string
mobile?: StringFieldUpdateOperationsInput | string
name?: NullableStringFieldUpdateOperationsInput | string | null
status?: EnumUserStatusFieldUpdateOperationsInput | $Enums.UserStatus
lastLoginAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
userCampaigns?: UserCampaignUpdateManyWithoutUserNestedInput
chanceTransactions?: ChanceTransactionUpdateManyWithoutUserNestedInput
spins?: SpinUpdateManyWithoutUserNestedInput
userPrizes?: UserPrizeUpdateManyWithoutUserNestedInput
otpCodes?: OtpCodeUpdateManyWithoutUserNestedInput
smsLogs?: SmsLogUpdateManyWithoutUserNestedInput
}
export type UserUncheckedUpdateInput = {
id?: StringFieldUpdateOperationsInput | string
mobile?: StringFieldUpdateOperationsInput | string
name?: NullableStringFieldUpdateOperationsInput | string | null
status?: EnumUserStatusFieldUpdateOperationsInput | $Enums.UserStatus
lastLoginAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
userCampaigns?: UserCampaignUncheckedUpdateManyWithoutUserNestedInput
chanceTransactions?: ChanceTransactionUncheckedUpdateManyWithoutUserNestedInput
spins?: SpinUncheckedUpdateManyWithoutUserNestedInput
userPrizes?: UserPrizeUncheckedUpdateManyWithoutUserNestedInput
otpCodes?: OtpCodeUncheckedUpdateManyWithoutUserNestedInput
smsLogs?: SmsLogUncheckedUpdateManyWithoutUserNestedInput
}
export type UserCreateManyInput = {
id?: string
mobile: string
name?: string | null
status?: $Enums.UserStatus
lastLoginAt?: Date | string | null
createdAt?: Date | string
updatedAt?: Date | string
}
export type UserUpdateManyMutationInput = {
id?: StringFieldUpdateOperationsInput | string
mobile?: StringFieldUpdateOperationsInput | string
name?: NullableStringFieldUpdateOperationsInput | string | null
status?: EnumUserStatusFieldUpdateOperationsInput | $Enums.UserStatus
lastLoginAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type UserUncheckedUpdateManyInput = {
id?: StringFieldUpdateOperationsInput | string
mobile?: StringFieldUpdateOperationsInput | string
name?: NullableStringFieldUpdateOperationsInput | string | null
status?: EnumUserStatusFieldUpdateOperationsInput | $Enums.UserStatus
lastLoginAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type OtpCodeCreateInput = {
id?: string
mobile: string
code: string
attempts?: number
consumed?: boolean
expiresAt: Date | string
createdAt?: Date | string
user?: UserCreateNestedOneWithoutOtpCodesInput
}
export type OtpCodeUncheckedCreateInput = {
id?: string
mobile: string
code: string
userId?: string | null
attempts?: number
consumed?: boolean
expiresAt: Date | string
createdAt?: Date | string
}
export type OtpCodeUpdateInput = {
id?: StringFieldUpdateOperationsInput | string
mobile?: StringFieldUpdateOperationsInput | string
code?: StringFieldUpdateOperationsInput | string
attempts?: IntFieldUpdateOperationsInput | number
consumed?: BoolFieldUpdateOperationsInput | boolean
expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
user?: UserUpdateOneWithoutOtpCodesNestedInput
}
export type OtpCodeUncheckedUpdateInput = {
id?: StringFieldUpdateOperationsInput | string
mobile?: StringFieldUpdateOperationsInput | string
code?: StringFieldUpdateOperationsInput | string
userId?: NullableStringFieldUpdateOperationsInput | string | null
attempts?: IntFieldUpdateOperationsInput | number
consumed?: BoolFieldUpdateOperationsInput | boolean
expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type OtpCodeCreateManyInput = {
id?: string
mobile: string
code: string
userId?: string | null
attempts?: number
consumed?: boolean
expiresAt: Date | string
createdAt?: Date | string
}
export type OtpCodeUpdateManyMutationInput = {
id?: StringFieldUpdateOperationsInput | string
mobile?: StringFieldUpdateOperationsInput | string
code?: StringFieldUpdateOperationsInput | string
attempts?: IntFieldUpdateOperationsInput | number
consumed?: BoolFieldUpdateOperationsInput | boolean
expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type OtpCodeUncheckedUpdateManyInput = {
id?: StringFieldUpdateOperationsInput | string
mobile?: StringFieldUpdateOperationsInput | string
code?: StringFieldUpdateOperationsInput | string
userId?: NullableStringFieldUpdateOperationsInput | string | null
attempts?: IntFieldUpdateOperationsInput | number
consumed?: BoolFieldUpdateOperationsInput | boolean
expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type CampaignCreateInput = {
id?: string
title: string
slug: string
description?: string | null
image?: string | null
banner?: string | null
logo?: string | null
startAt: Date | string
endAt: Date | string
status?: $Enums.CampaignStatus
defaultChances?: number
rules?: string | null
ctaText?: string | null
wheelDesign?: $Enums.WheelDesign
settings?: NullableJsonNullValueInput | InputJsonValue
createdAt?: Date | string
updatedAt?: Date | string
prizes?: PrizeCreateNestedManyWithoutCampaignInput
userCampaigns?: UserCampaignCreateNestedManyWithoutCampaignInput
chanceTxns?: ChanceTransactionCreateNestedManyWithoutCampaignInput
spins?: SpinCreateNestedManyWithoutCampaignInput
userPrizes?: UserPrizeCreateNestedManyWithoutCampaignInput
}
export type CampaignUncheckedCreateInput = {
id?: string
title: string
slug: string
description?: string | null
image?: string | null
banner?: string | null
logo?: string | null
startAt: Date | string
endAt: Date | string
status?: $Enums.CampaignStatus
defaultChances?: number
rules?: string | null
ctaText?: string | null
wheelDesign?: $Enums.WheelDesign
settings?: NullableJsonNullValueInput | InputJsonValue
createdAt?: Date | string
updatedAt?: Date | string
prizes?: PrizeUncheckedCreateNestedManyWithoutCampaignInput
userCampaigns?: UserCampaignUncheckedCreateNestedManyWithoutCampaignInput
chanceTxns?: ChanceTransactionUncheckedCreateNestedManyWithoutCampaignInput
spins?: SpinUncheckedCreateNestedManyWithoutCampaignInput
userPrizes?: UserPrizeUncheckedCreateNestedManyWithoutCampaignInput
}
export type CampaignUpdateInput = {
id?: StringFieldUpdateOperationsInput | string
title?: StringFieldUpdateOperationsInput | string
slug?: StringFieldUpdateOperationsInput | string
description?: NullableStringFieldUpdateOperationsInput | string | null
image?: NullableStringFieldUpdateOperationsInput | string | null
banner?: NullableStringFieldUpdateOperationsInput | string | null
logo?: NullableStringFieldUpdateOperationsInput | string | null
startAt?: DateTimeFieldUpdateOperationsInput | Date | string
endAt?: DateTimeFieldUpdateOperationsInput | Date | string
status?: EnumCampaignStatusFieldUpdateOperationsInput | $Enums.CampaignStatus
defaultChances?: IntFieldUpdateOperationsInput | number
rules?: NullableStringFieldUpdateOperationsInput | string | null
ctaText?: NullableStringFieldUpdateOperationsInput | string | null
wheelDesign?: EnumWheelDesignFieldUpdateOperationsInput | $Enums.WheelDesign
settings?: NullableJsonNullValueInput | InputJsonValue
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
prizes?: PrizeUpdateManyWithoutCampaignNestedInput
userCampaigns?: UserCampaignUpdateManyWithoutCampaignNestedInput
chanceTxns?: ChanceTransactionUpdateManyWithoutCampaignNestedInput
spins?: SpinUpdateManyWithoutCampaignNestedInput
userPrizes?: UserPrizeUpdateManyWithoutCampaignNestedInput
}
export type CampaignUncheckedUpdateInput = {
id?: StringFieldUpdateOperationsInput | string
title?: StringFieldUpdateOperationsInput | string
slug?: StringFieldUpdateOperationsInput | string
description?: NullableStringFieldUpdateOperationsInput | string | null
image?: NullableStringFieldUpdateOperationsInput | string | null
banner?: NullableStringFieldUpdateOperationsInput | string | null
logo?: NullableStringFieldUpdateOperationsInput | string | null
startAt?: DateTimeFieldUpdateOperationsInput | Date | string
endAt?: DateTimeFieldUpdateOperationsInput | Date | string
status?: EnumCampaignStatusFieldUpdateOperationsInput | $Enums.CampaignStatus
defaultChances?: IntFieldUpdateOperationsInput | number
rules?: NullableStringFieldUpdateOperationsInput | string | null
ctaText?: NullableStringFieldUpdateOperationsInput | string | null
wheelDesign?: EnumWheelDesignFieldUpdateOperationsInput | $Enums.WheelDesign
settings?: NullableJsonNullValueInput | InputJsonValue
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
prizes?: PrizeUncheckedUpdateManyWithoutCampaignNestedInput
userCampaigns?: UserCampaignUncheckedUpdateManyWithoutCampaignNestedInput
chanceTxns?: ChanceTransactionUncheckedUpdateManyWithoutCampaignNestedInput
spins?: SpinUncheckedUpdateManyWithoutCampaignNestedInput
userPrizes?: UserPrizeUncheckedUpdateManyWithoutCampaignNestedInput
}
export type CampaignCreateManyInput = {
id?: string
title: string
slug: string
description?: string | null
image?: string | null
banner?: string | null
logo?: string | null
startAt: Date | string
endAt: Date | string
status?: $Enums.CampaignStatus
defaultChances?: number
rules?: string | null
ctaText?: string | null
wheelDesign?: $Enums.WheelDesign
settings?: NullableJsonNullValueInput | InputJsonValue
createdAt?: Date | string
updatedAt?: Date | string
}
export type CampaignUpdateManyMutationInput = {
id?: StringFieldUpdateOperationsInput | string
title?: StringFieldUpdateOperationsInput | string
slug?: StringFieldUpdateOperationsInput | string
description?: NullableStringFieldUpdateOperationsInput | string | null
image?: NullableStringFieldUpdateOperationsInput | string | null
banner?: NullableStringFieldUpdateOperationsInput | string | null
logo?: NullableStringFieldUpdateOperationsInput | string | null
startAt?: DateTimeFieldUpdateOperationsInput | Date | string
endAt?: DateTimeFieldUpdateOperationsInput | Date | string
status?: EnumCampaignStatusFieldUpdateOperationsInput | $Enums.CampaignStatus
defaultChances?: IntFieldUpdateOperationsInput | number
rules?: NullableStringFieldUpdateOperationsInput | string | null
ctaText?: NullableStringFieldUpdateOperationsInput | string | null
wheelDesign?: EnumWheelDesignFieldUpdateOperationsInput | $Enums.WheelDesign
settings?: NullableJsonNullValueInput | InputJsonValue
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type CampaignUncheckedUpdateManyInput = {
id?: StringFieldUpdateOperationsInput | string
title?: StringFieldUpdateOperationsInput | string
slug?: StringFieldUpdateOperationsInput | string
description?: NullableStringFieldUpdateOperationsInput | string | null
image?: NullableStringFieldUpdateOperationsInput | string | null
banner?: NullableStringFieldUpdateOperationsInput | string | null
logo?: NullableStringFieldUpdateOperationsInput | string | null
startAt?: DateTimeFieldUpdateOperationsInput | Date | string
endAt?: DateTimeFieldUpdateOperationsInput | Date | string
status?: EnumCampaignStatusFieldUpdateOperationsInput | $Enums.CampaignStatus
defaultChances?: IntFieldUpdateOperationsInput | number
rules?: NullableStringFieldUpdateOperationsInput | string | null
ctaText?: NullableStringFieldUpdateOperationsInput | string | null
wheelDesign?: EnumWheelDesignFieldUpdateOperationsInput | $Enums.WheelDesign
settings?: NullableJsonNullValueInput | InputJsonValue
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type PrizeCreateInput = {
id?: string
title: string
description?: string | null
image?: string | null
type: $Enums.PrizeType
stockType: $Enums.StockType
initialStock?: number | null
remainingStock?: number | null
weight: number
status?: $Enums.PrizeStatus
sortOrder?: number
segmentColor: string
expiresAt?: Date | string | null
smsTemplate?: string | null
createdAt?: Date | string
updatedAt?: Date | string
campaign: CampaignCreateNestedOneWithoutPrizesInput
spins?: SpinCreateNestedManyWithoutPrizeInput
userPrizes?: UserPrizeCreateNestedManyWithoutPrizeInput
}
export type PrizeUncheckedCreateInput = {
id?: string
campaignId: string
title: string
description?: string | null
image?: string | null
type: $Enums.PrizeType
stockType: $Enums.StockType
initialStock?: number | null
remainingStock?: number | null
weight: number
status?: $Enums.PrizeStatus
sortOrder?: number
segmentColor: string
expiresAt?: Date | string | null
smsTemplate?: string | null
createdAt?: Date | string
updatedAt?: Date | string
spins?: SpinUncheckedCreateNestedManyWithoutPrizeInput
userPrizes?: UserPrizeUncheckedCreateNestedManyWithoutPrizeInput
}
export type PrizeUpdateInput = {
id?: StringFieldUpdateOperationsInput | string
title?: StringFieldUpdateOperationsInput | string
description?: NullableStringFieldUpdateOperationsInput | string | null
image?: NullableStringFieldUpdateOperationsInput | string | null
type?: EnumPrizeTypeFieldUpdateOperationsInput | $Enums.PrizeType
stockType?: EnumStockTypeFieldUpdateOperationsInput | $Enums.StockType
initialStock?: NullableIntFieldUpdateOperationsInput | number | null
remainingStock?: NullableIntFieldUpdateOperationsInput | number | null
weight?: IntFieldUpdateOperationsInput | number
status?: EnumPrizeStatusFieldUpdateOperationsInput | $Enums.PrizeStatus
sortOrder?: IntFieldUpdateOperationsInput | number
segmentColor?: StringFieldUpdateOperationsInput | string
expiresAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
smsTemplate?: NullableStringFieldUpdateOperationsInput | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
campaign?: CampaignUpdateOneRequiredWithoutPrizesNestedInput
spins?: SpinUpdateManyWithoutPrizeNestedInput
userPrizes?: UserPrizeUpdateManyWithoutPrizeNestedInput
}
export type PrizeUncheckedUpdateInput = {
id?: StringFieldUpdateOperationsInput | string
campaignId?: StringFieldUpdateOperationsInput | string
title?: StringFieldUpdateOperationsInput | string
description?: NullableStringFieldUpdateOperationsInput | string | null
image?: NullableStringFieldUpdateOperationsInput | string | null
type?: EnumPrizeTypeFieldUpdateOperationsInput | $Enums.PrizeType
stockType?: EnumStockTypeFieldUpdateOperationsInput | $Enums.StockType
initialStock?: NullableIntFieldUpdateOperationsInput | number | null
remainingStock?: NullableIntFieldUpdateOperationsInput | number | null
weight?: IntFieldUpdateOperationsInput | number
status?: EnumPrizeStatusFieldUpdateOperationsInput | $Enums.PrizeStatus
sortOrder?: IntFieldUpdateOperationsInput | number
segmentColor?: StringFieldUpdateOperationsInput | string
expiresAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
smsTemplate?: NullableStringFieldUpdateOperationsInput | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
spins?: SpinUncheckedUpdateManyWithoutPrizeNestedInput
userPrizes?: UserPrizeUncheckedUpdateManyWithoutPrizeNestedInput
}
export type PrizeCreateManyInput = {
id?: string
campaignId: string
title: string
description?: string | null
image?: string | null
type: $Enums.PrizeType
stockType: $Enums.StockType
initialStock?: number | null
remainingStock?: number | null
weight: number
status?: $Enums.PrizeStatus
sortOrder?: number
segmentColor: string
expiresAt?: Date | string | null
smsTemplate?: string | null
createdAt?: Date | string
updatedAt?: Date | string
}
export type PrizeUpdateManyMutationInput = {
id?: StringFieldUpdateOperationsInput | string
title?: StringFieldUpdateOperationsInput | string
description?: NullableStringFieldUpdateOperationsInput | string | null
image?: NullableStringFieldUpdateOperationsInput | string | null
type?: EnumPrizeTypeFieldUpdateOperationsInput | $Enums.PrizeType
stockType?: EnumStockTypeFieldUpdateOperationsInput | $Enums.StockType
initialStock?: NullableIntFieldUpdateOperationsInput | number | null
remainingStock?: NullableIntFieldUpdateOperationsInput | number | null
weight?: IntFieldUpdateOperationsInput | number
status?: EnumPrizeStatusFieldUpdateOperationsInput | $Enums.PrizeStatus
sortOrder?: IntFieldUpdateOperationsInput | number
segmentColor?: StringFieldUpdateOperationsInput | string
expiresAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
smsTemplate?: NullableStringFieldUpdateOperationsInput | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type PrizeUncheckedUpdateManyInput = {
id?: StringFieldUpdateOperationsInput | string
campaignId?: StringFieldUpdateOperationsInput | string
title?: StringFieldUpdateOperationsInput | string
description?: NullableStringFieldUpdateOperationsInput | string | null
image?: NullableStringFieldUpdateOperationsInput | string | null
type?: EnumPrizeTypeFieldUpdateOperationsInput | $Enums.PrizeType
stockType?: EnumStockTypeFieldUpdateOperationsInput | $Enums.StockType
initialStock?: NullableIntFieldUpdateOperationsInput | number | null
remainingStock?: NullableIntFieldUpdateOperationsInput | number | null
weight?: IntFieldUpdateOperationsInput | number
status?: EnumPrizeStatusFieldUpdateOperationsInput | $Enums.PrizeStatus
sortOrder?: IntFieldUpdateOperationsInput | number
segmentColor?: StringFieldUpdateOperationsInput | string
expiresAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
smsTemplate?: NullableStringFieldUpdateOperationsInput | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type UserCampaignCreateInput = {
id?: string
totalChances?: number
usedChances?: number
createdAt?: Date | string
updatedAt?: Date | string
user: UserCreateNestedOneWithoutUserCampaignsInput
campaign: CampaignCreateNestedOneWithoutUserCampaignsInput
}
export type UserCampaignUncheckedCreateInput = {
id?: string
userId: string
campaignId: string
totalChances?: number
usedChances?: number
createdAt?: Date | string
updatedAt?: Date | string
}
export type UserCampaignUpdateInput = {
id?: StringFieldUpdateOperationsInput | string
totalChances?: IntFieldUpdateOperationsInput | number
usedChances?: IntFieldUpdateOperationsInput | number
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
user?: UserUpdateOneRequiredWithoutUserCampaignsNestedInput
campaign?: CampaignUpdateOneRequiredWithoutUserCampaignsNestedInput
}
export type UserCampaignUncheckedUpdateInput = {
id?: StringFieldUpdateOperationsInput | string
userId?: StringFieldUpdateOperationsInput | string
campaignId?: StringFieldUpdateOperationsInput | string
totalChances?: IntFieldUpdateOperationsInput | number
usedChances?: IntFieldUpdateOperationsInput | number
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type UserCampaignCreateManyInput = {
id?: string
userId: string
campaignId: string
totalChances?: number
usedChances?: number
createdAt?: Date | string
updatedAt?: Date | string
}
export type UserCampaignUpdateManyMutationInput = {
id?: StringFieldUpdateOperationsInput | string
totalChances?: IntFieldUpdateOperationsInput | number
usedChances?: IntFieldUpdateOperationsInput | number
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type UserCampaignUncheckedUpdateManyInput = {
id?: StringFieldUpdateOperationsInput | string
userId?: StringFieldUpdateOperationsInput | string
campaignId?: StringFieldUpdateOperationsInput | string
totalChances?: IntFieldUpdateOperationsInput | number
usedChances?: IntFieldUpdateOperationsInput | number
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type ChanceTransactionCreateInput = {
id?: string
amount: number
type: $Enums.ChanceTxnType
referenceType?: string | null
referenceId?: string | null
description?: string | null
createdAt?: Date | string
user: UserCreateNestedOneWithoutChanceTransactionsInput
campaign: CampaignCreateNestedOneWithoutChanceTxnsInput
createdBy?: AdminCreateNestedOneWithoutChanceTxnsInput
}
export type ChanceTransactionUncheckedCreateInput = {
id?: string
userId: string
campaignId: string
amount: number
type: $Enums.ChanceTxnType
referenceType?: string | null
referenceId?: string | null
description?: string | null
createdById?: string | null
createdAt?: Date | string
}
export type ChanceTransactionUpdateInput = {
id?: StringFieldUpdateOperationsInput | string
amount?: IntFieldUpdateOperationsInput | number
type?: EnumChanceTxnTypeFieldUpdateOperationsInput | $Enums.ChanceTxnType
referenceType?: NullableStringFieldUpdateOperationsInput | string | null
referenceId?: NullableStringFieldUpdateOperationsInput | string | null
description?: NullableStringFieldUpdateOperationsInput | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
user?: UserUpdateOneRequiredWithoutChanceTransactionsNestedInput
campaign?: CampaignUpdateOneRequiredWithoutChanceTxnsNestedInput
createdBy?: AdminUpdateOneWithoutChanceTxnsNestedInput
}
export type ChanceTransactionUncheckedUpdateInput = {
id?: StringFieldUpdateOperationsInput | string
userId?: StringFieldUpdateOperationsInput | string
campaignId?: StringFieldUpdateOperationsInput | string
amount?: IntFieldUpdateOperationsInput | number
type?: EnumChanceTxnTypeFieldUpdateOperationsInput | $Enums.ChanceTxnType
referenceType?: NullableStringFieldUpdateOperationsInput | string | null
referenceId?: NullableStringFieldUpdateOperationsInput | string | null
description?: NullableStringFieldUpdateOperationsInput | string | null
createdById?: NullableStringFieldUpdateOperationsInput | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type ChanceTransactionCreateManyInput = {
id?: string
userId: string
campaignId: string
amount: number
type: $Enums.ChanceTxnType
referenceType?: string | null
referenceId?: string | null
description?: string | null
createdById?: string | null
createdAt?: Date | string
}
export type ChanceTransactionUpdateManyMutationInput = {
id?: StringFieldUpdateOperationsInput | string
amount?: IntFieldUpdateOperationsInput | number
type?: EnumChanceTxnTypeFieldUpdateOperationsInput | $Enums.ChanceTxnType
referenceType?: NullableStringFieldUpdateOperationsInput | string | null
referenceId?: NullableStringFieldUpdateOperationsInput | string | null
description?: NullableStringFieldUpdateOperationsInput | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type ChanceTransactionUncheckedUpdateManyInput = {
id?: StringFieldUpdateOperationsInput | string
userId?: StringFieldUpdateOperationsInput | string
campaignId?: StringFieldUpdateOperationsInput | string
amount?: IntFieldUpdateOperationsInput | number
type?: EnumChanceTxnTypeFieldUpdateOperationsInput | $Enums.ChanceTxnType
referenceType?: NullableStringFieldUpdateOperationsInput | string | null
referenceId?: NullableStringFieldUpdateOperationsInput | string | null
description?: NullableStringFieldUpdateOperationsInput | string | null
createdById?: NullableStringFieldUpdateOperationsInput | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type SpinCreateInput = {
id?: string
status?: $Enums.SpinStatus
idempotencyKey: string
ip?: string | null
userAgent?: string | null
createdAt?: Date | string
user: UserCreateNestedOneWithoutSpinsInput
campaign: CampaignCreateNestedOneWithoutSpinsInput
prize?: PrizeCreateNestedOneWithoutSpinsInput
userPrize?: UserPrizeCreateNestedOneWithoutSpinInput
}
export type SpinUncheckedCreateInput = {
id?: string
userId: string
campaignId: string
prizeId?: string | null
status?: $Enums.SpinStatus
idempotencyKey: string
ip?: string | null
userAgent?: string | null
createdAt?: Date | string
userPrize?: UserPrizeUncheckedCreateNestedOneWithoutSpinInput
}
export type SpinUpdateInput = {
id?: StringFieldUpdateOperationsInput | string
status?: EnumSpinStatusFieldUpdateOperationsInput | $Enums.SpinStatus
idempotencyKey?: StringFieldUpdateOperationsInput | string
ip?: NullableStringFieldUpdateOperationsInput | string | null
userAgent?: NullableStringFieldUpdateOperationsInput | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
user?: UserUpdateOneRequiredWithoutSpinsNestedInput
campaign?: CampaignUpdateOneRequiredWithoutSpinsNestedInput
prize?: PrizeUpdateOneWithoutSpinsNestedInput
userPrize?: UserPrizeUpdateOneWithoutSpinNestedInput
}
export type SpinUncheckedUpdateInput = {
id?: StringFieldUpdateOperationsInput | string
userId?: StringFieldUpdateOperationsInput | string
campaignId?: StringFieldUpdateOperationsInput | string
prizeId?: NullableStringFieldUpdateOperationsInput | string | null
status?: EnumSpinStatusFieldUpdateOperationsInput | $Enums.SpinStatus
idempotencyKey?: StringFieldUpdateOperationsInput | string
ip?: NullableStringFieldUpdateOperationsInput | string | null
userAgent?: NullableStringFieldUpdateOperationsInput | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
userPrize?: UserPrizeUncheckedUpdateOneWithoutSpinNestedInput
}
export type SpinCreateManyInput = {
id?: string
userId: string
campaignId: string
prizeId?: string | null
status?: $Enums.SpinStatus
idempotencyKey: string
ip?: string | null
userAgent?: string | null
createdAt?: Date | string
}
export type SpinUpdateManyMutationInput = {
id?: StringFieldUpdateOperationsInput | string
status?: EnumSpinStatusFieldUpdateOperationsInput | $Enums.SpinStatus
idempotencyKey?: StringFieldUpdateOperationsInput | string
ip?: NullableStringFieldUpdateOperationsInput | string | null
userAgent?: NullableStringFieldUpdateOperationsInput | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type SpinUncheckedUpdateManyInput = {
id?: StringFieldUpdateOperationsInput | string
userId?: StringFieldUpdateOperationsInput | string
campaignId?: StringFieldUpdateOperationsInput | string
prizeId?: NullableStringFieldUpdateOperationsInput | string | null
status?: EnumSpinStatusFieldUpdateOperationsInput | $Enums.SpinStatus
idempotencyKey?: StringFieldUpdateOperationsInput | string
ip?: NullableStringFieldUpdateOperationsInput | string | null
userAgent?: NullableStringFieldUpdateOperationsInput | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type UserPrizeCreateInput = {
id?: string
code?: string | null
status?: $Enums.UserPrizeStatus
wonAt?: Date | string
redeemedAt?: Date | string | null
user: UserCreateNestedOneWithoutUserPrizesInput
campaign: CampaignCreateNestedOneWithoutUserPrizesInput
prize: PrizeCreateNestedOneWithoutUserPrizesInput
spin: SpinCreateNestedOneWithoutUserPrizeInput
}
export type UserPrizeUncheckedCreateInput = {
id?: string
userId: string
campaignId: string
prizeId: string
spinId: string
code?: string | null
status?: $Enums.UserPrizeStatus
wonAt?: Date | string
redeemedAt?: Date | string | null
}
export type UserPrizeUpdateInput = {
id?: StringFieldUpdateOperationsInput | string
code?: NullableStringFieldUpdateOperationsInput | string | null
status?: EnumUserPrizeStatusFieldUpdateOperationsInput | $Enums.UserPrizeStatus
wonAt?: DateTimeFieldUpdateOperationsInput | Date | string
redeemedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
user?: UserUpdateOneRequiredWithoutUserPrizesNestedInput
campaign?: CampaignUpdateOneRequiredWithoutUserPrizesNestedInput
prize?: PrizeUpdateOneRequiredWithoutUserPrizesNestedInput
spin?: SpinUpdateOneRequiredWithoutUserPrizeNestedInput
}
export type UserPrizeUncheckedUpdateInput = {
id?: StringFieldUpdateOperationsInput | string
userId?: StringFieldUpdateOperationsInput | string
campaignId?: StringFieldUpdateOperationsInput | string
prizeId?: StringFieldUpdateOperationsInput | string
spinId?: StringFieldUpdateOperationsInput | string
code?: NullableStringFieldUpdateOperationsInput | string | null
status?: EnumUserPrizeStatusFieldUpdateOperationsInput | $Enums.UserPrizeStatus
wonAt?: DateTimeFieldUpdateOperationsInput | Date | string
redeemedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
}
export type UserPrizeCreateManyInput = {
id?: string
userId: string
campaignId: string
prizeId: string
spinId: string
code?: string | null
status?: $Enums.UserPrizeStatus
wonAt?: Date | string
redeemedAt?: Date | string | null
}
export type UserPrizeUpdateManyMutationInput = {
id?: StringFieldUpdateOperationsInput | string
code?: NullableStringFieldUpdateOperationsInput | string | null
status?: EnumUserPrizeStatusFieldUpdateOperationsInput | $Enums.UserPrizeStatus
wonAt?: DateTimeFieldUpdateOperationsInput | Date | string
redeemedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
}
export type UserPrizeUncheckedUpdateManyInput = {
id?: StringFieldUpdateOperationsInput | string
userId?: StringFieldUpdateOperationsInput | string
campaignId?: StringFieldUpdateOperationsInput | string
prizeId?: StringFieldUpdateOperationsInput | string
spinId?: StringFieldUpdateOperationsInput | string
code?: NullableStringFieldUpdateOperationsInput | string | null
status?: EnumUserPrizeStatusFieldUpdateOperationsInput | $Enums.UserPrizeStatus
wonAt?: DateTimeFieldUpdateOperationsInput | Date | string
redeemedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
}
export type SmsLogCreateInput = {
id?: string
mobile: string
type: $Enums.SmsType
message: string
provider?: string
status?: $Enums.SmsStatus
providerResponse?: NullableJsonNullValueInput | InputJsonValue
createdAt?: Date | string
user?: UserCreateNestedOneWithoutSmsLogsInput
}
export type SmsLogUncheckedCreateInput = {
id?: string
userId?: string | null
mobile: string
type: $Enums.SmsType
message: string
provider?: string
status?: $Enums.SmsStatus
providerResponse?: NullableJsonNullValueInput | InputJsonValue
createdAt?: Date | string
}
export type SmsLogUpdateInput = {
id?: StringFieldUpdateOperationsInput | string
mobile?: StringFieldUpdateOperationsInput | string
type?: EnumSmsTypeFieldUpdateOperationsInput | $Enums.SmsType
message?: StringFieldUpdateOperationsInput | string
provider?: StringFieldUpdateOperationsInput | string
status?: EnumSmsStatusFieldUpdateOperationsInput | $Enums.SmsStatus
providerResponse?: NullableJsonNullValueInput | InputJsonValue
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
user?: UserUpdateOneWithoutSmsLogsNestedInput
}
export type SmsLogUncheckedUpdateInput = {
id?: StringFieldUpdateOperationsInput | string
userId?: NullableStringFieldUpdateOperationsInput | string | null
mobile?: StringFieldUpdateOperationsInput | string
type?: EnumSmsTypeFieldUpdateOperationsInput | $Enums.SmsType
message?: StringFieldUpdateOperationsInput | string
provider?: StringFieldUpdateOperationsInput | string
status?: EnumSmsStatusFieldUpdateOperationsInput | $Enums.SmsStatus
providerResponse?: NullableJsonNullValueInput | InputJsonValue
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type SmsLogCreateManyInput = {
id?: string
userId?: string | null
mobile: string
type: $Enums.SmsType
message: string
provider?: string
status?: $Enums.SmsStatus
providerResponse?: NullableJsonNullValueInput | InputJsonValue
createdAt?: Date | string
}
export type SmsLogUpdateManyMutationInput = {
id?: StringFieldUpdateOperationsInput | string
mobile?: StringFieldUpdateOperationsInput | string
type?: EnumSmsTypeFieldUpdateOperationsInput | $Enums.SmsType
message?: StringFieldUpdateOperationsInput | string
provider?: StringFieldUpdateOperationsInput | string
status?: EnumSmsStatusFieldUpdateOperationsInput | $Enums.SmsStatus
providerResponse?: NullableJsonNullValueInput | InputJsonValue
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type SmsLogUncheckedUpdateManyInput = {
id?: StringFieldUpdateOperationsInput | string
userId?: NullableStringFieldUpdateOperationsInput | string | null
mobile?: StringFieldUpdateOperationsInput | string
type?: EnumSmsTypeFieldUpdateOperationsInput | $Enums.SmsType
message?: StringFieldUpdateOperationsInput | string
provider?: StringFieldUpdateOperationsInput | string
status?: EnumSmsStatusFieldUpdateOperationsInput | $Enums.SmsStatus
providerResponse?: NullableJsonNullValueInput | InputJsonValue
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type AdminLogCreateInput = {
id?: string
action: string
entityType: string
entityId: string
oldValue?: NullableJsonNullValueInput | InputJsonValue
newValue?: NullableJsonNullValueInput | InputJsonValue
ip?: string | null
createdAt?: Date | string
admin: AdminCreateNestedOneWithoutAuditLogsInput
}
export type AdminLogUncheckedCreateInput = {
id?: string
adminId: string
action: string
entityType: string
entityId: string
oldValue?: NullableJsonNullValueInput | InputJsonValue
newValue?: NullableJsonNullValueInput | InputJsonValue
ip?: string | null
createdAt?: Date | string
}
export type AdminLogUpdateInput = {
id?: StringFieldUpdateOperationsInput | string
action?: StringFieldUpdateOperationsInput | string
entityType?: StringFieldUpdateOperationsInput | string
entityId?: StringFieldUpdateOperationsInput | string
oldValue?: NullableJsonNullValueInput | InputJsonValue
newValue?: NullableJsonNullValueInput | InputJsonValue
ip?: NullableStringFieldUpdateOperationsInput | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
admin?: AdminUpdateOneRequiredWithoutAuditLogsNestedInput
}
export type AdminLogUncheckedUpdateInput = {
id?: StringFieldUpdateOperationsInput | string
adminId?: StringFieldUpdateOperationsInput | string
action?: StringFieldUpdateOperationsInput | string
entityType?: StringFieldUpdateOperationsInput | string
entityId?: StringFieldUpdateOperationsInput | string
oldValue?: NullableJsonNullValueInput | InputJsonValue
newValue?: NullableJsonNullValueInput | InputJsonValue
ip?: NullableStringFieldUpdateOperationsInput | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type AdminLogCreateManyInput = {
id?: string
adminId: string
action: string
entityType: string
entityId: string
oldValue?: NullableJsonNullValueInput | InputJsonValue
newValue?: NullableJsonNullValueInput | InputJsonValue
ip?: string | null
createdAt?: Date | string
}
export type AdminLogUpdateManyMutationInput = {
id?: StringFieldUpdateOperationsInput | string
action?: StringFieldUpdateOperationsInput | string
entityType?: StringFieldUpdateOperationsInput | string
entityId?: StringFieldUpdateOperationsInput | string
oldValue?: NullableJsonNullValueInput | InputJsonValue
newValue?: NullableJsonNullValueInput | InputJsonValue
ip?: NullableStringFieldUpdateOperationsInput | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type AdminLogUncheckedUpdateManyInput = {
id?: StringFieldUpdateOperationsInput | string
adminId?: StringFieldUpdateOperationsInput | string
action?: StringFieldUpdateOperationsInput | string
entityType?: StringFieldUpdateOperationsInput | string
entityId?: StringFieldUpdateOperationsInput | string
oldValue?: NullableJsonNullValueInput | InputJsonValue
newValue?: NullableJsonNullValueInput | InputJsonValue
ip?: NullableStringFieldUpdateOperationsInput | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type StringFilter<$PrismaModel = never> = {
equals?: string | StringFieldRefInput<$PrismaModel>
in?: string[] | ListStringFieldRefInput<$PrismaModel>
notIn?: string[] | ListStringFieldRefInput<$PrismaModel>
lt?: string | StringFieldRefInput<$PrismaModel>
lte?: string | StringFieldRefInput<$PrismaModel>
gt?: string | StringFieldRefInput<$PrismaModel>
gte?: string | StringFieldRefInput<$PrismaModel>
contains?: string | StringFieldRefInput<$PrismaModel>
startsWith?: string | StringFieldRefInput<$PrismaModel>
endsWith?: string | StringFieldRefInput<$PrismaModel>
mode?: QueryMode
not?: NestedStringFilter<$PrismaModel> | string
}
export type EnumAdminRoleFilter<$PrismaModel = never> = {
equals?: $Enums.AdminRole | EnumAdminRoleFieldRefInput<$PrismaModel>
in?: $Enums.AdminRole[] | ListEnumAdminRoleFieldRefInput<$PrismaModel>
notIn?: $Enums.AdminRole[] | ListEnumAdminRoleFieldRefInput<$PrismaModel>
not?: NestedEnumAdminRoleFilter<$PrismaModel> | $Enums.AdminRole
}
export type EnumAdminStatusFilter<$PrismaModel = never> = {
equals?: $Enums.AdminStatus | EnumAdminStatusFieldRefInput<$PrismaModel>
in?: $Enums.AdminStatus[] | ListEnumAdminStatusFieldRefInput<$PrismaModel>
notIn?: $Enums.AdminStatus[] | ListEnumAdminStatusFieldRefInput<$PrismaModel>
not?: NestedEnumAdminStatusFilter<$PrismaModel> | $Enums.AdminStatus
}
export type DateTimeFilter<$PrismaModel = never> = {
equals?: Date | string | DateTimeFieldRefInput<$PrismaModel>
in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel>
notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel>
lt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
lte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
gt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
gte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
not?: NestedDateTimeFilter<$PrismaModel> | Date | string
}
export type AdminLogListRelationFilter = {
every?: AdminLogWhereInput
some?: AdminLogWhereInput
none?: AdminLogWhereInput
}
export type ChanceTransactionListRelationFilter = {
every?: ChanceTransactionWhereInput
some?: ChanceTransactionWhereInput
none?: ChanceTransactionWhereInput
}
export type AdminLogOrderByRelationAggregateInput = {
_count?: SortOrder
}
export type ChanceTransactionOrderByRelationAggregateInput = {
_count?: SortOrder
}
export type AdminCountOrderByAggregateInput = {
id?: SortOrder
name?: SortOrder
mobile?: SortOrder
email?: SortOrder
passwordHash?: SortOrder
role?: SortOrder
status?: SortOrder
createdAt?: SortOrder
updatedAt?: SortOrder
}
export type AdminMaxOrderByAggregateInput = {
id?: SortOrder
name?: SortOrder
mobile?: SortOrder
email?: SortOrder
passwordHash?: SortOrder
role?: SortOrder
status?: SortOrder
createdAt?: SortOrder
updatedAt?: SortOrder
}
export type AdminMinOrderByAggregateInput = {
id?: SortOrder
name?: SortOrder
mobile?: SortOrder
email?: SortOrder
passwordHash?: SortOrder
role?: SortOrder
status?: SortOrder
createdAt?: SortOrder
updatedAt?: SortOrder
}
export type StringWithAggregatesFilter<$PrismaModel = never> = {
equals?: string | StringFieldRefInput<$PrismaModel>
in?: string[] | ListStringFieldRefInput<$PrismaModel>
notIn?: string[] | ListStringFieldRefInput<$PrismaModel>
lt?: string | StringFieldRefInput<$PrismaModel>
lte?: string | StringFieldRefInput<$PrismaModel>
gt?: string | StringFieldRefInput<$PrismaModel>
gte?: string | StringFieldRefInput<$PrismaModel>
contains?: string | StringFieldRefInput<$PrismaModel>
startsWith?: string | StringFieldRefInput<$PrismaModel>
endsWith?: string | StringFieldRefInput<$PrismaModel>
mode?: QueryMode
not?: NestedStringWithAggregatesFilter<$PrismaModel> | string
_count?: NestedIntFilter<$PrismaModel>
_min?: NestedStringFilter<$PrismaModel>
_max?: NestedStringFilter<$PrismaModel>
}
export type EnumAdminRoleWithAggregatesFilter<$PrismaModel = never> = {
equals?: $Enums.AdminRole | EnumAdminRoleFieldRefInput<$PrismaModel>
in?: $Enums.AdminRole[] | ListEnumAdminRoleFieldRefInput<$PrismaModel>
notIn?: $Enums.AdminRole[] | ListEnumAdminRoleFieldRefInput<$PrismaModel>
not?: NestedEnumAdminRoleWithAggregatesFilter<$PrismaModel> | $Enums.AdminRole
_count?: NestedIntFilter<$PrismaModel>
_min?: NestedEnumAdminRoleFilter<$PrismaModel>
_max?: NestedEnumAdminRoleFilter<$PrismaModel>
}
export type EnumAdminStatusWithAggregatesFilter<$PrismaModel = never> = {
equals?: $Enums.AdminStatus | EnumAdminStatusFieldRefInput<$PrismaModel>
in?: $Enums.AdminStatus[] | ListEnumAdminStatusFieldRefInput<$PrismaModel>
notIn?: $Enums.AdminStatus[] | ListEnumAdminStatusFieldRefInput<$PrismaModel>
not?: NestedEnumAdminStatusWithAggregatesFilter<$PrismaModel> | $Enums.AdminStatus
_count?: NestedIntFilter<$PrismaModel>
_min?: NestedEnumAdminStatusFilter<$PrismaModel>
_max?: NestedEnumAdminStatusFilter<$PrismaModel>
}
export type DateTimeWithAggregatesFilter<$PrismaModel = never> = {
equals?: Date | string | DateTimeFieldRefInput<$PrismaModel>
in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel>
notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel>
lt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
lte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
gt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
gte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
not?: NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string
_count?: NestedIntFilter<$PrismaModel>
_min?: NestedDateTimeFilter<$PrismaModel>
_max?: NestedDateTimeFilter<$PrismaModel>
}
export type StringNullableFilter<$PrismaModel = never> = {
equals?: string | StringFieldRefInput<$PrismaModel> | null
in?: string[] | ListStringFieldRefInput<$PrismaModel> | null
notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null
lt?: string | StringFieldRefInput<$PrismaModel>
lte?: string | StringFieldRefInput<$PrismaModel>
gt?: string | StringFieldRefInput<$PrismaModel>
gte?: string | StringFieldRefInput<$PrismaModel>
contains?: string | StringFieldRefInput<$PrismaModel>
startsWith?: string | StringFieldRefInput<$PrismaModel>
endsWith?: string | StringFieldRefInput<$PrismaModel>
mode?: QueryMode
not?: NestedStringNullableFilter<$PrismaModel> | string | null
}
export type EnumUserStatusFilter<$PrismaModel = never> = {
equals?: $Enums.UserStatus | EnumUserStatusFieldRefInput<$PrismaModel>
in?: $Enums.UserStatus[] | ListEnumUserStatusFieldRefInput<$PrismaModel>
notIn?: $Enums.UserStatus[] | ListEnumUserStatusFieldRefInput<$PrismaModel>
not?: NestedEnumUserStatusFilter<$PrismaModel> | $Enums.UserStatus
}
export type DateTimeNullableFilter<$PrismaModel = never> = {
equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null
in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null
notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null
lt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
lte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
gt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
gte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
not?: NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null
}
export type UserCampaignListRelationFilter = {
every?: UserCampaignWhereInput
some?: UserCampaignWhereInput
none?: UserCampaignWhereInput
}
export type SpinListRelationFilter = {
every?: SpinWhereInput
some?: SpinWhereInput
none?: SpinWhereInput
}
export type UserPrizeListRelationFilter = {
every?: UserPrizeWhereInput
some?: UserPrizeWhereInput
none?: UserPrizeWhereInput
}
export type OtpCodeListRelationFilter = {
every?: OtpCodeWhereInput
some?: OtpCodeWhereInput
none?: OtpCodeWhereInput
}
export type SmsLogListRelationFilter = {
every?: SmsLogWhereInput
some?: SmsLogWhereInput
none?: SmsLogWhereInput
}
export type SortOrderInput = {
sort: SortOrder
nulls?: NullsOrder
}
export type UserCampaignOrderByRelationAggregateInput = {
_count?: SortOrder
}
export type SpinOrderByRelationAggregateInput = {
_count?: SortOrder
}
export type UserPrizeOrderByRelationAggregateInput = {
_count?: SortOrder
}
export type OtpCodeOrderByRelationAggregateInput = {
_count?: SortOrder
}
export type SmsLogOrderByRelationAggregateInput = {
_count?: SortOrder
}
export type UserCountOrderByAggregateInput = {
id?: SortOrder
mobile?: SortOrder
name?: SortOrder
status?: SortOrder
lastLoginAt?: SortOrder
createdAt?: SortOrder
updatedAt?: SortOrder
}
export type UserMaxOrderByAggregateInput = {
id?: SortOrder
mobile?: SortOrder
name?: SortOrder
status?: SortOrder
lastLoginAt?: SortOrder
createdAt?: SortOrder
updatedAt?: SortOrder
}
export type UserMinOrderByAggregateInput = {
id?: SortOrder
mobile?: SortOrder
name?: SortOrder
status?: SortOrder
lastLoginAt?: SortOrder
createdAt?: SortOrder
updatedAt?: SortOrder
}
export type StringNullableWithAggregatesFilter<$PrismaModel = never> = {
equals?: string | StringFieldRefInput<$PrismaModel> | null
in?: string[] | ListStringFieldRefInput<$PrismaModel> | null
notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null
lt?: string | StringFieldRefInput<$PrismaModel>
lte?: string | StringFieldRefInput<$PrismaModel>
gt?: string | StringFieldRefInput<$PrismaModel>
gte?: string | StringFieldRefInput<$PrismaModel>
contains?: string | StringFieldRefInput<$PrismaModel>
startsWith?: string | StringFieldRefInput<$PrismaModel>
endsWith?: string | StringFieldRefInput<$PrismaModel>
mode?: QueryMode
not?: NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null
_count?: NestedIntNullableFilter<$PrismaModel>
_min?: NestedStringNullableFilter<$PrismaModel>
_max?: NestedStringNullableFilter<$PrismaModel>
}
export type EnumUserStatusWithAggregatesFilter<$PrismaModel = never> = {
equals?: $Enums.UserStatus | EnumUserStatusFieldRefInput<$PrismaModel>
in?: $Enums.UserStatus[] | ListEnumUserStatusFieldRefInput<$PrismaModel>
notIn?: $Enums.UserStatus[] | ListEnumUserStatusFieldRefInput<$PrismaModel>
not?: NestedEnumUserStatusWithAggregatesFilter<$PrismaModel> | $Enums.UserStatus
_count?: NestedIntFilter<$PrismaModel>
_min?: NestedEnumUserStatusFilter<$PrismaModel>
_max?: NestedEnumUserStatusFilter<$PrismaModel>
}
export type DateTimeNullableWithAggregatesFilter<$PrismaModel = never> = {
equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null
in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null
notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null
lt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
lte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
gt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
gte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
not?: NestedDateTimeNullableWithAggregatesFilter<$PrismaModel> | Date | string | null
_count?: NestedIntNullableFilter<$PrismaModel>
_min?: NestedDateTimeNullableFilter<$PrismaModel>
_max?: NestedDateTimeNullableFilter<$PrismaModel>
}
export type IntFilter<$PrismaModel = never> = {
equals?: number | IntFieldRefInput<$PrismaModel>
in?: number[] | ListIntFieldRefInput<$PrismaModel>
notIn?: number[] | ListIntFieldRefInput<$PrismaModel>
lt?: number | IntFieldRefInput<$PrismaModel>
lte?: number | IntFieldRefInput<$PrismaModel>
gt?: number | IntFieldRefInput<$PrismaModel>
gte?: number | IntFieldRefInput<$PrismaModel>
not?: NestedIntFilter<$PrismaModel> | number
}
export type BoolFilter<$PrismaModel = never> = {
equals?: boolean | BooleanFieldRefInput<$PrismaModel>
not?: NestedBoolFilter<$PrismaModel> | boolean
}
export type UserNullableRelationFilter = {
is?: UserWhereInput | null
isNot?: UserWhereInput | null
}
export type OtpCodeCountOrderByAggregateInput = {
id?: SortOrder
mobile?: SortOrder
code?: SortOrder
userId?: SortOrder
attempts?: SortOrder
consumed?: SortOrder
expiresAt?: SortOrder
createdAt?: SortOrder
}
export type OtpCodeAvgOrderByAggregateInput = {
attempts?: SortOrder
}
export type OtpCodeMaxOrderByAggregateInput = {
id?: SortOrder
mobile?: SortOrder
code?: SortOrder
userId?: SortOrder
attempts?: SortOrder
consumed?: SortOrder
expiresAt?: SortOrder
createdAt?: SortOrder
}
export type OtpCodeMinOrderByAggregateInput = {
id?: SortOrder
mobile?: SortOrder
code?: SortOrder
userId?: SortOrder
attempts?: SortOrder
consumed?: SortOrder
expiresAt?: SortOrder
createdAt?: SortOrder
}
export type OtpCodeSumOrderByAggregateInput = {
attempts?: SortOrder
}
export type IntWithAggregatesFilter<$PrismaModel = never> = {
equals?: number | IntFieldRefInput<$PrismaModel>
in?: number[] | ListIntFieldRefInput<$PrismaModel>
notIn?: number[] | ListIntFieldRefInput<$PrismaModel>
lt?: number | IntFieldRefInput<$PrismaModel>
lte?: number | IntFieldRefInput<$PrismaModel>
gt?: number | IntFieldRefInput<$PrismaModel>
gte?: number | IntFieldRefInput<$PrismaModel>
not?: NestedIntWithAggregatesFilter<$PrismaModel> | number
_count?: NestedIntFilter<$PrismaModel>
_avg?: NestedFloatFilter<$PrismaModel>
_sum?: NestedIntFilter<$PrismaModel>
_min?: NestedIntFilter<$PrismaModel>
_max?: NestedIntFilter<$PrismaModel>
}
export type BoolWithAggregatesFilter<$PrismaModel = never> = {
equals?: boolean | BooleanFieldRefInput<$PrismaModel>
not?: NestedBoolWithAggregatesFilter<$PrismaModel> | boolean
_count?: NestedIntFilter<$PrismaModel>
_min?: NestedBoolFilter<$PrismaModel>
_max?: NestedBoolFilter<$PrismaModel>
}
export type EnumCampaignStatusFilter<$PrismaModel = never> = {
equals?: $Enums.CampaignStatus | EnumCampaignStatusFieldRefInput<$PrismaModel>
in?: $Enums.CampaignStatus[] | ListEnumCampaignStatusFieldRefInput<$PrismaModel>
notIn?: $Enums.CampaignStatus[] | ListEnumCampaignStatusFieldRefInput<$PrismaModel>
not?: NestedEnumCampaignStatusFilter<$PrismaModel> | $Enums.CampaignStatus
}
export type EnumWheelDesignFilter<$PrismaModel = never> = {
equals?: $Enums.WheelDesign | EnumWheelDesignFieldRefInput<$PrismaModel>
in?: $Enums.WheelDesign[] | ListEnumWheelDesignFieldRefInput<$PrismaModel>
notIn?: $Enums.WheelDesign[] | ListEnumWheelDesignFieldRefInput<$PrismaModel>
not?: NestedEnumWheelDesignFilter<$PrismaModel> | $Enums.WheelDesign
}
export type JsonNullableFilter<$PrismaModel = never> =
| PatchUndefined<
Either<Required<JsonNullableFilterBase<$PrismaModel>>, Exclude<keyof Required<JsonNullableFilterBase<$PrismaModel>>, 'path'>>,
Required<JsonNullableFilterBase<$PrismaModel>>
>
| OptionalFlat<Omit<Required<JsonNullableFilterBase<$PrismaModel>>, 'path'>>
export type JsonNullableFilterBase<$PrismaModel = never> = {
equals?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
path?: string[]
string_contains?: string | StringFieldRefInput<$PrismaModel>
string_starts_with?: string | StringFieldRefInput<$PrismaModel>
string_ends_with?: string | StringFieldRefInput<$PrismaModel>
array_contains?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
array_starts_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
array_ends_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
lt?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
lte?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
gt?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
gte?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
not?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
}
export type PrizeListRelationFilter = {
every?: PrizeWhereInput
some?: PrizeWhereInput
none?: PrizeWhereInput
}
export type PrizeOrderByRelationAggregateInput = {
_count?: SortOrder
}
export type CampaignCountOrderByAggregateInput = {
id?: SortOrder
title?: SortOrder
slug?: SortOrder
description?: SortOrder
image?: SortOrder
banner?: SortOrder
logo?: SortOrder
startAt?: SortOrder
endAt?: SortOrder
status?: SortOrder
defaultChances?: SortOrder
rules?: SortOrder
ctaText?: SortOrder
wheelDesign?: SortOrder
settings?: SortOrder
createdAt?: SortOrder
updatedAt?: SortOrder
}
export type CampaignAvgOrderByAggregateInput = {
defaultChances?: SortOrder
}
export type CampaignMaxOrderByAggregateInput = {
id?: SortOrder
title?: SortOrder
slug?: SortOrder
description?: SortOrder
image?: SortOrder
banner?: SortOrder
logo?: SortOrder
startAt?: SortOrder
endAt?: SortOrder
status?: SortOrder
defaultChances?: SortOrder
rules?: SortOrder
ctaText?: SortOrder
wheelDesign?: SortOrder
createdAt?: SortOrder
updatedAt?: SortOrder
}
export type CampaignMinOrderByAggregateInput = {
id?: SortOrder
title?: SortOrder
slug?: SortOrder
description?: SortOrder
image?: SortOrder
banner?: SortOrder
logo?: SortOrder
startAt?: SortOrder
endAt?: SortOrder
status?: SortOrder
defaultChances?: SortOrder
rules?: SortOrder
ctaText?: SortOrder
wheelDesign?: SortOrder
createdAt?: SortOrder
updatedAt?: SortOrder
}
export type CampaignSumOrderByAggregateInput = {
defaultChances?: SortOrder
}
export type EnumCampaignStatusWithAggregatesFilter<$PrismaModel = never> = {
equals?: $Enums.CampaignStatus | EnumCampaignStatusFieldRefInput<$PrismaModel>
in?: $Enums.CampaignStatus[] | ListEnumCampaignStatusFieldRefInput<$PrismaModel>
notIn?: $Enums.CampaignStatus[] | ListEnumCampaignStatusFieldRefInput<$PrismaModel>
not?: NestedEnumCampaignStatusWithAggregatesFilter<$PrismaModel> | $Enums.CampaignStatus
_count?: NestedIntFilter<$PrismaModel>
_min?: NestedEnumCampaignStatusFilter<$PrismaModel>
_max?: NestedEnumCampaignStatusFilter<$PrismaModel>
}
export type EnumWheelDesignWithAggregatesFilter<$PrismaModel = never> = {
equals?: $Enums.WheelDesign | EnumWheelDesignFieldRefInput<$PrismaModel>
in?: $Enums.WheelDesign[] | ListEnumWheelDesignFieldRefInput<$PrismaModel>
notIn?: $Enums.WheelDesign[] | ListEnumWheelDesignFieldRefInput<$PrismaModel>
not?: NestedEnumWheelDesignWithAggregatesFilter<$PrismaModel> | $Enums.WheelDesign
_count?: NestedIntFilter<$PrismaModel>
_min?: NestedEnumWheelDesignFilter<$PrismaModel>
_max?: NestedEnumWheelDesignFilter<$PrismaModel>
}
export type JsonNullableWithAggregatesFilter<$PrismaModel = never> =
| PatchUndefined<
Either<Required<JsonNullableWithAggregatesFilterBase<$PrismaModel>>, Exclude<keyof Required<JsonNullableWithAggregatesFilterBase<$PrismaModel>>, 'path'>>,
Required<JsonNullableWithAggregatesFilterBase<$PrismaModel>>
>
| OptionalFlat<Omit<Required<JsonNullableWithAggregatesFilterBase<$PrismaModel>>, 'path'>>
export type JsonNullableWithAggregatesFilterBase<$PrismaModel = never> = {
equals?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
path?: string[]
string_contains?: string | StringFieldRefInput<$PrismaModel>
string_starts_with?: string | StringFieldRefInput<$PrismaModel>
string_ends_with?: string | StringFieldRefInput<$PrismaModel>
array_contains?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
array_starts_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
array_ends_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
lt?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
lte?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
gt?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
gte?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
not?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
_count?: NestedIntNullableFilter<$PrismaModel>
_min?: NestedJsonNullableFilter<$PrismaModel>
_max?: NestedJsonNullableFilter<$PrismaModel>
}
export type EnumPrizeTypeFilter<$PrismaModel = never> = {
equals?: $Enums.PrizeType | EnumPrizeTypeFieldRefInput<$PrismaModel>
in?: $Enums.PrizeType[] | ListEnumPrizeTypeFieldRefInput<$PrismaModel>
notIn?: $Enums.PrizeType[] | ListEnumPrizeTypeFieldRefInput<$PrismaModel>
not?: NestedEnumPrizeTypeFilter<$PrismaModel> | $Enums.PrizeType
}
export type EnumStockTypeFilter<$PrismaModel = never> = {
equals?: $Enums.StockType | EnumStockTypeFieldRefInput<$PrismaModel>
in?: $Enums.StockType[] | ListEnumStockTypeFieldRefInput<$PrismaModel>
notIn?: $Enums.StockType[] | ListEnumStockTypeFieldRefInput<$PrismaModel>
not?: NestedEnumStockTypeFilter<$PrismaModel> | $Enums.StockType
}
export type IntNullableFilter<$PrismaModel = never> = {
equals?: number | IntFieldRefInput<$PrismaModel> | null
in?: number[] | ListIntFieldRefInput<$PrismaModel> | null
notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null
lt?: number | IntFieldRefInput<$PrismaModel>
lte?: number | IntFieldRefInput<$PrismaModel>
gt?: number | IntFieldRefInput<$PrismaModel>
gte?: number | IntFieldRefInput<$PrismaModel>
not?: NestedIntNullableFilter<$PrismaModel> | number | null
}
export type EnumPrizeStatusFilter<$PrismaModel = never> = {
equals?: $Enums.PrizeStatus | EnumPrizeStatusFieldRefInput<$PrismaModel>
in?: $Enums.PrizeStatus[] | ListEnumPrizeStatusFieldRefInput<$PrismaModel>
notIn?: $Enums.PrizeStatus[] | ListEnumPrizeStatusFieldRefInput<$PrismaModel>
not?: NestedEnumPrizeStatusFilter<$PrismaModel> | $Enums.PrizeStatus
}
export type CampaignRelationFilter = {
is?: CampaignWhereInput
isNot?: CampaignWhereInput
}
export type PrizeCountOrderByAggregateInput = {
id?: SortOrder
campaignId?: SortOrder
title?: SortOrder
description?: SortOrder
image?: SortOrder
type?: SortOrder
stockType?: SortOrder
initialStock?: SortOrder
remainingStock?: SortOrder
weight?: SortOrder
status?: SortOrder
sortOrder?: SortOrder
segmentColor?: SortOrder
expiresAt?: SortOrder
smsTemplate?: SortOrder
createdAt?: SortOrder
updatedAt?: SortOrder
}
export type PrizeAvgOrderByAggregateInput = {
initialStock?: SortOrder
remainingStock?: SortOrder
weight?: SortOrder
sortOrder?: SortOrder
}
export type PrizeMaxOrderByAggregateInput = {
id?: SortOrder
campaignId?: SortOrder
title?: SortOrder
description?: SortOrder
image?: SortOrder
type?: SortOrder
stockType?: SortOrder
initialStock?: SortOrder
remainingStock?: SortOrder
weight?: SortOrder
status?: SortOrder
sortOrder?: SortOrder
segmentColor?: SortOrder
expiresAt?: SortOrder
smsTemplate?: SortOrder
createdAt?: SortOrder
updatedAt?: SortOrder
}
export type PrizeMinOrderByAggregateInput = {
id?: SortOrder
campaignId?: SortOrder
title?: SortOrder
description?: SortOrder
image?: SortOrder
type?: SortOrder
stockType?: SortOrder
initialStock?: SortOrder
remainingStock?: SortOrder
weight?: SortOrder
status?: SortOrder
sortOrder?: SortOrder
segmentColor?: SortOrder
expiresAt?: SortOrder
smsTemplate?: SortOrder
createdAt?: SortOrder
updatedAt?: SortOrder
}
export type PrizeSumOrderByAggregateInput = {
initialStock?: SortOrder
remainingStock?: SortOrder
weight?: SortOrder
sortOrder?: SortOrder
}
export type EnumPrizeTypeWithAggregatesFilter<$PrismaModel = never> = {
equals?: $Enums.PrizeType | EnumPrizeTypeFieldRefInput<$PrismaModel>
in?: $Enums.PrizeType[] | ListEnumPrizeTypeFieldRefInput<$PrismaModel>
notIn?: $Enums.PrizeType[] | ListEnumPrizeTypeFieldRefInput<$PrismaModel>
not?: NestedEnumPrizeTypeWithAggregatesFilter<$PrismaModel> | $Enums.PrizeType
_count?: NestedIntFilter<$PrismaModel>
_min?: NestedEnumPrizeTypeFilter<$PrismaModel>
_max?: NestedEnumPrizeTypeFilter<$PrismaModel>
}
export type EnumStockTypeWithAggregatesFilter<$PrismaModel = never> = {
equals?: $Enums.StockType | EnumStockTypeFieldRefInput<$PrismaModel>
in?: $Enums.StockType[] | ListEnumStockTypeFieldRefInput<$PrismaModel>
notIn?: $Enums.StockType[] | ListEnumStockTypeFieldRefInput<$PrismaModel>
not?: NestedEnumStockTypeWithAggregatesFilter<$PrismaModel> | $Enums.StockType
_count?: NestedIntFilter<$PrismaModel>
_min?: NestedEnumStockTypeFilter<$PrismaModel>
_max?: NestedEnumStockTypeFilter<$PrismaModel>
}
export type IntNullableWithAggregatesFilter<$PrismaModel = never> = {
equals?: number | IntFieldRefInput<$PrismaModel> | null
in?: number[] | ListIntFieldRefInput<$PrismaModel> | null
notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null
lt?: number | IntFieldRefInput<$PrismaModel>
lte?: number | IntFieldRefInput<$PrismaModel>
gt?: number | IntFieldRefInput<$PrismaModel>
gte?: number | IntFieldRefInput<$PrismaModel>
not?: NestedIntNullableWithAggregatesFilter<$PrismaModel> | number | null
_count?: NestedIntNullableFilter<$PrismaModel>
_avg?: NestedFloatNullableFilter<$PrismaModel>
_sum?: NestedIntNullableFilter<$PrismaModel>
_min?: NestedIntNullableFilter<$PrismaModel>
_max?: NestedIntNullableFilter<$PrismaModel>
}
export type EnumPrizeStatusWithAggregatesFilter<$PrismaModel = never> = {
equals?: $Enums.PrizeStatus | EnumPrizeStatusFieldRefInput<$PrismaModel>
in?: $Enums.PrizeStatus[] | ListEnumPrizeStatusFieldRefInput<$PrismaModel>
notIn?: $Enums.PrizeStatus[] | ListEnumPrizeStatusFieldRefInput<$PrismaModel>
not?: NestedEnumPrizeStatusWithAggregatesFilter<$PrismaModel> | $Enums.PrizeStatus
_count?: NestedIntFilter<$PrismaModel>
_min?: NestedEnumPrizeStatusFilter<$PrismaModel>
_max?: NestedEnumPrizeStatusFilter<$PrismaModel>
}
export type UserRelationFilter = {
is?: UserWhereInput
isNot?: UserWhereInput
}
export type UserCampaignUserIdCampaignIdCompoundUniqueInput = {
userId: string
campaignId: string
}
export type UserCampaignCountOrderByAggregateInput = {
id?: SortOrder
userId?: SortOrder
campaignId?: SortOrder
totalChances?: SortOrder
usedChances?: SortOrder
createdAt?: SortOrder
updatedAt?: SortOrder
}
export type UserCampaignAvgOrderByAggregateInput = {
totalChances?: SortOrder
usedChances?: SortOrder
}
export type UserCampaignMaxOrderByAggregateInput = {
id?: SortOrder
userId?: SortOrder
campaignId?: SortOrder
totalChances?: SortOrder
usedChances?: SortOrder
createdAt?: SortOrder
updatedAt?: SortOrder
}
export type UserCampaignMinOrderByAggregateInput = {
id?: SortOrder
userId?: SortOrder
campaignId?: SortOrder
totalChances?: SortOrder
usedChances?: SortOrder
createdAt?: SortOrder
updatedAt?: SortOrder
}
export type UserCampaignSumOrderByAggregateInput = {
totalChances?: SortOrder
usedChances?: SortOrder
}
export type EnumChanceTxnTypeFilter<$PrismaModel = never> = {
equals?: $Enums.ChanceTxnType | EnumChanceTxnTypeFieldRefInput<$PrismaModel>
in?: $Enums.ChanceTxnType[] | ListEnumChanceTxnTypeFieldRefInput<$PrismaModel>
notIn?: $Enums.ChanceTxnType[] | ListEnumChanceTxnTypeFieldRefInput<$PrismaModel>
not?: NestedEnumChanceTxnTypeFilter<$PrismaModel> | $Enums.ChanceTxnType
}
export type AdminNullableRelationFilter = {
is?: AdminWhereInput | null
isNot?: AdminWhereInput | null
}
export type ChanceTransactionCountOrderByAggregateInput = {
id?: SortOrder
userId?: SortOrder
campaignId?: SortOrder
amount?: SortOrder
type?: SortOrder
referenceType?: SortOrder
referenceId?: SortOrder
description?: SortOrder
createdById?: SortOrder
createdAt?: SortOrder
}
export type ChanceTransactionAvgOrderByAggregateInput = {
amount?: SortOrder
}
export type ChanceTransactionMaxOrderByAggregateInput = {
id?: SortOrder
userId?: SortOrder
campaignId?: SortOrder
amount?: SortOrder
type?: SortOrder
referenceType?: SortOrder
referenceId?: SortOrder
description?: SortOrder
createdById?: SortOrder
createdAt?: SortOrder
}
export type ChanceTransactionMinOrderByAggregateInput = {
id?: SortOrder
userId?: SortOrder
campaignId?: SortOrder
amount?: SortOrder
type?: SortOrder
referenceType?: SortOrder
referenceId?: SortOrder
description?: SortOrder
createdById?: SortOrder
createdAt?: SortOrder
}
export type ChanceTransactionSumOrderByAggregateInput = {
amount?: SortOrder
}
export type EnumChanceTxnTypeWithAggregatesFilter<$PrismaModel = never> = {
equals?: $Enums.ChanceTxnType | EnumChanceTxnTypeFieldRefInput<$PrismaModel>
in?: $Enums.ChanceTxnType[] | ListEnumChanceTxnTypeFieldRefInput<$PrismaModel>
notIn?: $Enums.ChanceTxnType[] | ListEnumChanceTxnTypeFieldRefInput<$PrismaModel>
not?: NestedEnumChanceTxnTypeWithAggregatesFilter<$PrismaModel> | $Enums.ChanceTxnType
_count?: NestedIntFilter<$PrismaModel>
_min?: NestedEnumChanceTxnTypeFilter<$PrismaModel>
_max?: NestedEnumChanceTxnTypeFilter<$PrismaModel>
}
export type EnumSpinStatusFilter<$PrismaModel = never> = {
equals?: $Enums.SpinStatus | EnumSpinStatusFieldRefInput<$PrismaModel>
in?: $Enums.SpinStatus[] | ListEnumSpinStatusFieldRefInput<$PrismaModel>
notIn?: $Enums.SpinStatus[] | ListEnumSpinStatusFieldRefInput<$PrismaModel>
not?: NestedEnumSpinStatusFilter<$PrismaModel> | $Enums.SpinStatus
}
export type PrizeNullableRelationFilter = {
is?: PrizeWhereInput | null
isNot?: PrizeWhereInput | null
}
export type UserPrizeNullableRelationFilter = {
is?: UserPrizeWhereInput | null
isNot?: UserPrizeWhereInput | null
}
export type SpinCountOrderByAggregateInput = {
id?: SortOrder
userId?: SortOrder
campaignId?: SortOrder
prizeId?: SortOrder
status?: SortOrder
idempotencyKey?: SortOrder
ip?: SortOrder
userAgent?: SortOrder
createdAt?: SortOrder
}
export type SpinMaxOrderByAggregateInput = {
id?: SortOrder
userId?: SortOrder
campaignId?: SortOrder
prizeId?: SortOrder
status?: SortOrder
idempotencyKey?: SortOrder
ip?: SortOrder
userAgent?: SortOrder
createdAt?: SortOrder
}
export type SpinMinOrderByAggregateInput = {
id?: SortOrder
userId?: SortOrder
campaignId?: SortOrder
prizeId?: SortOrder
status?: SortOrder
idempotencyKey?: SortOrder
ip?: SortOrder
userAgent?: SortOrder
createdAt?: SortOrder
}
export type EnumSpinStatusWithAggregatesFilter<$PrismaModel = never> = {
equals?: $Enums.SpinStatus | EnumSpinStatusFieldRefInput<$PrismaModel>
in?: $Enums.SpinStatus[] | ListEnumSpinStatusFieldRefInput<$PrismaModel>
notIn?: $Enums.SpinStatus[] | ListEnumSpinStatusFieldRefInput<$PrismaModel>
not?: NestedEnumSpinStatusWithAggregatesFilter<$PrismaModel> | $Enums.SpinStatus
_count?: NestedIntFilter<$PrismaModel>
_min?: NestedEnumSpinStatusFilter<$PrismaModel>
_max?: NestedEnumSpinStatusFilter<$PrismaModel>
}
export type EnumUserPrizeStatusFilter<$PrismaModel = never> = {
equals?: $Enums.UserPrizeStatus | EnumUserPrizeStatusFieldRefInput<$PrismaModel>
in?: $Enums.UserPrizeStatus[] | ListEnumUserPrizeStatusFieldRefInput<$PrismaModel>
notIn?: $Enums.UserPrizeStatus[] | ListEnumUserPrizeStatusFieldRefInput<$PrismaModel>
not?: NestedEnumUserPrizeStatusFilter<$PrismaModel> | $Enums.UserPrizeStatus
}
export type PrizeRelationFilter = {
is?: PrizeWhereInput
isNot?: PrizeWhereInput
}
export type SpinRelationFilter = {
is?: SpinWhereInput
isNot?: SpinWhereInput
}
export type UserPrizeCountOrderByAggregateInput = {
id?: SortOrder
userId?: SortOrder
campaignId?: SortOrder
prizeId?: SortOrder
spinId?: SortOrder
code?: SortOrder
status?: SortOrder
wonAt?: SortOrder
redeemedAt?: SortOrder
}
export type UserPrizeMaxOrderByAggregateInput = {
id?: SortOrder
userId?: SortOrder
campaignId?: SortOrder
prizeId?: SortOrder
spinId?: SortOrder
code?: SortOrder
status?: SortOrder
wonAt?: SortOrder
redeemedAt?: SortOrder
}
export type UserPrizeMinOrderByAggregateInput = {
id?: SortOrder
userId?: SortOrder
campaignId?: SortOrder
prizeId?: SortOrder
spinId?: SortOrder
code?: SortOrder
status?: SortOrder
wonAt?: SortOrder
redeemedAt?: SortOrder
}
export type EnumUserPrizeStatusWithAggregatesFilter<$PrismaModel = never> = {
equals?: $Enums.UserPrizeStatus | EnumUserPrizeStatusFieldRefInput<$PrismaModel>
in?: $Enums.UserPrizeStatus[] | ListEnumUserPrizeStatusFieldRefInput<$PrismaModel>
notIn?: $Enums.UserPrizeStatus[] | ListEnumUserPrizeStatusFieldRefInput<$PrismaModel>
not?: NestedEnumUserPrizeStatusWithAggregatesFilter<$PrismaModel> | $Enums.UserPrizeStatus
_count?: NestedIntFilter<$PrismaModel>
_min?: NestedEnumUserPrizeStatusFilter<$PrismaModel>
_max?: NestedEnumUserPrizeStatusFilter<$PrismaModel>
}
export type EnumSmsTypeFilter<$PrismaModel = never> = {
equals?: $Enums.SmsType | EnumSmsTypeFieldRefInput<$PrismaModel>
in?: $Enums.SmsType[] | ListEnumSmsTypeFieldRefInput<$PrismaModel>
notIn?: $Enums.SmsType[] | ListEnumSmsTypeFieldRefInput<$PrismaModel>
not?: NestedEnumSmsTypeFilter<$PrismaModel> | $Enums.SmsType
}
export type EnumSmsStatusFilter<$PrismaModel = never> = {
equals?: $Enums.SmsStatus | EnumSmsStatusFieldRefInput<$PrismaModel>
in?: $Enums.SmsStatus[] | ListEnumSmsStatusFieldRefInput<$PrismaModel>
notIn?: $Enums.SmsStatus[] | ListEnumSmsStatusFieldRefInput<$PrismaModel>
not?: NestedEnumSmsStatusFilter<$PrismaModel> | $Enums.SmsStatus
}
export type SmsLogCountOrderByAggregateInput = {
id?: SortOrder
userId?: SortOrder
mobile?: SortOrder
type?: SortOrder
message?: SortOrder
provider?: SortOrder
status?: SortOrder
providerResponse?: SortOrder
createdAt?: SortOrder
}
export type SmsLogMaxOrderByAggregateInput = {
id?: SortOrder
userId?: SortOrder
mobile?: SortOrder
type?: SortOrder
message?: SortOrder
provider?: SortOrder
status?: SortOrder
createdAt?: SortOrder
}
export type SmsLogMinOrderByAggregateInput = {
id?: SortOrder
userId?: SortOrder
mobile?: SortOrder
type?: SortOrder
message?: SortOrder
provider?: SortOrder
status?: SortOrder
createdAt?: SortOrder
}
export type EnumSmsTypeWithAggregatesFilter<$PrismaModel = never> = {
equals?: $Enums.SmsType | EnumSmsTypeFieldRefInput<$PrismaModel>
in?: $Enums.SmsType[] | ListEnumSmsTypeFieldRefInput<$PrismaModel>
notIn?: $Enums.SmsType[] | ListEnumSmsTypeFieldRefInput<$PrismaModel>
not?: NestedEnumSmsTypeWithAggregatesFilter<$PrismaModel> | $Enums.SmsType
_count?: NestedIntFilter<$PrismaModel>
_min?: NestedEnumSmsTypeFilter<$PrismaModel>
_max?: NestedEnumSmsTypeFilter<$PrismaModel>
}
export type EnumSmsStatusWithAggregatesFilter<$PrismaModel = never> = {
equals?: $Enums.SmsStatus | EnumSmsStatusFieldRefInput<$PrismaModel>
in?: $Enums.SmsStatus[] | ListEnumSmsStatusFieldRefInput<$PrismaModel>
notIn?: $Enums.SmsStatus[] | ListEnumSmsStatusFieldRefInput<$PrismaModel>
not?: NestedEnumSmsStatusWithAggregatesFilter<$PrismaModel> | $Enums.SmsStatus
_count?: NestedIntFilter<$PrismaModel>
_min?: NestedEnumSmsStatusFilter<$PrismaModel>
_max?: NestedEnumSmsStatusFilter<$PrismaModel>
}
export type AdminRelationFilter = {
is?: AdminWhereInput
isNot?: AdminWhereInput
}
export type AdminLogCountOrderByAggregateInput = {
id?: SortOrder
adminId?: SortOrder
action?: SortOrder
entityType?: SortOrder
entityId?: SortOrder
oldValue?: SortOrder
newValue?: SortOrder
ip?: SortOrder
createdAt?: SortOrder
}
export type AdminLogMaxOrderByAggregateInput = {
id?: SortOrder
adminId?: SortOrder
action?: SortOrder
entityType?: SortOrder
entityId?: SortOrder
ip?: SortOrder
createdAt?: SortOrder
}
export type AdminLogMinOrderByAggregateInput = {
id?: SortOrder
adminId?: SortOrder
action?: SortOrder
entityType?: SortOrder
entityId?: SortOrder
ip?: SortOrder
createdAt?: SortOrder
}
export type AdminLogCreateNestedManyWithoutAdminInput = {
create?: XOR<AdminLogCreateWithoutAdminInput, AdminLogUncheckedCreateWithoutAdminInput> | AdminLogCreateWithoutAdminInput[] | AdminLogUncheckedCreateWithoutAdminInput[]
connectOrCreate?: AdminLogCreateOrConnectWithoutAdminInput | AdminLogCreateOrConnectWithoutAdminInput[]
createMany?: AdminLogCreateManyAdminInputEnvelope
connect?: AdminLogWhereUniqueInput | AdminLogWhereUniqueInput[]
}
export type ChanceTransactionCreateNestedManyWithoutCreatedByInput = {
create?: XOR<ChanceTransactionCreateWithoutCreatedByInput, ChanceTransactionUncheckedCreateWithoutCreatedByInput> | ChanceTransactionCreateWithoutCreatedByInput[] | ChanceTransactionUncheckedCreateWithoutCreatedByInput[]
connectOrCreate?: ChanceTransactionCreateOrConnectWithoutCreatedByInput | ChanceTransactionCreateOrConnectWithoutCreatedByInput[]
createMany?: ChanceTransactionCreateManyCreatedByInputEnvelope
connect?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[]
}
export type AdminLogUncheckedCreateNestedManyWithoutAdminInput = {
create?: XOR<AdminLogCreateWithoutAdminInput, AdminLogUncheckedCreateWithoutAdminInput> | AdminLogCreateWithoutAdminInput[] | AdminLogUncheckedCreateWithoutAdminInput[]
connectOrCreate?: AdminLogCreateOrConnectWithoutAdminInput | AdminLogCreateOrConnectWithoutAdminInput[]
createMany?: AdminLogCreateManyAdminInputEnvelope
connect?: AdminLogWhereUniqueInput | AdminLogWhereUniqueInput[]
}
export type ChanceTransactionUncheckedCreateNestedManyWithoutCreatedByInput = {
create?: XOR<ChanceTransactionCreateWithoutCreatedByInput, ChanceTransactionUncheckedCreateWithoutCreatedByInput> | ChanceTransactionCreateWithoutCreatedByInput[] | ChanceTransactionUncheckedCreateWithoutCreatedByInput[]
connectOrCreate?: ChanceTransactionCreateOrConnectWithoutCreatedByInput | ChanceTransactionCreateOrConnectWithoutCreatedByInput[]
createMany?: ChanceTransactionCreateManyCreatedByInputEnvelope
connect?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[]
}
export type StringFieldUpdateOperationsInput = {
set?: string
}
export type EnumAdminRoleFieldUpdateOperationsInput = {
set?: $Enums.AdminRole
}
export type EnumAdminStatusFieldUpdateOperationsInput = {
set?: $Enums.AdminStatus
}
export type DateTimeFieldUpdateOperationsInput = {
set?: Date | string
}
export type AdminLogUpdateManyWithoutAdminNestedInput = {
create?: XOR<AdminLogCreateWithoutAdminInput, AdminLogUncheckedCreateWithoutAdminInput> | AdminLogCreateWithoutAdminInput[] | AdminLogUncheckedCreateWithoutAdminInput[]
connectOrCreate?: AdminLogCreateOrConnectWithoutAdminInput | AdminLogCreateOrConnectWithoutAdminInput[]
upsert?: AdminLogUpsertWithWhereUniqueWithoutAdminInput | AdminLogUpsertWithWhereUniqueWithoutAdminInput[]
createMany?: AdminLogCreateManyAdminInputEnvelope
set?: AdminLogWhereUniqueInput | AdminLogWhereUniqueInput[]
disconnect?: AdminLogWhereUniqueInput | AdminLogWhereUniqueInput[]
delete?: AdminLogWhereUniqueInput | AdminLogWhereUniqueInput[]
connect?: AdminLogWhereUniqueInput | AdminLogWhereUniqueInput[]
update?: AdminLogUpdateWithWhereUniqueWithoutAdminInput | AdminLogUpdateWithWhereUniqueWithoutAdminInput[]
updateMany?: AdminLogUpdateManyWithWhereWithoutAdminInput | AdminLogUpdateManyWithWhereWithoutAdminInput[]
deleteMany?: AdminLogScalarWhereInput | AdminLogScalarWhereInput[]
}
export type ChanceTransactionUpdateManyWithoutCreatedByNestedInput = {
create?: XOR<ChanceTransactionCreateWithoutCreatedByInput, ChanceTransactionUncheckedCreateWithoutCreatedByInput> | ChanceTransactionCreateWithoutCreatedByInput[] | ChanceTransactionUncheckedCreateWithoutCreatedByInput[]
connectOrCreate?: ChanceTransactionCreateOrConnectWithoutCreatedByInput | ChanceTransactionCreateOrConnectWithoutCreatedByInput[]
upsert?: ChanceTransactionUpsertWithWhereUniqueWithoutCreatedByInput | ChanceTransactionUpsertWithWhereUniqueWithoutCreatedByInput[]
createMany?: ChanceTransactionCreateManyCreatedByInputEnvelope
set?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[]
disconnect?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[]
delete?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[]
connect?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[]
update?: ChanceTransactionUpdateWithWhereUniqueWithoutCreatedByInput | ChanceTransactionUpdateWithWhereUniqueWithoutCreatedByInput[]
updateMany?: ChanceTransactionUpdateManyWithWhereWithoutCreatedByInput | ChanceTransactionUpdateManyWithWhereWithoutCreatedByInput[]
deleteMany?: ChanceTransactionScalarWhereInput | ChanceTransactionScalarWhereInput[]
}
export type AdminLogUncheckedUpdateManyWithoutAdminNestedInput = {
create?: XOR<AdminLogCreateWithoutAdminInput, AdminLogUncheckedCreateWithoutAdminInput> | AdminLogCreateWithoutAdminInput[] | AdminLogUncheckedCreateWithoutAdminInput[]
connectOrCreate?: AdminLogCreateOrConnectWithoutAdminInput | AdminLogCreateOrConnectWithoutAdminInput[]
upsert?: AdminLogUpsertWithWhereUniqueWithoutAdminInput | AdminLogUpsertWithWhereUniqueWithoutAdminInput[]
createMany?: AdminLogCreateManyAdminInputEnvelope
set?: AdminLogWhereUniqueInput | AdminLogWhereUniqueInput[]
disconnect?: AdminLogWhereUniqueInput | AdminLogWhereUniqueInput[]
delete?: AdminLogWhereUniqueInput | AdminLogWhereUniqueInput[]
connect?: AdminLogWhereUniqueInput | AdminLogWhereUniqueInput[]
update?: AdminLogUpdateWithWhereUniqueWithoutAdminInput | AdminLogUpdateWithWhereUniqueWithoutAdminInput[]
updateMany?: AdminLogUpdateManyWithWhereWithoutAdminInput | AdminLogUpdateManyWithWhereWithoutAdminInput[]
deleteMany?: AdminLogScalarWhereInput | AdminLogScalarWhereInput[]
}
export type ChanceTransactionUncheckedUpdateManyWithoutCreatedByNestedInput = {
create?: XOR<ChanceTransactionCreateWithoutCreatedByInput, ChanceTransactionUncheckedCreateWithoutCreatedByInput> | ChanceTransactionCreateWithoutCreatedByInput[] | ChanceTransactionUncheckedCreateWithoutCreatedByInput[]
connectOrCreate?: ChanceTransactionCreateOrConnectWithoutCreatedByInput | ChanceTransactionCreateOrConnectWithoutCreatedByInput[]
upsert?: ChanceTransactionUpsertWithWhereUniqueWithoutCreatedByInput | ChanceTransactionUpsertWithWhereUniqueWithoutCreatedByInput[]
createMany?: ChanceTransactionCreateManyCreatedByInputEnvelope
set?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[]
disconnect?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[]
delete?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[]
connect?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[]
update?: ChanceTransactionUpdateWithWhereUniqueWithoutCreatedByInput | ChanceTransactionUpdateWithWhereUniqueWithoutCreatedByInput[]
updateMany?: ChanceTransactionUpdateManyWithWhereWithoutCreatedByInput | ChanceTransactionUpdateManyWithWhereWithoutCreatedByInput[]
deleteMany?: ChanceTransactionScalarWhereInput | ChanceTransactionScalarWhereInput[]
}
export type UserCampaignCreateNestedManyWithoutUserInput = {
create?: XOR<UserCampaignCreateWithoutUserInput, UserCampaignUncheckedCreateWithoutUserInput> | UserCampaignCreateWithoutUserInput[] | UserCampaignUncheckedCreateWithoutUserInput[]
connectOrCreate?: UserCampaignCreateOrConnectWithoutUserInput | UserCampaignCreateOrConnectWithoutUserInput[]
createMany?: UserCampaignCreateManyUserInputEnvelope
connect?: UserCampaignWhereUniqueInput | UserCampaignWhereUniqueInput[]
}
export type ChanceTransactionCreateNestedManyWithoutUserInput = {
create?: XOR<ChanceTransactionCreateWithoutUserInput, ChanceTransactionUncheckedCreateWithoutUserInput> | ChanceTransactionCreateWithoutUserInput[] | ChanceTransactionUncheckedCreateWithoutUserInput[]
connectOrCreate?: ChanceTransactionCreateOrConnectWithoutUserInput | ChanceTransactionCreateOrConnectWithoutUserInput[]
createMany?: ChanceTransactionCreateManyUserInputEnvelope
connect?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[]
}
export type SpinCreateNestedManyWithoutUserInput = {
create?: XOR<SpinCreateWithoutUserInput, SpinUncheckedCreateWithoutUserInput> | SpinCreateWithoutUserInput[] | SpinUncheckedCreateWithoutUserInput[]
connectOrCreate?: SpinCreateOrConnectWithoutUserInput | SpinCreateOrConnectWithoutUserInput[]
createMany?: SpinCreateManyUserInputEnvelope
connect?: SpinWhereUniqueInput | SpinWhereUniqueInput[]
}
export type UserPrizeCreateNestedManyWithoutUserInput = {
create?: XOR<UserPrizeCreateWithoutUserInput, UserPrizeUncheckedCreateWithoutUserInput> | UserPrizeCreateWithoutUserInput[] | UserPrizeUncheckedCreateWithoutUserInput[]
connectOrCreate?: UserPrizeCreateOrConnectWithoutUserInput | UserPrizeCreateOrConnectWithoutUserInput[]
createMany?: UserPrizeCreateManyUserInputEnvelope
connect?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[]
}
export type OtpCodeCreateNestedManyWithoutUserInput = {
create?: XOR<OtpCodeCreateWithoutUserInput, OtpCodeUncheckedCreateWithoutUserInput> | OtpCodeCreateWithoutUserInput[] | OtpCodeUncheckedCreateWithoutUserInput[]
connectOrCreate?: OtpCodeCreateOrConnectWithoutUserInput | OtpCodeCreateOrConnectWithoutUserInput[]
createMany?: OtpCodeCreateManyUserInputEnvelope
connect?: OtpCodeWhereUniqueInput | OtpCodeWhereUniqueInput[]
}
export type SmsLogCreateNestedManyWithoutUserInput = {
create?: XOR<SmsLogCreateWithoutUserInput, SmsLogUncheckedCreateWithoutUserInput> | SmsLogCreateWithoutUserInput[] | SmsLogUncheckedCreateWithoutUserInput[]
connectOrCreate?: SmsLogCreateOrConnectWithoutUserInput | SmsLogCreateOrConnectWithoutUserInput[]
createMany?: SmsLogCreateManyUserInputEnvelope
connect?: SmsLogWhereUniqueInput | SmsLogWhereUniqueInput[]
}
export type UserCampaignUncheckedCreateNestedManyWithoutUserInput = {
create?: XOR<UserCampaignCreateWithoutUserInput, UserCampaignUncheckedCreateWithoutUserInput> | UserCampaignCreateWithoutUserInput[] | UserCampaignUncheckedCreateWithoutUserInput[]
connectOrCreate?: UserCampaignCreateOrConnectWithoutUserInput | UserCampaignCreateOrConnectWithoutUserInput[]
createMany?: UserCampaignCreateManyUserInputEnvelope
connect?: UserCampaignWhereUniqueInput | UserCampaignWhereUniqueInput[]
}
export type ChanceTransactionUncheckedCreateNestedManyWithoutUserInput = {
create?: XOR<ChanceTransactionCreateWithoutUserInput, ChanceTransactionUncheckedCreateWithoutUserInput> | ChanceTransactionCreateWithoutUserInput[] | ChanceTransactionUncheckedCreateWithoutUserInput[]
connectOrCreate?: ChanceTransactionCreateOrConnectWithoutUserInput | ChanceTransactionCreateOrConnectWithoutUserInput[]
createMany?: ChanceTransactionCreateManyUserInputEnvelope
connect?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[]
}
export type SpinUncheckedCreateNestedManyWithoutUserInput = {
create?: XOR<SpinCreateWithoutUserInput, SpinUncheckedCreateWithoutUserInput> | SpinCreateWithoutUserInput[] | SpinUncheckedCreateWithoutUserInput[]
connectOrCreate?: SpinCreateOrConnectWithoutUserInput | SpinCreateOrConnectWithoutUserInput[]
createMany?: SpinCreateManyUserInputEnvelope
connect?: SpinWhereUniqueInput | SpinWhereUniqueInput[]
}
export type UserPrizeUncheckedCreateNestedManyWithoutUserInput = {
create?: XOR<UserPrizeCreateWithoutUserInput, UserPrizeUncheckedCreateWithoutUserInput> | UserPrizeCreateWithoutUserInput[] | UserPrizeUncheckedCreateWithoutUserInput[]
connectOrCreate?: UserPrizeCreateOrConnectWithoutUserInput | UserPrizeCreateOrConnectWithoutUserInput[]
createMany?: UserPrizeCreateManyUserInputEnvelope
connect?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[]
}
export type OtpCodeUncheckedCreateNestedManyWithoutUserInput = {
create?: XOR<OtpCodeCreateWithoutUserInput, OtpCodeUncheckedCreateWithoutUserInput> | OtpCodeCreateWithoutUserInput[] | OtpCodeUncheckedCreateWithoutUserInput[]
connectOrCreate?: OtpCodeCreateOrConnectWithoutUserInput | OtpCodeCreateOrConnectWithoutUserInput[]
createMany?: OtpCodeCreateManyUserInputEnvelope
connect?: OtpCodeWhereUniqueInput | OtpCodeWhereUniqueInput[]
}
export type SmsLogUncheckedCreateNestedManyWithoutUserInput = {
create?: XOR<SmsLogCreateWithoutUserInput, SmsLogUncheckedCreateWithoutUserInput> | SmsLogCreateWithoutUserInput[] | SmsLogUncheckedCreateWithoutUserInput[]
connectOrCreate?: SmsLogCreateOrConnectWithoutUserInput | SmsLogCreateOrConnectWithoutUserInput[]
createMany?: SmsLogCreateManyUserInputEnvelope
connect?: SmsLogWhereUniqueInput | SmsLogWhereUniqueInput[]
}
export type NullableStringFieldUpdateOperationsInput = {
set?: string | null
}
export type EnumUserStatusFieldUpdateOperationsInput = {
set?: $Enums.UserStatus
}
export type NullableDateTimeFieldUpdateOperationsInput = {
set?: Date | string | null
}
export type UserCampaignUpdateManyWithoutUserNestedInput = {
create?: XOR<UserCampaignCreateWithoutUserInput, UserCampaignUncheckedCreateWithoutUserInput> | UserCampaignCreateWithoutUserInput[] | UserCampaignUncheckedCreateWithoutUserInput[]
connectOrCreate?: UserCampaignCreateOrConnectWithoutUserInput | UserCampaignCreateOrConnectWithoutUserInput[]
upsert?: UserCampaignUpsertWithWhereUniqueWithoutUserInput | UserCampaignUpsertWithWhereUniqueWithoutUserInput[]
createMany?: UserCampaignCreateManyUserInputEnvelope
set?: UserCampaignWhereUniqueInput | UserCampaignWhereUniqueInput[]
disconnect?: UserCampaignWhereUniqueInput | UserCampaignWhereUniqueInput[]
delete?: UserCampaignWhereUniqueInput | UserCampaignWhereUniqueInput[]
connect?: UserCampaignWhereUniqueInput | UserCampaignWhereUniqueInput[]
update?: UserCampaignUpdateWithWhereUniqueWithoutUserInput | UserCampaignUpdateWithWhereUniqueWithoutUserInput[]
updateMany?: UserCampaignUpdateManyWithWhereWithoutUserInput | UserCampaignUpdateManyWithWhereWithoutUserInput[]
deleteMany?: UserCampaignScalarWhereInput | UserCampaignScalarWhereInput[]
}
export type ChanceTransactionUpdateManyWithoutUserNestedInput = {
create?: XOR<ChanceTransactionCreateWithoutUserInput, ChanceTransactionUncheckedCreateWithoutUserInput> | ChanceTransactionCreateWithoutUserInput[] | ChanceTransactionUncheckedCreateWithoutUserInput[]
connectOrCreate?: ChanceTransactionCreateOrConnectWithoutUserInput | ChanceTransactionCreateOrConnectWithoutUserInput[]
upsert?: ChanceTransactionUpsertWithWhereUniqueWithoutUserInput | ChanceTransactionUpsertWithWhereUniqueWithoutUserInput[]
createMany?: ChanceTransactionCreateManyUserInputEnvelope
set?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[]
disconnect?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[]
delete?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[]
connect?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[]
update?: ChanceTransactionUpdateWithWhereUniqueWithoutUserInput | ChanceTransactionUpdateWithWhereUniqueWithoutUserInput[]
updateMany?: ChanceTransactionUpdateManyWithWhereWithoutUserInput | ChanceTransactionUpdateManyWithWhereWithoutUserInput[]
deleteMany?: ChanceTransactionScalarWhereInput | ChanceTransactionScalarWhereInput[]
}
export type SpinUpdateManyWithoutUserNestedInput = {
create?: XOR<SpinCreateWithoutUserInput, SpinUncheckedCreateWithoutUserInput> | SpinCreateWithoutUserInput[] | SpinUncheckedCreateWithoutUserInput[]
connectOrCreate?: SpinCreateOrConnectWithoutUserInput | SpinCreateOrConnectWithoutUserInput[]
upsert?: SpinUpsertWithWhereUniqueWithoutUserInput | SpinUpsertWithWhereUniqueWithoutUserInput[]
createMany?: SpinCreateManyUserInputEnvelope
set?: SpinWhereUniqueInput | SpinWhereUniqueInput[]
disconnect?: SpinWhereUniqueInput | SpinWhereUniqueInput[]
delete?: SpinWhereUniqueInput | SpinWhereUniqueInput[]
connect?: SpinWhereUniqueInput | SpinWhereUniqueInput[]
update?: SpinUpdateWithWhereUniqueWithoutUserInput | SpinUpdateWithWhereUniqueWithoutUserInput[]
updateMany?: SpinUpdateManyWithWhereWithoutUserInput | SpinUpdateManyWithWhereWithoutUserInput[]
deleteMany?: SpinScalarWhereInput | SpinScalarWhereInput[]
}
export type UserPrizeUpdateManyWithoutUserNestedInput = {
create?: XOR<UserPrizeCreateWithoutUserInput, UserPrizeUncheckedCreateWithoutUserInput> | UserPrizeCreateWithoutUserInput[] | UserPrizeUncheckedCreateWithoutUserInput[]
connectOrCreate?: UserPrizeCreateOrConnectWithoutUserInput | UserPrizeCreateOrConnectWithoutUserInput[]
upsert?: UserPrizeUpsertWithWhereUniqueWithoutUserInput | UserPrizeUpsertWithWhereUniqueWithoutUserInput[]
createMany?: UserPrizeCreateManyUserInputEnvelope
set?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[]
disconnect?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[]
delete?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[]
connect?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[]
update?: UserPrizeUpdateWithWhereUniqueWithoutUserInput | UserPrizeUpdateWithWhereUniqueWithoutUserInput[]
updateMany?: UserPrizeUpdateManyWithWhereWithoutUserInput | UserPrizeUpdateManyWithWhereWithoutUserInput[]
deleteMany?: UserPrizeScalarWhereInput | UserPrizeScalarWhereInput[]
}
export type OtpCodeUpdateManyWithoutUserNestedInput = {
create?: XOR<OtpCodeCreateWithoutUserInput, OtpCodeUncheckedCreateWithoutUserInput> | OtpCodeCreateWithoutUserInput[] | OtpCodeUncheckedCreateWithoutUserInput[]
connectOrCreate?: OtpCodeCreateOrConnectWithoutUserInput | OtpCodeCreateOrConnectWithoutUserInput[]
upsert?: OtpCodeUpsertWithWhereUniqueWithoutUserInput | OtpCodeUpsertWithWhereUniqueWithoutUserInput[]
createMany?: OtpCodeCreateManyUserInputEnvelope
set?: OtpCodeWhereUniqueInput | OtpCodeWhereUniqueInput[]
disconnect?: OtpCodeWhereUniqueInput | OtpCodeWhereUniqueInput[]
delete?: OtpCodeWhereUniqueInput | OtpCodeWhereUniqueInput[]
connect?: OtpCodeWhereUniqueInput | OtpCodeWhereUniqueInput[]
update?: OtpCodeUpdateWithWhereUniqueWithoutUserInput | OtpCodeUpdateWithWhereUniqueWithoutUserInput[]
updateMany?: OtpCodeUpdateManyWithWhereWithoutUserInput | OtpCodeUpdateManyWithWhereWithoutUserInput[]
deleteMany?: OtpCodeScalarWhereInput | OtpCodeScalarWhereInput[]
}
export type SmsLogUpdateManyWithoutUserNestedInput = {
create?: XOR<SmsLogCreateWithoutUserInput, SmsLogUncheckedCreateWithoutUserInput> | SmsLogCreateWithoutUserInput[] | SmsLogUncheckedCreateWithoutUserInput[]
connectOrCreate?: SmsLogCreateOrConnectWithoutUserInput | SmsLogCreateOrConnectWithoutUserInput[]
upsert?: SmsLogUpsertWithWhereUniqueWithoutUserInput | SmsLogUpsertWithWhereUniqueWithoutUserInput[]
createMany?: SmsLogCreateManyUserInputEnvelope
set?: SmsLogWhereUniqueInput | SmsLogWhereUniqueInput[]
disconnect?: SmsLogWhereUniqueInput | SmsLogWhereUniqueInput[]
delete?: SmsLogWhereUniqueInput | SmsLogWhereUniqueInput[]
connect?: SmsLogWhereUniqueInput | SmsLogWhereUniqueInput[]
update?: SmsLogUpdateWithWhereUniqueWithoutUserInput | SmsLogUpdateWithWhereUniqueWithoutUserInput[]
updateMany?: SmsLogUpdateManyWithWhereWithoutUserInput | SmsLogUpdateManyWithWhereWithoutUserInput[]
deleteMany?: SmsLogScalarWhereInput | SmsLogScalarWhereInput[]
}
export type UserCampaignUncheckedUpdateManyWithoutUserNestedInput = {
create?: XOR<UserCampaignCreateWithoutUserInput, UserCampaignUncheckedCreateWithoutUserInput> | UserCampaignCreateWithoutUserInput[] | UserCampaignUncheckedCreateWithoutUserInput[]
connectOrCreate?: UserCampaignCreateOrConnectWithoutUserInput | UserCampaignCreateOrConnectWithoutUserInput[]
upsert?: UserCampaignUpsertWithWhereUniqueWithoutUserInput | UserCampaignUpsertWithWhereUniqueWithoutUserInput[]
createMany?: UserCampaignCreateManyUserInputEnvelope
set?: UserCampaignWhereUniqueInput | UserCampaignWhereUniqueInput[]
disconnect?: UserCampaignWhereUniqueInput | UserCampaignWhereUniqueInput[]
delete?: UserCampaignWhereUniqueInput | UserCampaignWhereUniqueInput[]
connect?: UserCampaignWhereUniqueInput | UserCampaignWhereUniqueInput[]
update?: UserCampaignUpdateWithWhereUniqueWithoutUserInput | UserCampaignUpdateWithWhereUniqueWithoutUserInput[]
updateMany?: UserCampaignUpdateManyWithWhereWithoutUserInput | UserCampaignUpdateManyWithWhereWithoutUserInput[]
deleteMany?: UserCampaignScalarWhereInput | UserCampaignScalarWhereInput[]
}
export type ChanceTransactionUncheckedUpdateManyWithoutUserNestedInput = {
create?: XOR<ChanceTransactionCreateWithoutUserInput, ChanceTransactionUncheckedCreateWithoutUserInput> | ChanceTransactionCreateWithoutUserInput[] | ChanceTransactionUncheckedCreateWithoutUserInput[]
connectOrCreate?: ChanceTransactionCreateOrConnectWithoutUserInput | ChanceTransactionCreateOrConnectWithoutUserInput[]
upsert?: ChanceTransactionUpsertWithWhereUniqueWithoutUserInput | ChanceTransactionUpsertWithWhereUniqueWithoutUserInput[]
createMany?: ChanceTransactionCreateManyUserInputEnvelope
set?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[]
disconnect?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[]
delete?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[]
connect?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[]
update?: ChanceTransactionUpdateWithWhereUniqueWithoutUserInput | ChanceTransactionUpdateWithWhereUniqueWithoutUserInput[]
updateMany?: ChanceTransactionUpdateManyWithWhereWithoutUserInput | ChanceTransactionUpdateManyWithWhereWithoutUserInput[]
deleteMany?: ChanceTransactionScalarWhereInput | ChanceTransactionScalarWhereInput[]
}
export type SpinUncheckedUpdateManyWithoutUserNestedInput = {
create?: XOR<SpinCreateWithoutUserInput, SpinUncheckedCreateWithoutUserInput> | SpinCreateWithoutUserInput[] | SpinUncheckedCreateWithoutUserInput[]
connectOrCreate?: SpinCreateOrConnectWithoutUserInput | SpinCreateOrConnectWithoutUserInput[]
upsert?: SpinUpsertWithWhereUniqueWithoutUserInput | SpinUpsertWithWhereUniqueWithoutUserInput[]
createMany?: SpinCreateManyUserInputEnvelope
set?: SpinWhereUniqueInput | SpinWhereUniqueInput[]
disconnect?: SpinWhereUniqueInput | SpinWhereUniqueInput[]
delete?: SpinWhereUniqueInput | SpinWhereUniqueInput[]
connect?: SpinWhereUniqueInput | SpinWhereUniqueInput[]
update?: SpinUpdateWithWhereUniqueWithoutUserInput | SpinUpdateWithWhereUniqueWithoutUserInput[]
updateMany?: SpinUpdateManyWithWhereWithoutUserInput | SpinUpdateManyWithWhereWithoutUserInput[]
deleteMany?: SpinScalarWhereInput | SpinScalarWhereInput[]
}
export type UserPrizeUncheckedUpdateManyWithoutUserNestedInput = {
create?: XOR<UserPrizeCreateWithoutUserInput, UserPrizeUncheckedCreateWithoutUserInput> | UserPrizeCreateWithoutUserInput[] | UserPrizeUncheckedCreateWithoutUserInput[]
connectOrCreate?: UserPrizeCreateOrConnectWithoutUserInput | UserPrizeCreateOrConnectWithoutUserInput[]
upsert?: UserPrizeUpsertWithWhereUniqueWithoutUserInput | UserPrizeUpsertWithWhereUniqueWithoutUserInput[]
createMany?: UserPrizeCreateManyUserInputEnvelope
set?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[]
disconnect?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[]
delete?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[]
connect?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[]
update?: UserPrizeUpdateWithWhereUniqueWithoutUserInput | UserPrizeUpdateWithWhereUniqueWithoutUserInput[]
updateMany?: UserPrizeUpdateManyWithWhereWithoutUserInput | UserPrizeUpdateManyWithWhereWithoutUserInput[]
deleteMany?: UserPrizeScalarWhereInput | UserPrizeScalarWhereInput[]
}
export type OtpCodeUncheckedUpdateManyWithoutUserNestedInput = {
create?: XOR<OtpCodeCreateWithoutUserInput, OtpCodeUncheckedCreateWithoutUserInput> | OtpCodeCreateWithoutUserInput[] | OtpCodeUncheckedCreateWithoutUserInput[]
connectOrCreate?: OtpCodeCreateOrConnectWithoutUserInput | OtpCodeCreateOrConnectWithoutUserInput[]
upsert?: OtpCodeUpsertWithWhereUniqueWithoutUserInput | OtpCodeUpsertWithWhereUniqueWithoutUserInput[]
createMany?: OtpCodeCreateManyUserInputEnvelope
set?: OtpCodeWhereUniqueInput | OtpCodeWhereUniqueInput[]
disconnect?: OtpCodeWhereUniqueInput | OtpCodeWhereUniqueInput[]
delete?: OtpCodeWhereUniqueInput | OtpCodeWhereUniqueInput[]
connect?: OtpCodeWhereUniqueInput | OtpCodeWhereUniqueInput[]
update?: OtpCodeUpdateWithWhereUniqueWithoutUserInput | OtpCodeUpdateWithWhereUniqueWithoutUserInput[]
updateMany?: OtpCodeUpdateManyWithWhereWithoutUserInput | OtpCodeUpdateManyWithWhereWithoutUserInput[]
deleteMany?: OtpCodeScalarWhereInput | OtpCodeScalarWhereInput[]
}
export type SmsLogUncheckedUpdateManyWithoutUserNestedInput = {
create?: XOR<SmsLogCreateWithoutUserInput, SmsLogUncheckedCreateWithoutUserInput> | SmsLogCreateWithoutUserInput[] | SmsLogUncheckedCreateWithoutUserInput[]
connectOrCreate?: SmsLogCreateOrConnectWithoutUserInput | SmsLogCreateOrConnectWithoutUserInput[]
upsert?: SmsLogUpsertWithWhereUniqueWithoutUserInput | SmsLogUpsertWithWhereUniqueWithoutUserInput[]
createMany?: SmsLogCreateManyUserInputEnvelope
set?: SmsLogWhereUniqueInput | SmsLogWhereUniqueInput[]
disconnect?: SmsLogWhereUniqueInput | SmsLogWhereUniqueInput[]
delete?: SmsLogWhereUniqueInput | SmsLogWhereUniqueInput[]
connect?: SmsLogWhereUniqueInput | SmsLogWhereUniqueInput[]
update?: SmsLogUpdateWithWhereUniqueWithoutUserInput | SmsLogUpdateWithWhereUniqueWithoutUserInput[]
updateMany?: SmsLogUpdateManyWithWhereWithoutUserInput | SmsLogUpdateManyWithWhereWithoutUserInput[]
deleteMany?: SmsLogScalarWhereInput | SmsLogScalarWhereInput[]
}
export type UserCreateNestedOneWithoutOtpCodesInput = {
create?: XOR<UserCreateWithoutOtpCodesInput, UserUncheckedCreateWithoutOtpCodesInput>
connectOrCreate?: UserCreateOrConnectWithoutOtpCodesInput
connect?: UserWhereUniqueInput
}
export type IntFieldUpdateOperationsInput = {
set?: number
increment?: number
decrement?: number
multiply?: number
divide?: number
}
export type BoolFieldUpdateOperationsInput = {
set?: boolean
}
export type UserUpdateOneWithoutOtpCodesNestedInput = {
create?: XOR<UserCreateWithoutOtpCodesInput, UserUncheckedCreateWithoutOtpCodesInput>
connectOrCreate?: UserCreateOrConnectWithoutOtpCodesInput
upsert?: UserUpsertWithoutOtpCodesInput
disconnect?: UserWhereInput | boolean
delete?: UserWhereInput | boolean
connect?: UserWhereUniqueInput
update?: XOR<XOR<UserUpdateToOneWithWhereWithoutOtpCodesInput, UserUpdateWithoutOtpCodesInput>, UserUncheckedUpdateWithoutOtpCodesInput>
}
export type PrizeCreateNestedManyWithoutCampaignInput = {
create?: XOR<PrizeCreateWithoutCampaignInput, PrizeUncheckedCreateWithoutCampaignInput> | PrizeCreateWithoutCampaignInput[] | PrizeUncheckedCreateWithoutCampaignInput[]
connectOrCreate?: PrizeCreateOrConnectWithoutCampaignInput | PrizeCreateOrConnectWithoutCampaignInput[]
createMany?: PrizeCreateManyCampaignInputEnvelope
connect?: PrizeWhereUniqueInput | PrizeWhereUniqueInput[]
}
export type UserCampaignCreateNestedManyWithoutCampaignInput = {
create?: XOR<UserCampaignCreateWithoutCampaignInput, UserCampaignUncheckedCreateWithoutCampaignInput> | UserCampaignCreateWithoutCampaignInput[] | UserCampaignUncheckedCreateWithoutCampaignInput[]
connectOrCreate?: UserCampaignCreateOrConnectWithoutCampaignInput | UserCampaignCreateOrConnectWithoutCampaignInput[]
createMany?: UserCampaignCreateManyCampaignInputEnvelope
connect?: UserCampaignWhereUniqueInput | UserCampaignWhereUniqueInput[]
}
export type ChanceTransactionCreateNestedManyWithoutCampaignInput = {
create?: XOR<ChanceTransactionCreateWithoutCampaignInput, ChanceTransactionUncheckedCreateWithoutCampaignInput> | ChanceTransactionCreateWithoutCampaignInput[] | ChanceTransactionUncheckedCreateWithoutCampaignInput[]
connectOrCreate?: ChanceTransactionCreateOrConnectWithoutCampaignInput | ChanceTransactionCreateOrConnectWithoutCampaignInput[]
createMany?: ChanceTransactionCreateManyCampaignInputEnvelope
connect?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[]
}
export type SpinCreateNestedManyWithoutCampaignInput = {
create?: XOR<SpinCreateWithoutCampaignInput, SpinUncheckedCreateWithoutCampaignInput> | SpinCreateWithoutCampaignInput[] | SpinUncheckedCreateWithoutCampaignInput[]
connectOrCreate?: SpinCreateOrConnectWithoutCampaignInput | SpinCreateOrConnectWithoutCampaignInput[]
createMany?: SpinCreateManyCampaignInputEnvelope
connect?: SpinWhereUniqueInput | SpinWhereUniqueInput[]
}
export type UserPrizeCreateNestedManyWithoutCampaignInput = {
create?: XOR<UserPrizeCreateWithoutCampaignInput, UserPrizeUncheckedCreateWithoutCampaignInput> | UserPrizeCreateWithoutCampaignInput[] | UserPrizeUncheckedCreateWithoutCampaignInput[]
connectOrCreate?: UserPrizeCreateOrConnectWithoutCampaignInput | UserPrizeCreateOrConnectWithoutCampaignInput[]
createMany?: UserPrizeCreateManyCampaignInputEnvelope
connect?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[]
}
export type PrizeUncheckedCreateNestedManyWithoutCampaignInput = {
create?: XOR<PrizeCreateWithoutCampaignInput, PrizeUncheckedCreateWithoutCampaignInput> | PrizeCreateWithoutCampaignInput[] | PrizeUncheckedCreateWithoutCampaignInput[]
connectOrCreate?: PrizeCreateOrConnectWithoutCampaignInput | PrizeCreateOrConnectWithoutCampaignInput[]
createMany?: PrizeCreateManyCampaignInputEnvelope
connect?: PrizeWhereUniqueInput | PrizeWhereUniqueInput[]
}
export type UserCampaignUncheckedCreateNestedManyWithoutCampaignInput = {
create?: XOR<UserCampaignCreateWithoutCampaignInput, UserCampaignUncheckedCreateWithoutCampaignInput> | UserCampaignCreateWithoutCampaignInput[] | UserCampaignUncheckedCreateWithoutCampaignInput[]
connectOrCreate?: UserCampaignCreateOrConnectWithoutCampaignInput | UserCampaignCreateOrConnectWithoutCampaignInput[]
createMany?: UserCampaignCreateManyCampaignInputEnvelope
connect?: UserCampaignWhereUniqueInput | UserCampaignWhereUniqueInput[]
}
export type ChanceTransactionUncheckedCreateNestedManyWithoutCampaignInput = {
create?: XOR<ChanceTransactionCreateWithoutCampaignInput, ChanceTransactionUncheckedCreateWithoutCampaignInput> | ChanceTransactionCreateWithoutCampaignInput[] | ChanceTransactionUncheckedCreateWithoutCampaignInput[]
connectOrCreate?: ChanceTransactionCreateOrConnectWithoutCampaignInput | ChanceTransactionCreateOrConnectWithoutCampaignInput[]
createMany?: ChanceTransactionCreateManyCampaignInputEnvelope
connect?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[]
}
export type SpinUncheckedCreateNestedManyWithoutCampaignInput = {
create?: XOR<SpinCreateWithoutCampaignInput, SpinUncheckedCreateWithoutCampaignInput> | SpinCreateWithoutCampaignInput[] | SpinUncheckedCreateWithoutCampaignInput[]
connectOrCreate?: SpinCreateOrConnectWithoutCampaignInput | SpinCreateOrConnectWithoutCampaignInput[]
createMany?: SpinCreateManyCampaignInputEnvelope
connect?: SpinWhereUniqueInput | SpinWhereUniqueInput[]
}
export type UserPrizeUncheckedCreateNestedManyWithoutCampaignInput = {
create?: XOR<UserPrizeCreateWithoutCampaignInput, UserPrizeUncheckedCreateWithoutCampaignInput> | UserPrizeCreateWithoutCampaignInput[] | UserPrizeUncheckedCreateWithoutCampaignInput[]
connectOrCreate?: UserPrizeCreateOrConnectWithoutCampaignInput | UserPrizeCreateOrConnectWithoutCampaignInput[]
createMany?: UserPrizeCreateManyCampaignInputEnvelope
connect?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[]
}
export type EnumCampaignStatusFieldUpdateOperationsInput = {
set?: $Enums.CampaignStatus
}
export type EnumWheelDesignFieldUpdateOperationsInput = {
set?: $Enums.WheelDesign
}
export type PrizeUpdateManyWithoutCampaignNestedInput = {
create?: XOR<PrizeCreateWithoutCampaignInput, PrizeUncheckedCreateWithoutCampaignInput> | PrizeCreateWithoutCampaignInput[] | PrizeUncheckedCreateWithoutCampaignInput[]
connectOrCreate?: PrizeCreateOrConnectWithoutCampaignInput | PrizeCreateOrConnectWithoutCampaignInput[]
upsert?: PrizeUpsertWithWhereUniqueWithoutCampaignInput | PrizeUpsertWithWhereUniqueWithoutCampaignInput[]
createMany?: PrizeCreateManyCampaignInputEnvelope
set?: PrizeWhereUniqueInput | PrizeWhereUniqueInput[]
disconnect?: PrizeWhereUniqueInput | PrizeWhereUniqueInput[]
delete?: PrizeWhereUniqueInput | PrizeWhereUniqueInput[]
connect?: PrizeWhereUniqueInput | PrizeWhereUniqueInput[]
update?: PrizeUpdateWithWhereUniqueWithoutCampaignInput | PrizeUpdateWithWhereUniqueWithoutCampaignInput[]
updateMany?: PrizeUpdateManyWithWhereWithoutCampaignInput | PrizeUpdateManyWithWhereWithoutCampaignInput[]
deleteMany?: PrizeScalarWhereInput | PrizeScalarWhereInput[]
}
export type UserCampaignUpdateManyWithoutCampaignNestedInput = {
create?: XOR<UserCampaignCreateWithoutCampaignInput, UserCampaignUncheckedCreateWithoutCampaignInput> | UserCampaignCreateWithoutCampaignInput[] | UserCampaignUncheckedCreateWithoutCampaignInput[]
connectOrCreate?: UserCampaignCreateOrConnectWithoutCampaignInput | UserCampaignCreateOrConnectWithoutCampaignInput[]
upsert?: UserCampaignUpsertWithWhereUniqueWithoutCampaignInput | UserCampaignUpsertWithWhereUniqueWithoutCampaignInput[]
createMany?: UserCampaignCreateManyCampaignInputEnvelope
set?: UserCampaignWhereUniqueInput | UserCampaignWhereUniqueInput[]
disconnect?: UserCampaignWhereUniqueInput | UserCampaignWhereUniqueInput[]
delete?: UserCampaignWhereUniqueInput | UserCampaignWhereUniqueInput[]
connect?: UserCampaignWhereUniqueInput | UserCampaignWhereUniqueInput[]
update?: UserCampaignUpdateWithWhereUniqueWithoutCampaignInput | UserCampaignUpdateWithWhereUniqueWithoutCampaignInput[]
updateMany?: UserCampaignUpdateManyWithWhereWithoutCampaignInput | UserCampaignUpdateManyWithWhereWithoutCampaignInput[]
deleteMany?: UserCampaignScalarWhereInput | UserCampaignScalarWhereInput[]
}
export type ChanceTransactionUpdateManyWithoutCampaignNestedInput = {
create?: XOR<ChanceTransactionCreateWithoutCampaignInput, ChanceTransactionUncheckedCreateWithoutCampaignInput> | ChanceTransactionCreateWithoutCampaignInput[] | ChanceTransactionUncheckedCreateWithoutCampaignInput[]
connectOrCreate?: ChanceTransactionCreateOrConnectWithoutCampaignInput | ChanceTransactionCreateOrConnectWithoutCampaignInput[]
upsert?: ChanceTransactionUpsertWithWhereUniqueWithoutCampaignInput | ChanceTransactionUpsertWithWhereUniqueWithoutCampaignInput[]
createMany?: ChanceTransactionCreateManyCampaignInputEnvelope
set?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[]
disconnect?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[]
delete?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[]
connect?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[]
update?: ChanceTransactionUpdateWithWhereUniqueWithoutCampaignInput | ChanceTransactionUpdateWithWhereUniqueWithoutCampaignInput[]
updateMany?: ChanceTransactionUpdateManyWithWhereWithoutCampaignInput | ChanceTransactionUpdateManyWithWhereWithoutCampaignInput[]
deleteMany?: ChanceTransactionScalarWhereInput | ChanceTransactionScalarWhereInput[]
}
export type SpinUpdateManyWithoutCampaignNestedInput = {
create?: XOR<SpinCreateWithoutCampaignInput, SpinUncheckedCreateWithoutCampaignInput> | SpinCreateWithoutCampaignInput[] | SpinUncheckedCreateWithoutCampaignInput[]
connectOrCreate?: SpinCreateOrConnectWithoutCampaignInput | SpinCreateOrConnectWithoutCampaignInput[]
upsert?: SpinUpsertWithWhereUniqueWithoutCampaignInput | SpinUpsertWithWhereUniqueWithoutCampaignInput[]
createMany?: SpinCreateManyCampaignInputEnvelope
set?: SpinWhereUniqueInput | SpinWhereUniqueInput[]
disconnect?: SpinWhereUniqueInput | SpinWhereUniqueInput[]
delete?: SpinWhereUniqueInput | SpinWhereUniqueInput[]
connect?: SpinWhereUniqueInput | SpinWhereUniqueInput[]
update?: SpinUpdateWithWhereUniqueWithoutCampaignInput | SpinUpdateWithWhereUniqueWithoutCampaignInput[]
updateMany?: SpinUpdateManyWithWhereWithoutCampaignInput | SpinUpdateManyWithWhereWithoutCampaignInput[]
deleteMany?: SpinScalarWhereInput | SpinScalarWhereInput[]
}
export type UserPrizeUpdateManyWithoutCampaignNestedInput = {
create?: XOR<UserPrizeCreateWithoutCampaignInput, UserPrizeUncheckedCreateWithoutCampaignInput> | UserPrizeCreateWithoutCampaignInput[] | UserPrizeUncheckedCreateWithoutCampaignInput[]
connectOrCreate?: UserPrizeCreateOrConnectWithoutCampaignInput | UserPrizeCreateOrConnectWithoutCampaignInput[]
upsert?: UserPrizeUpsertWithWhereUniqueWithoutCampaignInput | UserPrizeUpsertWithWhereUniqueWithoutCampaignInput[]
createMany?: UserPrizeCreateManyCampaignInputEnvelope
set?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[]
disconnect?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[]
delete?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[]
connect?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[]
update?: UserPrizeUpdateWithWhereUniqueWithoutCampaignInput | UserPrizeUpdateWithWhereUniqueWithoutCampaignInput[]
updateMany?: UserPrizeUpdateManyWithWhereWithoutCampaignInput | UserPrizeUpdateManyWithWhereWithoutCampaignInput[]
deleteMany?: UserPrizeScalarWhereInput | UserPrizeScalarWhereInput[]
}
export type PrizeUncheckedUpdateManyWithoutCampaignNestedInput = {
create?: XOR<PrizeCreateWithoutCampaignInput, PrizeUncheckedCreateWithoutCampaignInput> | PrizeCreateWithoutCampaignInput[] | PrizeUncheckedCreateWithoutCampaignInput[]
connectOrCreate?: PrizeCreateOrConnectWithoutCampaignInput | PrizeCreateOrConnectWithoutCampaignInput[]
upsert?: PrizeUpsertWithWhereUniqueWithoutCampaignInput | PrizeUpsertWithWhereUniqueWithoutCampaignInput[]
createMany?: PrizeCreateManyCampaignInputEnvelope
set?: PrizeWhereUniqueInput | PrizeWhereUniqueInput[]
disconnect?: PrizeWhereUniqueInput | PrizeWhereUniqueInput[]
delete?: PrizeWhereUniqueInput | PrizeWhereUniqueInput[]
connect?: PrizeWhereUniqueInput | PrizeWhereUniqueInput[]
update?: PrizeUpdateWithWhereUniqueWithoutCampaignInput | PrizeUpdateWithWhereUniqueWithoutCampaignInput[]
updateMany?: PrizeUpdateManyWithWhereWithoutCampaignInput | PrizeUpdateManyWithWhereWithoutCampaignInput[]
deleteMany?: PrizeScalarWhereInput | PrizeScalarWhereInput[]
}
export type UserCampaignUncheckedUpdateManyWithoutCampaignNestedInput = {
create?: XOR<UserCampaignCreateWithoutCampaignInput, UserCampaignUncheckedCreateWithoutCampaignInput> | UserCampaignCreateWithoutCampaignInput[] | UserCampaignUncheckedCreateWithoutCampaignInput[]
connectOrCreate?: UserCampaignCreateOrConnectWithoutCampaignInput | UserCampaignCreateOrConnectWithoutCampaignInput[]
upsert?: UserCampaignUpsertWithWhereUniqueWithoutCampaignInput | UserCampaignUpsertWithWhereUniqueWithoutCampaignInput[]
createMany?: UserCampaignCreateManyCampaignInputEnvelope
set?: UserCampaignWhereUniqueInput | UserCampaignWhereUniqueInput[]
disconnect?: UserCampaignWhereUniqueInput | UserCampaignWhereUniqueInput[]
delete?: UserCampaignWhereUniqueInput | UserCampaignWhereUniqueInput[]
connect?: UserCampaignWhereUniqueInput | UserCampaignWhereUniqueInput[]
update?: UserCampaignUpdateWithWhereUniqueWithoutCampaignInput | UserCampaignUpdateWithWhereUniqueWithoutCampaignInput[]
updateMany?: UserCampaignUpdateManyWithWhereWithoutCampaignInput | UserCampaignUpdateManyWithWhereWithoutCampaignInput[]
deleteMany?: UserCampaignScalarWhereInput | UserCampaignScalarWhereInput[]
}
export type ChanceTransactionUncheckedUpdateManyWithoutCampaignNestedInput = {
create?: XOR<ChanceTransactionCreateWithoutCampaignInput, ChanceTransactionUncheckedCreateWithoutCampaignInput> | ChanceTransactionCreateWithoutCampaignInput[] | ChanceTransactionUncheckedCreateWithoutCampaignInput[]
connectOrCreate?: ChanceTransactionCreateOrConnectWithoutCampaignInput | ChanceTransactionCreateOrConnectWithoutCampaignInput[]
upsert?: ChanceTransactionUpsertWithWhereUniqueWithoutCampaignInput | ChanceTransactionUpsertWithWhereUniqueWithoutCampaignInput[]
createMany?: ChanceTransactionCreateManyCampaignInputEnvelope
set?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[]
disconnect?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[]
delete?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[]
connect?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[]
update?: ChanceTransactionUpdateWithWhereUniqueWithoutCampaignInput | ChanceTransactionUpdateWithWhereUniqueWithoutCampaignInput[]
updateMany?: ChanceTransactionUpdateManyWithWhereWithoutCampaignInput | ChanceTransactionUpdateManyWithWhereWithoutCampaignInput[]
deleteMany?: ChanceTransactionScalarWhereInput | ChanceTransactionScalarWhereInput[]
}
export type SpinUncheckedUpdateManyWithoutCampaignNestedInput = {
create?: XOR<SpinCreateWithoutCampaignInput, SpinUncheckedCreateWithoutCampaignInput> | SpinCreateWithoutCampaignInput[] | SpinUncheckedCreateWithoutCampaignInput[]
connectOrCreate?: SpinCreateOrConnectWithoutCampaignInput | SpinCreateOrConnectWithoutCampaignInput[]
upsert?: SpinUpsertWithWhereUniqueWithoutCampaignInput | SpinUpsertWithWhereUniqueWithoutCampaignInput[]
createMany?: SpinCreateManyCampaignInputEnvelope
set?: SpinWhereUniqueInput | SpinWhereUniqueInput[]
disconnect?: SpinWhereUniqueInput | SpinWhereUniqueInput[]
delete?: SpinWhereUniqueInput | SpinWhereUniqueInput[]
connect?: SpinWhereUniqueInput | SpinWhereUniqueInput[]
update?: SpinUpdateWithWhereUniqueWithoutCampaignInput | SpinUpdateWithWhereUniqueWithoutCampaignInput[]
updateMany?: SpinUpdateManyWithWhereWithoutCampaignInput | SpinUpdateManyWithWhereWithoutCampaignInput[]
deleteMany?: SpinScalarWhereInput | SpinScalarWhereInput[]
}
export type UserPrizeUncheckedUpdateManyWithoutCampaignNestedInput = {
create?: XOR<UserPrizeCreateWithoutCampaignInput, UserPrizeUncheckedCreateWithoutCampaignInput> | UserPrizeCreateWithoutCampaignInput[] | UserPrizeUncheckedCreateWithoutCampaignInput[]
connectOrCreate?: UserPrizeCreateOrConnectWithoutCampaignInput | UserPrizeCreateOrConnectWithoutCampaignInput[]
upsert?: UserPrizeUpsertWithWhereUniqueWithoutCampaignInput | UserPrizeUpsertWithWhereUniqueWithoutCampaignInput[]
createMany?: UserPrizeCreateManyCampaignInputEnvelope
set?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[]
disconnect?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[]
delete?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[]
connect?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[]
update?: UserPrizeUpdateWithWhereUniqueWithoutCampaignInput | UserPrizeUpdateWithWhereUniqueWithoutCampaignInput[]
updateMany?: UserPrizeUpdateManyWithWhereWithoutCampaignInput | UserPrizeUpdateManyWithWhereWithoutCampaignInput[]
deleteMany?: UserPrizeScalarWhereInput | UserPrizeScalarWhereInput[]
}
export type CampaignCreateNestedOneWithoutPrizesInput = {
create?: XOR<CampaignCreateWithoutPrizesInput, CampaignUncheckedCreateWithoutPrizesInput>
connectOrCreate?: CampaignCreateOrConnectWithoutPrizesInput
connect?: CampaignWhereUniqueInput
}
export type SpinCreateNestedManyWithoutPrizeInput = {
create?: XOR<SpinCreateWithoutPrizeInput, SpinUncheckedCreateWithoutPrizeInput> | SpinCreateWithoutPrizeInput[] | SpinUncheckedCreateWithoutPrizeInput[]
connectOrCreate?: SpinCreateOrConnectWithoutPrizeInput | SpinCreateOrConnectWithoutPrizeInput[]
createMany?: SpinCreateManyPrizeInputEnvelope
connect?: SpinWhereUniqueInput | SpinWhereUniqueInput[]
}
export type UserPrizeCreateNestedManyWithoutPrizeInput = {
create?: XOR<UserPrizeCreateWithoutPrizeInput, UserPrizeUncheckedCreateWithoutPrizeInput> | UserPrizeCreateWithoutPrizeInput[] | UserPrizeUncheckedCreateWithoutPrizeInput[]
connectOrCreate?: UserPrizeCreateOrConnectWithoutPrizeInput | UserPrizeCreateOrConnectWithoutPrizeInput[]
createMany?: UserPrizeCreateManyPrizeInputEnvelope
connect?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[]
}
export type SpinUncheckedCreateNestedManyWithoutPrizeInput = {
create?: XOR<SpinCreateWithoutPrizeInput, SpinUncheckedCreateWithoutPrizeInput> | SpinCreateWithoutPrizeInput[] | SpinUncheckedCreateWithoutPrizeInput[]
connectOrCreate?: SpinCreateOrConnectWithoutPrizeInput | SpinCreateOrConnectWithoutPrizeInput[]
createMany?: SpinCreateManyPrizeInputEnvelope
connect?: SpinWhereUniqueInput | SpinWhereUniqueInput[]
}
export type UserPrizeUncheckedCreateNestedManyWithoutPrizeInput = {
create?: XOR<UserPrizeCreateWithoutPrizeInput, UserPrizeUncheckedCreateWithoutPrizeInput> | UserPrizeCreateWithoutPrizeInput[] | UserPrizeUncheckedCreateWithoutPrizeInput[]
connectOrCreate?: UserPrizeCreateOrConnectWithoutPrizeInput | UserPrizeCreateOrConnectWithoutPrizeInput[]
createMany?: UserPrizeCreateManyPrizeInputEnvelope
connect?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[]
}
export type EnumPrizeTypeFieldUpdateOperationsInput = {
set?: $Enums.PrizeType
}
export type EnumStockTypeFieldUpdateOperationsInput = {
set?: $Enums.StockType
}
export type NullableIntFieldUpdateOperationsInput = {
set?: number | null
increment?: number
decrement?: number
multiply?: number
divide?: number
}
export type EnumPrizeStatusFieldUpdateOperationsInput = {
set?: $Enums.PrizeStatus
}
export type CampaignUpdateOneRequiredWithoutPrizesNestedInput = {
create?: XOR<CampaignCreateWithoutPrizesInput, CampaignUncheckedCreateWithoutPrizesInput>
connectOrCreate?: CampaignCreateOrConnectWithoutPrizesInput
upsert?: CampaignUpsertWithoutPrizesInput
connect?: CampaignWhereUniqueInput
update?: XOR<XOR<CampaignUpdateToOneWithWhereWithoutPrizesInput, CampaignUpdateWithoutPrizesInput>, CampaignUncheckedUpdateWithoutPrizesInput>
}
export type SpinUpdateManyWithoutPrizeNestedInput = {
create?: XOR<SpinCreateWithoutPrizeInput, SpinUncheckedCreateWithoutPrizeInput> | SpinCreateWithoutPrizeInput[] | SpinUncheckedCreateWithoutPrizeInput[]
connectOrCreate?: SpinCreateOrConnectWithoutPrizeInput | SpinCreateOrConnectWithoutPrizeInput[]
upsert?: SpinUpsertWithWhereUniqueWithoutPrizeInput | SpinUpsertWithWhereUniqueWithoutPrizeInput[]
createMany?: SpinCreateManyPrizeInputEnvelope
set?: SpinWhereUniqueInput | SpinWhereUniqueInput[]
disconnect?: SpinWhereUniqueInput | SpinWhereUniqueInput[]
delete?: SpinWhereUniqueInput | SpinWhereUniqueInput[]
connect?: SpinWhereUniqueInput | SpinWhereUniqueInput[]
update?: SpinUpdateWithWhereUniqueWithoutPrizeInput | SpinUpdateWithWhereUniqueWithoutPrizeInput[]
updateMany?: SpinUpdateManyWithWhereWithoutPrizeInput | SpinUpdateManyWithWhereWithoutPrizeInput[]
deleteMany?: SpinScalarWhereInput | SpinScalarWhereInput[]
}
export type UserPrizeUpdateManyWithoutPrizeNestedInput = {
create?: XOR<UserPrizeCreateWithoutPrizeInput, UserPrizeUncheckedCreateWithoutPrizeInput> | UserPrizeCreateWithoutPrizeInput[] | UserPrizeUncheckedCreateWithoutPrizeInput[]
connectOrCreate?: UserPrizeCreateOrConnectWithoutPrizeInput | UserPrizeCreateOrConnectWithoutPrizeInput[]
upsert?: UserPrizeUpsertWithWhereUniqueWithoutPrizeInput | UserPrizeUpsertWithWhereUniqueWithoutPrizeInput[]
createMany?: UserPrizeCreateManyPrizeInputEnvelope
set?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[]
disconnect?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[]
delete?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[]
connect?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[]
update?: UserPrizeUpdateWithWhereUniqueWithoutPrizeInput | UserPrizeUpdateWithWhereUniqueWithoutPrizeInput[]
updateMany?: UserPrizeUpdateManyWithWhereWithoutPrizeInput | UserPrizeUpdateManyWithWhereWithoutPrizeInput[]
deleteMany?: UserPrizeScalarWhereInput | UserPrizeScalarWhereInput[]
}
export type SpinUncheckedUpdateManyWithoutPrizeNestedInput = {
create?: XOR<SpinCreateWithoutPrizeInput, SpinUncheckedCreateWithoutPrizeInput> | SpinCreateWithoutPrizeInput[] | SpinUncheckedCreateWithoutPrizeInput[]
connectOrCreate?: SpinCreateOrConnectWithoutPrizeInput | SpinCreateOrConnectWithoutPrizeInput[]
upsert?: SpinUpsertWithWhereUniqueWithoutPrizeInput | SpinUpsertWithWhereUniqueWithoutPrizeInput[]
createMany?: SpinCreateManyPrizeInputEnvelope
set?: SpinWhereUniqueInput | SpinWhereUniqueInput[]
disconnect?: SpinWhereUniqueInput | SpinWhereUniqueInput[]
delete?: SpinWhereUniqueInput | SpinWhereUniqueInput[]
connect?: SpinWhereUniqueInput | SpinWhereUniqueInput[]
update?: SpinUpdateWithWhereUniqueWithoutPrizeInput | SpinUpdateWithWhereUniqueWithoutPrizeInput[]
updateMany?: SpinUpdateManyWithWhereWithoutPrizeInput | SpinUpdateManyWithWhereWithoutPrizeInput[]
deleteMany?: SpinScalarWhereInput | SpinScalarWhereInput[]
}
export type UserPrizeUncheckedUpdateManyWithoutPrizeNestedInput = {
create?: XOR<UserPrizeCreateWithoutPrizeInput, UserPrizeUncheckedCreateWithoutPrizeInput> | UserPrizeCreateWithoutPrizeInput[] | UserPrizeUncheckedCreateWithoutPrizeInput[]
connectOrCreate?: UserPrizeCreateOrConnectWithoutPrizeInput | UserPrizeCreateOrConnectWithoutPrizeInput[]
upsert?: UserPrizeUpsertWithWhereUniqueWithoutPrizeInput | UserPrizeUpsertWithWhereUniqueWithoutPrizeInput[]
createMany?: UserPrizeCreateManyPrizeInputEnvelope
set?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[]
disconnect?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[]
delete?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[]
connect?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[]
update?: UserPrizeUpdateWithWhereUniqueWithoutPrizeInput | UserPrizeUpdateWithWhereUniqueWithoutPrizeInput[]
updateMany?: UserPrizeUpdateManyWithWhereWithoutPrizeInput | UserPrizeUpdateManyWithWhereWithoutPrizeInput[]
deleteMany?: UserPrizeScalarWhereInput | UserPrizeScalarWhereInput[]
}
export type UserCreateNestedOneWithoutUserCampaignsInput = {
create?: XOR<UserCreateWithoutUserCampaignsInput, UserUncheckedCreateWithoutUserCampaignsInput>
connectOrCreate?: UserCreateOrConnectWithoutUserCampaignsInput
connect?: UserWhereUniqueInput
}
export type CampaignCreateNestedOneWithoutUserCampaignsInput = {
create?: XOR<CampaignCreateWithoutUserCampaignsInput, CampaignUncheckedCreateWithoutUserCampaignsInput>
connectOrCreate?: CampaignCreateOrConnectWithoutUserCampaignsInput
connect?: CampaignWhereUniqueInput
}
export type UserUpdateOneRequiredWithoutUserCampaignsNestedInput = {
create?: XOR<UserCreateWithoutUserCampaignsInput, UserUncheckedCreateWithoutUserCampaignsInput>
connectOrCreate?: UserCreateOrConnectWithoutUserCampaignsInput
upsert?: UserUpsertWithoutUserCampaignsInput
connect?: UserWhereUniqueInput
update?: XOR<XOR<UserUpdateToOneWithWhereWithoutUserCampaignsInput, UserUpdateWithoutUserCampaignsInput>, UserUncheckedUpdateWithoutUserCampaignsInput>
}
export type CampaignUpdateOneRequiredWithoutUserCampaignsNestedInput = {
create?: XOR<CampaignCreateWithoutUserCampaignsInput, CampaignUncheckedCreateWithoutUserCampaignsInput>
connectOrCreate?: CampaignCreateOrConnectWithoutUserCampaignsInput
upsert?: CampaignUpsertWithoutUserCampaignsInput
connect?: CampaignWhereUniqueInput
update?: XOR<XOR<CampaignUpdateToOneWithWhereWithoutUserCampaignsInput, CampaignUpdateWithoutUserCampaignsInput>, CampaignUncheckedUpdateWithoutUserCampaignsInput>
}
export type UserCreateNestedOneWithoutChanceTransactionsInput = {
create?: XOR<UserCreateWithoutChanceTransactionsInput, UserUncheckedCreateWithoutChanceTransactionsInput>
connectOrCreate?: UserCreateOrConnectWithoutChanceTransactionsInput
connect?: UserWhereUniqueInput
}
export type CampaignCreateNestedOneWithoutChanceTxnsInput = {
create?: XOR<CampaignCreateWithoutChanceTxnsInput, CampaignUncheckedCreateWithoutChanceTxnsInput>
connectOrCreate?: CampaignCreateOrConnectWithoutChanceTxnsInput
connect?: CampaignWhereUniqueInput
}
export type AdminCreateNestedOneWithoutChanceTxnsInput = {
create?: XOR<AdminCreateWithoutChanceTxnsInput, AdminUncheckedCreateWithoutChanceTxnsInput>
connectOrCreate?: AdminCreateOrConnectWithoutChanceTxnsInput
connect?: AdminWhereUniqueInput
}
export type EnumChanceTxnTypeFieldUpdateOperationsInput = {
set?: $Enums.ChanceTxnType
}
export type UserUpdateOneRequiredWithoutChanceTransactionsNestedInput = {
create?: XOR<UserCreateWithoutChanceTransactionsInput, UserUncheckedCreateWithoutChanceTransactionsInput>
connectOrCreate?: UserCreateOrConnectWithoutChanceTransactionsInput
upsert?: UserUpsertWithoutChanceTransactionsInput
connect?: UserWhereUniqueInput
update?: XOR<XOR<UserUpdateToOneWithWhereWithoutChanceTransactionsInput, UserUpdateWithoutChanceTransactionsInput>, UserUncheckedUpdateWithoutChanceTransactionsInput>
}
export type CampaignUpdateOneRequiredWithoutChanceTxnsNestedInput = {
create?: XOR<CampaignCreateWithoutChanceTxnsInput, CampaignUncheckedCreateWithoutChanceTxnsInput>
connectOrCreate?: CampaignCreateOrConnectWithoutChanceTxnsInput
upsert?: CampaignUpsertWithoutChanceTxnsInput
connect?: CampaignWhereUniqueInput
update?: XOR<XOR<CampaignUpdateToOneWithWhereWithoutChanceTxnsInput, CampaignUpdateWithoutChanceTxnsInput>, CampaignUncheckedUpdateWithoutChanceTxnsInput>
}
export type AdminUpdateOneWithoutChanceTxnsNestedInput = {
create?: XOR<AdminCreateWithoutChanceTxnsInput, AdminUncheckedCreateWithoutChanceTxnsInput>
connectOrCreate?: AdminCreateOrConnectWithoutChanceTxnsInput
upsert?: AdminUpsertWithoutChanceTxnsInput
disconnect?: AdminWhereInput | boolean
delete?: AdminWhereInput | boolean
connect?: AdminWhereUniqueInput
update?: XOR<XOR<AdminUpdateToOneWithWhereWithoutChanceTxnsInput, AdminUpdateWithoutChanceTxnsInput>, AdminUncheckedUpdateWithoutChanceTxnsInput>
}
export type UserCreateNestedOneWithoutSpinsInput = {
create?: XOR<UserCreateWithoutSpinsInput, UserUncheckedCreateWithoutSpinsInput>
connectOrCreate?: UserCreateOrConnectWithoutSpinsInput
connect?: UserWhereUniqueInput
}
export type CampaignCreateNestedOneWithoutSpinsInput = {
create?: XOR<CampaignCreateWithoutSpinsInput, CampaignUncheckedCreateWithoutSpinsInput>
connectOrCreate?: CampaignCreateOrConnectWithoutSpinsInput
connect?: CampaignWhereUniqueInput
}
export type PrizeCreateNestedOneWithoutSpinsInput = {
create?: XOR<PrizeCreateWithoutSpinsInput, PrizeUncheckedCreateWithoutSpinsInput>
connectOrCreate?: PrizeCreateOrConnectWithoutSpinsInput
connect?: PrizeWhereUniqueInput
}
export type UserPrizeCreateNestedOneWithoutSpinInput = {
create?: XOR<UserPrizeCreateWithoutSpinInput, UserPrizeUncheckedCreateWithoutSpinInput>
connectOrCreate?: UserPrizeCreateOrConnectWithoutSpinInput
connect?: UserPrizeWhereUniqueInput
}
export type UserPrizeUncheckedCreateNestedOneWithoutSpinInput = {
create?: XOR<UserPrizeCreateWithoutSpinInput, UserPrizeUncheckedCreateWithoutSpinInput>
connectOrCreate?: UserPrizeCreateOrConnectWithoutSpinInput
connect?: UserPrizeWhereUniqueInput
}
export type EnumSpinStatusFieldUpdateOperationsInput = {
set?: $Enums.SpinStatus
}
export type UserUpdateOneRequiredWithoutSpinsNestedInput = {
create?: XOR<UserCreateWithoutSpinsInput, UserUncheckedCreateWithoutSpinsInput>
connectOrCreate?: UserCreateOrConnectWithoutSpinsInput
upsert?: UserUpsertWithoutSpinsInput
connect?: UserWhereUniqueInput
update?: XOR<XOR<UserUpdateToOneWithWhereWithoutSpinsInput, UserUpdateWithoutSpinsInput>, UserUncheckedUpdateWithoutSpinsInput>
}
export type CampaignUpdateOneRequiredWithoutSpinsNestedInput = {
create?: XOR<CampaignCreateWithoutSpinsInput, CampaignUncheckedCreateWithoutSpinsInput>
connectOrCreate?: CampaignCreateOrConnectWithoutSpinsInput
upsert?: CampaignUpsertWithoutSpinsInput
connect?: CampaignWhereUniqueInput
update?: XOR<XOR<CampaignUpdateToOneWithWhereWithoutSpinsInput, CampaignUpdateWithoutSpinsInput>, CampaignUncheckedUpdateWithoutSpinsInput>
}
export type PrizeUpdateOneWithoutSpinsNestedInput = {
create?: XOR<PrizeCreateWithoutSpinsInput, PrizeUncheckedCreateWithoutSpinsInput>
connectOrCreate?: PrizeCreateOrConnectWithoutSpinsInput
upsert?: PrizeUpsertWithoutSpinsInput
disconnect?: PrizeWhereInput | boolean
delete?: PrizeWhereInput | boolean
connect?: PrizeWhereUniqueInput
update?: XOR<XOR<PrizeUpdateToOneWithWhereWithoutSpinsInput, PrizeUpdateWithoutSpinsInput>, PrizeUncheckedUpdateWithoutSpinsInput>
}
export type UserPrizeUpdateOneWithoutSpinNestedInput = {
create?: XOR<UserPrizeCreateWithoutSpinInput, UserPrizeUncheckedCreateWithoutSpinInput>
connectOrCreate?: UserPrizeCreateOrConnectWithoutSpinInput
upsert?: UserPrizeUpsertWithoutSpinInput
disconnect?: UserPrizeWhereInput | boolean
delete?: UserPrizeWhereInput | boolean
connect?: UserPrizeWhereUniqueInput
update?: XOR<XOR<UserPrizeUpdateToOneWithWhereWithoutSpinInput, UserPrizeUpdateWithoutSpinInput>, UserPrizeUncheckedUpdateWithoutSpinInput>
}
export type UserPrizeUncheckedUpdateOneWithoutSpinNestedInput = {
create?: XOR<UserPrizeCreateWithoutSpinInput, UserPrizeUncheckedCreateWithoutSpinInput>
connectOrCreate?: UserPrizeCreateOrConnectWithoutSpinInput
upsert?: UserPrizeUpsertWithoutSpinInput
disconnect?: UserPrizeWhereInput | boolean
delete?: UserPrizeWhereInput | boolean
connect?: UserPrizeWhereUniqueInput
update?: XOR<XOR<UserPrizeUpdateToOneWithWhereWithoutSpinInput, UserPrizeUpdateWithoutSpinInput>, UserPrizeUncheckedUpdateWithoutSpinInput>
}
export type UserCreateNestedOneWithoutUserPrizesInput = {
create?: XOR<UserCreateWithoutUserPrizesInput, UserUncheckedCreateWithoutUserPrizesInput>
connectOrCreate?: UserCreateOrConnectWithoutUserPrizesInput
connect?: UserWhereUniqueInput
}
export type CampaignCreateNestedOneWithoutUserPrizesInput = {
create?: XOR<CampaignCreateWithoutUserPrizesInput, CampaignUncheckedCreateWithoutUserPrizesInput>
connectOrCreate?: CampaignCreateOrConnectWithoutUserPrizesInput
connect?: CampaignWhereUniqueInput
}
export type PrizeCreateNestedOneWithoutUserPrizesInput = {
create?: XOR<PrizeCreateWithoutUserPrizesInput, PrizeUncheckedCreateWithoutUserPrizesInput>
connectOrCreate?: PrizeCreateOrConnectWithoutUserPrizesInput
connect?: PrizeWhereUniqueInput
}
export type SpinCreateNestedOneWithoutUserPrizeInput = {
create?: XOR<SpinCreateWithoutUserPrizeInput, SpinUncheckedCreateWithoutUserPrizeInput>
connectOrCreate?: SpinCreateOrConnectWithoutUserPrizeInput
connect?: SpinWhereUniqueInput
}
export type EnumUserPrizeStatusFieldUpdateOperationsInput = {
set?: $Enums.UserPrizeStatus
}
export type UserUpdateOneRequiredWithoutUserPrizesNestedInput = {
create?: XOR<UserCreateWithoutUserPrizesInput, UserUncheckedCreateWithoutUserPrizesInput>
connectOrCreate?: UserCreateOrConnectWithoutUserPrizesInput
upsert?: UserUpsertWithoutUserPrizesInput
connect?: UserWhereUniqueInput
update?: XOR<XOR<UserUpdateToOneWithWhereWithoutUserPrizesInput, UserUpdateWithoutUserPrizesInput>, UserUncheckedUpdateWithoutUserPrizesInput>
}
export type CampaignUpdateOneRequiredWithoutUserPrizesNestedInput = {
create?: XOR<CampaignCreateWithoutUserPrizesInput, CampaignUncheckedCreateWithoutUserPrizesInput>
connectOrCreate?: CampaignCreateOrConnectWithoutUserPrizesInput
upsert?: CampaignUpsertWithoutUserPrizesInput
connect?: CampaignWhereUniqueInput
update?: XOR<XOR<CampaignUpdateToOneWithWhereWithoutUserPrizesInput, CampaignUpdateWithoutUserPrizesInput>, CampaignUncheckedUpdateWithoutUserPrizesInput>
}
export type PrizeUpdateOneRequiredWithoutUserPrizesNestedInput = {
create?: XOR<PrizeCreateWithoutUserPrizesInput, PrizeUncheckedCreateWithoutUserPrizesInput>
connectOrCreate?: PrizeCreateOrConnectWithoutUserPrizesInput
upsert?: PrizeUpsertWithoutUserPrizesInput
connect?: PrizeWhereUniqueInput
update?: XOR<XOR<PrizeUpdateToOneWithWhereWithoutUserPrizesInput, PrizeUpdateWithoutUserPrizesInput>, PrizeUncheckedUpdateWithoutUserPrizesInput>
}
export type SpinUpdateOneRequiredWithoutUserPrizeNestedInput = {
create?: XOR<SpinCreateWithoutUserPrizeInput, SpinUncheckedCreateWithoutUserPrizeInput>
connectOrCreate?: SpinCreateOrConnectWithoutUserPrizeInput
upsert?: SpinUpsertWithoutUserPrizeInput
connect?: SpinWhereUniqueInput
update?: XOR<XOR<SpinUpdateToOneWithWhereWithoutUserPrizeInput, SpinUpdateWithoutUserPrizeInput>, SpinUncheckedUpdateWithoutUserPrizeInput>
}
export type UserCreateNestedOneWithoutSmsLogsInput = {
create?: XOR<UserCreateWithoutSmsLogsInput, UserUncheckedCreateWithoutSmsLogsInput>
connectOrCreate?: UserCreateOrConnectWithoutSmsLogsInput
connect?: UserWhereUniqueInput
}
export type EnumSmsTypeFieldUpdateOperationsInput = {
set?: $Enums.SmsType
}
export type EnumSmsStatusFieldUpdateOperationsInput = {
set?: $Enums.SmsStatus
}
export type UserUpdateOneWithoutSmsLogsNestedInput = {
create?: XOR<UserCreateWithoutSmsLogsInput, UserUncheckedCreateWithoutSmsLogsInput>
connectOrCreate?: UserCreateOrConnectWithoutSmsLogsInput
upsert?: UserUpsertWithoutSmsLogsInput
disconnect?: UserWhereInput | boolean
delete?: UserWhereInput | boolean
connect?: UserWhereUniqueInput
update?: XOR<XOR<UserUpdateToOneWithWhereWithoutSmsLogsInput, UserUpdateWithoutSmsLogsInput>, UserUncheckedUpdateWithoutSmsLogsInput>
}
export type AdminCreateNestedOneWithoutAuditLogsInput = {
create?: XOR<AdminCreateWithoutAuditLogsInput, AdminUncheckedCreateWithoutAuditLogsInput>
connectOrCreate?: AdminCreateOrConnectWithoutAuditLogsInput
connect?: AdminWhereUniqueInput
}
export type AdminUpdateOneRequiredWithoutAuditLogsNestedInput = {
create?: XOR<AdminCreateWithoutAuditLogsInput, AdminUncheckedCreateWithoutAuditLogsInput>
connectOrCreate?: AdminCreateOrConnectWithoutAuditLogsInput
upsert?: AdminUpsertWithoutAuditLogsInput
connect?: AdminWhereUniqueInput
update?: XOR<XOR<AdminUpdateToOneWithWhereWithoutAuditLogsInput, AdminUpdateWithoutAuditLogsInput>, AdminUncheckedUpdateWithoutAuditLogsInput>
}
export type NestedStringFilter<$PrismaModel = never> = {
equals?: string | StringFieldRefInput<$PrismaModel>
in?: string[] | ListStringFieldRefInput<$PrismaModel>
notIn?: string[] | ListStringFieldRefInput<$PrismaModel>
lt?: string | StringFieldRefInput<$PrismaModel>
lte?: string | StringFieldRefInput<$PrismaModel>
gt?: string | StringFieldRefInput<$PrismaModel>
gte?: string | StringFieldRefInput<$PrismaModel>
contains?: string | StringFieldRefInput<$PrismaModel>
startsWith?: string | StringFieldRefInput<$PrismaModel>
endsWith?: string | StringFieldRefInput<$PrismaModel>
not?: NestedStringFilter<$PrismaModel> | string
}
export type NestedEnumAdminRoleFilter<$PrismaModel = never> = {
equals?: $Enums.AdminRole | EnumAdminRoleFieldRefInput<$PrismaModel>
in?: $Enums.AdminRole[] | ListEnumAdminRoleFieldRefInput<$PrismaModel>
notIn?: $Enums.AdminRole[] | ListEnumAdminRoleFieldRefInput<$PrismaModel>
not?: NestedEnumAdminRoleFilter<$PrismaModel> | $Enums.AdminRole
}
export type NestedEnumAdminStatusFilter<$PrismaModel = never> = {
equals?: $Enums.AdminStatus | EnumAdminStatusFieldRefInput<$PrismaModel>
in?: $Enums.AdminStatus[] | ListEnumAdminStatusFieldRefInput<$PrismaModel>
notIn?: $Enums.AdminStatus[] | ListEnumAdminStatusFieldRefInput<$PrismaModel>
not?: NestedEnumAdminStatusFilter<$PrismaModel> | $Enums.AdminStatus
}
export type NestedDateTimeFilter<$PrismaModel = never> = {
equals?: Date | string | DateTimeFieldRefInput<$PrismaModel>
in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel>
notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel>
lt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
lte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
gt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
gte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
not?: NestedDateTimeFilter<$PrismaModel> | Date | string
}
export type NestedStringWithAggregatesFilter<$PrismaModel = never> = {
equals?: string | StringFieldRefInput<$PrismaModel>
in?: string[] | ListStringFieldRefInput<$PrismaModel>
notIn?: string[] | ListStringFieldRefInput<$PrismaModel>
lt?: string | StringFieldRefInput<$PrismaModel>
lte?: string | StringFieldRefInput<$PrismaModel>
gt?: string | StringFieldRefInput<$PrismaModel>
gte?: string | StringFieldRefInput<$PrismaModel>
contains?: string | StringFieldRefInput<$PrismaModel>
startsWith?: string | StringFieldRefInput<$PrismaModel>
endsWith?: string | StringFieldRefInput<$PrismaModel>
not?: NestedStringWithAggregatesFilter<$PrismaModel> | string
_count?: NestedIntFilter<$PrismaModel>
_min?: NestedStringFilter<$PrismaModel>
_max?: NestedStringFilter<$PrismaModel>
}
export type NestedIntFilter<$PrismaModel = never> = {
equals?: number | IntFieldRefInput<$PrismaModel>
in?: number[] | ListIntFieldRefInput<$PrismaModel>
notIn?: number[] | ListIntFieldRefInput<$PrismaModel>
lt?: number | IntFieldRefInput<$PrismaModel>
lte?: number | IntFieldRefInput<$PrismaModel>
gt?: number | IntFieldRefInput<$PrismaModel>
gte?: number | IntFieldRefInput<$PrismaModel>
not?: NestedIntFilter<$PrismaModel> | number
}
export type NestedEnumAdminRoleWithAggregatesFilter<$PrismaModel = never> = {
equals?: $Enums.AdminRole | EnumAdminRoleFieldRefInput<$PrismaModel>
in?: $Enums.AdminRole[] | ListEnumAdminRoleFieldRefInput<$PrismaModel>
notIn?: $Enums.AdminRole[] | ListEnumAdminRoleFieldRefInput<$PrismaModel>
not?: NestedEnumAdminRoleWithAggregatesFilter<$PrismaModel> | $Enums.AdminRole
_count?: NestedIntFilter<$PrismaModel>
_min?: NestedEnumAdminRoleFilter<$PrismaModel>
_max?: NestedEnumAdminRoleFilter<$PrismaModel>
}
export type NestedEnumAdminStatusWithAggregatesFilter<$PrismaModel = never> = {
equals?: $Enums.AdminStatus | EnumAdminStatusFieldRefInput<$PrismaModel>
in?: $Enums.AdminStatus[] | ListEnumAdminStatusFieldRefInput<$PrismaModel>
notIn?: $Enums.AdminStatus[] | ListEnumAdminStatusFieldRefInput<$PrismaModel>
not?: NestedEnumAdminStatusWithAggregatesFilter<$PrismaModel> | $Enums.AdminStatus
_count?: NestedIntFilter<$PrismaModel>
_min?: NestedEnumAdminStatusFilter<$PrismaModel>
_max?: NestedEnumAdminStatusFilter<$PrismaModel>
}
export type NestedDateTimeWithAggregatesFilter<$PrismaModel = never> = {
equals?: Date | string | DateTimeFieldRefInput<$PrismaModel>
in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel>
notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel>
lt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
lte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
gt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
gte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
not?: NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string
_count?: NestedIntFilter<$PrismaModel>
_min?: NestedDateTimeFilter<$PrismaModel>
_max?: NestedDateTimeFilter<$PrismaModel>
}
export type NestedStringNullableFilter<$PrismaModel = never> = {
equals?: string | StringFieldRefInput<$PrismaModel> | null
in?: string[] | ListStringFieldRefInput<$PrismaModel> | null
notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null
lt?: string | StringFieldRefInput<$PrismaModel>
lte?: string | StringFieldRefInput<$PrismaModel>
gt?: string | StringFieldRefInput<$PrismaModel>
gte?: string | StringFieldRefInput<$PrismaModel>
contains?: string | StringFieldRefInput<$PrismaModel>
startsWith?: string | StringFieldRefInput<$PrismaModel>
endsWith?: string | StringFieldRefInput<$PrismaModel>
not?: NestedStringNullableFilter<$PrismaModel> | string | null
}
export type NestedEnumUserStatusFilter<$PrismaModel = never> = {
equals?: $Enums.UserStatus | EnumUserStatusFieldRefInput<$PrismaModel>
in?: $Enums.UserStatus[] | ListEnumUserStatusFieldRefInput<$PrismaModel>
notIn?: $Enums.UserStatus[] | ListEnumUserStatusFieldRefInput<$PrismaModel>
not?: NestedEnumUserStatusFilter<$PrismaModel> | $Enums.UserStatus
}
export type NestedDateTimeNullableFilter<$PrismaModel = never> = {
equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null
in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null
notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null
lt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
lte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
gt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
gte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
not?: NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null
}
export type NestedStringNullableWithAggregatesFilter<$PrismaModel = never> = {
equals?: string | StringFieldRefInput<$PrismaModel> | null
in?: string[] | ListStringFieldRefInput<$PrismaModel> | null
notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null
lt?: string | StringFieldRefInput<$PrismaModel>
lte?: string | StringFieldRefInput<$PrismaModel>
gt?: string | StringFieldRefInput<$PrismaModel>
gte?: string | StringFieldRefInput<$PrismaModel>
contains?: string | StringFieldRefInput<$PrismaModel>
startsWith?: string | StringFieldRefInput<$PrismaModel>
endsWith?: string | StringFieldRefInput<$PrismaModel>
not?: NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null
_count?: NestedIntNullableFilter<$PrismaModel>
_min?: NestedStringNullableFilter<$PrismaModel>
_max?: NestedStringNullableFilter<$PrismaModel>
}
export type NestedIntNullableFilter<$PrismaModel = never> = {
equals?: number | IntFieldRefInput<$PrismaModel> | null
in?: number[] | ListIntFieldRefInput<$PrismaModel> | null
notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null
lt?: number | IntFieldRefInput<$PrismaModel>
lte?: number | IntFieldRefInput<$PrismaModel>
gt?: number | IntFieldRefInput<$PrismaModel>
gte?: number | IntFieldRefInput<$PrismaModel>
not?: NestedIntNullableFilter<$PrismaModel> | number | null
}
export type NestedEnumUserStatusWithAggregatesFilter<$PrismaModel = never> = {
equals?: $Enums.UserStatus | EnumUserStatusFieldRefInput<$PrismaModel>
in?: $Enums.UserStatus[] | ListEnumUserStatusFieldRefInput<$PrismaModel>
notIn?: $Enums.UserStatus[] | ListEnumUserStatusFieldRefInput<$PrismaModel>
not?: NestedEnumUserStatusWithAggregatesFilter<$PrismaModel> | $Enums.UserStatus
_count?: NestedIntFilter<$PrismaModel>
_min?: NestedEnumUserStatusFilter<$PrismaModel>
_max?: NestedEnumUserStatusFilter<$PrismaModel>
}
export type NestedDateTimeNullableWithAggregatesFilter<$PrismaModel = never> = {
equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null
in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null
notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null
lt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
lte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
gt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
gte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
not?: NestedDateTimeNullableWithAggregatesFilter<$PrismaModel> | Date | string | null
_count?: NestedIntNullableFilter<$PrismaModel>
_min?: NestedDateTimeNullableFilter<$PrismaModel>
_max?: NestedDateTimeNullableFilter<$PrismaModel>
}
export type NestedBoolFilter<$PrismaModel = never> = {
equals?: boolean | BooleanFieldRefInput<$PrismaModel>
not?: NestedBoolFilter<$PrismaModel> | boolean
}
export type NestedIntWithAggregatesFilter<$PrismaModel = never> = {
equals?: number | IntFieldRefInput<$PrismaModel>
in?: number[] | ListIntFieldRefInput<$PrismaModel>
notIn?: number[] | ListIntFieldRefInput<$PrismaModel>
lt?: number | IntFieldRefInput<$PrismaModel>
lte?: number | IntFieldRefInput<$PrismaModel>
gt?: number | IntFieldRefInput<$PrismaModel>
gte?: number | IntFieldRefInput<$PrismaModel>
not?: NestedIntWithAggregatesFilter<$PrismaModel> | number
_count?: NestedIntFilter<$PrismaModel>
_avg?: NestedFloatFilter<$PrismaModel>
_sum?: NestedIntFilter<$PrismaModel>
_min?: NestedIntFilter<$PrismaModel>
_max?: NestedIntFilter<$PrismaModel>
}
export type NestedFloatFilter<$PrismaModel = never> = {
equals?: number | FloatFieldRefInput<$PrismaModel>
in?: number[] | ListFloatFieldRefInput<$PrismaModel>
notIn?: number[] | ListFloatFieldRefInput<$PrismaModel>
lt?: number | FloatFieldRefInput<$PrismaModel>
lte?: number | FloatFieldRefInput<$PrismaModel>
gt?: number | FloatFieldRefInput<$PrismaModel>
gte?: number | FloatFieldRefInput<$PrismaModel>
not?: NestedFloatFilter<$PrismaModel> | number
}
export type NestedBoolWithAggregatesFilter<$PrismaModel = never> = {
equals?: boolean | BooleanFieldRefInput<$PrismaModel>
not?: NestedBoolWithAggregatesFilter<$PrismaModel> | boolean
_count?: NestedIntFilter<$PrismaModel>
_min?: NestedBoolFilter<$PrismaModel>
_max?: NestedBoolFilter<$PrismaModel>
}
export type NestedEnumCampaignStatusFilter<$PrismaModel = never> = {
equals?: $Enums.CampaignStatus | EnumCampaignStatusFieldRefInput<$PrismaModel>
in?: $Enums.CampaignStatus[] | ListEnumCampaignStatusFieldRefInput<$PrismaModel>
notIn?: $Enums.CampaignStatus[] | ListEnumCampaignStatusFieldRefInput<$PrismaModel>
not?: NestedEnumCampaignStatusFilter<$PrismaModel> | $Enums.CampaignStatus
}
export type NestedEnumWheelDesignFilter<$PrismaModel = never> = {
equals?: $Enums.WheelDesign | EnumWheelDesignFieldRefInput<$PrismaModel>
in?: $Enums.WheelDesign[] | ListEnumWheelDesignFieldRefInput<$PrismaModel>
notIn?: $Enums.WheelDesign[] | ListEnumWheelDesignFieldRefInput<$PrismaModel>
not?: NestedEnumWheelDesignFilter<$PrismaModel> | $Enums.WheelDesign
}
export type NestedEnumCampaignStatusWithAggregatesFilter<$PrismaModel = never> = {
equals?: $Enums.CampaignStatus | EnumCampaignStatusFieldRefInput<$PrismaModel>
in?: $Enums.CampaignStatus[] | ListEnumCampaignStatusFieldRefInput<$PrismaModel>
notIn?: $Enums.CampaignStatus[] | ListEnumCampaignStatusFieldRefInput<$PrismaModel>
not?: NestedEnumCampaignStatusWithAggregatesFilter<$PrismaModel> | $Enums.CampaignStatus
_count?: NestedIntFilter<$PrismaModel>
_min?: NestedEnumCampaignStatusFilter<$PrismaModel>
_max?: NestedEnumCampaignStatusFilter<$PrismaModel>
}
export type NestedEnumWheelDesignWithAggregatesFilter<$PrismaModel = never> = {
equals?: $Enums.WheelDesign | EnumWheelDesignFieldRefInput<$PrismaModel>
in?: $Enums.WheelDesign[] | ListEnumWheelDesignFieldRefInput<$PrismaModel>
notIn?: $Enums.WheelDesign[] | ListEnumWheelDesignFieldRefInput<$PrismaModel>
not?: NestedEnumWheelDesignWithAggregatesFilter<$PrismaModel> | $Enums.WheelDesign
_count?: NestedIntFilter<$PrismaModel>
_min?: NestedEnumWheelDesignFilter<$PrismaModel>
_max?: NestedEnumWheelDesignFilter<$PrismaModel>
}
export type NestedJsonNullableFilter<$PrismaModel = never> =
| PatchUndefined<
Either<Required<NestedJsonNullableFilterBase<$PrismaModel>>, Exclude<keyof Required<NestedJsonNullableFilterBase<$PrismaModel>>, 'path'>>,
Required<NestedJsonNullableFilterBase<$PrismaModel>>
>
| OptionalFlat<Omit<Required<NestedJsonNullableFilterBase<$PrismaModel>>, 'path'>>
export type NestedJsonNullableFilterBase<$PrismaModel = never> = {
equals?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
path?: string[]
string_contains?: string | StringFieldRefInput<$PrismaModel>
string_starts_with?: string | StringFieldRefInput<$PrismaModel>
string_ends_with?: string | StringFieldRefInput<$PrismaModel>
array_contains?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
array_starts_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
array_ends_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
lt?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
lte?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
gt?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
gte?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
not?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
}
export type NestedEnumPrizeTypeFilter<$PrismaModel = never> = {
equals?: $Enums.PrizeType | EnumPrizeTypeFieldRefInput<$PrismaModel>
in?: $Enums.PrizeType[] | ListEnumPrizeTypeFieldRefInput<$PrismaModel>
notIn?: $Enums.PrizeType[] | ListEnumPrizeTypeFieldRefInput<$PrismaModel>
not?: NestedEnumPrizeTypeFilter<$PrismaModel> | $Enums.PrizeType
}
export type NestedEnumStockTypeFilter<$PrismaModel = never> = {
equals?: $Enums.StockType | EnumStockTypeFieldRefInput<$PrismaModel>
in?: $Enums.StockType[] | ListEnumStockTypeFieldRefInput<$PrismaModel>
notIn?: $Enums.StockType[] | ListEnumStockTypeFieldRefInput<$PrismaModel>
not?: NestedEnumStockTypeFilter<$PrismaModel> | $Enums.StockType
}
export type NestedEnumPrizeStatusFilter<$PrismaModel = never> = {
equals?: $Enums.PrizeStatus | EnumPrizeStatusFieldRefInput<$PrismaModel>
in?: $Enums.PrizeStatus[] | ListEnumPrizeStatusFieldRefInput<$PrismaModel>
notIn?: $Enums.PrizeStatus[] | ListEnumPrizeStatusFieldRefInput<$PrismaModel>
not?: NestedEnumPrizeStatusFilter<$PrismaModel> | $Enums.PrizeStatus
}
export type NestedEnumPrizeTypeWithAggregatesFilter<$PrismaModel = never> = {
equals?: $Enums.PrizeType | EnumPrizeTypeFieldRefInput<$PrismaModel>
in?: $Enums.PrizeType[] | ListEnumPrizeTypeFieldRefInput<$PrismaModel>
notIn?: $Enums.PrizeType[] | ListEnumPrizeTypeFieldRefInput<$PrismaModel>
not?: NestedEnumPrizeTypeWithAggregatesFilter<$PrismaModel> | $Enums.PrizeType
_count?: NestedIntFilter<$PrismaModel>
_min?: NestedEnumPrizeTypeFilter<$PrismaModel>
_max?: NestedEnumPrizeTypeFilter<$PrismaModel>
}
export type NestedEnumStockTypeWithAggregatesFilter<$PrismaModel = never> = {
equals?: $Enums.StockType | EnumStockTypeFieldRefInput<$PrismaModel>
in?: $Enums.StockType[] | ListEnumStockTypeFieldRefInput<$PrismaModel>
notIn?: $Enums.StockType[] | ListEnumStockTypeFieldRefInput<$PrismaModel>
not?: NestedEnumStockTypeWithAggregatesFilter<$PrismaModel> | $Enums.StockType
_count?: NestedIntFilter<$PrismaModel>
_min?: NestedEnumStockTypeFilter<$PrismaModel>
_max?: NestedEnumStockTypeFilter<$PrismaModel>
}
export type NestedIntNullableWithAggregatesFilter<$PrismaModel = never> = {
equals?: number | IntFieldRefInput<$PrismaModel> | null
in?: number[] | ListIntFieldRefInput<$PrismaModel> | null
notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null
lt?: number | IntFieldRefInput<$PrismaModel>
lte?: number | IntFieldRefInput<$PrismaModel>
gt?: number | IntFieldRefInput<$PrismaModel>
gte?: number | IntFieldRefInput<$PrismaModel>
not?: NestedIntNullableWithAggregatesFilter<$PrismaModel> | number | null
_count?: NestedIntNullableFilter<$PrismaModel>
_avg?: NestedFloatNullableFilter<$PrismaModel>
_sum?: NestedIntNullableFilter<$PrismaModel>
_min?: NestedIntNullableFilter<$PrismaModel>
_max?: NestedIntNullableFilter<$PrismaModel>
}
export type NestedFloatNullableFilter<$PrismaModel = never> = {
equals?: number | FloatFieldRefInput<$PrismaModel> | null
in?: number[] | ListFloatFieldRefInput<$PrismaModel> | null
notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> | null
lt?: number | FloatFieldRefInput<$PrismaModel>
lte?: number | FloatFieldRefInput<$PrismaModel>
gt?: number | FloatFieldRefInput<$PrismaModel>
gte?: number | FloatFieldRefInput<$PrismaModel>
not?: NestedFloatNullableFilter<$PrismaModel> | number | null
}
export type NestedEnumPrizeStatusWithAggregatesFilter<$PrismaModel = never> = {
equals?: $Enums.PrizeStatus | EnumPrizeStatusFieldRefInput<$PrismaModel>
in?: $Enums.PrizeStatus[] | ListEnumPrizeStatusFieldRefInput<$PrismaModel>
notIn?: $Enums.PrizeStatus[] | ListEnumPrizeStatusFieldRefInput<$PrismaModel>
not?: NestedEnumPrizeStatusWithAggregatesFilter<$PrismaModel> | $Enums.PrizeStatus
_count?: NestedIntFilter<$PrismaModel>
_min?: NestedEnumPrizeStatusFilter<$PrismaModel>
_max?: NestedEnumPrizeStatusFilter<$PrismaModel>
}
export type NestedEnumChanceTxnTypeFilter<$PrismaModel = never> = {
equals?: $Enums.ChanceTxnType | EnumChanceTxnTypeFieldRefInput<$PrismaModel>
in?: $Enums.ChanceTxnType[] | ListEnumChanceTxnTypeFieldRefInput<$PrismaModel>
notIn?: $Enums.ChanceTxnType[] | ListEnumChanceTxnTypeFieldRefInput<$PrismaModel>
not?: NestedEnumChanceTxnTypeFilter<$PrismaModel> | $Enums.ChanceTxnType
}
export type NestedEnumChanceTxnTypeWithAggregatesFilter<$PrismaModel = never> = {
equals?: $Enums.ChanceTxnType | EnumChanceTxnTypeFieldRefInput<$PrismaModel>
in?: $Enums.ChanceTxnType[] | ListEnumChanceTxnTypeFieldRefInput<$PrismaModel>
notIn?: $Enums.ChanceTxnType[] | ListEnumChanceTxnTypeFieldRefInput<$PrismaModel>
not?: NestedEnumChanceTxnTypeWithAggregatesFilter<$PrismaModel> | $Enums.ChanceTxnType
_count?: NestedIntFilter<$PrismaModel>
_min?: NestedEnumChanceTxnTypeFilter<$PrismaModel>
_max?: NestedEnumChanceTxnTypeFilter<$PrismaModel>
}
export type NestedEnumSpinStatusFilter<$PrismaModel = never> = {
equals?: $Enums.SpinStatus | EnumSpinStatusFieldRefInput<$PrismaModel>
in?: $Enums.SpinStatus[] | ListEnumSpinStatusFieldRefInput<$PrismaModel>
notIn?: $Enums.SpinStatus[] | ListEnumSpinStatusFieldRefInput<$PrismaModel>
not?: NestedEnumSpinStatusFilter<$PrismaModel> | $Enums.SpinStatus
}
export type NestedEnumSpinStatusWithAggregatesFilter<$PrismaModel = never> = {
equals?: $Enums.SpinStatus | EnumSpinStatusFieldRefInput<$PrismaModel>
in?: $Enums.SpinStatus[] | ListEnumSpinStatusFieldRefInput<$PrismaModel>
notIn?: $Enums.SpinStatus[] | ListEnumSpinStatusFieldRefInput<$PrismaModel>
not?: NestedEnumSpinStatusWithAggregatesFilter<$PrismaModel> | $Enums.SpinStatus
_count?: NestedIntFilter<$PrismaModel>
_min?: NestedEnumSpinStatusFilter<$PrismaModel>
_max?: NestedEnumSpinStatusFilter<$PrismaModel>
}
export type NestedEnumUserPrizeStatusFilter<$PrismaModel = never> = {
equals?: $Enums.UserPrizeStatus | EnumUserPrizeStatusFieldRefInput<$PrismaModel>
in?: $Enums.UserPrizeStatus[] | ListEnumUserPrizeStatusFieldRefInput<$PrismaModel>
notIn?: $Enums.UserPrizeStatus[] | ListEnumUserPrizeStatusFieldRefInput<$PrismaModel>
not?: NestedEnumUserPrizeStatusFilter<$PrismaModel> | $Enums.UserPrizeStatus
}
export type NestedEnumUserPrizeStatusWithAggregatesFilter<$PrismaModel = never> = {
equals?: $Enums.UserPrizeStatus | EnumUserPrizeStatusFieldRefInput<$PrismaModel>
in?: $Enums.UserPrizeStatus[] | ListEnumUserPrizeStatusFieldRefInput<$PrismaModel>
notIn?: $Enums.UserPrizeStatus[] | ListEnumUserPrizeStatusFieldRefInput<$PrismaModel>
not?: NestedEnumUserPrizeStatusWithAggregatesFilter<$PrismaModel> | $Enums.UserPrizeStatus
_count?: NestedIntFilter<$PrismaModel>
_min?: NestedEnumUserPrizeStatusFilter<$PrismaModel>
_max?: NestedEnumUserPrizeStatusFilter<$PrismaModel>
}
export type NestedEnumSmsTypeFilter<$PrismaModel = never> = {
equals?: $Enums.SmsType | EnumSmsTypeFieldRefInput<$PrismaModel>
in?: $Enums.SmsType[] | ListEnumSmsTypeFieldRefInput<$PrismaModel>
notIn?: $Enums.SmsType[] | ListEnumSmsTypeFieldRefInput<$PrismaModel>
not?: NestedEnumSmsTypeFilter<$PrismaModel> | $Enums.SmsType
}
export type NestedEnumSmsStatusFilter<$PrismaModel = never> = {
equals?: $Enums.SmsStatus | EnumSmsStatusFieldRefInput<$PrismaModel>
in?: $Enums.SmsStatus[] | ListEnumSmsStatusFieldRefInput<$PrismaModel>
notIn?: $Enums.SmsStatus[] | ListEnumSmsStatusFieldRefInput<$PrismaModel>
not?: NestedEnumSmsStatusFilter<$PrismaModel> | $Enums.SmsStatus
}
export type NestedEnumSmsTypeWithAggregatesFilter<$PrismaModel = never> = {
equals?: $Enums.SmsType | EnumSmsTypeFieldRefInput<$PrismaModel>
in?: $Enums.SmsType[] | ListEnumSmsTypeFieldRefInput<$PrismaModel>
notIn?: $Enums.SmsType[] | ListEnumSmsTypeFieldRefInput<$PrismaModel>
not?: NestedEnumSmsTypeWithAggregatesFilter<$PrismaModel> | $Enums.SmsType
_count?: NestedIntFilter<$PrismaModel>
_min?: NestedEnumSmsTypeFilter<$PrismaModel>
_max?: NestedEnumSmsTypeFilter<$PrismaModel>
}
export type NestedEnumSmsStatusWithAggregatesFilter<$PrismaModel = never> = {
equals?: $Enums.SmsStatus | EnumSmsStatusFieldRefInput<$PrismaModel>
in?: $Enums.SmsStatus[] | ListEnumSmsStatusFieldRefInput<$PrismaModel>
notIn?: $Enums.SmsStatus[] | ListEnumSmsStatusFieldRefInput<$PrismaModel>
not?: NestedEnumSmsStatusWithAggregatesFilter<$PrismaModel> | $Enums.SmsStatus
_count?: NestedIntFilter<$PrismaModel>
_min?: NestedEnumSmsStatusFilter<$PrismaModel>
_max?: NestedEnumSmsStatusFilter<$PrismaModel>
}
export type AdminLogCreateWithoutAdminInput = {
id?: string
action: string
entityType: string
entityId: string
oldValue?: NullableJsonNullValueInput | InputJsonValue
newValue?: NullableJsonNullValueInput | InputJsonValue
ip?: string | null
createdAt?: Date | string
}
export type AdminLogUncheckedCreateWithoutAdminInput = {
id?: string
action: string
entityType: string
entityId: string
oldValue?: NullableJsonNullValueInput | InputJsonValue
newValue?: NullableJsonNullValueInput | InputJsonValue
ip?: string | null
createdAt?: Date | string
}
export type AdminLogCreateOrConnectWithoutAdminInput = {
where: AdminLogWhereUniqueInput
create: XOR<AdminLogCreateWithoutAdminInput, AdminLogUncheckedCreateWithoutAdminInput>
}
export type AdminLogCreateManyAdminInputEnvelope = {
data: AdminLogCreateManyAdminInput | AdminLogCreateManyAdminInput[]
skipDuplicates?: boolean
}
export type ChanceTransactionCreateWithoutCreatedByInput = {
id?: string
amount: number
type: $Enums.ChanceTxnType
referenceType?: string | null
referenceId?: string | null
description?: string | null
createdAt?: Date | string
user: UserCreateNestedOneWithoutChanceTransactionsInput
campaign: CampaignCreateNestedOneWithoutChanceTxnsInput
}
export type ChanceTransactionUncheckedCreateWithoutCreatedByInput = {
id?: string
userId: string
campaignId: string
amount: number
type: $Enums.ChanceTxnType
referenceType?: string | null
referenceId?: string | null
description?: string | null
createdAt?: Date | string
}
export type ChanceTransactionCreateOrConnectWithoutCreatedByInput = {
where: ChanceTransactionWhereUniqueInput
create: XOR<ChanceTransactionCreateWithoutCreatedByInput, ChanceTransactionUncheckedCreateWithoutCreatedByInput>
}
export type ChanceTransactionCreateManyCreatedByInputEnvelope = {
data: ChanceTransactionCreateManyCreatedByInput | ChanceTransactionCreateManyCreatedByInput[]
skipDuplicates?: boolean
}
export type AdminLogUpsertWithWhereUniqueWithoutAdminInput = {
where: AdminLogWhereUniqueInput
update: XOR<AdminLogUpdateWithoutAdminInput, AdminLogUncheckedUpdateWithoutAdminInput>
create: XOR<AdminLogCreateWithoutAdminInput, AdminLogUncheckedCreateWithoutAdminInput>
}
export type AdminLogUpdateWithWhereUniqueWithoutAdminInput = {
where: AdminLogWhereUniqueInput
data: XOR<AdminLogUpdateWithoutAdminInput, AdminLogUncheckedUpdateWithoutAdminInput>
}
export type AdminLogUpdateManyWithWhereWithoutAdminInput = {
where: AdminLogScalarWhereInput
data: XOR<AdminLogUpdateManyMutationInput, AdminLogUncheckedUpdateManyWithoutAdminInput>
}
export type AdminLogScalarWhereInput = {
AND?: AdminLogScalarWhereInput | AdminLogScalarWhereInput[]
OR?: AdminLogScalarWhereInput[]
NOT?: AdminLogScalarWhereInput | AdminLogScalarWhereInput[]
id?: StringFilter<"AdminLog"> | string
adminId?: StringFilter<"AdminLog"> | string
action?: StringFilter<"AdminLog"> | string
entityType?: StringFilter<"AdminLog"> | string
entityId?: StringFilter<"AdminLog"> | string
oldValue?: JsonNullableFilter<"AdminLog">
newValue?: JsonNullableFilter<"AdminLog">
ip?: StringNullableFilter<"AdminLog"> | string | null
createdAt?: DateTimeFilter<"AdminLog"> | Date | string
}
export type ChanceTransactionUpsertWithWhereUniqueWithoutCreatedByInput = {
where: ChanceTransactionWhereUniqueInput
update: XOR<ChanceTransactionUpdateWithoutCreatedByInput, ChanceTransactionUncheckedUpdateWithoutCreatedByInput>
create: XOR<ChanceTransactionCreateWithoutCreatedByInput, ChanceTransactionUncheckedCreateWithoutCreatedByInput>
}
export type ChanceTransactionUpdateWithWhereUniqueWithoutCreatedByInput = {
where: ChanceTransactionWhereUniqueInput
data: XOR<ChanceTransactionUpdateWithoutCreatedByInput, ChanceTransactionUncheckedUpdateWithoutCreatedByInput>
}
export type ChanceTransactionUpdateManyWithWhereWithoutCreatedByInput = {
where: ChanceTransactionScalarWhereInput
data: XOR<ChanceTransactionUpdateManyMutationInput, ChanceTransactionUncheckedUpdateManyWithoutCreatedByInput>
}
export type ChanceTransactionScalarWhereInput = {
AND?: ChanceTransactionScalarWhereInput | ChanceTransactionScalarWhereInput[]
OR?: ChanceTransactionScalarWhereInput[]
NOT?: ChanceTransactionScalarWhereInput | ChanceTransactionScalarWhereInput[]
id?: StringFilter<"ChanceTransaction"> | string
userId?: StringFilter<"ChanceTransaction"> | string
campaignId?: StringFilter<"ChanceTransaction"> | string
amount?: IntFilter<"ChanceTransaction"> | number
type?: EnumChanceTxnTypeFilter<"ChanceTransaction"> | $Enums.ChanceTxnType
referenceType?: StringNullableFilter<"ChanceTransaction"> | string | null
referenceId?: StringNullableFilter<"ChanceTransaction"> | string | null
description?: StringNullableFilter<"ChanceTransaction"> | string | null
createdById?: StringNullableFilter<"ChanceTransaction"> | string | null
createdAt?: DateTimeFilter<"ChanceTransaction"> | Date | string
}
export type UserCampaignCreateWithoutUserInput = {
id?: string
totalChances?: number
usedChances?: number
createdAt?: Date | string
updatedAt?: Date | string
campaign: CampaignCreateNestedOneWithoutUserCampaignsInput
}
export type UserCampaignUncheckedCreateWithoutUserInput = {
id?: string
campaignId: string
totalChances?: number
usedChances?: number
createdAt?: Date | string
updatedAt?: Date | string
}
export type UserCampaignCreateOrConnectWithoutUserInput = {
where: UserCampaignWhereUniqueInput
create: XOR<UserCampaignCreateWithoutUserInput, UserCampaignUncheckedCreateWithoutUserInput>
}
export type UserCampaignCreateManyUserInputEnvelope = {
data: UserCampaignCreateManyUserInput | UserCampaignCreateManyUserInput[]
skipDuplicates?: boolean
}
export type ChanceTransactionCreateWithoutUserInput = {
id?: string
amount: number
type: $Enums.ChanceTxnType
referenceType?: string | null
referenceId?: string | null
description?: string | null
createdAt?: Date | string
campaign: CampaignCreateNestedOneWithoutChanceTxnsInput
createdBy?: AdminCreateNestedOneWithoutChanceTxnsInput
}
export type ChanceTransactionUncheckedCreateWithoutUserInput = {
id?: string
campaignId: string
amount: number
type: $Enums.ChanceTxnType
referenceType?: string | null
referenceId?: string | null
description?: string | null
createdById?: string | null
createdAt?: Date | string
}
export type ChanceTransactionCreateOrConnectWithoutUserInput = {
where: ChanceTransactionWhereUniqueInput
create: XOR<ChanceTransactionCreateWithoutUserInput, ChanceTransactionUncheckedCreateWithoutUserInput>
}
export type ChanceTransactionCreateManyUserInputEnvelope = {
data: ChanceTransactionCreateManyUserInput | ChanceTransactionCreateManyUserInput[]
skipDuplicates?: boolean
}
export type SpinCreateWithoutUserInput = {
id?: string
status?: $Enums.SpinStatus
idempotencyKey: string
ip?: string | null
userAgent?: string | null
createdAt?: Date | string
campaign: CampaignCreateNestedOneWithoutSpinsInput
prize?: PrizeCreateNestedOneWithoutSpinsInput
userPrize?: UserPrizeCreateNestedOneWithoutSpinInput
}
export type SpinUncheckedCreateWithoutUserInput = {
id?: string
campaignId: string
prizeId?: string | null
status?: $Enums.SpinStatus
idempotencyKey: string
ip?: string | null
userAgent?: string | null
createdAt?: Date | string
userPrize?: UserPrizeUncheckedCreateNestedOneWithoutSpinInput
}
export type SpinCreateOrConnectWithoutUserInput = {
where: SpinWhereUniqueInput
create: XOR<SpinCreateWithoutUserInput, SpinUncheckedCreateWithoutUserInput>
}
export type SpinCreateManyUserInputEnvelope = {
data: SpinCreateManyUserInput | SpinCreateManyUserInput[]
skipDuplicates?: boolean
}
export type UserPrizeCreateWithoutUserInput = {
id?: string
code?: string | null
status?: $Enums.UserPrizeStatus
wonAt?: Date | string
redeemedAt?: Date | string | null
campaign: CampaignCreateNestedOneWithoutUserPrizesInput
prize: PrizeCreateNestedOneWithoutUserPrizesInput
spin: SpinCreateNestedOneWithoutUserPrizeInput
}
export type UserPrizeUncheckedCreateWithoutUserInput = {
id?: string
campaignId: string
prizeId: string
spinId: string
code?: string | null
status?: $Enums.UserPrizeStatus
wonAt?: Date | string
redeemedAt?: Date | string | null
}
export type UserPrizeCreateOrConnectWithoutUserInput = {
where: UserPrizeWhereUniqueInput
create: XOR<UserPrizeCreateWithoutUserInput, UserPrizeUncheckedCreateWithoutUserInput>
}
export type UserPrizeCreateManyUserInputEnvelope = {
data: UserPrizeCreateManyUserInput | UserPrizeCreateManyUserInput[]
skipDuplicates?: boolean
}
export type OtpCodeCreateWithoutUserInput = {
id?: string
mobile: string
code: string
attempts?: number
consumed?: boolean
expiresAt: Date | string
createdAt?: Date | string
}
export type OtpCodeUncheckedCreateWithoutUserInput = {
id?: string
mobile: string
code: string
attempts?: number
consumed?: boolean
expiresAt: Date | string
createdAt?: Date | string
}
export type OtpCodeCreateOrConnectWithoutUserInput = {
where: OtpCodeWhereUniqueInput
create: XOR<OtpCodeCreateWithoutUserInput, OtpCodeUncheckedCreateWithoutUserInput>
}
export type OtpCodeCreateManyUserInputEnvelope = {
data: OtpCodeCreateManyUserInput | OtpCodeCreateManyUserInput[]
skipDuplicates?: boolean
}
export type SmsLogCreateWithoutUserInput = {
id?: string
mobile: string
type: $Enums.SmsType
message: string
provider?: string
status?: $Enums.SmsStatus
providerResponse?: NullableJsonNullValueInput | InputJsonValue
createdAt?: Date | string
}
export type SmsLogUncheckedCreateWithoutUserInput = {
id?: string
mobile: string
type: $Enums.SmsType
message: string
provider?: string
status?: $Enums.SmsStatus
providerResponse?: NullableJsonNullValueInput | InputJsonValue
createdAt?: Date | string
}
export type SmsLogCreateOrConnectWithoutUserInput = {
where: SmsLogWhereUniqueInput
create: XOR<SmsLogCreateWithoutUserInput, SmsLogUncheckedCreateWithoutUserInput>
}
export type SmsLogCreateManyUserInputEnvelope = {
data: SmsLogCreateManyUserInput | SmsLogCreateManyUserInput[]
skipDuplicates?: boolean
}
export type UserCampaignUpsertWithWhereUniqueWithoutUserInput = {
where: UserCampaignWhereUniqueInput
update: XOR<UserCampaignUpdateWithoutUserInput, UserCampaignUncheckedUpdateWithoutUserInput>
create: XOR<UserCampaignCreateWithoutUserInput, UserCampaignUncheckedCreateWithoutUserInput>
}
export type UserCampaignUpdateWithWhereUniqueWithoutUserInput = {
where: UserCampaignWhereUniqueInput
data: XOR<UserCampaignUpdateWithoutUserInput, UserCampaignUncheckedUpdateWithoutUserInput>
}
export type UserCampaignUpdateManyWithWhereWithoutUserInput = {
where: UserCampaignScalarWhereInput
data: XOR<UserCampaignUpdateManyMutationInput, UserCampaignUncheckedUpdateManyWithoutUserInput>
}
export type UserCampaignScalarWhereInput = {
AND?: UserCampaignScalarWhereInput | UserCampaignScalarWhereInput[]
OR?: UserCampaignScalarWhereInput[]
NOT?: UserCampaignScalarWhereInput | UserCampaignScalarWhereInput[]
id?: StringFilter<"UserCampaign"> | string
userId?: StringFilter<"UserCampaign"> | string
campaignId?: StringFilter<"UserCampaign"> | string
totalChances?: IntFilter<"UserCampaign"> | number
usedChances?: IntFilter<"UserCampaign"> | number
createdAt?: DateTimeFilter<"UserCampaign"> | Date | string
updatedAt?: DateTimeFilter<"UserCampaign"> | Date | string
}
export type ChanceTransactionUpsertWithWhereUniqueWithoutUserInput = {
where: ChanceTransactionWhereUniqueInput
update: XOR<ChanceTransactionUpdateWithoutUserInput, ChanceTransactionUncheckedUpdateWithoutUserInput>
create: XOR<ChanceTransactionCreateWithoutUserInput, ChanceTransactionUncheckedCreateWithoutUserInput>
}
export type ChanceTransactionUpdateWithWhereUniqueWithoutUserInput = {
where: ChanceTransactionWhereUniqueInput
data: XOR<ChanceTransactionUpdateWithoutUserInput, ChanceTransactionUncheckedUpdateWithoutUserInput>
}
export type ChanceTransactionUpdateManyWithWhereWithoutUserInput = {
where: ChanceTransactionScalarWhereInput
data: XOR<ChanceTransactionUpdateManyMutationInput, ChanceTransactionUncheckedUpdateManyWithoutUserInput>
}
export type SpinUpsertWithWhereUniqueWithoutUserInput = {
where: SpinWhereUniqueInput
update: XOR<SpinUpdateWithoutUserInput, SpinUncheckedUpdateWithoutUserInput>
create: XOR<SpinCreateWithoutUserInput, SpinUncheckedCreateWithoutUserInput>
}
export type SpinUpdateWithWhereUniqueWithoutUserInput = {
where: SpinWhereUniqueInput
data: XOR<SpinUpdateWithoutUserInput, SpinUncheckedUpdateWithoutUserInput>
}
export type SpinUpdateManyWithWhereWithoutUserInput = {
where: SpinScalarWhereInput
data: XOR<SpinUpdateManyMutationInput, SpinUncheckedUpdateManyWithoutUserInput>
}
export type SpinScalarWhereInput = {
AND?: SpinScalarWhereInput | SpinScalarWhereInput[]
OR?: SpinScalarWhereInput[]
NOT?: SpinScalarWhereInput | SpinScalarWhereInput[]
id?: StringFilter<"Spin"> | string
userId?: StringFilter<"Spin"> | string
campaignId?: StringFilter<"Spin"> | string
prizeId?: StringNullableFilter<"Spin"> | string | null
status?: EnumSpinStatusFilter<"Spin"> | $Enums.SpinStatus
idempotencyKey?: StringFilter<"Spin"> | string
ip?: StringNullableFilter<"Spin"> | string | null
userAgent?: StringNullableFilter<"Spin"> | string | null
createdAt?: DateTimeFilter<"Spin"> | Date | string
}
export type UserPrizeUpsertWithWhereUniqueWithoutUserInput = {
where: UserPrizeWhereUniqueInput
update: XOR<UserPrizeUpdateWithoutUserInput, UserPrizeUncheckedUpdateWithoutUserInput>
create: XOR<UserPrizeCreateWithoutUserInput, UserPrizeUncheckedCreateWithoutUserInput>
}
export type UserPrizeUpdateWithWhereUniqueWithoutUserInput = {
where: UserPrizeWhereUniqueInput
data: XOR<UserPrizeUpdateWithoutUserInput, UserPrizeUncheckedUpdateWithoutUserInput>
}
export type UserPrizeUpdateManyWithWhereWithoutUserInput = {
where: UserPrizeScalarWhereInput
data: XOR<UserPrizeUpdateManyMutationInput, UserPrizeUncheckedUpdateManyWithoutUserInput>
}
export type UserPrizeScalarWhereInput = {
AND?: UserPrizeScalarWhereInput | UserPrizeScalarWhereInput[]
OR?: UserPrizeScalarWhereInput[]
NOT?: UserPrizeScalarWhereInput | UserPrizeScalarWhereInput[]
id?: StringFilter<"UserPrize"> | string
userId?: StringFilter<"UserPrize"> | string
campaignId?: StringFilter<"UserPrize"> | string
prizeId?: StringFilter<"UserPrize"> | string
spinId?: StringFilter<"UserPrize"> | string
code?: StringNullableFilter<"UserPrize"> | string | null
status?: EnumUserPrizeStatusFilter<"UserPrize"> | $Enums.UserPrizeStatus
wonAt?: DateTimeFilter<"UserPrize"> | Date | string
redeemedAt?: DateTimeNullableFilter<"UserPrize"> | Date | string | null
}
export type OtpCodeUpsertWithWhereUniqueWithoutUserInput = {
where: OtpCodeWhereUniqueInput
update: XOR<OtpCodeUpdateWithoutUserInput, OtpCodeUncheckedUpdateWithoutUserInput>
create: XOR<OtpCodeCreateWithoutUserInput, OtpCodeUncheckedCreateWithoutUserInput>
}
export type OtpCodeUpdateWithWhereUniqueWithoutUserInput = {
where: OtpCodeWhereUniqueInput
data: XOR<OtpCodeUpdateWithoutUserInput, OtpCodeUncheckedUpdateWithoutUserInput>
}
export type OtpCodeUpdateManyWithWhereWithoutUserInput = {
where: OtpCodeScalarWhereInput
data: XOR<OtpCodeUpdateManyMutationInput, OtpCodeUncheckedUpdateManyWithoutUserInput>
}
export type OtpCodeScalarWhereInput = {
AND?: OtpCodeScalarWhereInput | OtpCodeScalarWhereInput[]
OR?: OtpCodeScalarWhereInput[]
NOT?: OtpCodeScalarWhereInput | OtpCodeScalarWhereInput[]
id?: StringFilter<"OtpCode"> | string
mobile?: StringFilter<"OtpCode"> | string
code?: StringFilter<"OtpCode"> | string
userId?: StringNullableFilter<"OtpCode"> | string | null
attempts?: IntFilter<"OtpCode"> | number
consumed?: BoolFilter<"OtpCode"> | boolean
expiresAt?: DateTimeFilter<"OtpCode"> | Date | string
createdAt?: DateTimeFilter<"OtpCode"> | Date | string
}
export type SmsLogUpsertWithWhereUniqueWithoutUserInput = {
where: SmsLogWhereUniqueInput
update: XOR<SmsLogUpdateWithoutUserInput, SmsLogUncheckedUpdateWithoutUserInput>
create: XOR<SmsLogCreateWithoutUserInput, SmsLogUncheckedCreateWithoutUserInput>
}
export type SmsLogUpdateWithWhereUniqueWithoutUserInput = {
where: SmsLogWhereUniqueInput
data: XOR<SmsLogUpdateWithoutUserInput, SmsLogUncheckedUpdateWithoutUserInput>
}
export type SmsLogUpdateManyWithWhereWithoutUserInput = {
where: SmsLogScalarWhereInput
data: XOR<SmsLogUpdateManyMutationInput, SmsLogUncheckedUpdateManyWithoutUserInput>
}
export type SmsLogScalarWhereInput = {
AND?: SmsLogScalarWhereInput | SmsLogScalarWhereInput[]
OR?: SmsLogScalarWhereInput[]
NOT?: SmsLogScalarWhereInput | SmsLogScalarWhereInput[]
id?: StringFilter<"SmsLog"> | string
userId?: StringNullableFilter<"SmsLog"> | string | null
mobile?: StringFilter<"SmsLog"> | string
type?: EnumSmsTypeFilter<"SmsLog"> | $Enums.SmsType
message?: StringFilter<"SmsLog"> | string
provider?: StringFilter<"SmsLog"> | string
status?: EnumSmsStatusFilter<"SmsLog"> | $Enums.SmsStatus
providerResponse?: JsonNullableFilter<"SmsLog">
createdAt?: DateTimeFilter<"SmsLog"> | Date | string
}
export type UserCreateWithoutOtpCodesInput = {
id?: string
mobile: string
name?: string | null
status?: $Enums.UserStatus
lastLoginAt?: Date | string | null
createdAt?: Date | string
updatedAt?: Date | string
userCampaigns?: UserCampaignCreateNestedManyWithoutUserInput
chanceTransactions?: ChanceTransactionCreateNestedManyWithoutUserInput
spins?: SpinCreateNestedManyWithoutUserInput
userPrizes?: UserPrizeCreateNestedManyWithoutUserInput
smsLogs?: SmsLogCreateNestedManyWithoutUserInput
}
export type UserUncheckedCreateWithoutOtpCodesInput = {
id?: string
mobile: string
name?: string | null
status?: $Enums.UserStatus
lastLoginAt?: Date | string | null
createdAt?: Date | string
updatedAt?: Date | string
userCampaigns?: UserCampaignUncheckedCreateNestedManyWithoutUserInput
chanceTransactions?: ChanceTransactionUncheckedCreateNestedManyWithoutUserInput
spins?: SpinUncheckedCreateNestedManyWithoutUserInput
userPrizes?: UserPrizeUncheckedCreateNestedManyWithoutUserInput
smsLogs?: SmsLogUncheckedCreateNestedManyWithoutUserInput
}
export type UserCreateOrConnectWithoutOtpCodesInput = {
where: UserWhereUniqueInput
create: XOR<UserCreateWithoutOtpCodesInput, UserUncheckedCreateWithoutOtpCodesInput>
}
export type UserUpsertWithoutOtpCodesInput = {
update: XOR<UserUpdateWithoutOtpCodesInput, UserUncheckedUpdateWithoutOtpCodesInput>
create: XOR<UserCreateWithoutOtpCodesInput, UserUncheckedCreateWithoutOtpCodesInput>
where?: UserWhereInput
}
export type UserUpdateToOneWithWhereWithoutOtpCodesInput = {
where?: UserWhereInput
data: XOR<UserUpdateWithoutOtpCodesInput, UserUncheckedUpdateWithoutOtpCodesInput>
}
export type UserUpdateWithoutOtpCodesInput = {
id?: StringFieldUpdateOperationsInput | string
mobile?: StringFieldUpdateOperationsInput | string
name?: NullableStringFieldUpdateOperationsInput | string | null
status?: EnumUserStatusFieldUpdateOperationsInput | $Enums.UserStatus
lastLoginAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
userCampaigns?: UserCampaignUpdateManyWithoutUserNestedInput
chanceTransactions?: ChanceTransactionUpdateManyWithoutUserNestedInput
spins?: SpinUpdateManyWithoutUserNestedInput
userPrizes?: UserPrizeUpdateManyWithoutUserNestedInput
smsLogs?: SmsLogUpdateManyWithoutUserNestedInput
}
export type UserUncheckedUpdateWithoutOtpCodesInput = {
id?: StringFieldUpdateOperationsInput | string
mobile?: StringFieldUpdateOperationsInput | string
name?: NullableStringFieldUpdateOperationsInput | string | null
status?: EnumUserStatusFieldUpdateOperationsInput | $Enums.UserStatus
lastLoginAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
userCampaigns?: UserCampaignUncheckedUpdateManyWithoutUserNestedInput
chanceTransactions?: ChanceTransactionUncheckedUpdateManyWithoutUserNestedInput
spins?: SpinUncheckedUpdateManyWithoutUserNestedInput
userPrizes?: UserPrizeUncheckedUpdateManyWithoutUserNestedInput
smsLogs?: SmsLogUncheckedUpdateManyWithoutUserNestedInput
}
export type PrizeCreateWithoutCampaignInput = {
id?: string
title: string
description?: string | null
image?: string | null
type: $Enums.PrizeType
stockType: $Enums.StockType
initialStock?: number | null
remainingStock?: number | null
weight: number
status?: $Enums.PrizeStatus
sortOrder?: number
segmentColor: string
expiresAt?: Date | string | null
smsTemplate?: string | null
createdAt?: Date | string
updatedAt?: Date | string
spins?: SpinCreateNestedManyWithoutPrizeInput
userPrizes?: UserPrizeCreateNestedManyWithoutPrizeInput
}
export type PrizeUncheckedCreateWithoutCampaignInput = {
id?: string
title: string
description?: string | null
image?: string | null
type: $Enums.PrizeType
stockType: $Enums.StockType
initialStock?: number | null
remainingStock?: number | null
weight: number
status?: $Enums.PrizeStatus
sortOrder?: number
segmentColor: string
expiresAt?: Date | string | null
smsTemplate?: string | null
createdAt?: Date | string
updatedAt?: Date | string
spins?: SpinUncheckedCreateNestedManyWithoutPrizeInput
userPrizes?: UserPrizeUncheckedCreateNestedManyWithoutPrizeInput
}
export type PrizeCreateOrConnectWithoutCampaignInput = {
where: PrizeWhereUniqueInput
create: XOR<PrizeCreateWithoutCampaignInput, PrizeUncheckedCreateWithoutCampaignInput>
}
export type PrizeCreateManyCampaignInputEnvelope = {
data: PrizeCreateManyCampaignInput | PrizeCreateManyCampaignInput[]
skipDuplicates?: boolean
}
export type UserCampaignCreateWithoutCampaignInput = {
id?: string
totalChances?: number
usedChances?: number
createdAt?: Date | string
updatedAt?: Date | string
user: UserCreateNestedOneWithoutUserCampaignsInput
}
export type UserCampaignUncheckedCreateWithoutCampaignInput = {
id?: string
userId: string
totalChances?: number
usedChances?: number
createdAt?: Date | string
updatedAt?: Date | string
}
export type UserCampaignCreateOrConnectWithoutCampaignInput = {
where: UserCampaignWhereUniqueInput
create: XOR<UserCampaignCreateWithoutCampaignInput, UserCampaignUncheckedCreateWithoutCampaignInput>
}
export type UserCampaignCreateManyCampaignInputEnvelope = {
data: UserCampaignCreateManyCampaignInput | UserCampaignCreateManyCampaignInput[]
skipDuplicates?: boolean
}
export type ChanceTransactionCreateWithoutCampaignInput = {
id?: string
amount: number
type: $Enums.ChanceTxnType
referenceType?: string | null
referenceId?: string | null
description?: string | null
createdAt?: Date | string
user: UserCreateNestedOneWithoutChanceTransactionsInput
createdBy?: AdminCreateNestedOneWithoutChanceTxnsInput
}
export type ChanceTransactionUncheckedCreateWithoutCampaignInput = {
id?: string
userId: string
amount: number
type: $Enums.ChanceTxnType
referenceType?: string | null
referenceId?: string | null
description?: string | null
createdById?: string | null
createdAt?: Date | string
}
export type ChanceTransactionCreateOrConnectWithoutCampaignInput = {
where: ChanceTransactionWhereUniqueInput
create: XOR<ChanceTransactionCreateWithoutCampaignInput, ChanceTransactionUncheckedCreateWithoutCampaignInput>
}
export type ChanceTransactionCreateManyCampaignInputEnvelope = {
data: ChanceTransactionCreateManyCampaignInput | ChanceTransactionCreateManyCampaignInput[]
skipDuplicates?: boolean
}
export type SpinCreateWithoutCampaignInput = {
id?: string
status?: $Enums.SpinStatus
idempotencyKey: string
ip?: string | null
userAgent?: string | null
createdAt?: Date | string
user: UserCreateNestedOneWithoutSpinsInput
prize?: PrizeCreateNestedOneWithoutSpinsInput
userPrize?: UserPrizeCreateNestedOneWithoutSpinInput
}
export type SpinUncheckedCreateWithoutCampaignInput = {
id?: string
userId: string
prizeId?: string | null
status?: $Enums.SpinStatus
idempotencyKey: string
ip?: string | null
userAgent?: string | null
createdAt?: Date | string
userPrize?: UserPrizeUncheckedCreateNestedOneWithoutSpinInput
}
export type SpinCreateOrConnectWithoutCampaignInput = {
where: SpinWhereUniqueInput
create: XOR<SpinCreateWithoutCampaignInput, SpinUncheckedCreateWithoutCampaignInput>
}
export type SpinCreateManyCampaignInputEnvelope = {
data: SpinCreateManyCampaignInput | SpinCreateManyCampaignInput[]
skipDuplicates?: boolean
}
export type UserPrizeCreateWithoutCampaignInput = {
id?: string
code?: string | null
status?: $Enums.UserPrizeStatus
wonAt?: Date | string
redeemedAt?: Date | string | null
user: UserCreateNestedOneWithoutUserPrizesInput
prize: PrizeCreateNestedOneWithoutUserPrizesInput
spin: SpinCreateNestedOneWithoutUserPrizeInput
}
export type UserPrizeUncheckedCreateWithoutCampaignInput = {
id?: string
userId: string
prizeId: string
spinId: string
code?: string | null
status?: $Enums.UserPrizeStatus
wonAt?: Date | string
redeemedAt?: Date | string | null
}
export type UserPrizeCreateOrConnectWithoutCampaignInput = {
where: UserPrizeWhereUniqueInput
create: XOR<UserPrizeCreateWithoutCampaignInput, UserPrizeUncheckedCreateWithoutCampaignInput>
}
export type UserPrizeCreateManyCampaignInputEnvelope = {
data: UserPrizeCreateManyCampaignInput | UserPrizeCreateManyCampaignInput[]
skipDuplicates?: boolean
}
export type PrizeUpsertWithWhereUniqueWithoutCampaignInput = {
where: PrizeWhereUniqueInput
update: XOR<PrizeUpdateWithoutCampaignInput, PrizeUncheckedUpdateWithoutCampaignInput>
create: XOR<PrizeCreateWithoutCampaignInput, PrizeUncheckedCreateWithoutCampaignInput>
}
export type PrizeUpdateWithWhereUniqueWithoutCampaignInput = {
where: PrizeWhereUniqueInput
data: XOR<PrizeUpdateWithoutCampaignInput, PrizeUncheckedUpdateWithoutCampaignInput>
}
export type PrizeUpdateManyWithWhereWithoutCampaignInput = {
where: PrizeScalarWhereInput
data: XOR<PrizeUpdateManyMutationInput, PrizeUncheckedUpdateManyWithoutCampaignInput>
}
export type PrizeScalarWhereInput = {
AND?: PrizeScalarWhereInput | PrizeScalarWhereInput[]
OR?: PrizeScalarWhereInput[]
NOT?: PrizeScalarWhereInput | PrizeScalarWhereInput[]
id?: StringFilter<"Prize"> | string
campaignId?: StringFilter<"Prize"> | string
title?: StringFilter<"Prize"> | string
description?: StringNullableFilter<"Prize"> | string | null
image?: StringNullableFilter<"Prize"> | string | null
type?: EnumPrizeTypeFilter<"Prize"> | $Enums.PrizeType
stockType?: EnumStockTypeFilter<"Prize"> | $Enums.StockType
initialStock?: IntNullableFilter<"Prize"> | number | null
remainingStock?: IntNullableFilter<"Prize"> | number | null
weight?: IntFilter<"Prize"> | number
status?: EnumPrizeStatusFilter<"Prize"> | $Enums.PrizeStatus
sortOrder?: IntFilter<"Prize"> | number
segmentColor?: StringFilter<"Prize"> | string
expiresAt?: DateTimeNullableFilter<"Prize"> | Date | string | null
smsTemplate?: StringNullableFilter<"Prize"> | string | null
createdAt?: DateTimeFilter<"Prize"> | Date | string
updatedAt?: DateTimeFilter<"Prize"> | Date | string
}
export type UserCampaignUpsertWithWhereUniqueWithoutCampaignInput = {
where: UserCampaignWhereUniqueInput
update: XOR<UserCampaignUpdateWithoutCampaignInput, UserCampaignUncheckedUpdateWithoutCampaignInput>
create: XOR<UserCampaignCreateWithoutCampaignInput, UserCampaignUncheckedCreateWithoutCampaignInput>
}
export type UserCampaignUpdateWithWhereUniqueWithoutCampaignInput = {
where: UserCampaignWhereUniqueInput
data: XOR<UserCampaignUpdateWithoutCampaignInput, UserCampaignUncheckedUpdateWithoutCampaignInput>
}
export type UserCampaignUpdateManyWithWhereWithoutCampaignInput = {
where: UserCampaignScalarWhereInput
data: XOR<UserCampaignUpdateManyMutationInput, UserCampaignUncheckedUpdateManyWithoutCampaignInput>
}
export type ChanceTransactionUpsertWithWhereUniqueWithoutCampaignInput = {
where: ChanceTransactionWhereUniqueInput
update: XOR<ChanceTransactionUpdateWithoutCampaignInput, ChanceTransactionUncheckedUpdateWithoutCampaignInput>
create: XOR<ChanceTransactionCreateWithoutCampaignInput, ChanceTransactionUncheckedCreateWithoutCampaignInput>
}
export type ChanceTransactionUpdateWithWhereUniqueWithoutCampaignInput = {
where: ChanceTransactionWhereUniqueInput
data: XOR<ChanceTransactionUpdateWithoutCampaignInput, ChanceTransactionUncheckedUpdateWithoutCampaignInput>
}
export type ChanceTransactionUpdateManyWithWhereWithoutCampaignInput = {
where: ChanceTransactionScalarWhereInput
data: XOR<ChanceTransactionUpdateManyMutationInput, ChanceTransactionUncheckedUpdateManyWithoutCampaignInput>
}
export type SpinUpsertWithWhereUniqueWithoutCampaignInput = {
where: SpinWhereUniqueInput
update: XOR<SpinUpdateWithoutCampaignInput, SpinUncheckedUpdateWithoutCampaignInput>
create: XOR<SpinCreateWithoutCampaignInput, SpinUncheckedCreateWithoutCampaignInput>
}
export type SpinUpdateWithWhereUniqueWithoutCampaignInput = {
where: SpinWhereUniqueInput
data: XOR<SpinUpdateWithoutCampaignInput, SpinUncheckedUpdateWithoutCampaignInput>
}
export type SpinUpdateManyWithWhereWithoutCampaignInput = {
where: SpinScalarWhereInput
data: XOR<SpinUpdateManyMutationInput, SpinUncheckedUpdateManyWithoutCampaignInput>
}
export type UserPrizeUpsertWithWhereUniqueWithoutCampaignInput = {
where: UserPrizeWhereUniqueInput
update: XOR<UserPrizeUpdateWithoutCampaignInput, UserPrizeUncheckedUpdateWithoutCampaignInput>
create: XOR<UserPrizeCreateWithoutCampaignInput, UserPrizeUncheckedCreateWithoutCampaignInput>
}
export type UserPrizeUpdateWithWhereUniqueWithoutCampaignInput = {
where: UserPrizeWhereUniqueInput
data: XOR<UserPrizeUpdateWithoutCampaignInput, UserPrizeUncheckedUpdateWithoutCampaignInput>
}
export type UserPrizeUpdateManyWithWhereWithoutCampaignInput = {
where: UserPrizeScalarWhereInput
data: XOR<UserPrizeUpdateManyMutationInput, UserPrizeUncheckedUpdateManyWithoutCampaignInput>
}
export type CampaignCreateWithoutPrizesInput = {
id?: string
title: string
slug: string
description?: string | null
image?: string | null
banner?: string | null
logo?: string | null
startAt: Date | string
endAt: Date | string
status?: $Enums.CampaignStatus
defaultChances?: number
rules?: string | null
ctaText?: string | null
wheelDesign?: $Enums.WheelDesign
settings?: NullableJsonNullValueInput | InputJsonValue
createdAt?: Date | string
updatedAt?: Date | string
userCampaigns?: UserCampaignCreateNestedManyWithoutCampaignInput
chanceTxns?: ChanceTransactionCreateNestedManyWithoutCampaignInput
spins?: SpinCreateNestedManyWithoutCampaignInput
userPrizes?: UserPrizeCreateNestedManyWithoutCampaignInput
}
export type CampaignUncheckedCreateWithoutPrizesInput = {
id?: string
title: string
slug: string
description?: string | null
image?: string | null
banner?: string | null
logo?: string | null
startAt: Date | string
endAt: Date | string
status?: $Enums.CampaignStatus
defaultChances?: number
rules?: string | null
ctaText?: string | null
wheelDesign?: $Enums.WheelDesign
settings?: NullableJsonNullValueInput | InputJsonValue
createdAt?: Date | string
updatedAt?: Date | string
userCampaigns?: UserCampaignUncheckedCreateNestedManyWithoutCampaignInput
chanceTxns?: ChanceTransactionUncheckedCreateNestedManyWithoutCampaignInput
spins?: SpinUncheckedCreateNestedManyWithoutCampaignInput
userPrizes?: UserPrizeUncheckedCreateNestedManyWithoutCampaignInput
}
export type CampaignCreateOrConnectWithoutPrizesInput = {
where: CampaignWhereUniqueInput
create: XOR<CampaignCreateWithoutPrizesInput, CampaignUncheckedCreateWithoutPrizesInput>
}
export type SpinCreateWithoutPrizeInput = {
id?: string
status?: $Enums.SpinStatus
idempotencyKey: string
ip?: string | null
userAgent?: string | null
createdAt?: Date | string
user: UserCreateNestedOneWithoutSpinsInput
campaign: CampaignCreateNestedOneWithoutSpinsInput
userPrize?: UserPrizeCreateNestedOneWithoutSpinInput
}
export type SpinUncheckedCreateWithoutPrizeInput = {
id?: string
userId: string
campaignId: string
status?: $Enums.SpinStatus
idempotencyKey: string
ip?: string | null
userAgent?: string | null
createdAt?: Date | string
userPrize?: UserPrizeUncheckedCreateNestedOneWithoutSpinInput
}
export type SpinCreateOrConnectWithoutPrizeInput = {
where: SpinWhereUniqueInput
create: XOR<SpinCreateWithoutPrizeInput, SpinUncheckedCreateWithoutPrizeInput>
}
export type SpinCreateManyPrizeInputEnvelope = {
data: SpinCreateManyPrizeInput | SpinCreateManyPrizeInput[]
skipDuplicates?: boolean
}
export type UserPrizeCreateWithoutPrizeInput = {
id?: string
code?: string | null
status?: $Enums.UserPrizeStatus
wonAt?: Date | string
redeemedAt?: Date | string | null
user: UserCreateNestedOneWithoutUserPrizesInput
campaign: CampaignCreateNestedOneWithoutUserPrizesInput
spin: SpinCreateNestedOneWithoutUserPrizeInput
}
export type UserPrizeUncheckedCreateWithoutPrizeInput = {
id?: string
userId: string
campaignId: string
spinId: string
code?: string | null
status?: $Enums.UserPrizeStatus
wonAt?: Date | string
redeemedAt?: Date | string | null
}
export type UserPrizeCreateOrConnectWithoutPrizeInput = {
where: UserPrizeWhereUniqueInput
create: XOR<UserPrizeCreateWithoutPrizeInput, UserPrizeUncheckedCreateWithoutPrizeInput>
}
export type UserPrizeCreateManyPrizeInputEnvelope = {
data: UserPrizeCreateManyPrizeInput | UserPrizeCreateManyPrizeInput[]
skipDuplicates?: boolean
}
export type CampaignUpsertWithoutPrizesInput = {
update: XOR<CampaignUpdateWithoutPrizesInput, CampaignUncheckedUpdateWithoutPrizesInput>
create: XOR<CampaignCreateWithoutPrizesInput, CampaignUncheckedCreateWithoutPrizesInput>
where?: CampaignWhereInput
}
export type CampaignUpdateToOneWithWhereWithoutPrizesInput = {
where?: CampaignWhereInput
data: XOR<CampaignUpdateWithoutPrizesInput, CampaignUncheckedUpdateWithoutPrizesInput>
}
export type CampaignUpdateWithoutPrizesInput = {
id?: StringFieldUpdateOperationsInput | string
title?: StringFieldUpdateOperationsInput | string
slug?: StringFieldUpdateOperationsInput | string
description?: NullableStringFieldUpdateOperationsInput | string | null
image?: NullableStringFieldUpdateOperationsInput | string | null
banner?: NullableStringFieldUpdateOperationsInput | string | null
logo?: NullableStringFieldUpdateOperationsInput | string | null
startAt?: DateTimeFieldUpdateOperationsInput | Date | string
endAt?: DateTimeFieldUpdateOperationsInput | Date | string
status?: EnumCampaignStatusFieldUpdateOperationsInput | $Enums.CampaignStatus
defaultChances?: IntFieldUpdateOperationsInput | number
rules?: NullableStringFieldUpdateOperationsInput | string | null
ctaText?: NullableStringFieldUpdateOperationsInput | string | null
wheelDesign?: EnumWheelDesignFieldUpdateOperationsInput | $Enums.WheelDesign
settings?: NullableJsonNullValueInput | InputJsonValue
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
userCampaigns?: UserCampaignUpdateManyWithoutCampaignNestedInput
chanceTxns?: ChanceTransactionUpdateManyWithoutCampaignNestedInput
spins?: SpinUpdateManyWithoutCampaignNestedInput
userPrizes?: UserPrizeUpdateManyWithoutCampaignNestedInput
}
export type CampaignUncheckedUpdateWithoutPrizesInput = {
id?: StringFieldUpdateOperationsInput | string
title?: StringFieldUpdateOperationsInput | string
slug?: StringFieldUpdateOperationsInput | string
description?: NullableStringFieldUpdateOperationsInput | string | null
image?: NullableStringFieldUpdateOperationsInput | string | null
banner?: NullableStringFieldUpdateOperationsInput | string | null
logo?: NullableStringFieldUpdateOperationsInput | string | null
startAt?: DateTimeFieldUpdateOperationsInput | Date | string
endAt?: DateTimeFieldUpdateOperationsInput | Date | string
status?: EnumCampaignStatusFieldUpdateOperationsInput | $Enums.CampaignStatus
defaultChances?: IntFieldUpdateOperationsInput | number
rules?: NullableStringFieldUpdateOperationsInput | string | null
ctaText?: NullableStringFieldUpdateOperationsInput | string | null
wheelDesign?: EnumWheelDesignFieldUpdateOperationsInput | $Enums.WheelDesign
settings?: NullableJsonNullValueInput | InputJsonValue
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
userCampaigns?: UserCampaignUncheckedUpdateManyWithoutCampaignNestedInput
chanceTxns?: ChanceTransactionUncheckedUpdateManyWithoutCampaignNestedInput
spins?: SpinUncheckedUpdateManyWithoutCampaignNestedInput
userPrizes?: UserPrizeUncheckedUpdateManyWithoutCampaignNestedInput
}
export type SpinUpsertWithWhereUniqueWithoutPrizeInput = {
where: SpinWhereUniqueInput
update: XOR<SpinUpdateWithoutPrizeInput, SpinUncheckedUpdateWithoutPrizeInput>
create: XOR<SpinCreateWithoutPrizeInput, SpinUncheckedCreateWithoutPrizeInput>
}
export type SpinUpdateWithWhereUniqueWithoutPrizeInput = {
where: SpinWhereUniqueInput
data: XOR<SpinUpdateWithoutPrizeInput, SpinUncheckedUpdateWithoutPrizeInput>
}
export type SpinUpdateManyWithWhereWithoutPrizeInput = {
where: SpinScalarWhereInput
data: XOR<SpinUpdateManyMutationInput, SpinUncheckedUpdateManyWithoutPrizeInput>
}
export type UserPrizeUpsertWithWhereUniqueWithoutPrizeInput = {
where: UserPrizeWhereUniqueInput
update: XOR<UserPrizeUpdateWithoutPrizeInput, UserPrizeUncheckedUpdateWithoutPrizeInput>
create: XOR<UserPrizeCreateWithoutPrizeInput, UserPrizeUncheckedCreateWithoutPrizeInput>
}
export type UserPrizeUpdateWithWhereUniqueWithoutPrizeInput = {
where: UserPrizeWhereUniqueInput
data: XOR<UserPrizeUpdateWithoutPrizeInput, UserPrizeUncheckedUpdateWithoutPrizeInput>
}
export type UserPrizeUpdateManyWithWhereWithoutPrizeInput = {
where: UserPrizeScalarWhereInput
data: XOR<UserPrizeUpdateManyMutationInput, UserPrizeUncheckedUpdateManyWithoutPrizeInput>
}
export type UserCreateWithoutUserCampaignsInput = {
id?: string
mobile: string
name?: string | null
status?: $Enums.UserStatus
lastLoginAt?: Date | string | null
createdAt?: Date | string
updatedAt?: Date | string
chanceTransactions?: ChanceTransactionCreateNestedManyWithoutUserInput
spins?: SpinCreateNestedManyWithoutUserInput
userPrizes?: UserPrizeCreateNestedManyWithoutUserInput
otpCodes?: OtpCodeCreateNestedManyWithoutUserInput
smsLogs?: SmsLogCreateNestedManyWithoutUserInput
}
export type UserUncheckedCreateWithoutUserCampaignsInput = {
id?: string
mobile: string
name?: string | null
status?: $Enums.UserStatus
lastLoginAt?: Date | string | null
createdAt?: Date | string
updatedAt?: Date | string
chanceTransactions?: ChanceTransactionUncheckedCreateNestedManyWithoutUserInput
spins?: SpinUncheckedCreateNestedManyWithoutUserInput
userPrizes?: UserPrizeUncheckedCreateNestedManyWithoutUserInput
otpCodes?: OtpCodeUncheckedCreateNestedManyWithoutUserInput
smsLogs?: SmsLogUncheckedCreateNestedManyWithoutUserInput
}
export type UserCreateOrConnectWithoutUserCampaignsInput = {
where: UserWhereUniqueInput
create: XOR<UserCreateWithoutUserCampaignsInput, UserUncheckedCreateWithoutUserCampaignsInput>
}
export type CampaignCreateWithoutUserCampaignsInput = {
id?: string
title: string
slug: string
description?: string | null
image?: string | null
banner?: string | null
logo?: string | null
startAt: Date | string
endAt: Date | string
status?: $Enums.CampaignStatus
defaultChances?: number
rules?: string | null
ctaText?: string | null
wheelDesign?: $Enums.WheelDesign
settings?: NullableJsonNullValueInput | InputJsonValue
createdAt?: Date | string
updatedAt?: Date | string
prizes?: PrizeCreateNestedManyWithoutCampaignInput
chanceTxns?: ChanceTransactionCreateNestedManyWithoutCampaignInput
spins?: SpinCreateNestedManyWithoutCampaignInput
userPrizes?: UserPrizeCreateNestedManyWithoutCampaignInput
}
export type CampaignUncheckedCreateWithoutUserCampaignsInput = {
id?: string
title: string
slug: string
description?: string | null
image?: string | null
banner?: string | null
logo?: string | null
startAt: Date | string
endAt: Date | string
status?: $Enums.CampaignStatus
defaultChances?: number
rules?: string | null
ctaText?: string | null
wheelDesign?: $Enums.WheelDesign
settings?: NullableJsonNullValueInput | InputJsonValue
createdAt?: Date | string
updatedAt?: Date | string
prizes?: PrizeUncheckedCreateNestedManyWithoutCampaignInput
chanceTxns?: ChanceTransactionUncheckedCreateNestedManyWithoutCampaignInput
spins?: SpinUncheckedCreateNestedManyWithoutCampaignInput
userPrizes?: UserPrizeUncheckedCreateNestedManyWithoutCampaignInput
}
export type CampaignCreateOrConnectWithoutUserCampaignsInput = {
where: CampaignWhereUniqueInput
create: XOR<CampaignCreateWithoutUserCampaignsInput, CampaignUncheckedCreateWithoutUserCampaignsInput>
}
export type UserUpsertWithoutUserCampaignsInput = {
update: XOR<UserUpdateWithoutUserCampaignsInput, UserUncheckedUpdateWithoutUserCampaignsInput>
create: XOR<UserCreateWithoutUserCampaignsInput, UserUncheckedCreateWithoutUserCampaignsInput>
where?: UserWhereInput
}
export type UserUpdateToOneWithWhereWithoutUserCampaignsInput = {
where?: UserWhereInput
data: XOR<UserUpdateWithoutUserCampaignsInput, UserUncheckedUpdateWithoutUserCampaignsInput>
}
export type UserUpdateWithoutUserCampaignsInput = {
id?: StringFieldUpdateOperationsInput | string
mobile?: StringFieldUpdateOperationsInput | string
name?: NullableStringFieldUpdateOperationsInput | string | null
status?: EnumUserStatusFieldUpdateOperationsInput | $Enums.UserStatus
lastLoginAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
chanceTransactions?: ChanceTransactionUpdateManyWithoutUserNestedInput
spins?: SpinUpdateManyWithoutUserNestedInput
userPrizes?: UserPrizeUpdateManyWithoutUserNestedInput
otpCodes?: OtpCodeUpdateManyWithoutUserNestedInput
smsLogs?: SmsLogUpdateManyWithoutUserNestedInput
}
export type UserUncheckedUpdateWithoutUserCampaignsInput = {
id?: StringFieldUpdateOperationsInput | string
mobile?: StringFieldUpdateOperationsInput | string
name?: NullableStringFieldUpdateOperationsInput | string | null
status?: EnumUserStatusFieldUpdateOperationsInput | $Enums.UserStatus
lastLoginAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
chanceTransactions?: ChanceTransactionUncheckedUpdateManyWithoutUserNestedInput
spins?: SpinUncheckedUpdateManyWithoutUserNestedInput
userPrizes?: UserPrizeUncheckedUpdateManyWithoutUserNestedInput
otpCodes?: OtpCodeUncheckedUpdateManyWithoutUserNestedInput
smsLogs?: SmsLogUncheckedUpdateManyWithoutUserNestedInput
}
export type CampaignUpsertWithoutUserCampaignsInput = {
update: XOR<CampaignUpdateWithoutUserCampaignsInput, CampaignUncheckedUpdateWithoutUserCampaignsInput>
create: XOR<CampaignCreateWithoutUserCampaignsInput, CampaignUncheckedCreateWithoutUserCampaignsInput>
where?: CampaignWhereInput
}
export type CampaignUpdateToOneWithWhereWithoutUserCampaignsInput = {
where?: CampaignWhereInput
data: XOR<CampaignUpdateWithoutUserCampaignsInput, CampaignUncheckedUpdateWithoutUserCampaignsInput>
}
export type CampaignUpdateWithoutUserCampaignsInput = {
id?: StringFieldUpdateOperationsInput | string
title?: StringFieldUpdateOperationsInput | string
slug?: StringFieldUpdateOperationsInput | string
description?: NullableStringFieldUpdateOperationsInput | string | null
image?: NullableStringFieldUpdateOperationsInput | string | null
banner?: NullableStringFieldUpdateOperationsInput | string | null
logo?: NullableStringFieldUpdateOperationsInput | string | null
startAt?: DateTimeFieldUpdateOperationsInput | Date | string
endAt?: DateTimeFieldUpdateOperationsInput | Date | string
status?: EnumCampaignStatusFieldUpdateOperationsInput | $Enums.CampaignStatus
defaultChances?: IntFieldUpdateOperationsInput | number
rules?: NullableStringFieldUpdateOperationsInput | string | null
ctaText?: NullableStringFieldUpdateOperationsInput | string | null
wheelDesign?: EnumWheelDesignFieldUpdateOperationsInput | $Enums.WheelDesign
settings?: NullableJsonNullValueInput | InputJsonValue
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
prizes?: PrizeUpdateManyWithoutCampaignNestedInput
chanceTxns?: ChanceTransactionUpdateManyWithoutCampaignNestedInput
spins?: SpinUpdateManyWithoutCampaignNestedInput
userPrizes?: UserPrizeUpdateManyWithoutCampaignNestedInput
}
export type CampaignUncheckedUpdateWithoutUserCampaignsInput = {
id?: StringFieldUpdateOperationsInput | string
title?: StringFieldUpdateOperationsInput | string
slug?: StringFieldUpdateOperationsInput | string
description?: NullableStringFieldUpdateOperationsInput | string | null
image?: NullableStringFieldUpdateOperationsInput | string | null
banner?: NullableStringFieldUpdateOperationsInput | string | null
logo?: NullableStringFieldUpdateOperationsInput | string | null
startAt?: DateTimeFieldUpdateOperationsInput | Date | string
endAt?: DateTimeFieldUpdateOperationsInput | Date | string
status?: EnumCampaignStatusFieldUpdateOperationsInput | $Enums.CampaignStatus
defaultChances?: IntFieldUpdateOperationsInput | number
rules?: NullableStringFieldUpdateOperationsInput | string | null
ctaText?: NullableStringFieldUpdateOperationsInput | string | null
wheelDesign?: EnumWheelDesignFieldUpdateOperationsInput | $Enums.WheelDesign
settings?: NullableJsonNullValueInput | InputJsonValue
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
prizes?: PrizeUncheckedUpdateManyWithoutCampaignNestedInput
chanceTxns?: ChanceTransactionUncheckedUpdateManyWithoutCampaignNestedInput
spins?: SpinUncheckedUpdateManyWithoutCampaignNestedInput
userPrizes?: UserPrizeUncheckedUpdateManyWithoutCampaignNestedInput
}
export type UserCreateWithoutChanceTransactionsInput = {
id?: string
mobile: string
name?: string | null
status?: $Enums.UserStatus
lastLoginAt?: Date | string | null
createdAt?: Date | string
updatedAt?: Date | string
userCampaigns?: UserCampaignCreateNestedManyWithoutUserInput
spins?: SpinCreateNestedManyWithoutUserInput
userPrizes?: UserPrizeCreateNestedManyWithoutUserInput
otpCodes?: OtpCodeCreateNestedManyWithoutUserInput
smsLogs?: SmsLogCreateNestedManyWithoutUserInput
}
export type UserUncheckedCreateWithoutChanceTransactionsInput = {
id?: string
mobile: string
name?: string | null
status?: $Enums.UserStatus
lastLoginAt?: Date | string | null
createdAt?: Date | string
updatedAt?: Date | string
userCampaigns?: UserCampaignUncheckedCreateNestedManyWithoutUserInput
spins?: SpinUncheckedCreateNestedManyWithoutUserInput
userPrizes?: UserPrizeUncheckedCreateNestedManyWithoutUserInput
otpCodes?: OtpCodeUncheckedCreateNestedManyWithoutUserInput
smsLogs?: SmsLogUncheckedCreateNestedManyWithoutUserInput
}
export type UserCreateOrConnectWithoutChanceTransactionsInput = {
where: UserWhereUniqueInput
create: XOR<UserCreateWithoutChanceTransactionsInput, UserUncheckedCreateWithoutChanceTransactionsInput>
}
export type CampaignCreateWithoutChanceTxnsInput = {
id?: string
title: string
slug: string
description?: string | null
image?: string | null
banner?: string | null
logo?: string | null
startAt: Date | string
endAt: Date | string
status?: $Enums.CampaignStatus
defaultChances?: number
rules?: string | null
ctaText?: string | null
wheelDesign?: $Enums.WheelDesign
settings?: NullableJsonNullValueInput | InputJsonValue
createdAt?: Date | string
updatedAt?: Date | string
prizes?: PrizeCreateNestedManyWithoutCampaignInput
userCampaigns?: UserCampaignCreateNestedManyWithoutCampaignInput
spins?: SpinCreateNestedManyWithoutCampaignInput
userPrizes?: UserPrizeCreateNestedManyWithoutCampaignInput
}
export type CampaignUncheckedCreateWithoutChanceTxnsInput = {
id?: string
title: string
slug: string
description?: string | null
image?: string | null
banner?: string | null
logo?: string | null
startAt: Date | string
endAt: Date | string
status?: $Enums.CampaignStatus
defaultChances?: number
rules?: string | null
ctaText?: string | null
wheelDesign?: $Enums.WheelDesign
settings?: NullableJsonNullValueInput | InputJsonValue
createdAt?: Date | string
updatedAt?: Date | string
prizes?: PrizeUncheckedCreateNestedManyWithoutCampaignInput
userCampaigns?: UserCampaignUncheckedCreateNestedManyWithoutCampaignInput
spins?: SpinUncheckedCreateNestedManyWithoutCampaignInput
userPrizes?: UserPrizeUncheckedCreateNestedManyWithoutCampaignInput
}
export type CampaignCreateOrConnectWithoutChanceTxnsInput = {
where: CampaignWhereUniqueInput
create: XOR<CampaignCreateWithoutChanceTxnsInput, CampaignUncheckedCreateWithoutChanceTxnsInput>
}
export type AdminCreateWithoutChanceTxnsInput = {
id?: string
name: string
mobile: string
email: string
passwordHash: string
role?: $Enums.AdminRole
status?: $Enums.AdminStatus
createdAt?: Date | string
updatedAt?: Date | string
auditLogs?: AdminLogCreateNestedManyWithoutAdminInput
}
export type AdminUncheckedCreateWithoutChanceTxnsInput = {
id?: string
name: string
mobile: string
email: string
passwordHash: string
role?: $Enums.AdminRole
status?: $Enums.AdminStatus
createdAt?: Date | string
updatedAt?: Date | string
auditLogs?: AdminLogUncheckedCreateNestedManyWithoutAdminInput
}
export type AdminCreateOrConnectWithoutChanceTxnsInput = {
where: AdminWhereUniqueInput
create: XOR<AdminCreateWithoutChanceTxnsInput, AdminUncheckedCreateWithoutChanceTxnsInput>
}
export type UserUpsertWithoutChanceTransactionsInput = {
update: XOR<UserUpdateWithoutChanceTransactionsInput, UserUncheckedUpdateWithoutChanceTransactionsInput>
create: XOR<UserCreateWithoutChanceTransactionsInput, UserUncheckedCreateWithoutChanceTransactionsInput>
where?: UserWhereInput
}
export type UserUpdateToOneWithWhereWithoutChanceTransactionsInput = {
where?: UserWhereInput
data: XOR<UserUpdateWithoutChanceTransactionsInput, UserUncheckedUpdateWithoutChanceTransactionsInput>
}
export type UserUpdateWithoutChanceTransactionsInput = {
id?: StringFieldUpdateOperationsInput | string
mobile?: StringFieldUpdateOperationsInput | string
name?: NullableStringFieldUpdateOperationsInput | string | null
status?: EnumUserStatusFieldUpdateOperationsInput | $Enums.UserStatus
lastLoginAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
userCampaigns?: UserCampaignUpdateManyWithoutUserNestedInput
spins?: SpinUpdateManyWithoutUserNestedInput
userPrizes?: UserPrizeUpdateManyWithoutUserNestedInput
otpCodes?: OtpCodeUpdateManyWithoutUserNestedInput
smsLogs?: SmsLogUpdateManyWithoutUserNestedInput
}
export type UserUncheckedUpdateWithoutChanceTransactionsInput = {
id?: StringFieldUpdateOperationsInput | string
mobile?: StringFieldUpdateOperationsInput | string
name?: NullableStringFieldUpdateOperationsInput | string | null
status?: EnumUserStatusFieldUpdateOperationsInput | $Enums.UserStatus
lastLoginAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
userCampaigns?: UserCampaignUncheckedUpdateManyWithoutUserNestedInput
spins?: SpinUncheckedUpdateManyWithoutUserNestedInput
userPrizes?: UserPrizeUncheckedUpdateManyWithoutUserNestedInput
otpCodes?: OtpCodeUncheckedUpdateManyWithoutUserNestedInput
smsLogs?: SmsLogUncheckedUpdateManyWithoutUserNestedInput
}
export type CampaignUpsertWithoutChanceTxnsInput = {
update: XOR<CampaignUpdateWithoutChanceTxnsInput, CampaignUncheckedUpdateWithoutChanceTxnsInput>
create: XOR<CampaignCreateWithoutChanceTxnsInput, CampaignUncheckedCreateWithoutChanceTxnsInput>
where?: CampaignWhereInput
}
export type CampaignUpdateToOneWithWhereWithoutChanceTxnsInput = {
where?: CampaignWhereInput
data: XOR<CampaignUpdateWithoutChanceTxnsInput, CampaignUncheckedUpdateWithoutChanceTxnsInput>
}
export type CampaignUpdateWithoutChanceTxnsInput = {
id?: StringFieldUpdateOperationsInput | string
title?: StringFieldUpdateOperationsInput | string
slug?: StringFieldUpdateOperationsInput | string
description?: NullableStringFieldUpdateOperationsInput | string | null
image?: NullableStringFieldUpdateOperationsInput | string | null
banner?: NullableStringFieldUpdateOperationsInput | string | null
logo?: NullableStringFieldUpdateOperationsInput | string | null
startAt?: DateTimeFieldUpdateOperationsInput | Date | string
endAt?: DateTimeFieldUpdateOperationsInput | Date | string
status?: EnumCampaignStatusFieldUpdateOperationsInput | $Enums.CampaignStatus
defaultChances?: IntFieldUpdateOperationsInput | number
rules?: NullableStringFieldUpdateOperationsInput | string | null
ctaText?: NullableStringFieldUpdateOperationsInput | string | null
wheelDesign?: EnumWheelDesignFieldUpdateOperationsInput | $Enums.WheelDesign
settings?: NullableJsonNullValueInput | InputJsonValue
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
prizes?: PrizeUpdateManyWithoutCampaignNestedInput
userCampaigns?: UserCampaignUpdateManyWithoutCampaignNestedInput
spins?: SpinUpdateManyWithoutCampaignNestedInput
userPrizes?: UserPrizeUpdateManyWithoutCampaignNestedInput
}
export type CampaignUncheckedUpdateWithoutChanceTxnsInput = {
id?: StringFieldUpdateOperationsInput | string
title?: StringFieldUpdateOperationsInput | string
slug?: StringFieldUpdateOperationsInput | string
description?: NullableStringFieldUpdateOperationsInput | string | null
image?: NullableStringFieldUpdateOperationsInput | string | null
banner?: NullableStringFieldUpdateOperationsInput | string | null
logo?: NullableStringFieldUpdateOperationsInput | string | null
startAt?: DateTimeFieldUpdateOperationsInput | Date | string
endAt?: DateTimeFieldUpdateOperationsInput | Date | string
status?: EnumCampaignStatusFieldUpdateOperationsInput | $Enums.CampaignStatus
defaultChances?: IntFieldUpdateOperationsInput | number
rules?: NullableStringFieldUpdateOperationsInput | string | null
ctaText?: NullableStringFieldUpdateOperationsInput | string | null
wheelDesign?: EnumWheelDesignFieldUpdateOperationsInput | $Enums.WheelDesign
settings?: NullableJsonNullValueInput | InputJsonValue
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
prizes?: PrizeUncheckedUpdateManyWithoutCampaignNestedInput
userCampaigns?: UserCampaignUncheckedUpdateManyWithoutCampaignNestedInput
spins?: SpinUncheckedUpdateManyWithoutCampaignNestedInput
userPrizes?: UserPrizeUncheckedUpdateManyWithoutCampaignNestedInput
}
export type AdminUpsertWithoutChanceTxnsInput = {
update: XOR<AdminUpdateWithoutChanceTxnsInput, AdminUncheckedUpdateWithoutChanceTxnsInput>
create: XOR<AdminCreateWithoutChanceTxnsInput, AdminUncheckedCreateWithoutChanceTxnsInput>
where?: AdminWhereInput
}
export type AdminUpdateToOneWithWhereWithoutChanceTxnsInput = {
where?: AdminWhereInput
data: XOR<AdminUpdateWithoutChanceTxnsInput, AdminUncheckedUpdateWithoutChanceTxnsInput>
}
export type AdminUpdateWithoutChanceTxnsInput = {
id?: StringFieldUpdateOperationsInput | string
name?: StringFieldUpdateOperationsInput | string
mobile?: StringFieldUpdateOperationsInput | string
email?: StringFieldUpdateOperationsInput | string
passwordHash?: StringFieldUpdateOperationsInput | string
role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole
status?: EnumAdminStatusFieldUpdateOperationsInput | $Enums.AdminStatus
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
auditLogs?: AdminLogUpdateManyWithoutAdminNestedInput
}
export type AdminUncheckedUpdateWithoutChanceTxnsInput = {
id?: StringFieldUpdateOperationsInput | string
name?: StringFieldUpdateOperationsInput | string
mobile?: StringFieldUpdateOperationsInput | string
email?: StringFieldUpdateOperationsInput | string
passwordHash?: StringFieldUpdateOperationsInput | string
role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole
status?: EnumAdminStatusFieldUpdateOperationsInput | $Enums.AdminStatus
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
auditLogs?: AdminLogUncheckedUpdateManyWithoutAdminNestedInput
}
export type UserCreateWithoutSpinsInput = {
id?: string
mobile: string
name?: string | null
status?: $Enums.UserStatus
lastLoginAt?: Date | string | null
createdAt?: Date | string
updatedAt?: Date | string
userCampaigns?: UserCampaignCreateNestedManyWithoutUserInput
chanceTransactions?: ChanceTransactionCreateNestedManyWithoutUserInput
userPrizes?: UserPrizeCreateNestedManyWithoutUserInput
otpCodes?: OtpCodeCreateNestedManyWithoutUserInput
smsLogs?: SmsLogCreateNestedManyWithoutUserInput
}
export type UserUncheckedCreateWithoutSpinsInput = {
id?: string
mobile: string
name?: string | null
status?: $Enums.UserStatus
lastLoginAt?: Date | string | null
createdAt?: Date | string
updatedAt?: Date | string
userCampaigns?: UserCampaignUncheckedCreateNestedManyWithoutUserInput
chanceTransactions?: ChanceTransactionUncheckedCreateNestedManyWithoutUserInput
userPrizes?: UserPrizeUncheckedCreateNestedManyWithoutUserInput
otpCodes?: OtpCodeUncheckedCreateNestedManyWithoutUserInput
smsLogs?: SmsLogUncheckedCreateNestedManyWithoutUserInput
}
export type UserCreateOrConnectWithoutSpinsInput = {
where: UserWhereUniqueInput
create: XOR<UserCreateWithoutSpinsInput, UserUncheckedCreateWithoutSpinsInput>
}
export type CampaignCreateWithoutSpinsInput = {
id?: string
title: string
slug: string
description?: string | null
image?: string | null
banner?: string | null
logo?: string | null
startAt: Date | string
endAt: Date | string
status?: $Enums.CampaignStatus
defaultChances?: number
rules?: string | null
ctaText?: string | null
wheelDesign?: $Enums.WheelDesign
settings?: NullableJsonNullValueInput | InputJsonValue
createdAt?: Date | string
updatedAt?: Date | string
prizes?: PrizeCreateNestedManyWithoutCampaignInput
userCampaigns?: UserCampaignCreateNestedManyWithoutCampaignInput
chanceTxns?: ChanceTransactionCreateNestedManyWithoutCampaignInput
userPrizes?: UserPrizeCreateNestedManyWithoutCampaignInput
}
export type CampaignUncheckedCreateWithoutSpinsInput = {
id?: string
title: string
slug: string
description?: string | null
image?: string | null
banner?: string | null
logo?: string | null
startAt: Date | string
endAt: Date | string
status?: $Enums.CampaignStatus
defaultChances?: number
rules?: string | null
ctaText?: string | null
wheelDesign?: $Enums.WheelDesign
settings?: NullableJsonNullValueInput | InputJsonValue
createdAt?: Date | string
updatedAt?: Date | string
prizes?: PrizeUncheckedCreateNestedManyWithoutCampaignInput
userCampaigns?: UserCampaignUncheckedCreateNestedManyWithoutCampaignInput
chanceTxns?: ChanceTransactionUncheckedCreateNestedManyWithoutCampaignInput
userPrizes?: UserPrizeUncheckedCreateNestedManyWithoutCampaignInput
}
export type CampaignCreateOrConnectWithoutSpinsInput = {
where: CampaignWhereUniqueInput
create: XOR<CampaignCreateWithoutSpinsInput, CampaignUncheckedCreateWithoutSpinsInput>
}
export type PrizeCreateWithoutSpinsInput = {
id?: string
title: string
description?: string | null
image?: string | null
type: $Enums.PrizeType
stockType: $Enums.StockType
initialStock?: number | null
remainingStock?: number | null
weight: number
status?: $Enums.PrizeStatus
sortOrder?: number
segmentColor: string
expiresAt?: Date | string | null
smsTemplate?: string | null
createdAt?: Date | string
updatedAt?: Date | string
campaign: CampaignCreateNestedOneWithoutPrizesInput
userPrizes?: UserPrizeCreateNestedManyWithoutPrizeInput
}
export type PrizeUncheckedCreateWithoutSpinsInput = {
id?: string
campaignId: string
title: string
description?: string | null
image?: string | null
type: $Enums.PrizeType
stockType: $Enums.StockType
initialStock?: number | null
remainingStock?: number | null
weight: number
status?: $Enums.PrizeStatus
sortOrder?: number
segmentColor: string
expiresAt?: Date | string | null
smsTemplate?: string | null
createdAt?: Date | string
updatedAt?: Date | string
userPrizes?: UserPrizeUncheckedCreateNestedManyWithoutPrizeInput
}
export type PrizeCreateOrConnectWithoutSpinsInput = {
where: PrizeWhereUniqueInput
create: XOR<PrizeCreateWithoutSpinsInput, PrizeUncheckedCreateWithoutSpinsInput>
}
export type UserPrizeCreateWithoutSpinInput = {
id?: string
code?: string | null
status?: $Enums.UserPrizeStatus
wonAt?: Date | string
redeemedAt?: Date | string | null
user: UserCreateNestedOneWithoutUserPrizesInput
campaign: CampaignCreateNestedOneWithoutUserPrizesInput
prize: PrizeCreateNestedOneWithoutUserPrizesInput
}
export type UserPrizeUncheckedCreateWithoutSpinInput = {
id?: string
userId: string
campaignId: string
prizeId: string
code?: string | null
status?: $Enums.UserPrizeStatus
wonAt?: Date | string
redeemedAt?: Date | string | null
}
export type UserPrizeCreateOrConnectWithoutSpinInput = {
where: UserPrizeWhereUniqueInput
create: XOR<UserPrizeCreateWithoutSpinInput, UserPrizeUncheckedCreateWithoutSpinInput>
}
export type UserUpsertWithoutSpinsInput = {
update: XOR<UserUpdateWithoutSpinsInput, UserUncheckedUpdateWithoutSpinsInput>
create: XOR<UserCreateWithoutSpinsInput, UserUncheckedCreateWithoutSpinsInput>
where?: UserWhereInput
}
export type UserUpdateToOneWithWhereWithoutSpinsInput = {
where?: UserWhereInput
data: XOR<UserUpdateWithoutSpinsInput, UserUncheckedUpdateWithoutSpinsInput>
}
export type UserUpdateWithoutSpinsInput = {
id?: StringFieldUpdateOperationsInput | string
mobile?: StringFieldUpdateOperationsInput | string
name?: NullableStringFieldUpdateOperationsInput | string | null
status?: EnumUserStatusFieldUpdateOperationsInput | $Enums.UserStatus
lastLoginAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
userCampaigns?: UserCampaignUpdateManyWithoutUserNestedInput
chanceTransactions?: ChanceTransactionUpdateManyWithoutUserNestedInput
userPrizes?: UserPrizeUpdateManyWithoutUserNestedInput
otpCodes?: OtpCodeUpdateManyWithoutUserNestedInput
smsLogs?: SmsLogUpdateManyWithoutUserNestedInput
}
export type UserUncheckedUpdateWithoutSpinsInput = {
id?: StringFieldUpdateOperationsInput | string
mobile?: StringFieldUpdateOperationsInput | string
name?: NullableStringFieldUpdateOperationsInput | string | null
status?: EnumUserStatusFieldUpdateOperationsInput | $Enums.UserStatus
lastLoginAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
userCampaigns?: UserCampaignUncheckedUpdateManyWithoutUserNestedInput
chanceTransactions?: ChanceTransactionUncheckedUpdateManyWithoutUserNestedInput
userPrizes?: UserPrizeUncheckedUpdateManyWithoutUserNestedInput
otpCodes?: OtpCodeUncheckedUpdateManyWithoutUserNestedInput
smsLogs?: SmsLogUncheckedUpdateManyWithoutUserNestedInput
}
export type CampaignUpsertWithoutSpinsInput = {
update: XOR<CampaignUpdateWithoutSpinsInput, CampaignUncheckedUpdateWithoutSpinsInput>
create: XOR<CampaignCreateWithoutSpinsInput, CampaignUncheckedCreateWithoutSpinsInput>
where?: CampaignWhereInput
}
export type CampaignUpdateToOneWithWhereWithoutSpinsInput = {
where?: CampaignWhereInput
data: XOR<CampaignUpdateWithoutSpinsInput, CampaignUncheckedUpdateWithoutSpinsInput>
}
export type CampaignUpdateWithoutSpinsInput = {
id?: StringFieldUpdateOperationsInput | string
title?: StringFieldUpdateOperationsInput | string
slug?: StringFieldUpdateOperationsInput | string
description?: NullableStringFieldUpdateOperationsInput | string | null
image?: NullableStringFieldUpdateOperationsInput | string | null
banner?: NullableStringFieldUpdateOperationsInput | string | null
logo?: NullableStringFieldUpdateOperationsInput | string | null
startAt?: DateTimeFieldUpdateOperationsInput | Date | string
endAt?: DateTimeFieldUpdateOperationsInput | Date | string
status?: EnumCampaignStatusFieldUpdateOperationsInput | $Enums.CampaignStatus
defaultChances?: IntFieldUpdateOperationsInput | number
rules?: NullableStringFieldUpdateOperationsInput | string | null
ctaText?: NullableStringFieldUpdateOperationsInput | string | null
wheelDesign?: EnumWheelDesignFieldUpdateOperationsInput | $Enums.WheelDesign
settings?: NullableJsonNullValueInput | InputJsonValue
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
prizes?: PrizeUpdateManyWithoutCampaignNestedInput
userCampaigns?: UserCampaignUpdateManyWithoutCampaignNestedInput
chanceTxns?: ChanceTransactionUpdateManyWithoutCampaignNestedInput
userPrizes?: UserPrizeUpdateManyWithoutCampaignNestedInput
}
export type CampaignUncheckedUpdateWithoutSpinsInput = {
id?: StringFieldUpdateOperationsInput | string
title?: StringFieldUpdateOperationsInput | string
slug?: StringFieldUpdateOperationsInput | string
description?: NullableStringFieldUpdateOperationsInput | string | null
image?: NullableStringFieldUpdateOperationsInput | string | null
banner?: NullableStringFieldUpdateOperationsInput | string | null
logo?: NullableStringFieldUpdateOperationsInput | string | null
startAt?: DateTimeFieldUpdateOperationsInput | Date | string
endAt?: DateTimeFieldUpdateOperationsInput | Date | string
status?: EnumCampaignStatusFieldUpdateOperationsInput | $Enums.CampaignStatus
defaultChances?: IntFieldUpdateOperationsInput | number
rules?: NullableStringFieldUpdateOperationsInput | string | null
ctaText?: NullableStringFieldUpdateOperationsInput | string | null
wheelDesign?: EnumWheelDesignFieldUpdateOperationsInput | $Enums.WheelDesign
settings?: NullableJsonNullValueInput | InputJsonValue
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
prizes?: PrizeUncheckedUpdateManyWithoutCampaignNestedInput
userCampaigns?: UserCampaignUncheckedUpdateManyWithoutCampaignNestedInput
chanceTxns?: ChanceTransactionUncheckedUpdateManyWithoutCampaignNestedInput
userPrizes?: UserPrizeUncheckedUpdateManyWithoutCampaignNestedInput
}
export type PrizeUpsertWithoutSpinsInput = {
update: XOR<PrizeUpdateWithoutSpinsInput, PrizeUncheckedUpdateWithoutSpinsInput>
create: XOR<PrizeCreateWithoutSpinsInput, PrizeUncheckedCreateWithoutSpinsInput>
where?: PrizeWhereInput
}
export type PrizeUpdateToOneWithWhereWithoutSpinsInput = {
where?: PrizeWhereInput
data: XOR<PrizeUpdateWithoutSpinsInput, PrizeUncheckedUpdateWithoutSpinsInput>
}
export type PrizeUpdateWithoutSpinsInput = {
id?: StringFieldUpdateOperationsInput | string
title?: StringFieldUpdateOperationsInput | string
description?: NullableStringFieldUpdateOperationsInput | string | null
image?: NullableStringFieldUpdateOperationsInput | string | null
type?: EnumPrizeTypeFieldUpdateOperationsInput | $Enums.PrizeType
stockType?: EnumStockTypeFieldUpdateOperationsInput | $Enums.StockType
initialStock?: NullableIntFieldUpdateOperationsInput | number | null
remainingStock?: NullableIntFieldUpdateOperationsInput | number | null
weight?: IntFieldUpdateOperationsInput | number
status?: EnumPrizeStatusFieldUpdateOperationsInput | $Enums.PrizeStatus
sortOrder?: IntFieldUpdateOperationsInput | number
segmentColor?: StringFieldUpdateOperationsInput | string
expiresAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
smsTemplate?: NullableStringFieldUpdateOperationsInput | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
campaign?: CampaignUpdateOneRequiredWithoutPrizesNestedInput
userPrizes?: UserPrizeUpdateManyWithoutPrizeNestedInput
}
export type PrizeUncheckedUpdateWithoutSpinsInput = {
id?: StringFieldUpdateOperationsInput | string
campaignId?: StringFieldUpdateOperationsInput | string
title?: StringFieldUpdateOperationsInput | string
description?: NullableStringFieldUpdateOperationsInput | string | null
image?: NullableStringFieldUpdateOperationsInput | string | null
type?: EnumPrizeTypeFieldUpdateOperationsInput | $Enums.PrizeType
stockType?: EnumStockTypeFieldUpdateOperationsInput | $Enums.StockType
initialStock?: NullableIntFieldUpdateOperationsInput | number | null
remainingStock?: NullableIntFieldUpdateOperationsInput | number | null
weight?: IntFieldUpdateOperationsInput | number
status?: EnumPrizeStatusFieldUpdateOperationsInput | $Enums.PrizeStatus
sortOrder?: IntFieldUpdateOperationsInput | number
segmentColor?: StringFieldUpdateOperationsInput | string
expiresAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
smsTemplate?: NullableStringFieldUpdateOperationsInput | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
userPrizes?: UserPrizeUncheckedUpdateManyWithoutPrizeNestedInput
}
export type UserPrizeUpsertWithoutSpinInput = {
update: XOR<UserPrizeUpdateWithoutSpinInput, UserPrizeUncheckedUpdateWithoutSpinInput>
create: XOR<UserPrizeCreateWithoutSpinInput, UserPrizeUncheckedCreateWithoutSpinInput>
where?: UserPrizeWhereInput
}
export type UserPrizeUpdateToOneWithWhereWithoutSpinInput = {
where?: UserPrizeWhereInput
data: XOR<UserPrizeUpdateWithoutSpinInput, UserPrizeUncheckedUpdateWithoutSpinInput>
}
export type UserPrizeUpdateWithoutSpinInput = {
id?: StringFieldUpdateOperationsInput | string
code?: NullableStringFieldUpdateOperationsInput | string | null
status?: EnumUserPrizeStatusFieldUpdateOperationsInput | $Enums.UserPrizeStatus
wonAt?: DateTimeFieldUpdateOperationsInput | Date | string
redeemedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
user?: UserUpdateOneRequiredWithoutUserPrizesNestedInput
campaign?: CampaignUpdateOneRequiredWithoutUserPrizesNestedInput
prize?: PrizeUpdateOneRequiredWithoutUserPrizesNestedInput
}
export type UserPrizeUncheckedUpdateWithoutSpinInput = {
id?: StringFieldUpdateOperationsInput | string
userId?: StringFieldUpdateOperationsInput | string
campaignId?: StringFieldUpdateOperationsInput | string
prizeId?: StringFieldUpdateOperationsInput | string
code?: NullableStringFieldUpdateOperationsInput | string | null
status?: EnumUserPrizeStatusFieldUpdateOperationsInput | $Enums.UserPrizeStatus
wonAt?: DateTimeFieldUpdateOperationsInput | Date | string
redeemedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
}
export type UserCreateWithoutUserPrizesInput = {
id?: string
mobile: string
name?: string | null
status?: $Enums.UserStatus
lastLoginAt?: Date | string | null
createdAt?: Date | string
updatedAt?: Date | string
userCampaigns?: UserCampaignCreateNestedManyWithoutUserInput
chanceTransactions?: ChanceTransactionCreateNestedManyWithoutUserInput
spins?: SpinCreateNestedManyWithoutUserInput
otpCodes?: OtpCodeCreateNestedManyWithoutUserInput
smsLogs?: SmsLogCreateNestedManyWithoutUserInput
}
export type UserUncheckedCreateWithoutUserPrizesInput = {
id?: string
mobile: string
name?: string | null
status?: $Enums.UserStatus
lastLoginAt?: Date | string | null
createdAt?: Date | string
updatedAt?: Date | string
userCampaigns?: UserCampaignUncheckedCreateNestedManyWithoutUserInput
chanceTransactions?: ChanceTransactionUncheckedCreateNestedManyWithoutUserInput
spins?: SpinUncheckedCreateNestedManyWithoutUserInput
otpCodes?: OtpCodeUncheckedCreateNestedManyWithoutUserInput
smsLogs?: SmsLogUncheckedCreateNestedManyWithoutUserInput
}
export type UserCreateOrConnectWithoutUserPrizesInput = {
where: UserWhereUniqueInput
create: XOR<UserCreateWithoutUserPrizesInput, UserUncheckedCreateWithoutUserPrizesInput>
}
export type CampaignCreateWithoutUserPrizesInput = {
id?: string
title: string
slug: string
description?: string | null
image?: string | null
banner?: string | null
logo?: string | null
startAt: Date | string
endAt: Date | string
status?: $Enums.CampaignStatus
defaultChances?: number
rules?: string | null
ctaText?: string | null
wheelDesign?: $Enums.WheelDesign
settings?: NullableJsonNullValueInput | InputJsonValue
createdAt?: Date | string
updatedAt?: Date | string
prizes?: PrizeCreateNestedManyWithoutCampaignInput
userCampaigns?: UserCampaignCreateNestedManyWithoutCampaignInput
chanceTxns?: ChanceTransactionCreateNestedManyWithoutCampaignInput
spins?: SpinCreateNestedManyWithoutCampaignInput
}
export type CampaignUncheckedCreateWithoutUserPrizesInput = {
id?: string
title: string
slug: string
description?: string | null
image?: string | null
banner?: string | null
logo?: string | null
startAt: Date | string
endAt: Date | string
status?: $Enums.CampaignStatus
defaultChances?: number
rules?: string | null
ctaText?: string | null
wheelDesign?: $Enums.WheelDesign
settings?: NullableJsonNullValueInput | InputJsonValue
createdAt?: Date | string
updatedAt?: Date | string
prizes?: PrizeUncheckedCreateNestedManyWithoutCampaignInput
userCampaigns?: UserCampaignUncheckedCreateNestedManyWithoutCampaignInput
chanceTxns?: ChanceTransactionUncheckedCreateNestedManyWithoutCampaignInput
spins?: SpinUncheckedCreateNestedManyWithoutCampaignInput
}
export type CampaignCreateOrConnectWithoutUserPrizesInput = {
where: CampaignWhereUniqueInput
create: XOR<CampaignCreateWithoutUserPrizesInput, CampaignUncheckedCreateWithoutUserPrizesInput>
}
export type PrizeCreateWithoutUserPrizesInput = {
id?: string
title: string
description?: string | null
image?: string | null
type: $Enums.PrizeType
stockType: $Enums.StockType
initialStock?: number | null
remainingStock?: number | null
weight: number
status?: $Enums.PrizeStatus
sortOrder?: number
segmentColor: string
expiresAt?: Date | string | null
smsTemplate?: string | null
createdAt?: Date | string
updatedAt?: Date | string
campaign: CampaignCreateNestedOneWithoutPrizesInput
spins?: SpinCreateNestedManyWithoutPrizeInput
}
export type PrizeUncheckedCreateWithoutUserPrizesInput = {
id?: string
campaignId: string
title: string
description?: string | null
image?: string | null
type: $Enums.PrizeType
stockType: $Enums.StockType
initialStock?: number | null
remainingStock?: number | null
weight: number
status?: $Enums.PrizeStatus
sortOrder?: number
segmentColor: string
expiresAt?: Date | string | null
smsTemplate?: string | null
createdAt?: Date | string
updatedAt?: Date | string
spins?: SpinUncheckedCreateNestedManyWithoutPrizeInput
}
export type PrizeCreateOrConnectWithoutUserPrizesInput = {
where: PrizeWhereUniqueInput
create: XOR<PrizeCreateWithoutUserPrizesInput, PrizeUncheckedCreateWithoutUserPrizesInput>
}
export type SpinCreateWithoutUserPrizeInput = {
id?: string
status?: $Enums.SpinStatus
idempotencyKey: string
ip?: string | null
userAgent?: string | null
createdAt?: Date | string
user: UserCreateNestedOneWithoutSpinsInput
campaign: CampaignCreateNestedOneWithoutSpinsInput
prize?: PrizeCreateNestedOneWithoutSpinsInput
}
export type SpinUncheckedCreateWithoutUserPrizeInput = {
id?: string
userId: string
campaignId: string
prizeId?: string | null
status?: $Enums.SpinStatus
idempotencyKey: string
ip?: string | null
userAgent?: string | null
createdAt?: Date | string
}
export type SpinCreateOrConnectWithoutUserPrizeInput = {
where: SpinWhereUniqueInput
create: XOR<SpinCreateWithoutUserPrizeInput, SpinUncheckedCreateWithoutUserPrizeInput>
}
export type UserUpsertWithoutUserPrizesInput = {
update: XOR<UserUpdateWithoutUserPrizesInput, UserUncheckedUpdateWithoutUserPrizesInput>
create: XOR<UserCreateWithoutUserPrizesInput, UserUncheckedCreateWithoutUserPrizesInput>
where?: UserWhereInput
}
export type UserUpdateToOneWithWhereWithoutUserPrizesInput = {
where?: UserWhereInput
data: XOR<UserUpdateWithoutUserPrizesInput, UserUncheckedUpdateWithoutUserPrizesInput>
}
export type UserUpdateWithoutUserPrizesInput = {
id?: StringFieldUpdateOperationsInput | string
mobile?: StringFieldUpdateOperationsInput | string
name?: NullableStringFieldUpdateOperationsInput | string | null
status?: EnumUserStatusFieldUpdateOperationsInput | $Enums.UserStatus
lastLoginAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
userCampaigns?: UserCampaignUpdateManyWithoutUserNestedInput
chanceTransactions?: ChanceTransactionUpdateManyWithoutUserNestedInput
spins?: SpinUpdateManyWithoutUserNestedInput
otpCodes?: OtpCodeUpdateManyWithoutUserNestedInput
smsLogs?: SmsLogUpdateManyWithoutUserNestedInput
}
export type UserUncheckedUpdateWithoutUserPrizesInput = {
id?: StringFieldUpdateOperationsInput | string
mobile?: StringFieldUpdateOperationsInput | string
name?: NullableStringFieldUpdateOperationsInput | string | null
status?: EnumUserStatusFieldUpdateOperationsInput | $Enums.UserStatus
lastLoginAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
userCampaigns?: UserCampaignUncheckedUpdateManyWithoutUserNestedInput
chanceTransactions?: ChanceTransactionUncheckedUpdateManyWithoutUserNestedInput
spins?: SpinUncheckedUpdateManyWithoutUserNestedInput
otpCodes?: OtpCodeUncheckedUpdateManyWithoutUserNestedInput
smsLogs?: SmsLogUncheckedUpdateManyWithoutUserNestedInput
}
export type CampaignUpsertWithoutUserPrizesInput = {
update: XOR<CampaignUpdateWithoutUserPrizesInput, CampaignUncheckedUpdateWithoutUserPrizesInput>
create: XOR<CampaignCreateWithoutUserPrizesInput, CampaignUncheckedCreateWithoutUserPrizesInput>
where?: CampaignWhereInput
}
export type CampaignUpdateToOneWithWhereWithoutUserPrizesInput = {
where?: CampaignWhereInput
data: XOR<CampaignUpdateWithoutUserPrizesInput, CampaignUncheckedUpdateWithoutUserPrizesInput>
}
export type CampaignUpdateWithoutUserPrizesInput = {
id?: StringFieldUpdateOperationsInput | string
title?: StringFieldUpdateOperationsInput | string
slug?: StringFieldUpdateOperationsInput | string
description?: NullableStringFieldUpdateOperationsInput | string | null
image?: NullableStringFieldUpdateOperationsInput | string | null
banner?: NullableStringFieldUpdateOperationsInput | string | null
logo?: NullableStringFieldUpdateOperationsInput | string | null
startAt?: DateTimeFieldUpdateOperationsInput | Date | string
endAt?: DateTimeFieldUpdateOperationsInput | Date | string
status?: EnumCampaignStatusFieldUpdateOperationsInput | $Enums.CampaignStatus
defaultChances?: IntFieldUpdateOperationsInput | number
rules?: NullableStringFieldUpdateOperationsInput | string | null
ctaText?: NullableStringFieldUpdateOperationsInput | string | null
wheelDesign?: EnumWheelDesignFieldUpdateOperationsInput | $Enums.WheelDesign
settings?: NullableJsonNullValueInput | InputJsonValue
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
prizes?: PrizeUpdateManyWithoutCampaignNestedInput
userCampaigns?: UserCampaignUpdateManyWithoutCampaignNestedInput
chanceTxns?: ChanceTransactionUpdateManyWithoutCampaignNestedInput
spins?: SpinUpdateManyWithoutCampaignNestedInput
}
export type CampaignUncheckedUpdateWithoutUserPrizesInput = {
id?: StringFieldUpdateOperationsInput | string
title?: StringFieldUpdateOperationsInput | string
slug?: StringFieldUpdateOperationsInput | string
description?: NullableStringFieldUpdateOperationsInput | string | null
image?: NullableStringFieldUpdateOperationsInput | string | null
banner?: NullableStringFieldUpdateOperationsInput | string | null
logo?: NullableStringFieldUpdateOperationsInput | string | null
startAt?: DateTimeFieldUpdateOperationsInput | Date | string
endAt?: DateTimeFieldUpdateOperationsInput | Date | string
status?: EnumCampaignStatusFieldUpdateOperationsInput | $Enums.CampaignStatus
defaultChances?: IntFieldUpdateOperationsInput | number
rules?: NullableStringFieldUpdateOperationsInput | string | null
ctaText?: NullableStringFieldUpdateOperationsInput | string | null
wheelDesign?: EnumWheelDesignFieldUpdateOperationsInput | $Enums.WheelDesign
settings?: NullableJsonNullValueInput | InputJsonValue
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
prizes?: PrizeUncheckedUpdateManyWithoutCampaignNestedInput
userCampaigns?: UserCampaignUncheckedUpdateManyWithoutCampaignNestedInput
chanceTxns?: ChanceTransactionUncheckedUpdateManyWithoutCampaignNestedInput
spins?: SpinUncheckedUpdateManyWithoutCampaignNestedInput
}
export type PrizeUpsertWithoutUserPrizesInput = {
update: XOR<PrizeUpdateWithoutUserPrizesInput, PrizeUncheckedUpdateWithoutUserPrizesInput>
create: XOR<PrizeCreateWithoutUserPrizesInput, PrizeUncheckedCreateWithoutUserPrizesInput>
where?: PrizeWhereInput
}
export type PrizeUpdateToOneWithWhereWithoutUserPrizesInput = {
where?: PrizeWhereInput
data: XOR<PrizeUpdateWithoutUserPrizesInput, PrizeUncheckedUpdateWithoutUserPrizesInput>
}
export type PrizeUpdateWithoutUserPrizesInput = {
id?: StringFieldUpdateOperationsInput | string
title?: StringFieldUpdateOperationsInput | string
description?: NullableStringFieldUpdateOperationsInput | string | null
image?: NullableStringFieldUpdateOperationsInput | string | null
type?: EnumPrizeTypeFieldUpdateOperationsInput | $Enums.PrizeType
stockType?: EnumStockTypeFieldUpdateOperationsInput | $Enums.StockType
initialStock?: NullableIntFieldUpdateOperationsInput | number | null
remainingStock?: NullableIntFieldUpdateOperationsInput | number | null
weight?: IntFieldUpdateOperationsInput | number
status?: EnumPrizeStatusFieldUpdateOperationsInput | $Enums.PrizeStatus
sortOrder?: IntFieldUpdateOperationsInput | number
segmentColor?: StringFieldUpdateOperationsInput | string
expiresAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
smsTemplate?: NullableStringFieldUpdateOperationsInput | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
campaign?: CampaignUpdateOneRequiredWithoutPrizesNestedInput
spins?: SpinUpdateManyWithoutPrizeNestedInput
}
export type PrizeUncheckedUpdateWithoutUserPrizesInput = {
id?: StringFieldUpdateOperationsInput | string
campaignId?: StringFieldUpdateOperationsInput | string
title?: StringFieldUpdateOperationsInput | string
description?: NullableStringFieldUpdateOperationsInput | string | null
image?: NullableStringFieldUpdateOperationsInput | string | null
type?: EnumPrizeTypeFieldUpdateOperationsInput | $Enums.PrizeType
stockType?: EnumStockTypeFieldUpdateOperationsInput | $Enums.StockType
initialStock?: NullableIntFieldUpdateOperationsInput | number | null
remainingStock?: NullableIntFieldUpdateOperationsInput | number | null
weight?: IntFieldUpdateOperationsInput | number
status?: EnumPrizeStatusFieldUpdateOperationsInput | $Enums.PrizeStatus
sortOrder?: IntFieldUpdateOperationsInput | number
segmentColor?: StringFieldUpdateOperationsInput | string
expiresAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
smsTemplate?: NullableStringFieldUpdateOperationsInput | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
spins?: SpinUncheckedUpdateManyWithoutPrizeNestedInput
}
export type SpinUpsertWithoutUserPrizeInput = {
update: XOR<SpinUpdateWithoutUserPrizeInput, SpinUncheckedUpdateWithoutUserPrizeInput>
create: XOR<SpinCreateWithoutUserPrizeInput, SpinUncheckedCreateWithoutUserPrizeInput>
where?: SpinWhereInput
}
export type SpinUpdateToOneWithWhereWithoutUserPrizeInput = {
where?: SpinWhereInput
data: XOR<SpinUpdateWithoutUserPrizeInput, SpinUncheckedUpdateWithoutUserPrizeInput>
}
export type SpinUpdateWithoutUserPrizeInput = {
id?: StringFieldUpdateOperationsInput | string
status?: EnumSpinStatusFieldUpdateOperationsInput | $Enums.SpinStatus
idempotencyKey?: StringFieldUpdateOperationsInput | string
ip?: NullableStringFieldUpdateOperationsInput | string | null
userAgent?: NullableStringFieldUpdateOperationsInput | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
user?: UserUpdateOneRequiredWithoutSpinsNestedInput
campaign?: CampaignUpdateOneRequiredWithoutSpinsNestedInput
prize?: PrizeUpdateOneWithoutSpinsNestedInput
}
export type SpinUncheckedUpdateWithoutUserPrizeInput = {
id?: StringFieldUpdateOperationsInput | string
userId?: StringFieldUpdateOperationsInput | string
campaignId?: StringFieldUpdateOperationsInput | string
prizeId?: NullableStringFieldUpdateOperationsInput | string | null
status?: EnumSpinStatusFieldUpdateOperationsInput | $Enums.SpinStatus
idempotencyKey?: StringFieldUpdateOperationsInput | string
ip?: NullableStringFieldUpdateOperationsInput | string | null
userAgent?: NullableStringFieldUpdateOperationsInput | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type UserCreateWithoutSmsLogsInput = {
id?: string
mobile: string
name?: string | null
status?: $Enums.UserStatus
lastLoginAt?: Date | string | null
createdAt?: Date | string
updatedAt?: Date | string
userCampaigns?: UserCampaignCreateNestedManyWithoutUserInput
chanceTransactions?: ChanceTransactionCreateNestedManyWithoutUserInput
spins?: SpinCreateNestedManyWithoutUserInput
userPrizes?: UserPrizeCreateNestedManyWithoutUserInput
otpCodes?: OtpCodeCreateNestedManyWithoutUserInput
}
export type UserUncheckedCreateWithoutSmsLogsInput = {
id?: string
mobile: string
name?: string | null
status?: $Enums.UserStatus
lastLoginAt?: Date | string | null
createdAt?: Date | string
updatedAt?: Date | string
userCampaigns?: UserCampaignUncheckedCreateNestedManyWithoutUserInput
chanceTransactions?: ChanceTransactionUncheckedCreateNestedManyWithoutUserInput
spins?: SpinUncheckedCreateNestedManyWithoutUserInput
userPrizes?: UserPrizeUncheckedCreateNestedManyWithoutUserInput
otpCodes?: OtpCodeUncheckedCreateNestedManyWithoutUserInput
}
export type UserCreateOrConnectWithoutSmsLogsInput = {
where: UserWhereUniqueInput
create: XOR<UserCreateWithoutSmsLogsInput, UserUncheckedCreateWithoutSmsLogsInput>
}
export type UserUpsertWithoutSmsLogsInput = {
update: XOR<UserUpdateWithoutSmsLogsInput, UserUncheckedUpdateWithoutSmsLogsInput>
create: XOR<UserCreateWithoutSmsLogsInput, UserUncheckedCreateWithoutSmsLogsInput>
where?: UserWhereInput
}
export type UserUpdateToOneWithWhereWithoutSmsLogsInput = {
where?: UserWhereInput
data: XOR<UserUpdateWithoutSmsLogsInput, UserUncheckedUpdateWithoutSmsLogsInput>
}
export type UserUpdateWithoutSmsLogsInput = {
id?: StringFieldUpdateOperationsInput | string
mobile?: StringFieldUpdateOperationsInput | string
name?: NullableStringFieldUpdateOperationsInput | string | null
status?: EnumUserStatusFieldUpdateOperationsInput | $Enums.UserStatus
lastLoginAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
userCampaigns?: UserCampaignUpdateManyWithoutUserNestedInput
chanceTransactions?: ChanceTransactionUpdateManyWithoutUserNestedInput
spins?: SpinUpdateManyWithoutUserNestedInput
userPrizes?: UserPrizeUpdateManyWithoutUserNestedInput
otpCodes?: OtpCodeUpdateManyWithoutUserNestedInput
}
export type UserUncheckedUpdateWithoutSmsLogsInput = {
id?: StringFieldUpdateOperationsInput | string
mobile?: StringFieldUpdateOperationsInput | string
name?: NullableStringFieldUpdateOperationsInput | string | null
status?: EnumUserStatusFieldUpdateOperationsInput | $Enums.UserStatus
lastLoginAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
userCampaigns?: UserCampaignUncheckedUpdateManyWithoutUserNestedInput
chanceTransactions?: ChanceTransactionUncheckedUpdateManyWithoutUserNestedInput
spins?: SpinUncheckedUpdateManyWithoutUserNestedInput
userPrizes?: UserPrizeUncheckedUpdateManyWithoutUserNestedInput
otpCodes?: OtpCodeUncheckedUpdateManyWithoutUserNestedInput
}
export type AdminCreateWithoutAuditLogsInput = {
id?: string
name: string
mobile: string
email: string
passwordHash: string
role?: $Enums.AdminRole
status?: $Enums.AdminStatus
createdAt?: Date | string
updatedAt?: Date | string
chanceTxns?: ChanceTransactionCreateNestedManyWithoutCreatedByInput
}
export type AdminUncheckedCreateWithoutAuditLogsInput = {
id?: string
name: string
mobile: string
email: string
passwordHash: string
role?: $Enums.AdminRole
status?: $Enums.AdminStatus
createdAt?: Date | string
updatedAt?: Date | string
chanceTxns?: ChanceTransactionUncheckedCreateNestedManyWithoutCreatedByInput
}
export type AdminCreateOrConnectWithoutAuditLogsInput = {
where: AdminWhereUniqueInput
create: XOR<AdminCreateWithoutAuditLogsInput, AdminUncheckedCreateWithoutAuditLogsInput>
}
export type AdminUpsertWithoutAuditLogsInput = {
update: XOR<AdminUpdateWithoutAuditLogsInput, AdminUncheckedUpdateWithoutAuditLogsInput>
create: XOR<AdminCreateWithoutAuditLogsInput, AdminUncheckedCreateWithoutAuditLogsInput>
where?: AdminWhereInput
}
export type AdminUpdateToOneWithWhereWithoutAuditLogsInput = {
where?: AdminWhereInput
data: XOR<AdminUpdateWithoutAuditLogsInput, AdminUncheckedUpdateWithoutAuditLogsInput>
}
export type AdminUpdateWithoutAuditLogsInput = {
id?: StringFieldUpdateOperationsInput | string
name?: StringFieldUpdateOperationsInput | string
mobile?: StringFieldUpdateOperationsInput | string
email?: StringFieldUpdateOperationsInput | string
passwordHash?: StringFieldUpdateOperationsInput | string
role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole
status?: EnumAdminStatusFieldUpdateOperationsInput | $Enums.AdminStatus
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
chanceTxns?: ChanceTransactionUpdateManyWithoutCreatedByNestedInput
}
export type AdminUncheckedUpdateWithoutAuditLogsInput = {
id?: StringFieldUpdateOperationsInput | string
name?: StringFieldUpdateOperationsInput | string
mobile?: StringFieldUpdateOperationsInput | string
email?: StringFieldUpdateOperationsInput | string
passwordHash?: StringFieldUpdateOperationsInput | string
role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole
status?: EnumAdminStatusFieldUpdateOperationsInput | $Enums.AdminStatus
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
chanceTxns?: ChanceTransactionUncheckedUpdateManyWithoutCreatedByNestedInput
}
export type AdminLogCreateManyAdminInput = {
id?: string
action: string
entityType: string
entityId: string
oldValue?: NullableJsonNullValueInput | InputJsonValue
newValue?: NullableJsonNullValueInput | InputJsonValue
ip?: string | null
createdAt?: Date | string
}
export type ChanceTransactionCreateManyCreatedByInput = {
id?: string
userId: string
campaignId: string
amount: number
type: $Enums.ChanceTxnType
referenceType?: string | null
referenceId?: string | null
description?: string | null
createdAt?: Date | string
}
export type AdminLogUpdateWithoutAdminInput = {
id?: StringFieldUpdateOperationsInput | string
action?: StringFieldUpdateOperationsInput | string
entityType?: StringFieldUpdateOperationsInput | string
entityId?: StringFieldUpdateOperationsInput | string
oldValue?: NullableJsonNullValueInput | InputJsonValue
newValue?: NullableJsonNullValueInput | InputJsonValue
ip?: NullableStringFieldUpdateOperationsInput | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type AdminLogUncheckedUpdateWithoutAdminInput = {
id?: StringFieldUpdateOperationsInput | string
action?: StringFieldUpdateOperationsInput | string
entityType?: StringFieldUpdateOperationsInput | string
entityId?: StringFieldUpdateOperationsInput | string
oldValue?: NullableJsonNullValueInput | InputJsonValue
newValue?: NullableJsonNullValueInput | InputJsonValue
ip?: NullableStringFieldUpdateOperationsInput | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type AdminLogUncheckedUpdateManyWithoutAdminInput = {
id?: StringFieldUpdateOperationsInput | string
action?: StringFieldUpdateOperationsInput | string
entityType?: StringFieldUpdateOperationsInput | string
entityId?: StringFieldUpdateOperationsInput | string
oldValue?: NullableJsonNullValueInput | InputJsonValue
newValue?: NullableJsonNullValueInput | InputJsonValue
ip?: NullableStringFieldUpdateOperationsInput | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type ChanceTransactionUpdateWithoutCreatedByInput = {
id?: StringFieldUpdateOperationsInput | string
amount?: IntFieldUpdateOperationsInput | number
type?: EnumChanceTxnTypeFieldUpdateOperationsInput | $Enums.ChanceTxnType
referenceType?: NullableStringFieldUpdateOperationsInput | string | null
referenceId?: NullableStringFieldUpdateOperationsInput | string | null
description?: NullableStringFieldUpdateOperationsInput | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
user?: UserUpdateOneRequiredWithoutChanceTransactionsNestedInput
campaign?: CampaignUpdateOneRequiredWithoutChanceTxnsNestedInput
}
export type ChanceTransactionUncheckedUpdateWithoutCreatedByInput = {
id?: StringFieldUpdateOperationsInput | string
userId?: StringFieldUpdateOperationsInput | string
campaignId?: StringFieldUpdateOperationsInput | string
amount?: IntFieldUpdateOperationsInput | number
type?: EnumChanceTxnTypeFieldUpdateOperationsInput | $Enums.ChanceTxnType
referenceType?: NullableStringFieldUpdateOperationsInput | string | null
referenceId?: NullableStringFieldUpdateOperationsInput | string | null
description?: NullableStringFieldUpdateOperationsInput | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type ChanceTransactionUncheckedUpdateManyWithoutCreatedByInput = {
id?: StringFieldUpdateOperationsInput | string
userId?: StringFieldUpdateOperationsInput | string
campaignId?: StringFieldUpdateOperationsInput | string
amount?: IntFieldUpdateOperationsInput | number
type?: EnumChanceTxnTypeFieldUpdateOperationsInput | $Enums.ChanceTxnType
referenceType?: NullableStringFieldUpdateOperationsInput | string | null
referenceId?: NullableStringFieldUpdateOperationsInput | string | null
description?: NullableStringFieldUpdateOperationsInput | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type UserCampaignCreateManyUserInput = {
id?: string
campaignId: string
totalChances?: number
usedChances?: number
createdAt?: Date | string
updatedAt?: Date | string
}
export type ChanceTransactionCreateManyUserInput = {
id?: string
campaignId: string
amount: number
type: $Enums.ChanceTxnType
referenceType?: string | null
referenceId?: string | null
description?: string | null
createdById?: string | null
createdAt?: Date | string
}
export type SpinCreateManyUserInput = {
id?: string
campaignId: string
prizeId?: string | null
status?: $Enums.SpinStatus
idempotencyKey: string
ip?: string | null
userAgent?: string | null
createdAt?: Date | string
}
export type UserPrizeCreateManyUserInput = {
id?: string
campaignId: string
prizeId: string
spinId: string
code?: string | null
status?: $Enums.UserPrizeStatus
wonAt?: Date | string
redeemedAt?: Date | string | null
}
export type OtpCodeCreateManyUserInput = {
id?: string
mobile: string
code: string
attempts?: number
consumed?: boolean
expiresAt: Date | string
createdAt?: Date | string
}
export type SmsLogCreateManyUserInput = {
id?: string
mobile: string
type: $Enums.SmsType
message: string
provider?: string
status?: $Enums.SmsStatus
providerResponse?: NullableJsonNullValueInput | InputJsonValue
createdAt?: Date | string
}
export type UserCampaignUpdateWithoutUserInput = {
id?: StringFieldUpdateOperationsInput | string
totalChances?: IntFieldUpdateOperationsInput | number
usedChances?: IntFieldUpdateOperationsInput | number
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
campaign?: CampaignUpdateOneRequiredWithoutUserCampaignsNestedInput
}
export type UserCampaignUncheckedUpdateWithoutUserInput = {
id?: StringFieldUpdateOperationsInput | string
campaignId?: StringFieldUpdateOperationsInput | string
totalChances?: IntFieldUpdateOperationsInput | number
usedChances?: IntFieldUpdateOperationsInput | number
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type UserCampaignUncheckedUpdateManyWithoutUserInput = {
id?: StringFieldUpdateOperationsInput | string
campaignId?: StringFieldUpdateOperationsInput | string
totalChances?: IntFieldUpdateOperationsInput | number
usedChances?: IntFieldUpdateOperationsInput | number
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type ChanceTransactionUpdateWithoutUserInput = {
id?: StringFieldUpdateOperationsInput | string
amount?: IntFieldUpdateOperationsInput | number
type?: EnumChanceTxnTypeFieldUpdateOperationsInput | $Enums.ChanceTxnType
referenceType?: NullableStringFieldUpdateOperationsInput | string | null
referenceId?: NullableStringFieldUpdateOperationsInput | string | null
description?: NullableStringFieldUpdateOperationsInput | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
campaign?: CampaignUpdateOneRequiredWithoutChanceTxnsNestedInput
createdBy?: AdminUpdateOneWithoutChanceTxnsNestedInput
}
export type ChanceTransactionUncheckedUpdateWithoutUserInput = {
id?: StringFieldUpdateOperationsInput | string
campaignId?: StringFieldUpdateOperationsInput | string
amount?: IntFieldUpdateOperationsInput | number
type?: EnumChanceTxnTypeFieldUpdateOperationsInput | $Enums.ChanceTxnType
referenceType?: NullableStringFieldUpdateOperationsInput | string | null
referenceId?: NullableStringFieldUpdateOperationsInput | string | null
description?: NullableStringFieldUpdateOperationsInput | string | null
createdById?: NullableStringFieldUpdateOperationsInput | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type ChanceTransactionUncheckedUpdateManyWithoutUserInput = {
id?: StringFieldUpdateOperationsInput | string
campaignId?: StringFieldUpdateOperationsInput | string
amount?: IntFieldUpdateOperationsInput | number
type?: EnumChanceTxnTypeFieldUpdateOperationsInput | $Enums.ChanceTxnType
referenceType?: NullableStringFieldUpdateOperationsInput | string | null
referenceId?: NullableStringFieldUpdateOperationsInput | string | null
description?: NullableStringFieldUpdateOperationsInput | string | null
createdById?: NullableStringFieldUpdateOperationsInput | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type SpinUpdateWithoutUserInput = {
id?: StringFieldUpdateOperationsInput | string
status?: EnumSpinStatusFieldUpdateOperationsInput | $Enums.SpinStatus
idempotencyKey?: StringFieldUpdateOperationsInput | string
ip?: NullableStringFieldUpdateOperationsInput | string | null
userAgent?: NullableStringFieldUpdateOperationsInput | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
campaign?: CampaignUpdateOneRequiredWithoutSpinsNestedInput
prize?: PrizeUpdateOneWithoutSpinsNestedInput
userPrize?: UserPrizeUpdateOneWithoutSpinNestedInput
}
export type SpinUncheckedUpdateWithoutUserInput = {
id?: StringFieldUpdateOperationsInput | string
campaignId?: StringFieldUpdateOperationsInput | string
prizeId?: NullableStringFieldUpdateOperationsInput | string | null
status?: EnumSpinStatusFieldUpdateOperationsInput | $Enums.SpinStatus
idempotencyKey?: StringFieldUpdateOperationsInput | string
ip?: NullableStringFieldUpdateOperationsInput | string | null
userAgent?: NullableStringFieldUpdateOperationsInput | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
userPrize?: UserPrizeUncheckedUpdateOneWithoutSpinNestedInput
}
export type SpinUncheckedUpdateManyWithoutUserInput = {
id?: StringFieldUpdateOperationsInput | string
campaignId?: StringFieldUpdateOperationsInput | string
prizeId?: NullableStringFieldUpdateOperationsInput | string | null
status?: EnumSpinStatusFieldUpdateOperationsInput | $Enums.SpinStatus
idempotencyKey?: StringFieldUpdateOperationsInput | string
ip?: NullableStringFieldUpdateOperationsInput | string | null
userAgent?: NullableStringFieldUpdateOperationsInput | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type UserPrizeUpdateWithoutUserInput = {
id?: StringFieldUpdateOperationsInput | string
code?: NullableStringFieldUpdateOperationsInput | string | null
status?: EnumUserPrizeStatusFieldUpdateOperationsInput | $Enums.UserPrizeStatus
wonAt?: DateTimeFieldUpdateOperationsInput | Date | string
redeemedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
campaign?: CampaignUpdateOneRequiredWithoutUserPrizesNestedInput
prize?: PrizeUpdateOneRequiredWithoutUserPrizesNestedInput
spin?: SpinUpdateOneRequiredWithoutUserPrizeNestedInput
}
export type UserPrizeUncheckedUpdateWithoutUserInput = {
id?: StringFieldUpdateOperationsInput | string
campaignId?: StringFieldUpdateOperationsInput | string
prizeId?: StringFieldUpdateOperationsInput | string
spinId?: StringFieldUpdateOperationsInput | string
code?: NullableStringFieldUpdateOperationsInput | string | null
status?: EnumUserPrizeStatusFieldUpdateOperationsInput | $Enums.UserPrizeStatus
wonAt?: DateTimeFieldUpdateOperationsInput | Date | string
redeemedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
}
export type UserPrizeUncheckedUpdateManyWithoutUserInput = {
id?: StringFieldUpdateOperationsInput | string
campaignId?: StringFieldUpdateOperationsInput | string
prizeId?: StringFieldUpdateOperationsInput | string
spinId?: StringFieldUpdateOperationsInput | string
code?: NullableStringFieldUpdateOperationsInput | string | null
status?: EnumUserPrizeStatusFieldUpdateOperationsInput | $Enums.UserPrizeStatus
wonAt?: DateTimeFieldUpdateOperationsInput | Date | string
redeemedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
}
export type OtpCodeUpdateWithoutUserInput = {
id?: StringFieldUpdateOperationsInput | string
mobile?: StringFieldUpdateOperationsInput | string
code?: StringFieldUpdateOperationsInput | string
attempts?: IntFieldUpdateOperationsInput | number
consumed?: BoolFieldUpdateOperationsInput | boolean
expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type OtpCodeUncheckedUpdateWithoutUserInput = {
id?: StringFieldUpdateOperationsInput | string
mobile?: StringFieldUpdateOperationsInput | string
code?: StringFieldUpdateOperationsInput | string
attempts?: IntFieldUpdateOperationsInput | number
consumed?: BoolFieldUpdateOperationsInput | boolean
expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type OtpCodeUncheckedUpdateManyWithoutUserInput = {
id?: StringFieldUpdateOperationsInput | string
mobile?: StringFieldUpdateOperationsInput | string
code?: StringFieldUpdateOperationsInput | string
attempts?: IntFieldUpdateOperationsInput | number
consumed?: BoolFieldUpdateOperationsInput | boolean
expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type SmsLogUpdateWithoutUserInput = {
id?: StringFieldUpdateOperationsInput | string
mobile?: StringFieldUpdateOperationsInput | string
type?: EnumSmsTypeFieldUpdateOperationsInput | $Enums.SmsType
message?: StringFieldUpdateOperationsInput | string
provider?: StringFieldUpdateOperationsInput | string
status?: EnumSmsStatusFieldUpdateOperationsInput | $Enums.SmsStatus
providerResponse?: NullableJsonNullValueInput | InputJsonValue
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type SmsLogUncheckedUpdateWithoutUserInput = {
id?: StringFieldUpdateOperationsInput | string
mobile?: StringFieldUpdateOperationsInput | string
type?: EnumSmsTypeFieldUpdateOperationsInput | $Enums.SmsType
message?: StringFieldUpdateOperationsInput | string
provider?: StringFieldUpdateOperationsInput | string
status?: EnumSmsStatusFieldUpdateOperationsInput | $Enums.SmsStatus
providerResponse?: NullableJsonNullValueInput | InputJsonValue
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type SmsLogUncheckedUpdateManyWithoutUserInput = {
id?: StringFieldUpdateOperationsInput | string
mobile?: StringFieldUpdateOperationsInput | string
type?: EnumSmsTypeFieldUpdateOperationsInput | $Enums.SmsType
message?: StringFieldUpdateOperationsInput | string
provider?: StringFieldUpdateOperationsInput | string
status?: EnumSmsStatusFieldUpdateOperationsInput | $Enums.SmsStatus
providerResponse?: NullableJsonNullValueInput | InputJsonValue
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type PrizeCreateManyCampaignInput = {
id?: string
title: string
description?: string | null
image?: string | null
type: $Enums.PrizeType
stockType: $Enums.StockType
initialStock?: number | null
remainingStock?: number | null
weight: number
status?: $Enums.PrizeStatus
sortOrder?: number
segmentColor: string
expiresAt?: Date | string | null
smsTemplate?: string | null
createdAt?: Date | string
updatedAt?: Date | string
}
export type UserCampaignCreateManyCampaignInput = {
id?: string
userId: string
totalChances?: number
usedChances?: number
createdAt?: Date | string
updatedAt?: Date | string
}
export type ChanceTransactionCreateManyCampaignInput = {
id?: string
userId: string
amount: number
type: $Enums.ChanceTxnType
referenceType?: string | null
referenceId?: string | null
description?: string | null
createdById?: string | null
createdAt?: Date | string
}
export type SpinCreateManyCampaignInput = {
id?: string
userId: string
prizeId?: string | null
status?: $Enums.SpinStatus
idempotencyKey: string
ip?: string | null
userAgent?: string | null
createdAt?: Date | string
}
export type UserPrizeCreateManyCampaignInput = {
id?: string
userId: string
prizeId: string
spinId: string
code?: string | null
status?: $Enums.UserPrizeStatus
wonAt?: Date | string
redeemedAt?: Date | string | null
}
export type PrizeUpdateWithoutCampaignInput = {
id?: StringFieldUpdateOperationsInput | string
title?: StringFieldUpdateOperationsInput | string
description?: NullableStringFieldUpdateOperationsInput | string | null
image?: NullableStringFieldUpdateOperationsInput | string | null
type?: EnumPrizeTypeFieldUpdateOperationsInput | $Enums.PrizeType
stockType?: EnumStockTypeFieldUpdateOperationsInput | $Enums.StockType
initialStock?: NullableIntFieldUpdateOperationsInput | number | null
remainingStock?: NullableIntFieldUpdateOperationsInput | number | null
weight?: IntFieldUpdateOperationsInput | number
status?: EnumPrizeStatusFieldUpdateOperationsInput | $Enums.PrizeStatus
sortOrder?: IntFieldUpdateOperationsInput | number
segmentColor?: StringFieldUpdateOperationsInput | string
expiresAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
smsTemplate?: NullableStringFieldUpdateOperationsInput | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
spins?: SpinUpdateManyWithoutPrizeNestedInput
userPrizes?: UserPrizeUpdateManyWithoutPrizeNestedInput
}
export type PrizeUncheckedUpdateWithoutCampaignInput = {
id?: StringFieldUpdateOperationsInput | string
title?: StringFieldUpdateOperationsInput | string
description?: NullableStringFieldUpdateOperationsInput | string | null
image?: NullableStringFieldUpdateOperationsInput | string | null
type?: EnumPrizeTypeFieldUpdateOperationsInput | $Enums.PrizeType
stockType?: EnumStockTypeFieldUpdateOperationsInput | $Enums.StockType
initialStock?: NullableIntFieldUpdateOperationsInput | number | null
remainingStock?: NullableIntFieldUpdateOperationsInput | number | null
weight?: IntFieldUpdateOperationsInput | number
status?: EnumPrizeStatusFieldUpdateOperationsInput | $Enums.PrizeStatus
sortOrder?: IntFieldUpdateOperationsInput | number
segmentColor?: StringFieldUpdateOperationsInput | string
expiresAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
smsTemplate?: NullableStringFieldUpdateOperationsInput | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
spins?: SpinUncheckedUpdateManyWithoutPrizeNestedInput
userPrizes?: UserPrizeUncheckedUpdateManyWithoutPrizeNestedInput
}
export type PrizeUncheckedUpdateManyWithoutCampaignInput = {
id?: StringFieldUpdateOperationsInput | string
title?: StringFieldUpdateOperationsInput | string
description?: NullableStringFieldUpdateOperationsInput | string | null
image?: NullableStringFieldUpdateOperationsInput | string | null
type?: EnumPrizeTypeFieldUpdateOperationsInput | $Enums.PrizeType
stockType?: EnumStockTypeFieldUpdateOperationsInput | $Enums.StockType
initialStock?: NullableIntFieldUpdateOperationsInput | number | null
remainingStock?: NullableIntFieldUpdateOperationsInput | number | null
weight?: IntFieldUpdateOperationsInput | number
status?: EnumPrizeStatusFieldUpdateOperationsInput | $Enums.PrizeStatus
sortOrder?: IntFieldUpdateOperationsInput | number
segmentColor?: StringFieldUpdateOperationsInput | string
expiresAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
smsTemplate?: NullableStringFieldUpdateOperationsInput | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type UserCampaignUpdateWithoutCampaignInput = {
id?: StringFieldUpdateOperationsInput | string
totalChances?: IntFieldUpdateOperationsInput | number
usedChances?: IntFieldUpdateOperationsInput | number
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
user?: UserUpdateOneRequiredWithoutUserCampaignsNestedInput
}
export type UserCampaignUncheckedUpdateWithoutCampaignInput = {
id?: StringFieldUpdateOperationsInput | string
userId?: StringFieldUpdateOperationsInput | string
totalChances?: IntFieldUpdateOperationsInput | number
usedChances?: IntFieldUpdateOperationsInput | number
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type UserCampaignUncheckedUpdateManyWithoutCampaignInput = {
id?: StringFieldUpdateOperationsInput | string
userId?: StringFieldUpdateOperationsInput | string
totalChances?: IntFieldUpdateOperationsInput | number
usedChances?: IntFieldUpdateOperationsInput | number
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type ChanceTransactionUpdateWithoutCampaignInput = {
id?: StringFieldUpdateOperationsInput | string
amount?: IntFieldUpdateOperationsInput | number
type?: EnumChanceTxnTypeFieldUpdateOperationsInput | $Enums.ChanceTxnType
referenceType?: NullableStringFieldUpdateOperationsInput | string | null
referenceId?: NullableStringFieldUpdateOperationsInput | string | null
description?: NullableStringFieldUpdateOperationsInput | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
user?: UserUpdateOneRequiredWithoutChanceTransactionsNestedInput
createdBy?: AdminUpdateOneWithoutChanceTxnsNestedInput
}
export type ChanceTransactionUncheckedUpdateWithoutCampaignInput = {
id?: StringFieldUpdateOperationsInput | string
userId?: StringFieldUpdateOperationsInput | string
amount?: IntFieldUpdateOperationsInput | number
type?: EnumChanceTxnTypeFieldUpdateOperationsInput | $Enums.ChanceTxnType
referenceType?: NullableStringFieldUpdateOperationsInput | string | null
referenceId?: NullableStringFieldUpdateOperationsInput | string | null
description?: NullableStringFieldUpdateOperationsInput | string | null
createdById?: NullableStringFieldUpdateOperationsInput | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type ChanceTransactionUncheckedUpdateManyWithoutCampaignInput = {
id?: StringFieldUpdateOperationsInput | string
userId?: StringFieldUpdateOperationsInput | string
amount?: IntFieldUpdateOperationsInput | number
type?: EnumChanceTxnTypeFieldUpdateOperationsInput | $Enums.ChanceTxnType
referenceType?: NullableStringFieldUpdateOperationsInput | string | null
referenceId?: NullableStringFieldUpdateOperationsInput | string | null
description?: NullableStringFieldUpdateOperationsInput | string | null
createdById?: NullableStringFieldUpdateOperationsInput | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type SpinUpdateWithoutCampaignInput = {
id?: StringFieldUpdateOperationsInput | string
status?: EnumSpinStatusFieldUpdateOperationsInput | $Enums.SpinStatus
idempotencyKey?: StringFieldUpdateOperationsInput | string
ip?: NullableStringFieldUpdateOperationsInput | string | null
userAgent?: NullableStringFieldUpdateOperationsInput | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
user?: UserUpdateOneRequiredWithoutSpinsNestedInput
prize?: PrizeUpdateOneWithoutSpinsNestedInput
userPrize?: UserPrizeUpdateOneWithoutSpinNestedInput
}
export type SpinUncheckedUpdateWithoutCampaignInput = {
id?: StringFieldUpdateOperationsInput | string
userId?: StringFieldUpdateOperationsInput | string
prizeId?: NullableStringFieldUpdateOperationsInput | string | null
status?: EnumSpinStatusFieldUpdateOperationsInput | $Enums.SpinStatus
idempotencyKey?: StringFieldUpdateOperationsInput | string
ip?: NullableStringFieldUpdateOperationsInput | string | null
userAgent?: NullableStringFieldUpdateOperationsInput | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
userPrize?: UserPrizeUncheckedUpdateOneWithoutSpinNestedInput
}
export type SpinUncheckedUpdateManyWithoutCampaignInput = {
id?: StringFieldUpdateOperationsInput | string
userId?: StringFieldUpdateOperationsInput | string
prizeId?: NullableStringFieldUpdateOperationsInput | string | null
status?: EnumSpinStatusFieldUpdateOperationsInput | $Enums.SpinStatus
idempotencyKey?: StringFieldUpdateOperationsInput | string
ip?: NullableStringFieldUpdateOperationsInput | string | null
userAgent?: NullableStringFieldUpdateOperationsInput | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type UserPrizeUpdateWithoutCampaignInput = {
id?: StringFieldUpdateOperationsInput | string
code?: NullableStringFieldUpdateOperationsInput | string | null
status?: EnumUserPrizeStatusFieldUpdateOperationsInput | $Enums.UserPrizeStatus
wonAt?: DateTimeFieldUpdateOperationsInput | Date | string
redeemedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
user?: UserUpdateOneRequiredWithoutUserPrizesNestedInput
prize?: PrizeUpdateOneRequiredWithoutUserPrizesNestedInput
spin?: SpinUpdateOneRequiredWithoutUserPrizeNestedInput
}
export type UserPrizeUncheckedUpdateWithoutCampaignInput = {
id?: StringFieldUpdateOperationsInput | string
userId?: StringFieldUpdateOperationsInput | string
prizeId?: StringFieldUpdateOperationsInput | string
spinId?: StringFieldUpdateOperationsInput | string
code?: NullableStringFieldUpdateOperationsInput | string | null
status?: EnumUserPrizeStatusFieldUpdateOperationsInput | $Enums.UserPrizeStatus
wonAt?: DateTimeFieldUpdateOperationsInput | Date | string
redeemedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
}
export type UserPrizeUncheckedUpdateManyWithoutCampaignInput = {
id?: StringFieldUpdateOperationsInput | string
userId?: StringFieldUpdateOperationsInput | string
prizeId?: StringFieldUpdateOperationsInput | string
spinId?: StringFieldUpdateOperationsInput | string
code?: NullableStringFieldUpdateOperationsInput | string | null
status?: EnumUserPrizeStatusFieldUpdateOperationsInput | $Enums.UserPrizeStatus
wonAt?: DateTimeFieldUpdateOperationsInput | Date | string
redeemedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
}
export type SpinCreateManyPrizeInput = {
id?: string
userId: string
campaignId: string
status?: $Enums.SpinStatus
idempotencyKey: string
ip?: string | null
userAgent?: string | null
createdAt?: Date | string
}
export type UserPrizeCreateManyPrizeInput = {
id?: string
userId: string
campaignId: string
spinId: string
code?: string | null
status?: $Enums.UserPrizeStatus
wonAt?: Date | string
redeemedAt?: Date | string | null
}
export type SpinUpdateWithoutPrizeInput = {
id?: StringFieldUpdateOperationsInput | string
status?: EnumSpinStatusFieldUpdateOperationsInput | $Enums.SpinStatus
idempotencyKey?: StringFieldUpdateOperationsInput | string
ip?: NullableStringFieldUpdateOperationsInput | string | null
userAgent?: NullableStringFieldUpdateOperationsInput | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
user?: UserUpdateOneRequiredWithoutSpinsNestedInput
campaign?: CampaignUpdateOneRequiredWithoutSpinsNestedInput
userPrize?: UserPrizeUpdateOneWithoutSpinNestedInput
}
export type SpinUncheckedUpdateWithoutPrizeInput = {
id?: StringFieldUpdateOperationsInput | string
userId?: StringFieldUpdateOperationsInput | string
campaignId?: StringFieldUpdateOperationsInput | string
status?: EnumSpinStatusFieldUpdateOperationsInput | $Enums.SpinStatus
idempotencyKey?: StringFieldUpdateOperationsInput | string
ip?: NullableStringFieldUpdateOperationsInput | string | null
userAgent?: NullableStringFieldUpdateOperationsInput | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
userPrize?: UserPrizeUncheckedUpdateOneWithoutSpinNestedInput
}
export type SpinUncheckedUpdateManyWithoutPrizeInput = {
id?: StringFieldUpdateOperationsInput | string
userId?: StringFieldUpdateOperationsInput | string
campaignId?: StringFieldUpdateOperationsInput | string
status?: EnumSpinStatusFieldUpdateOperationsInput | $Enums.SpinStatus
idempotencyKey?: StringFieldUpdateOperationsInput | string
ip?: NullableStringFieldUpdateOperationsInput | string | null
userAgent?: NullableStringFieldUpdateOperationsInput | string | null
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
export type UserPrizeUpdateWithoutPrizeInput = {
id?: StringFieldUpdateOperationsInput | string
code?: NullableStringFieldUpdateOperationsInput | string | null
status?: EnumUserPrizeStatusFieldUpdateOperationsInput | $Enums.UserPrizeStatus
wonAt?: DateTimeFieldUpdateOperationsInput | Date | string
redeemedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
user?: UserUpdateOneRequiredWithoutUserPrizesNestedInput
campaign?: CampaignUpdateOneRequiredWithoutUserPrizesNestedInput
spin?: SpinUpdateOneRequiredWithoutUserPrizeNestedInput
}
export type UserPrizeUncheckedUpdateWithoutPrizeInput = {
id?: StringFieldUpdateOperationsInput | string
userId?: StringFieldUpdateOperationsInput | string
campaignId?: StringFieldUpdateOperationsInput | string
spinId?: StringFieldUpdateOperationsInput | string
code?: NullableStringFieldUpdateOperationsInput | string | null
status?: EnumUserPrizeStatusFieldUpdateOperationsInput | $Enums.UserPrizeStatus
wonAt?: DateTimeFieldUpdateOperationsInput | Date | string
redeemedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
}
export type UserPrizeUncheckedUpdateManyWithoutPrizeInput = {
id?: StringFieldUpdateOperationsInput | string
userId?: StringFieldUpdateOperationsInput | string
campaignId?: StringFieldUpdateOperationsInput | string
spinId?: StringFieldUpdateOperationsInput | string
code?: NullableStringFieldUpdateOperationsInput | string | null
status?: EnumUserPrizeStatusFieldUpdateOperationsInput | $Enums.UserPrizeStatus
wonAt?: DateTimeFieldUpdateOperationsInput | Date | string
redeemedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
}
/**
* Aliases for legacy arg types
*/
/**
* @deprecated Use AdminCountOutputTypeDefaultArgs instead
*/
export type AdminCountOutputTypeArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = AdminCountOutputTypeDefaultArgs<ExtArgs>
/**
* @deprecated Use UserCountOutputTypeDefaultArgs instead
*/
export type UserCountOutputTypeArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = UserCountOutputTypeDefaultArgs<ExtArgs>
/**
* @deprecated Use CampaignCountOutputTypeDefaultArgs instead
*/
export type CampaignCountOutputTypeArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = CampaignCountOutputTypeDefaultArgs<ExtArgs>
/**
* @deprecated Use PrizeCountOutputTypeDefaultArgs instead
*/
export type PrizeCountOutputTypeArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = PrizeCountOutputTypeDefaultArgs<ExtArgs>
/**
* @deprecated Use AdminDefaultArgs instead
*/
export type AdminArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = AdminDefaultArgs<ExtArgs>
/**
* @deprecated Use UserDefaultArgs instead
*/
export type UserArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = UserDefaultArgs<ExtArgs>
/**
* @deprecated Use OtpCodeDefaultArgs instead
*/
export type OtpCodeArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = OtpCodeDefaultArgs<ExtArgs>
/**
* @deprecated Use CampaignDefaultArgs instead
*/
export type CampaignArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = CampaignDefaultArgs<ExtArgs>
/**
* @deprecated Use PrizeDefaultArgs instead
*/
export type PrizeArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = PrizeDefaultArgs<ExtArgs>
/**
* @deprecated Use UserCampaignDefaultArgs instead
*/
export type UserCampaignArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = UserCampaignDefaultArgs<ExtArgs>
/**
* @deprecated Use ChanceTransactionDefaultArgs instead
*/
export type ChanceTransactionArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = ChanceTransactionDefaultArgs<ExtArgs>
/**
* @deprecated Use SpinDefaultArgs instead
*/
export type SpinArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = SpinDefaultArgs<ExtArgs>
/**
* @deprecated Use UserPrizeDefaultArgs instead
*/
export type UserPrizeArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = UserPrizeDefaultArgs<ExtArgs>
/**
* @deprecated Use SmsLogDefaultArgs instead
*/
export type SmsLogArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = SmsLogDefaultArgs<ExtArgs>
/**
* @deprecated Use AdminLogDefaultArgs instead
*/
export type AdminLogArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = AdminLogDefaultArgs<ExtArgs>
/**
* Batch Payload for updateMany & deleteMany & createMany
*/
export type BatchPayload = {
count: number
}
/**
* DMMF
*/
export const dmmf: runtime.BaseDMMF
}