435 lines
60 KiB
JavaScript
435 lines
60 KiB
JavaScript
|
|||
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||
|
|
|
||
|
|
const {
|
||
|
|
PrismaClientKnownRequestError,
|
||
|
|
PrismaClientUnknownRequestError,
|
||
|
|
PrismaClientRustPanicError,
|
||
|
|
PrismaClientInitializationError,
|
||
|
|
PrismaClientValidationError,
|
||
|
|
NotFoundError,
|
||
|
|
getPrismaClient,
|
||
|
|
sqltag,
|
||
|
|
empty,
|
||
|
|
join,
|
||
|
|
raw,
|
||
|
|
skip,
|
||
|
|
Decimal,
|
||
|
|
Debug,
|
||
|
|
objectEnumValues,
|
||
|
|
makeStrictEnum,
|
||
|
|
Extensions,
|
||
|
|
warnOnce,
|
||
|
|
defineDmmfProperty,
|
||
|
|
Public,
|
||
|
|
getRuntime
|
||
|
|
} = require('@prisma/client/runtime/edge.js')
|
||
|
|
|
||
|
|
|
||
|
|
const Prisma = {}
|
||
|
|
|
||
|
|
exports.Prisma = Prisma
|
||
|
|
exports.$Enums = {}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Prisma Client JS version: 5.22.0
|
||
|
|
* Query Engine version: 605197351a3c8bdd595af2d2a9bc3025bca48ea2
|
||
|
|
*/
|
||
|
|
Prisma.prismaVersion = {
|
||
|
|
client: "5.22.0",
|
||
|
|
engine: "605197351a3c8bdd595af2d2a9bc3025bca48ea2"
|
||
|
|
}
|
||
|
|
|
||
|
|
Prisma.PrismaClientKnownRequestError = PrismaClientKnownRequestError;
|
||
|
|
Prisma.PrismaClientUnknownRequestError = PrismaClientUnknownRequestError
|
||
|
|
Prisma.PrismaClientRustPanicError = PrismaClientRustPanicError
|
||
|
|
Prisma.PrismaClientInitializationError = PrismaClientInitializationError
|
||
|
|
Prisma.PrismaClientValidationError = PrismaClientValidationError
|
||
|
|
Prisma.NotFoundError = NotFoundError
|
||
|
|
Prisma.Decimal = Decimal
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Re-export of sql-template-tag
|
||
|
|
*/
|
||
|
|
Prisma.sql = sqltag
|
||
|
|
Prisma.empty = empty
|
||
|
|
Prisma.join = join
|
||
|
|
Prisma.raw = raw
|
||
|
|
Prisma.validator = Public.validator
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Extensions
|
||
|
|
*/
|
||
|
|
Prisma.getExtensionContext = Extensions.getExtensionContext
|
||
|
|
Prisma.defineExtension = Extensions.defineExtension
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Shorthand utilities for JSON filtering
|
||
|
|
*/
|
||
|
|
Prisma.DbNull = objectEnumValues.instances.DbNull
|
||
|
|
Prisma.JsonNull = objectEnumValues.instances.JsonNull
|
||
|
|
Prisma.AnyNull = objectEnumValues.instances.AnyNull
|
||
|
|
|
||
|
|
Prisma.NullTypes = {
|
||
|
|
DbNull: objectEnumValues.classes.DbNull,
|
||
|
|
JsonNull: objectEnumValues.classes.JsonNull,
|
||
|
|
AnyNull: objectEnumValues.classes.AnyNull
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Enums
|
||
|
|
*/
|
||
|
|
exports.Prisma.TransactionIsolationLevel = makeStrictEnum({
|
||
|
|
ReadUncommitted: 'ReadUncommitted',
|
||
|
|
ReadCommitted: 'ReadCommitted',
|
||
|
|
RepeatableRead: 'RepeatableRead',
|
||
|
|
Serializable: 'Serializable'
|
||
|
|
});
|
||
|
|
|
||
|
|
exports.Prisma.AdminScalarFieldEnum = {
|
||
|
|
id: 'id',
|
||
|
|
name: 'name',
|
||
|
|
mobile: 'mobile',
|
||
|
|
email: 'email',
|
||
|
|
passwordHash: 'passwordHash',
|
||
|
|
role: 'role',
|
||
|
|
status: 'status',
|
||
|
|
createdAt: 'createdAt',
|
||
|
|
updatedAt: 'updatedAt'
|
||
|
|
};
|
||
|
|
|
||
|
|
exports.Prisma.UserScalarFieldEnum = {
|
||
|
|
id: 'id',
|
||
|
|
mobile: 'mobile',
|
||
|
|
name: 'name',
|
||
|
|
status: 'status',
|
||
|
|
lastLoginAt: 'lastLoginAt',
|
||
|
|
createdAt: 'createdAt',
|
||
|
|
updatedAt: 'updatedAt'
|
||
|
|
};
|
||
|
|
|
||
|
|
exports.Prisma.OtpCodeScalarFieldEnum = {
|
||
|
|
id: 'id',
|
||
|
|
mobile: 'mobile',
|
||
|
|
code: 'code',
|
||
|
|
userId: 'userId',
|
||
|
|
attempts: 'attempts',
|
||
|
|
consumed: 'consumed',
|
||
|
|
expiresAt: 'expiresAt',
|
||
|
|
createdAt: 'createdAt'
|
||
|
|
};
|
||
|
|
|
||
|
|
exports.Prisma.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'
|
||
|
|
};
|
||
|
|
|
||
|
|
exports.Prisma.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'
|
||
|
|
};
|
||
|
|
|
||
|
|
exports.Prisma.UserCampaignScalarFieldEnum = {
|
||
|
|
id: 'id',
|
||
|
|
userId: 'userId',
|
||
|
|
campaignId: 'campaignId',
|
||
|
|
totalChances: 'totalChances',
|
||
|
|
usedChances: 'usedChances',
|
||
|
|
createdAt: 'createdAt',
|
||
|
|
updatedAt: 'updatedAt'
|
||
|
|
};
|
||
|
|
|
||
|
|
exports.Prisma.ChanceTransactionScalarFieldEnum = {
|
||
|
|
id: 'id',
|
||
|
|
userId: 'userId',
|
||
|
|
campaignId: 'campaignId',
|
||
|
|
amount: 'amount',
|
||
|
|
type: 'type',
|
||
|
|
referenceType: 'referenceType',
|
||
|
|
referenceId: 'referenceId',
|
||
|
|
description: 'description',
|
||
|
|
createdById: 'createdById',
|
||
|
|
createdAt: 'createdAt'
|
||
|
|
};
|
||
|
|
|
||
|
|
exports.Prisma.SpinScalarFieldEnum = {
|
||
|
|
id: 'id',
|
||
|
|
userId: 'userId',
|
||
|
|
campaignId: 'campaignId',
|
||
|
|
prizeId: 'prizeId',
|
||
|
|
status: 'status',
|
||
|
|
idempotencyKey: 'idempotencyKey',
|
||
|
|
ip: 'ip',
|
||
|
|
userAgent: 'userAgent',
|
||
|
|
createdAt: 'createdAt'
|
||
|
|
};
|
||
|
|
|
||
|
|
exports.Prisma.UserPrizeScalarFieldEnum = {
|
||
|
|
id: 'id',
|
||
|
|
userId: 'userId',
|
||
|
|
campaignId: 'campaignId',
|
||
|
|
prizeId: 'prizeId',
|
||
|
|
spinId: 'spinId',
|
||
|
|
code: 'code',
|
||
|
|
status: 'status',
|
||
|
|
wonAt: 'wonAt',
|
||
|
|
redeemedAt: 'redeemedAt'
|
||
|
|
};
|
||
|
|
|
||
|
|
exports.Prisma.SmsLogScalarFieldEnum = {
|
||
|
|
id: 'id',
|
||
|
|
userId: 'userId',
|
||
|
|
mobile: 'mobile',
|
||
|
|
type: 'type',
|
||
|
|
message: 'message',
|
||
|
|
provider: 'provider',
|
||
|
|
status: 'status',
|
||
|
|
providerResponse: 'providerResponse',
|
||
|
|
createdAt: 'createdAt'
|
||
|
|
};
|
||
|
|
|
||
|
|
exports.Prisma.AdminLogScalarFieldEnum = {
|
||
|
|
id: 'id',
|
||
|
|
adminId: 'adminId',
|
||
|
|
action: 'action',
|
||
|
|
entityType: 'entityType',
|
||
|
|
entityId: 'entityId',
|
||
|
|
oldValue: 'oldValue',
|
||
|
|
newValue: 'newValue',
|
||
|
|
ip: 'ip',
|
||
|
|
createdAt: 'createdAt'
|
||
|
|
};
|
||
|
|
|
||
|
|
exports.Prisma.SortOrder = {
|
||
|
|
asc: 'asc',
|
||
|
|
desc: 'desc'
|
||
|
|
};
|
||
|
|
|
||
|
|
exports.Prisma.NullableJsonNullValueInput = {
|
||
|
|
DbNull: Prisma.DbNull,
|
||
|
|
JsonNull: Prisma.JsonNull
|
||
|
|
};
|
||
|
|
|
||
|
|
exports.Prisma.QueryMode = {
|
||
|
|
default: 'default',
|
||
|
|
insensitive: 'insensitive'
|
||
|
|
};
|
||
|
|
|
||
|
|
exports.Prisma.NullsOrder = {
|
||
|
|
first: 'first',
|
||
|
|
last: 'last'
|
||
|
|
};
|
||
|
|
|
||
|
|
exports.Prisma.JsonNullValueFilter = {
|
||
|
|
DbNull: Prisma.DbNull,
|
||
|
|
JsonNull: Prisma.JsonNull,
|
||
|
|
AnyNull: Prisma.AnyNull
|
||
|
|
};
|
||
|
|
exports.AdminRole = exports.$Enums.AdminRole = {
|
||
|
|
SUPER_ADMIN: 'SUPER_ADMIN',
|
||
|
|
OPERATOR: 'OPERATOR',
|
||
|
|
SUPPORT: 'SUPPORT'
|
||
|
|
};
|
||
|
|
|
||
|
|
exports.AdminStatus = exports.$Enums.AdminStatus = {
|
||
|
|
ACTIVE: 'ACTIVE',
|
||
|
|
DISABLED: 'DISABLED'
|
||
|
|
};
|
||
|
|
|
||
|
|
exports.UserStatus = exports.$Enums.UserStatus = {
|
||
|
|
ACTIVE: 'ACTIVE',
|
||
|
|
BLOCKED: 'BLOCKED'
|
||
|
|
};
|
||
|
|
|
||
|
|
exports.CampaignStatus = exports.$Enums.CampaignStatus = {
|
||
|
|
DRAFT: 'DRAFT',
|
||
|
|
ACTIVE: 'ACTIVE',
|
||
|
|
PAUSED: 'PAUSED',
|
||
|
|
FINISHED: 'FINISHED'
|
||
|
|
};
|
||
|
|
|
||
|
|
exports.WheelDesign = exports.$Enums.WheelDesign = {
|
||
|
|
CLASSIC_CASINO: 'CLASSIC_CASINO',
|
||
|
|
NEON_CYBER: 'NEON_CYBER',
|
||
|
|
MINIMAL_FLAT: 'MINIMAL_FLAT',
|
||
|
|
LUXURY_GOLD: 'LUXURY_GOLD',
|
||
|
|
PLAYFUL_CARTOON: 'PLAYFUL_CARTOON'
|
||
|
|
};
|
||
|
|
|
||
|
|
exports.PrizeType = exports.$Enums.PrizeType = {
|
||
|
|
PHYSICAL: 'PHYSICAL',
|
||
|
|
DISCOUNT_CODE: 'DISCOUNT_CODE',
|
||
|
|
CREDIT: 'CREDIT',
|
||
|
|
CASH: 'CASH',
|
||
|
|
NO_PRIZE: 'NO_PRIZE',
|
||
|
|
OTHER: 'OTHER'
|
||
|
|
};
|
||
|
|
|
||
|
|
exports.StockType = exports.$Enums.StockType = {
|
||
|
|
LIMITED: 'LIMITED',
|
||
|
|
UNLIMITED: 'UNLIMITED'
|
||
|
|
};
|
||
|
|
|
||
|
|
exports.PrizeStatus = exports.$Enums.PrizeStatus = {
|
||
|
|
ACTIVE: 'ACTIVE',
|
||
|
|
INACTIVE: 'INACTIVE'
|
||
|
|
};
|
||
|
|
|
||
|
|
exports.ChanceTxnType = exports.$Enums.ChanceTxnType = {
|
||
|
|
SIGNUP_BONUS: 'SIGNUP_BONUS',
|
||
|
|
ADMIN_ADJUSTMENT: 'ADMIN_ADJUSTMENT',
|
||
|
|
SPIN_CONSUME: 'SPIN_CONSUME',
|
||
|
|
CAMPAIGN_BONUS: 'CAMPAIGN_BONUS',
|
||
|
|
REFUND: 'REFUND'
|
||
|
|
};
|
||
|
|
|
||
|
|
exports.SpinStatus = exports.$Enums.SpinStatus = {
|
||
|
|
SUCCESS: 'SUCCESS',
|
||
|
|
FAILED: 'FAILED',
|
||
|
|
DUPLICATE: 'DUPLICATE'
|
||
|
|
};
|
||
|
|
|
||
|
|
exports.UserPrizeStatus = exports.$Enums.UserPrizeStatus = {
|
||
|
|
NEW: 'NEW',
|
||
|
|
CONTACTED: 'CONTACTED',
|
||
|
|
DELIVERED: 'DELIVERED',
|
||
|
|
ACTIVE_CODE: 'ACTIVE_CODE',
|
||
|
|
USED: 'USED',
|
||
|
|
EXPIRED: 'EXPIRED'
|
||
|
|
};
|
||
|
|
|
||
|
|
exports.SmsType = exports.$Enums.SmsType = {
|
||
|
|
OTP: 'OTP',
|
||
|
|
WINNING: 'WINNING',
|
||
|
|
NO_PRIZE: 'NO_PRIZE',
|
||
|
|
PRIZE_REMINDER: 'PRIZE_REMINDER'
|
||
|
|
};
|
||
|
|
|
||
|
|
exports.SmsStatus = exports.$Enums.SmsStatus = {
|
||
|
|
PENDING: 'PENDING',
|
||
|
|
SENT: 'SENT',
|
||
|
|
FAILED: 'FAILED'
|
||
|
|
};
|
||
|
|
|
||
|
|
exports.Prisma.ModelName = {
|
||
|
|
Admin: 'Admin',
|
||
|
|
User: 'User',
|
||
|
|
OtpCode: 'OtpCode',
|
||
|
|
Campaign: 'Campaign',
|
||
|
|
Prize: 'Prize',
|
||
|
|
UserCampaign: 'UserCampaign',
|
||
|
|
ChanceTransaction: 'ChanceTransaction',
|
||
|
|
Spin: 'Spin',
|
||
|
|
UserPrize: 'UserPrize',
|
||
|
|
SmsLog: 'SmsLog',
|
||
|
|
AdminLog: 'AdminLog'
|
||
|
|
};
|
||
|
|
/**
|
||
|
|
* Create the Client
|
||
|
|
*/
|
||
|
|
const config = {
|
||
|
|
"generator": {
|
||
|
|
"name": "client",
|
||
|
|
"provider": {
|
||
|
|
"fromEnvVar": null,
|
||
|
|
"value": "prisma-client-js"
|
||
|
|
},
|
||
|
|
"output": {
|
||
|
|
"value": "C:\\App\\Lucky_Wheel\\apps\\api\\release\\node_modules\\@prisma\\client",
|
||
|
|
"fromEnvVar": null
|
||
|
|
},
|
||
|
|
"config": {
|
||
|
|
"engineType": "library"
|
||
|
|
},
|
||
|
|
"binaryTargets": [
|
||
|
|
{
|
||
|
|
"fromEnvVar": null,
|
||
|
|
"value": "windows",
|
||
|
|
"native": true
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"fromEnvVar": null,
|
||
|
|
"value": "debian-openssl-3.0.x"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"previewFeatures": [],
|
||
|
|
"sourceFilePath": "C:\\App\\Lucky_Wheel\\apps\\api\\release\\prisma\\schema.prisma"
|
||
|
|
},
|
||
|
|
"relativeEnvPaths": {
|
||
|
|
"rootEnvPath": null
|
||
|
|
},
|
||
|
|
"relativePath": "../../../prisma",
|
||
|
|
"clientVersion": "5.22.0",
|
||
|
|
"engineVersion": "605197351a3c8bdd595af2d2a9bc3025bca48ea2",
|
||
|
|
"datasourceNames": [
|
||
|
|
"db"
|
||
|
|
],
|
||
|
|
"activeProvider": "postgresql",
|
||
|
|
"postinstall": false,
|
||
|
|
"inlineDatasources": {
|
||
|
|
"db": {
|
||
|
|
"url": {
|
||
|
|
"fromEnvVar": "DATABASE_URL",
|
||
|
|
"value": null
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n // native = ویندوز/مک لوکال؛ debian = ایمیج node:20-bookworm-slim در Docker\n binaryTargets = [\"native\", \"debian-openssl-3.0.x\"]\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\n// ==================== ENUMS ====================\n\nenum AdminStatus {\n ACTIVE\n DISABLED\n}\n\nenum AdminRole {\n SUPER_ADMIN\n OPERATOR\n SUPPORT\n}\n\nenum UserStatus {\n ACTIVE\n BLOCKED\n}\n\nenum CampaignStatus {\n DRAFT\n ACTIVE\n PAUSED\n FINISHED\n}\n\nenum PrizeType {\n PHYSICAL\n DISCOUNT_CODE\n CREDIT\n CASH\n NO_PRIZE\n OTHER\n}\n\nenum StockType {\n LIMITED\n UNLIMITED\n}\n\nenum PrizeStatus {\n ACTIVE\n INACTIVE\n}\n\nenum SpinStatus {\n SUCCESS\n FAILED\n DUPLICATE\n}\n\nenum ChanceTxnType {\n SIGNUP_BONUS\n ADMIN_ADJUSTMENT\n SPIN_CONSUME\n CAMPAIGN_BONUS\n REFUND\n}\n\nenum UserPrizeStatus {\n NEW\n CONTACTED\n DELIVERED\n ACTIVE_CODE\n USED\n EXPIRED\n}\n\nenum SmsType {\n OTP\n WINNING\n NO_PRIZE\n PRIZE_REMINDER\n}\n\nenum SmsStatus {\n PENDING\n SENT\n FAILED\n}\n\nenum WheelDesign {\n CLASSIC_CASINO\n NEON_CYBER\n MINIMAL_FLAT\n LUXURY_GOLD\n PLAYFUL_CARTOON\n}\n\n// ==================== MODELS ====================\n\nmodel Admin {\n id String @id @default(uuid())\n name String\n mobile String @unique\n email String @unique\n passwordHash String @map(\"password_hash\")\n role AdminRole @default(OPERATOR)\n status AdminStatus @default(ACTIVE)\n createdAt DateTime @default(now()) @map(\"created_at\")\n updatedAt DateTime @updatedAt @map(\"updated_at\")\n\n auditLogs AdminLog[]\n chanceTxns ChanceTransaction[] @relation(\"AdminCreatedTxn\")\n\n @@map(\"admins\")\n}\n\nmodel User {\n id String @id @default(uuid())\n mobile String @unique\n name String?\n status UserStatus @default(ACTIVE)\n lastLoginAt DateTime? @map(\"last_login_at\")\n createdAt DateTime @default(now()) @map(\"created_at\")\n updatedAt DateTime @updatedAt @map(\"updated_at\")\n\n userCampaigns UserCampaign[]\n chanceTransactions ChanceTransaction[]\n spins Spin[]\n userPrizes UserPrize[]\n otpCodes OtpCode[]\n smsLogs SmsLog[]\n\n @@index([mobile])\n @@map(\"users\")\n}\n\nmodel OtpCode {\n id String @id @default(uuid())\n mobile String\n code String\n userId String? @map(\"user_id\")\n user User? @relation(fields: [userId], references: [id])\n attempts Int @default(0)\n consumed Boolean @default(false)\n expiresAt DateTime @map(\"expires_at\")\n createdAt DateTime @default(now()) @map(\"created_at\")\n\n @@index([mobile, consumed])\n @@map(\"otp_codes\")\n}\n\nmodel Campaign {\n id String @id @default(uuid())\n title String\n slug String @unique\n description String?\n image String?\n banner String?\n logo String?\n startAt DateTime @map(\"start_at\")\n endAt DateTime @map(\"end_at\")\n status CampaignStatus @default(DRAFT)\n defaultChances Int @default(0) @map(\"default_chances\")\n rules String?\n ctaText String? @map(\"cta_text\")\n wheelDesign WheelDesign @default(CLASSIC_CASINO) @map(\"wheel_design\")\n settings Json? // primaryColor, secondaryColor, headerText, buttonText, headerImage, celebrationEffect...\n createdAt DateTime @default(now()) @map(\"created_at\")\n updatedAt DateTime @updatedAt @map(\"updated_at\")\n\n prizes Prize[]\n userCampaigns UserCampaign[]\n chanceTxns ChanceTransaction[]\n spins Spin[]\n userPrizes UserPrize[]\n\n @@index([status, startAt, endAt])\n @@map(\"campaigns\")\n}\n\nmodel Prize {\n id String @id @default(uuid())\n campaignId String
|
||
|
|
"inlineSchemaHash": "330dd92450a24da68bb5335439fe0a49e7d5fd7cbac2a3918f6fce972f87eea9",
|
||
|
|
"copyEngine": true
|
||
|
|
}
|
||
|
|
config.dirname = '/'
|
||
|
|
|
||
|
|
config.runtimeDataModel = JSON.parse("{\"models\":{\"Admin\":{\"dbName\":\"admins\",\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"uuid(4)\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mobile\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"passwordHash\",\"dbName\":\"password_hash\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"role\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"AdminRole\",\"default\":\"OPERATOR\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"AdminStatus\",\"default\":\"ACTIVE\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"dbName\":\"created_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"dbName\":\"updated_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"auditLogs\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminLog\",\"relationName\":\"AdminToAdminLog\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"chanceTxns\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChanceTransaction\",\"relationName\":\"AdminCreatedTxn\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"User\":{\"dbName\":\"users\",\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"uuid(4)\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mobile\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"UserStatus\",\"default\":\"ACTIVE\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastLoginAt\",\"dbName
|
||
|
|
defineDmmfProperty(exports.Prisma, config.runtimeDataModel)
|
||
|
|
config.engineWasm = undefined
|
||
|
|
|
||
|
|
config.injectableEdgeEnv = () => ({
|
||
|
|
parsed: {
|
||
|
|
DATABASE_URL: typeof globalThis !== 'undefined' && globalThis['DATABASE_URL'] || typeof process !== 'undefined' && process.env && process.env.DATABASE_URL || undefined
|
||
|
|
}
|
||
|
|
})
|
||
|
|
|
||
|
|
if (typeof globalThis !== 'undefined' && globalThis['DEBUG'] || typeof process !== 'undefined' && process.env && process.env.DEBUG || undefined) {
|
||
|
|
Debug.enable(typeof globalThis !== 'undefined' && globalThis['DEBUG'] || typeof process !== 'undefined' && process.env && process.env.DEBUG || undefined)
|
||
|
|
}
|
||
|
|
|
||
|
|
const PrismaClient = getPrismaClient(config)
|
||
|
|
exports.PrismaClient = PrismaClient
|
||
|
|
Object.assign(exports, Prisma)
|
||
|
|
|