chore: mqsrv backend
This commit is contained in:
commit
606137e030
2165 files changed
+904507
No files matched your search
+1
@@ -0,0 +1 @@
|
||||
export * from "./index"
|
||||
+1
@@ -0,0 +1 @@
|
||||
module.exports = { ...require('.') }
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
class PrismaClient {
|
||||
constructor() {
|
||||
throw new Error(
|
||||
'@prisma/client/deno/edge did not initialize yet. Please run "prisma generate" and try to import it again.',
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export { PrismaClient }
|
||||
+1
@@ -0,0 +1 @@
|
||||
export * from "./default"
|
||||
+329
@@ -0,0 +1,329 @@
|
||||
|
||||
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.UserScalarFieldEnum = {
|
||||
id: 'id',
|
||||
username: 'username',
|
||||
email: 'email',
|
||||
passwordHash: 'passwordHash',
|
||||
avatar: 'avatar',
|
||||
isVip: 'isVip',
|
||||
vipLevel: 'vipLevel',
|
||||
vipExpireAt: 'vipExpireAt',
|
||||
schemesCount: 'schemesCount',
|
||||
favoritesCount: 'favoritesCount',
|
||||
installId: 'installId',
|
||||
deviceHash: 'deviceHash',
|
||||
lastDeviceCheck: 'lastDeviceCheck',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt',
|
||||
lastLoginAt: 'lastLoginAt',
|
||||
deletedAt: 'deletedAt'
|
||||
};
|
||||
|
||||
exports.Prisma.VipCardScalarFieldEnum = {
|
||||
id: 'id',
|
||||
cardKey: 'cardKey',
|
||||
cardType: 'cardType',
|
||||
days: 'days',
|
||||
status: 'status',
|
||||
usedBy: 'usedBy',
|
||||
usedAt: 'usedAt',
|
||||
batchId: 'batchId',
|
||||
generatedAt: 'generatedAt',
|
||||
originalPrice: 'originalPrice',
|
||||
salePrice: 'salePrice'
|
||||
};
|
||||
|
||||
exports.Prisma.SchemeScalarFieldEnum = {
|
||||
id: 'id',
|
||||
userId: 'userId',
|
||||
title: 'title',
|
||||
description: 'description',
|
||||
weaponName: 'weaponName',
|
||||
category: 'category',
|
||||
schemeContent: 'schemeContent',
|
||||
contentEncrypted: 'contentEncrypted',
|
||||
price: 'price',
|
||||
viewsCount: 'viewsCount',
|
||||
downloadsCount: 'downloadsCount',
|
||||
likesCount: 'likesCount',
|
||||
favoritesCount: 'favoritesCount',
|
||||
gpuModel: 'gpuModel',
|
||||
driverVersion: 'driverVersion',
|
||||
appVersion: 'appVersion',
|
||||
status: 'status',
|
||||
isOfficial: 'isOfficial',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
};
|
||||
|
||||
exports.Prisma.SchemeAobScalarFieldEnum = {
|
||||
id: 'id',
|
||||
userId: 'userId',
|
||||
title: 'title',
|
||||
description: 'description',
|
||||
weaponName: 'weaponName',
|
||||
category: 'category',
|
||||
schemeContent: 'schemeContent',
|
||||
contentEncrypted: 'contentEncrypted',
|
||||
price: 'price',
|
||||
viewsCount: 'viewsCount',
|
||||
downloadsCount: 'downloadsCount',
|
||||
likesCount: 'likesCount',
|
||||
favoritesCount: 'favoritesCount',
|
||||
status: 'status',
|
||||
isOfficial: 'isOfficial',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
};
|
||||
|
||||
exports.Prisma.FilterShareScalarFieldEnum = {
|
||||
id: 'id',
|
||||
userId: 'userId',
|
||||
title: 'title',
|
||||
description: 'description',
|
||||
category: 'category',
|
||||
filterContent: 'filterContent',
|
||||
contentFormat: 'contentFormat',
|
||||
viewsCount: 'viewsCount',
|
||||
likesCount: 'likesCount',
|
||||
status: 'status',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
};
|
||||
|
||||
exports.Prisma.FavoriteScalarFieldEnum = {
|
||||
id: 'id',
|
||||
userId: 'userId',
|
||||
targetType: 'targetType',
|
||||
targetId: 'targetId',
|
||||
createdAt: 'createdAt'
|
||||
};
|
||||
|
||||
exports.Prisma.LikeScalarFieldEnum = {
|
||||
id: 'id',
|
||||
userId: 'userId',
|
||||
targetType: 'targetType',
|
||||
targetId: 'targetId',
|
||||
createdAt: 'createdAt'
|
||||
};
|
||||
|
||||
exports.Prisma.CategoryScalarFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
type: 'type',
|
||||
sortOrder: 'sortOrder',
|
||||
isActive: 'isActive',
|
||||
createdAt: 'createdAt'
|
||||
};
|
||||
|
||||
exports.Prisma.UserLogScalarFieldEnum = {
|
||||
id: 'id',
|
||||
userId: 'userId',
|
||||
action: 'action',
|
||||
targetType: 'targetType',
|
||||
targetId: 'targetId',
|
||||
installId: 'installId',
|
||||
deviceHash: 'deviceHash',
|
||||
ipAddress: 'ipAddress',
|
||||
createdAt: 'createdAt'
|
||||
};
|
||||
|
||||
exports.Prisma.DeviceBindingScalarFieldEnum = {
|
||||
id: 'id',
|
||||
userId: 'userId',
|
||||
installId: 'installId',
|
||||
deviceHash: 'deviceHash',
|
||||
boundAt: 'boundAt',
|
||||
lastActiveAt: 'lastActiveAt',
|
||||
isActive: 'isActive'
|
||||
};
|
||||
|
||||
exports.Prisma.SortOrder = {
|
||||
asc: 'asc',
|
||||
desc: 'desc'
|
||||
};
|
||||
|
||||
exports.Prisma.QueryMode = {
|
||||
default: 'default',
|
||||
insensitive: 'insensitive'
|
||||
};
|
||||
|
||||
exports.Prisma.NullsOrder = {
|
||||
first: 'first',
|
||||
last: 'last'
|
||||
};
|
||||
|
||||
|
||||
exports.Prisma.ModelName = {
|
||||
User: 'User',
|
||||
VipCard: 'VipCard',
|
||||
Scheme: 'Scheme',
|
||||
SchemeAob: 'SchemeAob',
|
||||
FilterShare: 'FilterShare',
|
||||
Favorite: 'Favorite',
|
||||
Like: 'Like',
|
||||
Category: 'Category',
|
||||
UserLog: 'UserLog',
|
||||
DeviceBinding: 'DeviceBinding'
|
||||
};
|
||||
/**
|
||||
* Create the Client
|
||||
*/
|
||||
const config = {
|
||||
"generator": {
|
||||
"name": "client",
|
||||
"provider": {
|
||||
"fromEnvVar": null,
|
||||
"value": "prisma-client-js"
|
||||
},
|
||||
"output": {
|
||||
"value": "/Users/guchen/.openclaw/workspace/maqt-backend/node_modules/@prisma/client",
|
||||
"fromEnvVar": null
|
||||
},
|
||||
"config": {
|
||||
"engineType": "library"
|
||||
},
|
||||
"binaryTargets": [
|
||||
{
|
||||
"fromEnvVar": null,
|
||||
"value": "darwin",
|
||||
"native": true
|
||||
}
|
||||
],
|
||||
"previewFeatures": [],
|
||||
"sourceFilePath": "/Users/guchen/.openclaw/workspace/maqt-backend/prisma/schema.prisma"
|
||||
},
|
||||
"relativeEnvPaths": {
|
||||
"rootEnvPath": null,
|
||||
"schemaEnvPath": "../../../.env"
|
||||
},
|
||||
"relativePath": "../../../prisma",
|
||||
"clientVersion": "5.22.0",
|
||||
"engineVersion": "605197351a3c8bdd595af2d2a9bc3025bca48ea2",
|
||||
"datasourceNames": [
|
||||
"db"
|
||||
],
|
||||
"activeProvider": "postgresql",
|
||||
"inlineDatasources": {
|
||||
"db": {
|
||||
"url": {
|
||||
"fromEnvVar": "DATABASE_URL",
|
||||
"value": null
|
||||
}
|
||||
}
|
||||
},
|
||||
"inlineSchema": "// This is your Prisma schema file,\n// learn more about it in the docs: https://pris.ly/d/prisma-schema\n\ngenerator client {\n provider = \"prisma-client-js\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\n// ============================================\n// 用户表\n// ============================================\nmodel User {\n id String @id @default(uuid())\n username String @unique @db.VarChar(50)\n email String @unique @db.VarChar(100)\n passwordHash String @map(\"password_hash\") @db.VarChar(255)\n avatar String? @db.VarChar(255)\n\n // VIP 状态\n isVip Boolean @default(false) @map(\"is_vip\")\n vipLevel Int @default(0) @map(\"vip_level\")\n vipExpireAt DateTime? @map(\"vip_expire_at\")\n\n // 统计\n schemesCount Int @default(0) @map(\"schemes_count\")\n favoritesCount Int @default(0) @map(\"favorites_count\")\n\n // 设备绑定\n installId String? @map(\"install_id\") @db.VarChar(64)\n deviceHash String? @map(\"device_hash\") @db.VarChar(64)\n lastDeviceCheck DateTime? @map(\"last_device_check\")\n\n // 元数据\n createdAt DateTime @default(now()) @map(\"created_at\")\n updatedAt DateTime @updatedAt @map(\"updated_at\")\n lastLoginAt DateTime? @map(\"last_login_at\")\n deletedAt DateTime? @map(\"deleted_at\")\n\n // 关系\n schemes Scheme[]\n schemesAob SchemeAob[]\n filterShares FilterShare[]\n favorites Favorite[]\n likes Like[]\n logs UserLog[]\n usedVipCards VipCard[] @relation(\"UsedCards\")\n deviceBindings DeviceBinding[]\n\n @@map(\"users\")\n}\n\n// ============================================\n// VIP 卡密表\n// ============================================\nmodel VipCard {\n id String @id @default(uuid())\n cardKey String @unique @map(\"card_key\") @db.VarChar(50)\n\n cardType String @map(\"card_type\") @db.VarChar(20)\n days Int\n\n status String @default(\"UNUSED\") @db.VarChar(20)\n usedBy String? @map(\"used_by\")\n usedAt DateTime? @map(\"used_at\")\n\n batchId String? @map(\"batch_id\")\n generatedAt DateTime @default(now()) @map(\"generated_at\")\n\n originalPrice Decimal? @map(\"original_price\") @db.Decimal(10, 2)\n salePrice Decimal? @map(\"sale_price\") @db.Decimal(10, 2)\n\n user User? @relation(\"UsedCards\", fields: [usedBy], references: [id], onDelete: SetNull)\n\n @@map(\"vip_cards\")\n}\n\n// ============================================\n// 方案表 - 烽火地带\n// ============================================\nmodel Scheme {\n id String @id @default(uuid())\n userId String @map(\"user_id\")\n\n title String? @db.VarChar(100)\n description String? @db.Text\n weaponName String? @map(\"weapon_name\") @db.VarChar(100)\n category String? @db.VarChar(50)\n\n schemeContent String @map(\"scheme_content\") @db.Text\n contentEncrypted Boolean @default(true) @map(\"content_encrypted\")\n\n price Int @default(0)\n\n viewsCount Int @default(0) @map(\"views_count\")\n downloadsCount Int @default(0) @map(\"downloads_count\")\n likesCount Int @default(0) @map(\"likes_count\")\n favoritesCount Int @default(0) @map(\"favorites_count\")\n\n gpuModel String? @map(\"gpu_model\") @db.VarChar(100)\n driverVersion String? @map(\"driver_version\") @db.VarChar(50)\n appVersion String? @map(\"app_version\") @db.VarChar(20)\n\n status String @default(\"DRAFT\") @db.VarChar(20)\n isOfficial Boolean @default(false) @map(\"is_official\")\n\n createdAt DateTime @default(now()) @map(\"created_at\")\n updatedAt DateTime @updatedAt @map(\"updated_at\")\n\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n\n @@index([userId])\n @@index([weaponName])\n @@index([category])\n @@index([status])\n @@map(\"schemes\")\n}\n\n// ============================================\n// 方案表 - 全面战场 (AOB)\n// ============================================\nmodel SchemeAob {\n id String @id @default(uuid())\n userId String @map(\"user_id\")\n\n title String? @db.VarChar(100)\n description String? @db.Text\n weaponName String? @map(\"weapon_name\") @db.VarChar(100)\n category String? @db.VarChar(50)\n\n schemeContent String @map(\"scheme_content\") @db.Text\n contentEncrypted Boolean @default(true) @map(\"content_encrypted\")\n\n price Int @default(0)\n\n viewsCount Int @default(0) @map(\"views_count\")\n downloadsCount Int @default(0) @map(\"downloads_count\")\n likesCount Int @default(0) @map(\"likes_count\")\n favoritesCount Int @default(0) @map(\"favorites_count\")\n\n status String @default(\"DRAFT\") @db.VarChar(20)\n isOfficial Boolean @default(false) @map(\"is_official\")\n\n createdAt DateTime @default(now()) @map(\"created_at\")\n updatedAt DateTime @updatedAt @map(\"updated_at\")\n\n user User @relation(fieLine truncated
|
||||
"inlineSchemaHash": "b5ab9bd32c06bc713d0f551c8ccd6f8dcb83319ae1a391699f101bc863228ba4",
|
||||
"copyEngine": true
|
||||
}
|
||||
config.dirname = '/'
|
||||
|
||||
config.runtimeDataModel = JSON.parse("{\"models\":{\"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\":\"username\",\"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\":\"avatar\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isVip\",\"dbName\":\"is_vip\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"vipLevel\",\"dbName\":\"vip_level\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"vipExpireAt\",\"dbName\":\"vip_expire_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"schemesCount\",\"dbName\":\"schemes_count\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"favoritesCount\",\"dbName\":\"favorites_count\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"installId\",\"dbName\":\"install_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"deviceHash\",\"dbName\":\"device_hash\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastDeviceCheck\",\"dbName\":\"last_device_check\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"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\":\"lastLoginAt\",\"dbName\":\"last_login_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"deletedAt\",\"dbName\":\"deleted_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"schemes\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Scheme\",\"relationName\":\"SchemeToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"schemesAob\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SchemeAob\",\"relationName\":\"SchemeAobToUser\",\"relLine truncated
|
||||
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)
|
||||
|
||||
+322
@@ -0,0 +1,322 @@
|
||||
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
|
||||
const {
|
||||
Decimal,
|
||||
objectEnumValues,
|
||||
makeStrictEnum,
|
||||
Public,
|
||||
getRuntime,
|
||||
skip
|
||||
} = require('@prisma/client/runtime/index-browser.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 = () => {
|
||||
const runtimeName = getRuntime().prettyName;
|
||||
throw new Error(`PrismaClientKnownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
||||
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
||||
)};
|
||||
Prisma.PrismaClientUnknownRequestError = () => {
|
||||
const runtimeName = getRuntime().prettyName;
|
||||
throw new Error(`PrismaClientUnknownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
||||
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
||||
)}
|
||||
Prisma.PrismaClientRustPanicError = () => {
|
||||
const runtimeName = getRuntime().prettyName;
|
||||
throw new Error(`PrismaClientRustPanicError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
||||
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
||||
)}
|
||||
Prisma.PrismaClientInitializationError = () => {
|
||||
const runtimeName = getRuntime().prettyName;
|
||||
throw new Error(`PrismaClientInitializationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
||||
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
||||
)}
|
||||
Prisma.PrismaClientValidationError = () => {
|
||||
const runtimeName = getRuntime().prettyName;
|
||||
throw new Error(`PrismaClientValidationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
||||
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
||||
)}
|
||||
Prisma.NotFoundError = () => {
|
||||
const runtimeName = getRuntime().prettyName;
|
||||
throw new Error(`NotFoundError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
||||
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
||||
)}
|
||||
Prisma.Decimal = Decimal
|
||||
|
||||
/**
|
||||
* Re-export of sql-template-tag
|
||||
*/
|
||||
Prisma.sql = () => {
|
||||
const runtimeName = getRuntime().prettyName;
|
||||
throw new Error(`sqltag is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
||||
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
||||
)}
|
||||
Prisma.empty = () => {
|
||||
const runtimeName = getRuntime().prettyName;
|
||||
throw new Error(`empty is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
||||
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
||||
)}
|
||||
Prisma.join = () => {
|
||||
const runtimeName = getRuntime().prettyName;
|
||||
throw new Error(`join is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
||||
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
||||
)}
|
||||
Prisma.raw = () => {
|
||||
const runtimeName = getRuntime().prettyName;
|
||||
throw new Error(`raw is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
||||
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
||||
)}
|
||||
Prisma.validator = Public.validator
|
||||
|
||||
/**
|
||||
* Extensions
|
||||
*/
|
||||
Prisma.getExtensionContext = () => {
|
||||
const runtimeName = getRuntime().prettyName;
|
||||
throw new Error(`Extensions.getExtensionContext is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
||||
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
||||
)}
|
||||
Prisma.defineExtension = () => {
|
||||
const runtimeName = getRuntime().prettyName;
|
||||
throw new Error(`Extensions.defineExtension is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
||||
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
||||
)}
|
||||
|
||||
/**
|
||||
* 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.UserScalarFieldEnum = {
|
||||
id: 'id',
|
||||
username: 'username',
|
||||
email: 'email',
|
||||
passwordHash: 'passwordHash',
|
||||
avatar: 'avatar',
|
||||
isVip: 'isVip',
|
||||
vipLevel: 'vipLevel',
|
||||
vipExpireAt: 'vipExpireAt',
|
||||
schemesCount: 'schemesCount',
|
||||
favoritesCount: 'favoritesCount',
|
||||
installId: 'installId',
|
||||
deviceHash: 'deviceHash',
|
||||
lastDeviceCheck: 'lastDeviceCheck',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt',
|
||||
lastLoginAt: 'lastLoginAt',
|
||||
deletedAt: 'deletedAt'
|
||||
};
|
||||
|
||||
exports.Prisma.VipCardScalarFieldEnum = {
|
||||
id: 'id',
|
||||
cardKey: 'cardKey',
|
||||
cardType: 'cardType',
|
||||
days: 'days',
|
||||
status: 'status',
|
||||
usedBy: 'usedBy',
|
||||
usedAt: 'usedAt',
|
||||
batchId: 'batchId',
|
||||
generatedAt: 'generatedAt',
|
||||
originalPrice: 'originalPrice',
|
||||
salePrice: 'salePrice'
|
||||
};
|
||||
|
||||
exports.Prisma.SchemeScalarFieldEnum = {
|
||||
id: 'id',
|
||||
userId: 'userId',
|
||||
title: 'title',
|
||||
description: 'description',
|
||||
weaponName: 'weaponName',
|
||||
category: 'category',
|
||||
schemeContent: 'schemeContent',
|
||||
contentEncrypted: 'contentEncrypted',
|
||||
price: 'price',
|
||||
viewsCount: 'viewsCount',
|
||||
downloadsCount: 'downloadsCount',
|
||||
likesCount: 'likesCount',
|
||||
favoritesCount: 'favoritesCount',
|
||||
gpuModel: 'gpuModel',
|
||||
driverVersion: 'driverVersion',
|
||||
appVersion: 'appVersion',
|
||||
status: 'status',
|
||||
isOfficial: 'isOfficial',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
};
|
||||
|
||||
exports.Prisma.SchemeAobScalarFieldEnum = {
|
||||
id: 'id',
|
||||
userId: 'userId',
|
||||
title: 'title',
|
||||
description: 'description',
|
||||
weaponName: 'weaponName',
|
||||
category: 'category',
|
||||
schemeContent: 'schemeContent',
|
||||
contentEncrypted: 'contentEncrypted',
|
||||
price: 'price',
|
||||
viewsCount: 'viewsCount',
|
||||
downloadsCount: 'downloadsCount',
|
||||
likesCount: 'likesCount',
|
||||
favoritesCount: 'favoritesCount',
|
||||
status: 'status',
|
||||
isOfficial: 'isOfficial',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
};
|
||||
|
||||
exports.Prisma.FilterShareScalarFieldEnum = {
|
||||
id: 'id',
|
||||
userId: 'userId',
|
||||
title: 'title',
|
||||
description: 'description',
|
||||
category: 'category',
|
||||
filterContent: 'filterContent',
|
||||
contentFormat: 'contentFormat',
|
||||
viewsCount: 'viewsCount',
|
||||
likesCount: 'likesCount',
|
||||
status: 'status',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
};
|
||||
|
||||
exports.Prisma.FavoriteScalarFieldEnum = {
|
||||
id: 'id',
|
||||
userId: 'userId',
|
||||
targetType: 'targetType',
|
||||
targetId: 'targetId',
|
||||
createdAt: 'createdAt'
|
||||
};
|
||||
|
||||
exports.Prisma.LikeScalarFieldEnum = {
|
||||
id: 'id',
|
||||
userId: 'userId',
|
||||
targetType: 'targetType',
|
||||
targetId: 'targetId',
|
||||
createdAt: 'createdAt'
|
||||
};
|
||||
|
||||
exports.Prisma.CategoryScalarFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
type: 'type',
|
||||
sortOrder: 'sortOrder',
|
||||
isActive: 'isActive',
|
||||
createdAt: 'createdAt'
|
||||
};
|
||||
|
||||
exports.Prisma.UserLogScalarFieldEnum = {
|
||||
id: 'id',
|
||||
userId: 'userId',
|
||||
action: 'action',
|
||||
targetType: 'targetType',
|
||||
targetId: 'targetId',
|
||||
installId: 'installId',
|
||||
deviceHash: 'deviceHash',
|
||||
ipAddress: 'ipAddress',
|
||||
createdAt: 'createdAt'
|
||||
};
|
||||
|
||||
exports.Prisma.DeviceBindingScalarFieldEnum = {
|
||||
id: 'id',
|
||||
userId: 'userId',
|
||||
installId: 'installId',
|
||||
deviceHash: 'deviceHash',
|
||||
boundAt: 'boundAt',
|
||||
lastActiveAt: 'lastActiveAt',
|
||||
isActive: 'isActive'
|
||||
};
|
||||
|
||||
exports.Prisma.SortOrder = {
|
||||
asc: 'asc',
|
||||
desc: 'desc'
|
||||
};
|
||||
|
||||
exports.Prisma.QueryMode = {
|
||||
default: 'default',
|
||||
insensitive: 'insensitive'
|
||||
};
|
||||
|
||||
exports.Prisma.NullsOrder = {
|
||||
first: 'first',
|
||||
last: 'last'
|
||||
};
|
||||
|
||||
|
||||
exports.Prisma.ModelName = {
|
||||
User: 'User',
|
||||
VipCard: 'VipCard',
|
||||
Scheme: 'Scheme',
|
||||
SchemeAob: 'SchemeAob',
|
||||
FilterShare: 'FilterShare',
|
||||
Favorite: 'Favorite',
|
||||
Like: 'Like',
|
||||
Category: 'Category',
|
||||
UserLog: 'UserLog',
|
||||
DeviceBinding: 'DeviceBinding'
|
||||
};
|
||||
|
||||
/**
|
||||
* This is a stub Prisma Client that will error at runtime if called.
|
||||
*/
|
||||
class PrismaClient {
|
||||
constructor() {
|
||||
return new Proxy(this, {
|
||||
get(target, prop) {
|
||||
let message
|
||||
const runtime = getRuntime()
|
||||
if (runtime.isEdge) {
|
||||
message = `PrismaClient is not configured to run in ${runtime.prettyName}. In order to run Prisma Client on edge runtime, either:
|
||||
- Use Prisma Accelerate: https://pris.ly/d/accelerate
|
||||
- Use Driver Adapters: https://pris.ly/d/driver-adapters
|
||||
`;
|
||||
} else {
|
||||
message = 'PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in `' + runtime.prettyName + '`).'
|
||||
}
|
||||
|
||||
message += `
|
||||
If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report`
|
||||
|
||||
throw new Error(message)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
exports.PrismaClient = PrismaClient
|
||||
|
||||
Object.assign(exports, Prisma)
|
||||
+17815
File diff suppressed because it is too large.
Load diff
+350
@@ -0,0 +1,350 @@
|
||||
|
||||
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/library.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
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
const path = require('path')
|
||||
|
||||
/**
|
||||
* Enums
|
||||
*/
|
||||
exports.Prisma.TransactionIsolationLevel = makeStrictEnum({
|
||||
ReadUncommitted: 'ReadUncommitted',
|
||||
ReadCommitted: 'ReadCommitted',
|
||||
RepeatableRead: 'RepeatableRead',
|
||||
Serializable: 'Serializable'
|
||||
});
|
||||
|
||||
exports.Prisma.UserScalarFieldEnum = {
|
||||
id: 'id',
|
||||
username: 'username',
|
||||
email: 'email',
|
||||
passwordHash: 'passwordHash',
|
||||
avatar: 'avatar',
|
||||
isVip: 'isVip',
|
||||
vipLevel: 'vipLevel',
|
||||
vipExpireAt: 'vipExpireAt',
|
||||
schemesCount: 'schemesCount',
|
||||
favoritesCount: 'favoritesCount',
|
||||
installId: 'installId',
|
||||
deviceHash: 'deviceHash',
|
||||
lastDeviceCheck: 'lastDeviceCheck',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt',
|
||||
lastLoginAt: 'lastLoginAt',
|
||||
deletedAt: 'deletedAt'
|
||||
};
|
||||
|
||||
exports.Prisma.VipCardScalarFieldEnum = {
|
||||
id: 'id',
|
||||
cardKey: 'cardKey',
|
||||
cardType: 'cardType',
|
||||
days: 'days',
|
||||
status: 'status',
|
||||
usedBy: 'usedBy',
|
||||
usedAt: 'usedAt',
|
||||
batchId: 'batchId',
|
||||
generatedAt: 'generatedAt',
|
||||
originalPrice: 'originalPrice',
|
||||
salePrice: 'salePrice'
|
||||
};
|
||||
|
||||
exports.Prisma.SchemeScalarFieldEnum = {
|
||||
id: 'id',
|
||||
userId: 'userId',
|
||||
title: 'title',
|
||||
description: 'description',
|
||||
weaponName: 'weaponName',
|
||||
category: 'category',
|
||||
schemeContent: 'schemeContent',
|
||||
contentEncrypted: 'contentEncrypted',
|
||||
price: 'price',
|
||||
viewsCount: 'viewsCount',
|
||||
downloadsCount: 'downloadsCount',
|
||||
likesCount: 'likesCount',
|
||||
favoritesCount: 'favoritesCount',
|
||||
gpuModel: 'gpuModel',
|
||||
driverVersion: 'driverVersion',
|
||||
appVersion: 'appVersion',
|
||||
status: 'status',
|
||||
isOfficial: 'isOfficial',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
};
|
||||
|
||||
exports.Prisma.SchemeAobScalarFieldEnum = {
|
||||
id: 'id',
|
||||
userId: 'userId',
|
||||
title: 'title',
|
||||
description: 'description',
|
||||
weaponName: 'weaponName',
|
||||
category: 'category',
|
||||
schemeContent: 'schemeContent',
|
||||
contentEncrypted: 'contentEncrypted',
|
||||
price: 'price',
|
||||
viewsCount: 'viewsCount',
|
||||
downloadsCount: 'downloadsCount',
|
||||
likesCount: 'likesCount',
|
||||
favoritesCount: 'favoritesCount',
|
||||
status: 'status',
|
||||
isOfficial: 'isOfficial',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
};
|
||||
|
||||
exports.Prisma.FilterShareScalarFieldEnum = {
|
||||
id: 'id',
|
||||
userId: 'userId',
|
||||
title: 'title',
|
||||
description: 'description',
|
||||
category: 'category',
|
||||
filterContent: 'filterContent',
|
||||
contentFormat: 'contentFormat',
|
||||
viewsCount: 'viewsCount',
|
||||
likesCount: 'likesCount',
|
||||
status: 'status',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
};
|
||||
|
||||
exports.Prisma.FavoriteScalarFieldEnum = {
|
||||
id: 'id',
|
||||
userId: 'userId',
|
||||
targetType: 'targetType',
|
||||
targetId: 'targetId',
|
||||
createdAt: 'createdAt'
|
||||
};
|
||||
|
||||
exports.Prisma.LikeScalarFieldEnum = {
|
||||
id: 'id',
|
||||
userId: 'userId',
|
||||
targetType: 'targetType',
|
||||
targetId: 'targetId',
|
||||
createdAt: 'createdAt'
|
||||
};
|
||||
|
||||
exports.Prisma.CategoryScalarFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
type: 'type',
|
||||
sortOrder: 'sortOrder',
|
||||
isActive: 'isActive',
|
||||
createdAt: 'createdAt'
|
||||
};
|
||||
|
||||
exports.Prisma.UserLogScalarFieldEnum = {
|
||||
id: 'id',
|
||||
userId: 'userId',
|
||||
action: 'action',
|
||||
targetType: 'targetType',
|
||||
targetId: 'targetId',
|
||||
installId: 'installId',
|
||||
deviceHash: 'deviceHash',
|
||||
ipAddress: 'ipAddress',
|
||||
createdAt: 'createdAt'
|
||||
};
|
||||
|
||||
exports.Prisma.DeviceBindingScalarFieldEnum = {
|
||||
id: 'id',
|
||||
userId: 'userId',
|
||||
installId: 'installId',
|
||||
deviceHash: 'deviceHash',
|
||||
boundAt: 'boundAt',
|
||||
lastActiveAt: 'lastActiveAt',
|
||||
isActive: 'isActive'
|
||||
};
|
||||
|
||||
exports.Prisma.SortOrder = {
|
||||
asc: 'asc',
|
||||
desc: 'desc'
|
||||
};
|
||||
|
||||
exports.Prisma.QueryMode = {
|
||||
default: 'default',
|
||||
insensitive: 'insensitive'
|
||||
};
|
||||
|
||||
exports.Prisma.NullsOrder = {
|
||||
first: 'first',
|
||||
last: 'last'
|
||||
};
|
||||
|
||||
|
||||
exports.Prisma.ModelName = {
|
||||
User: 'User',
|
||||
VipCard: 'VipCard',
|
||||
Scheme: 'Scheme',
|
||||
SchemeAob: 'SchemeAob',
|
||||
FilterShare: 'FilterShare',
|
||||
Favorite: 'Favorite',
|
||||
Like: 'Like',
|
||||
Category: 'Category',
|
||||
UserLog: 'UserLog',
|
||||
DeviceBinding: 'DeviceBinding'
|
||||
};
|
||||
/**
|
||||
* Create the Client
|
||||
*/
|
||||
const config = {
|
||||
"generator": {
|
||||
"name": "client",
|
||||
"provider": {
|
||||
"fromEnvVar": null,
|
||||
"value": "prisma-client-js"
|
||||
},
|
||||
"output": {
|
||||
"value": "/Users/guchen/.openclaw/workspace/maqt-backend/node_modules/@prisma/client",
|
||||
"fromEnvVar": null
|
||||
},
|
||||
"config": {
|
||||
"engineType": "library"
|
||||
},
|
||||
"binaryTargets": [
|
||||
{
|
||||
"fromEnvVar": null,
|
||||
"value": "darwin",
|
||||
"native": true
|
||||
}
|
||||
],
|
||||
"previewFeatures": [],
|
||||
"sourceFilePath": "/Users/guchen/.openclaw/workspace/maqt-backend/prisma/schema.prisma"
|
||||
},
|
||||
"relativeEnvPaths": {
|
||||
"rootEnvPath": null,
|
||||
"schemaEnvPath": "../../../.env"
|
||||
},
|
||||
"relativePath": "../../../prisma",
|
||||
"clientVersion": "5.22.0",
|
||||
"engineVersion": "605197351a3c8bdd595af2d2a9bc3025bca48ea2",
|
||||
"datasourceNames": [
|
||||
"db"
|
||||
],
|
||||
"activeProvider": "postgresql",
|
||||
"inlineDatasources": {
|
||||
"db": {
|
||||
"url": {
|
||||
"fromEnvVar": "DATABASE_URL",
|
||||
"value": null
|
||||
}
|
||||
}
|
||||
},
|
||||
"inlineSchema": "// This is your Prisma schema file,\n// learn more about it in the docs: https://pris.ly/d/prisma-schema\n\ngenerator client {\n provider = \"prisma-client-js\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\n// ============================================\n// 用户表\n// ============================================\nmodel User {\n id String @id @default(uuid())\n username String @unique @db.VarChar(50)\n email String @unique @db.VarChar(100)\n passwordHash String @map(\"password_hash\") @db.VarChar(255)\n avatar String? @db.VarChar(255)\n\n // VIP 状态\n isVip Boolean @default(false) @map(\"is_vip\")\n vipLevel Int @default(0) @map(\"vip_level\")\n vipExpireAt DateTime? @map(\"vip_expire_at\")\n\n // 统计\n schemesCount Int @default(0) @map(\"schemes_count\")\n favoritesCount Int @default(0) @map(\"favorites_count\")\n\n // 设备绑定\n installId String? @map(\"install_id\") @db.VarChar(64)\n deviceHash String? @map(\"device_hash\") @db.VarChar(64)\n lastDeviceCheck DateTime? @map(\"last_device_check\")\n\n // 元数据\n createdAt DateTime @default(now()) @map(\"created_at\")\n updatedAt DateTime @updatedAt @map(\"updated_at\")\n lastLoginAt DateTime? @map(\"last_login_at\")\n deletedAt DateTime? @map(\"deleted_at\")\n\n // 关系\n schemes Scheme[]\n schemesAob SchemeAob[]\n filterShares FilterShare[]\n favorites Favorite[]\n likes Like[]\n logs UserLog[]\n usedVipCards VipCard[] @relation(\"UsedCards\")\n deviceBindings DeviceBinding[]\n\n @@map(\"users\")\n}\n\n// ============================================\n// VIP 卡密表\n// ============================================\nmodel VipCard {\n id String @id @default(uuid())\n cardKey String @unique @map(\"card_key\") @db.VarChar(50)\n\n cardType String @map(\"card_type\") @db.VarChar(20)\n days Int\n\n status String @default(\"UNUSED\") @db.VarChar(20)\n usedBy String? @map(\"used_by\")\n usedAt DateTime? @map(\"used_at\")\n\n batchId String? @map(\"batch_id\")\n generatedAt DateTime @default(now()) @map(\"generated_at\")\n\n originalPrice Decimal? @map(\"original_price\") @db.Decimal(10, 2)\n salePrice Decimal? @map(\"sale_price\") @db.Decimal(10, 2)\n\n user User? @relation(\"UsedCards\", fields: [usedBy], references: [id], onDelete: SetNull)\n\n @@map(\"vip_cards\")\n}\n\n// ============================================\n// 方案表 - 烽火地带\n// ============================================\nmodel Scheme {\n id String @id @default(uuid())\n userId String @map(\"user_id\")\n\n title String? @db.VarChar(100)\n description String? @db.Text\n weaponName String? @map(\"weapon_name\") @db.VarChar(100)\n category String? @db.VarChar(50)\n\n schemeContent String @map(\"scheme_content\") @db.Text\n contentEncrypted Boolean @default(true) @map(\"content_encrypted\")\n\n price Int @default(0)\n\n viewsCount Int @default(0) @map(\"views_count\")\n downloadsCount Int @default(0) @map(\"downloads_count\")\n likesCount Int @default(0) @map(\"likes_count\")\n favoritesCount Int @default(0) @map(\"favorites_count\")\n\n gpuModel String? @map(\"gpu_model\") @db.VarChar(100)\n driverVersion String? @map(\"driver_version\") @db.VarChar(50)\n appVersion String? @map(\"app_version\") @db.VarChar(20)\n\n status String @default(\"DRAFT\") @db.VarChar(20)\n isOfficial Boolean @default(false) @map(\"is_official\")\n\n createdAt DateTime @default(now()) @map(\"created_at\")\n updatedAt DateTime @updatedAt @map(\"updated_at\")\n\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n\n @@index([userId])\n @@index([weaponName])\n @@index([category])\n @@index([status])\n @@map(\"schemes\")\n}\n\n// ============================================\n// 方案表 - 全面战场 (AOB)\n// ============================================\nmodel SchemeAob {\n id String @id @default(uuid())\n userId String @map(\"user_id\")\n\n title String? @db.VarChar(100)\n description String? @db.Text\n weaponName String? @map(\"weapon_name\") @db.VarChar(100)\n category String? @db.VarChar(50)\n\n schemeContent String @map(\"scheme_content\") @db.Text\n contentEncrypted Boolean @default(true) @map(\"content_encrypted\")\n\n price Int @default(0)\n\n viewsCount Int @default(0) @map(\"views_count\")\n downloadsCount Int @default(0) @map(\"downloads_count\")\n likesCount Int @default(0) @map(\"likes_count\")\n favoritesCount Int @default(0) @map(\"favorites_count\")\n\n status String @default(\"DRAFT\") @db.VarChar(20)\n isOfficial Boolean @default(false) @map(\"is_official\")\n\n createdAt DateTime @default(now()) @map(\"created_at\")\n updatedAt DateTime @updatedAt @map(\"updated_at\")\n\n user User @relation(fieLine truncated
|
||||
"inlineSchemaHash": "b5ab9bd32c06bc713d0f551c8ccd6f8dcb83319ae1a391699f101bc863228ba4",
|
||||
"copyEngine": true
|
||||
}
|
||||
|
||||
const fs = require('fs')
|
||||
|
||||
config.dirname = __dirname
|
||||
if (!fs.existsSync(path.join(__dirname, 'schema.prisma'))) {
|
||||
const alternativePaths = [
|
||||
"node_modules/.prisma/client",
|
||||
".prisma/client",
|
||||
]
|
||||
|
||||
const alternativePath = alternativePaths.find((altPath) => {
|
||||
return fs.existsSync(path.join(process.cwd(), altPath, 'schema.prisma'))
|
||||
}) ?? alternativePaths[0]
|
||||
|
||||
config.dirname = path.join(process.cwd(), alternativePath)
|
||||
config.isBundled = true
|
||||
}
|
||||
|
||||
config.runtimeDataModel = JSON.parse("{\"models\":{\"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\":\"username\",\"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\":\"avatar\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isVip\",\"dbName\":\"is_vip\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"vipLevel\",\"dbName\":\"vip_level\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"vipExpireAt\",\"dbName\":\"vip_expire_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"schemesCount\",\"dbName\":\"schemes_count\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"favoritesCount\",\"dbName\":\"favorites_count\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"installId\",\"dbName\":\"install_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"deviceHash\",\"dbName\":\"device_hash\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastDeviceCheck\",\"dbName\":\"last_device_check\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"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\":\"lastLoginAt\",\"dbName\":\"last_login_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"deletedAt\",\"dbName\":\"deleted_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"schemes\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Scheme\",\"relationName\":\"SchemeToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"schemesAob\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SchemeAob\",\"relationName\":\"SchemeAobToUser\",\"relLine truncated
|
||||
defineDmmfProperty(exports.Prisma, config.runtimeDataModel)
|
||||
config.engineWasm = undefined
|
||||
|
||||
|
||||
const { warnEnvConflicts } = require('@prisma/client/runtime/library.js')
|
||||
|
||||
warnEnvConflicts({
|
||||
rootEnvPath: config.relativeEnvPaths.rootEnvPath && path.resolve(config.dirname, config.relativeEnvPaths.rootEnvPath),
|
||||
schemaEnvPath: config.relativeEnvPaths.schemaEnvPath && path.resolve(config.dirname, config.relativeEnvPaths.schemaEnvPath)
|
||||
})
|
||||
|
||||
const PrismaClient = getPrismaClient(config)
|
||||
exports.PrismaClient = PrismaClient
|
||||
Object.assign(exports, Prisma)
|
||||
|
||||
// file annotations for bundling tools to include these files
|
||||
path.join(__dirname, "libquery_engine-darwin.dylib.node");
|
||||
path.join(process.cwd(), "node_modules/.prisma/client/libquery_engine-darwin.dylib.node")
|
||||
// file annotations for bundling tools to include these files
|
||||
path.join(__dirname, "schema.prisma");
|
||||
path.join(process.cwd(), "node_modules/.prisma/client/schema.prisma")
|
||||
BIN
Binary file not shown.
+97
@@ -0,0 +1,97 @@
|
||||
{
|
||||
"name": "prisma-client-c6bdb0f4d71c754b179b2311d7828e2352a96cae99c1c37490ecedcad3d24f1a",
|
||||
"main": "index.js",
|
||||
"types": "index.d.ts",
|
||||
"browser": "index-browser.js",
|
||||
"exports": {
|
||||
"./package.json": "./package.json",
|
||||
".": {
|
||||
"require": {
|
||||
"node": "./index.js",
|
||||
"edge-light": "./wasm.js",
|
||||
"workerd": "./wasm.js",
|
||||
"worker": "./wasm.js",
|
||||
"browser": "./index-browser.js",
|
||||
"default": "./index.js"
|
||||
},
|
||||
"import": {
|
||||
"node": "./index.js",
|
||||
"edge-light": "./wasm.js",
|
||||
"workerd": "./wasm.js",
|
||||
"worker": "./wasm.js",
|
||||
"browser": "./index-browser.js",
|
||||
"default": "./index.js"
|
||||
},
|
||||
"default": "./index.js"
|
||||
},
|
||||
"./edge": {
|
||||
"types": "./edge.d.ts",
|
||||
"require": "./edge.js",
|
||||
"import": "./edge.js",
|
||||
"default": "./edge.js"
|
||||
},
|
||||
"./react-native": {
|
||||
"types": "./react-native.d.ts",
|
||||
"require": "./react-native.js",
|
||||
"import": "./react-native.js",
|
||||
"default": "./react-native.js"
|
||||
},
|
||||
"./extension": {
|
||||
"types": "./extension.d.ts",
|
||||
"require": "./extension.js",
|
||||
"import": "./extension.js",
|
||||
"default": "./extension.js"
|
||||
},
|
||||
"./index-browser": {
|
||||
"types": "./index.d.ts",
|
||||
"require": "./index-browser.js",
|
||||
"import": "./index-browser.js",
|
||||
"default": "./index-browser.js"
|
||||
},
|
||||
"./index": {
|
||||
"types": "./index.d.ts",
|
||||
"require": "./index.js",
|
||||
"import": "./index.js",
|
||||
"default": "./index.js"
|
||||
},
|
||||
"./wasm": {
|
||||
"types": "./wasm.d.ts",
|
||||
"require": "./wasm.js",
|
||||
"import": "./wasm.js",
|
||||
"default": "./wasm.js"
|
||||
},
|
||||
"./runtime/library": {
|
||||
"types": "./runtime/library.d.ts",
|
||||
"require": "./runtime/library.js",
|
||||
"import": "./runtime/library.js",
|
||||
"default": "./runtime/library.js"
|
||||
},
|
||||
"./runtime/binary": {
|
||||
"types": "./runtime/binary.d.ts",
|
||||
"require": "./runtime/binary.js",
|
||||
"import": "./runtime/binary.js",
|
||||
"default": "./runtime/binary.js"
|
||||
},
|
||||
"./generator-build": {
|
||||
"require": "./generator-build/index.js",
|
||||
"import": "./generator-build/index.js",
|
||||
"default": "./generator-build/index.js"
|
||||
},
|
||||
"./sql": {
|
||||
"require": {
|
||||
"types": "./sql.d.ts",
|
||||
"node": "./sql.js",
|
||||
"default": "./sql.js"
|
||||
},
|
||||
"import": {
|
||||
"types": "./sql.d.ts",
|
||||
"node": "./sql.mjs",
|
||||
"default": "./sql.mjs"
|
||||
},
|
||||
"default": "./sql.js"
|
||||
},
|
||||
"./*": "./*"
|
||||
},
|
||||
"version": "5.22.0",
|
||||
"sideEffects": false
|
||||
}
|
||||
+279
@@ -0,0 +1,279 @@
|
||||
// This is your Prisma schema file,
|
||||
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
||||
|
||||
generator client {
|
||||
provider = "prisma-client-js"
|
||||
}
|
||||
|
||||
datasource db {
|
||||
provider = "postgresql"
|
||||
url = env("DATABASE_URL")
|
||||
}
|
||||
|
||||
// ============================================
|
||||
// 用户表
|
||||
// ============================================
|
||||
model User {
|
||||
id String @id @default(uuid())
|
||||
username String @unique @db.VarChar(50)
|
||||
email String @unique @db.VarChar(100)
|
||||
passwordHash String @map("password_hash") @db.VarChar(255)
|
||||
avatar String? @db.VarChar(255)
|
||||
|
||||
// VIP 状态
|
||||
isVip Boolean @default(false) @map("is_vip")
|
||||
vipLevel Int @default(0) @map("vip_level")
|
||||
vipExpireAt DateTime? @map("vip_expire_at")
|
||||
|
||||
// 统计
|
||||
schemesCount Int @default(0) @map("schemes_count")
|
||||
favoritesCount Int @default(0) @map("favorites_count")
|
||||
|
||||
// 设备绑定
|
||||
installId String? @map("install_id") @db.VarChar(64)
|
||||
deviceHash String? @map("device_hash") @db.VarChar(64)
|
||||
lastDeviceCheck DateTime? @map("last_device_check")
|
||||
|
||||
// 元数据
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
lastLoginAt DateTime? @map("last_login_at")
|
||||
deletedAt DateTime? @map("deleted_at")
|
||||
|
||||
// 关系
|
||||
schemes Scheme[]
|
||||
schemesAob SchemeAob[]
|
||||
filterShares FilterShare[]
|
||||
favorites Favorite[]
|
||||
likes Like[]
|
||||
logs UserLog[]
|
||||
usedVipCards VipCard[] @relation("UsedCards")
|
||||
deviceBindings DeviceBinding[]
|
||||
|
||||
@@map("users")
|
||||
}
|
||||
|
||||
// ============================================
|
||||
// VIP 卡密表
|
||||
// ============================================
|
||||
model VipCard {
|
||||
id String @id @default(uuid())
|
||||
cardKey String @unique @map("card_key") @db.VarChar(50)
|
||||
|
||||
cardType String @map("card_type") @db.VarChar(20)
|
||||
days Int
|
||||
|
||||
status String @default("UNUSED") @db.VarChar(20)
|
||||
usedBy String? @map("used_by")
|
||||
usedAt DateTime? @map("used_at")
|
||||
|
||||
batchId String? @map("batch_id")
|
||||
generatedAt DateTime @default(now()) @map("generated_at")
|
||||
|
||||
originalPrice Decimal? @map("original_price") @db.Decimal(10, 2)
|
||||
salePrice Decimal? @map("sale_price") @db.Decimal(10, 2)
|
||||
|
||||
user User? @relation("UsedCards", fields: [usedBy], references: [id], onDelete: SetNull)
|
||||
|
||||
@@map("vip_cards")
|
||||
}
|
||||
|
||||
// ============================================
|
||||
// 方案表 - 烽火地带
|
||||
// ============================================
|
||||
model Scheme {
|
||||
id String @id @default(uuid())
|
||||
userId String @map("user_id")
|
||||
|
||||
title String? @db.VarChar(100)
|
||||
description String? @db.Text
|
||||
weaponName String? @map("weapon_name") @db.VarChar(100)
|
||||
category String? @db.VarChar(50)
|
||||
|
||||
schemeContent String @map("scheme_content") @db.Text
|
||||
contentEncrypted Boolean @default(true) @map("content_encrypted")
|
||||
|
||||
price Int @default(0)
|
||||
|
||||
viewsCount Int @default(0) @map("views_count")
|
||||
downloadsCount Int @default(0) @map("downloads_count")
|
||||
likesCount Int @default(0) @map("likes_count")
|
||||
favoritesCount Int @default(0) @map("favorites_count")
|
||||
|
||||
gpuModel String? @map("gpu_model") @db.VarChar(100)
|
||||
driverVersion String? @map("driver_version") @db.VarChar(50)
|
||||
appVersion String? @map("app_version") @db.VarChar(20)
|
||||
|
||||
status String @default("DRAFT") @db.VarChar(20)
|
||||
isOfficial Boolean @default(false) @map("is_official")
|
||||
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@index([userId])
|
||||
@@index([weaponName])
|
||||
@@index([category])
|
||||
@@index([status])
|
||||
@@map("schemes")
|
||||
}
|
||||
|
||||
// ============================================
|
||||
// 方案表 - 全面战场 (AOB)
|
||||
// ============================================
|
||||
model SchemeAob {
|
||||
id String @id @default(uuid())
|
||||
userId String @map("user_id")
|
||||
|
||||
title String? @db.VarChar(100)
|
||||
description String? @db.Text
|
||||
weaponName String? @map("weapon_name") @db.VarChar(100)
|
||||
category String? @db.VarChar(50)
|
||||
|
||||
schemeContent String @map("scheme_content") @db.Text
|
||||
contentEncrypted Boolean @default(true) @map("content_encrypted")
|
||||
|
||||
price Int @default(0)
|
||||
|
||||
viewsCount Int @default(0) @map("views_count")
|
||||
downloadsCount Int @default(0) @map("downloads_count")
|
||||
likesCount Int @default(0) @map("likes_count")
|
||||
favoritesCount Int @default(0) @map("favorites_count")
|
||||
|
||||
status String @default("DRAFT") @db.VarChar(20)
|
||||
isOfficial Boolean @default(false) @map("is_official")
|
||||
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@index([userId])
|
||||
@@index([weaponName])
|
||||
@@map("schemes_aob")
|
||||
}
|
||||
|
||||
// ============================================
|
||||
// 滤镜分享表
|
||||
// ============================================
|
||||
model FilterShare {
|
||||
id String @id @default(uuid())
|
||||
userId String @map("user_id")
|
||||
|
||||
title String @db.VarChar(100)
|
||||
description String? @db.Text
|
||||
category String? @db.VarChar(50)
|
||||
|
||||
filterContent String @map("filter_content") @db.Text
|
||||
contentFormat String @default("MQTS1") @map("content_format") @db.VarChar(20)
|
||||
|
||||
viewsCount Int @default(0) @map("views_count")
|
||||
likesCount Int @default(0) @map("likes_count")
|
||||
|
||||
status String @default("DRAFT") @db.VarChar(20)
|
||||
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@index([userId])
|
||||
@@map("filter_shares")
|
||||
}
|
||||
|
||||
// ============================================
|
||||
// 收藏表
|
||||
// ============================================
|
||||
model Favorite {
|
||||
id String @id @default(uuid())
|
||||
userId String @map("user_id")
|
||||
targetType String @map("target_type") @db.VarChar(20)
|
||||
targetId String @map("target_id")
|
||||
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@unique([userId, targetType, targetId])
|
||||
@@index([userId])
|
||||
@@map("favorites")
|
||||
}
|
||||
|
||||
// ============================================
|
||||
// 点赞表
|
||||
// ============================================
|
||||
model Like {
|
||||
id String @id @default(uuid())
|
||||
userId String @map("user_id")
|
||||
targetType String @map("target_type") @db.VarChar(20)
|
||||
targetId String @map("target_id")
|
||||
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@unique([userId, targetType, targetId])
|
||||
@@index([userId])
|
||||
@@index([targetType, targetId])
|
||||
@@map("likes")
|
||||
}
|
||||
|
||||
// ============================================
|
||||
// 分类表
|
||||
// ============================================
|
||||
model Category {
|
||||
id String @id @default(uuid())
|
||||
name String @db.VarChar(50)
|
||||
type String @db.VarChar(20)
|
||||
|
||||
sortOrder Int @default(0) @map("sort_order")
|
||||
isActive Boolean @default(true) @map("is_active")
|
||||
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
|
||||
@@map("categories")
|
||||
}
|
||||
|
||||
// ============================================
|
||||
// 用户日志表
|
||||
// ============================================
|
||||
model UserLog {
|
||||
id String @id @default(uuid())
|
||||
userId String? @map("user_id")
|
||||
|
||||
action String @db.VarChar(50)
|
||||
targetType String? @map("target_type") @db.VarChar(50)
|
||||
targetId String? @map("target_id")
|
||||
|
||||
installId String? @map("install_id") @db.VarChar(64)
|
||||
deviceHash String? @map("device_hash") @db.VarChar(64)
|
||||
ipAddress String? @map("ip_address") @db.VarChar(45)
|
||||
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
|
||||
user User? @relation(fields: [userId], references: [id], onDelete: SetNull)
|
||||
|
||||
@@index([userId])
|
||||
@@index([action])
|
||||
@@map("user_logs")
|
||||
}
|
||||
|
||||
// ============================================
|
||||
// 设备绑定表
|
||||
// ============================================
|
||||
model DeviceBinding {
|
||||
id String @id @default(uuid())
|
||||
userId String @map("user_id")
|
||||
installId String @map("install_id") @db.VarChar(64)
|
||||
deviceHash String @map("device_hash") @db.VarChar(64)
|
||||
|
||||
boundAt DateTime @default(now()) @map("bound_at")
|
||||
lastActiveAt DateTime? @map("last_active_at")
|
||||
isActive Boolean @default(true) @map("is_active")
|
||||
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@unique([userId, installId])
|
||||
@@map("device_bindings")
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
export * from "./index"
|
||||
+322
@@ -0,0 +1,322 @@
|
||||
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
|
||||
const {
|
||||
Decimal,
|
||||
objectEnumValues,
|
||||
makeStrictEnum,
|
||||
Public,
|
||||
getRuntime,
|
||||
skip
|
||||
} = require('@prisma/client/runtime/index-browser.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 = () => {
|
||||
const runtimeName = getRuntime().prettyName;
|
||||
throw new Error(`PrismaClientKnownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
||||
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
||||
)};
|
||||
Prisma.PrismaClientUnknownRequestError = () => {
|
||||
const runtimeName = getRuntime().prettyName;
|
||||
throw new Error(`PrismaClientUnknownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
||||
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
||||
)}
|
||||
Prisma.PrismaClientRustPanicError = () => {
|
||||
const runtimeName = getRuntime().prettyName;
|
||||
throw new Error(`PrismaClientRustPanicError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
||||
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
||||
)}
|
||||
Prisma.PrismaClientInitializationError = () => {
|
||||
const runtimeName = getRuntime().prettyName;
|
||||
throw new Error(`PrismaClientInitializationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
||||
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
||||
)}
|
||||
Prisma.PrismaClientValidationError = () => {
|
||||
const runtimeName = getRuntime().prettyName;
|
||||
throw new Error(`PrismaClientValidationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
||||
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
||||
)}
|
||||
Prisma.NotFoundError = () => {
|
||||
const runtimeName = getRuntime().prettyName;
|
||||
throw new Error(`NotFoundError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
||||
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
||||
)}
|
||||
Prisma.Decimal = Decimal
|
||||
|
||||
/**
|
||||
* Re-export of sql-template-tag
|
||||
*/
|
||||
Prisma.sql = () => {
|
||||
const runtimeName = getRuntime().prettyName;
|
||||
throw new Error(`sqltag is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
||||
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
||||
)}
|
||||
Prisma.empty = () => {
|
||||
const runtimeName = getRuntime().prettyName;
|
||||
throw new Error(`empty is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
||||
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
||||
)}
|
||||
Prisma.join = () => {
|
||||
const runtimeName = getRuntime().prettyName;
|
||||
throw new Error(`join is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
||||
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
||||
)}
|
||||
Prisma.raw = () => {
|
||||
const runtimeName = getRuntime().prettyName;
|
||||
throw new Error(`raw is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
||||
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
||||
)}
|
||||
Prisma.validator = Public.validator
|
||||
|
||||
/**
|
||||
* Extensions
|
||||
*/
|
||||
Prisma.getExtensionContext = () => {
|
||||
const runtimeName = getRuntime().prettyName;
|
||||
throw new Error(`Extensions.getExtensionContext is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
||||
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
||||
)}
|
||||
Prisma.defineExtension = () => {
|
||||
const runtimeName = getRuntime().prettyName;
|
||||
throw new Error(`Extensions.defineExtension is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
||||
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
||||
)}
|
||||
|
||||
/**
|
||||
* 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.UserScalarFieldEnum = {
|
||||
id: 'id',
|
||||
username: 'username',
|
||||
email: 'email',
|
||||
passwordHash: 'passwordHash',
|
||||
avatar: 'avatar',
|
||||
isVip: 'isVip',
|
||||
vipLevel: 'vipLevel',
|
||||
vipExpireAt: 'vipExpireAt',
|
||||
schemesCount: 'schemesCount',
|
||||
favoritesCount: 'favoritesCount',
|
||||
installId: 'installId',
|
||||
deviceHash: 'deviceHash',
|
||||
lastDeviceCheck: 'lastDeviceCheck',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt',
|
||||
lastLoginAt: 'lastLoginAt',
|
||||
deletedAt: 'deletedAt'
|
||||
};
|
||||
|
||||
exports.Prisma.VipCardScalarFieldEnum = {
|
||||
id: 'id',
|
||||
cardKey: 'cardKey',
|
||||
cardType: 'cardType',
|
||||
days: 'days',
|
||||
status: 'status',
|
||||
usedBy: 'usedBy',
|
||||
usedAt: 'usedAt',
|
||||
batchId: 'batchId',
|
||||
generatedAt: 'generatedAt',
|
||||
originalPrice: 'originalPrice',
|
||||
salePrice: 'salePrice'
|
||||
};
|
||||
|
||||
exports.Prisma.SchemeScalarFieldEnum = {
|
||||
id: 'id',
|
||||
userId: 'userId',
|
||||
title: 'title',
|
||||
description: 'description',
|
||||
weaponName: 'weaponName',
|
||||
category: 'category',
|
||||
schemeContent: 'schemeContent',
|
||||
contentEncrypted: 'contentEncrypted',
|
||||
price: 'price',
|
||||
viewsCount: 'viewsCount',
|
||||
downloadsCount: 'downloadsCount',
|
||||
likesCount: 'likesCount',
|
||||
favoritesCount: 'favoritesCount',
|
||||
gpuModel: 'gpuModel',
|
||||
driverVersion: 'driverVersion',
|
||||
appVersion: 'appVersion',
|
||||
status: 'status',
|
||||
isOfficial: 'isOfficial',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
};
|
||||
|
||||
exports.Prisma.SchemeAobScalarFieldEnum = {
|
||||
id: 'id',
|
||||
userId: 'userId',
|
||||
title: 'title',
|
||||
description: 'description',
|
||||
weaponName: 'weaponName',
|
||||
category: 'category',
|
||||
schemeContent: 'schemeContent',
|
||||
contentEncrypted: 'contentEncrypted',
|
||||
price: 'price',
|
||||
viewsCount: 'viewsCount',
|
||||
downloadsCount: 'downloadsCount',
|
||||
likesCount: 'likesCount',
|
||||
favoritesCount: 'favoritesCount',
|
||||
status: 'status',
|
||||
isOfficial: 'isOfficial',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
};
|
||||
|
||||
exports.Prisma.FilterShareScalarFieldEnum = {
|
||||
id: 'id',
|
||||
userId: 'userId',
|
||||
title: 'title',
|
||||
description: 'description',
|
||||
category: 'category',
|
||||
filterContent: 'filterContent',
|
||||
contentFormat: 'contentFormat',
|
||||
viewsCount: 'viewsCount',
|
||||
likesCount: 'likesCount',
|
||||
status: 'status',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
};
|
||||
|
||||
exports.Prisma.FavoriteScalarFieldEnum = {
|
||||
id: 'id',
|
||||
userId: 'userId',
|
||||
targetType: 'targetType',
|
||||
targetId: 'targetId',
|
||||
createdAt: 'createdAt'
|
||||
};
|
||||
|
||||
exports.Prisma.LikeScalarFieldEnum = {
|
||||
id: 'id',
|
||||
userId: 'userId',
|
||||
targetType: 'targetType',
|
||||
targetId: 'targetId',
|
||||
createdAt: 'createdAt'
|
||||
};
|
||||
|
||||
exports.Prisma.CategoryScalarFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
type: 'type',
|
||||
sortOrder: 'sortOrder',
|
||||
isActive: 'isActive',
|
||||
createdAt: 'createdAt'
|
||||
};
|
||||
|
||||
exports.Prisma.UserLogScalarFieldEnum = {
|
||||
id: 'id',
|
||||
userId: 'userId',
|
||||
action: 'action',
|
||||
targetType: 'targetType',
|
||||
targetId: 'targetId',
|
||||
installId: 'installId',
|
||||
deviceHash: 'deviceHash',
|
||||
ipAddress: 'ipAddress',
|
||||
createdAt: 'createdAt'
|
||||
};
|
||||
|
||||
exports.Prisma.DeviceBindingScalarFieldEnum = {
|
||||
id: 'id',
|
||||
userId: 'userId',
|
||||
installId: 'installId',
|
||||
deviceHash: 'deviceHash',
|
||||
boundAt: 'boundAt',
|
||||
lastActiveAt: 'lastActiveAt',
|
||||
isActive: 'isActive'
|
||||
};
|
||||
|
||||
exports.Prisma.SortOrder = {
|
||||
asc: 'asc',
|
||||
desc: 'desc'
|
||||
};
|
||||
|
||||
exports.Prisma.QueryMode = {
|
||||
default: 'default',
|
||||
insensitive: 'insensitive'
|
||||
};
|
||||
|
||||
exports.Prisma.NullsOrder = {
|
||||
first: 'first',
|
||||
last: 'last'
|
||||
};
|
||||
|
||||
|
||||
exports.Prisma.ModelName = {
|
||||
User: 'User',
|
||||
VipCard: 'VipCard',
|
||||
Scheme: 'Scheme',
|
||||
SchemeAob: 'SchemeAob',
|
||||
FilterShare: 'FilterShare',
|
||||
Favorite: 'Favorite',
|
||||
Like: 'Like',
|
||||
Category: 'Category',
|
||||
UserLog: 'UserLog',
|
||||
DeviceBinding: 'DeviceBinding'
|
||||
};
|
||||
|
||||
/**
|
||||
* This is a stub Prisma Client that will error at runtime if called.
|
||||
*/
|
||||
class PrismaClient {
|
||||
constructor() {
|
||||
return new Proxy(this, {
|
||||
get(target, prop) {
|
||||
let message
|
||||
const runtime = getRuntime()
|
||||
if (runtime.isEdge) {
|
||||
message = `PrismaClient is not configured to run in ${runtime.prettyName}. In order to run Prisma Client on edge runtime, either:
|
||||
- Use Prisma Accelerate: https://pris.ly/d/accelerate
|
||||
- Use Driver Adapters: https://pris.ly/d/driver-adapters
|
||||
`;
|
||||
} else {
|
||||
message = 'PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in `' + runtime.prettyName + '`).'
|
||||
}
|
||||
|
||||
message += `
|
||||
If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report`
|
||||
|
||||
throw new Error(message)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
exports.PrismaClient = PrismaClient
|
||||
|
||||
Object.assign(exports, Prisma)
|
||||
Reference in new issue
Block a user