datasource db { provider = "postgresql" url = env("DB_URL") extensions = [tsm_system_rows] } generator client { provider = "prisma-client-py" previewFeatures = ["nativeDistinct", "relationJoins", "postgresqlExtensions"] interface = "asyncio" recursive_type_depth = -1 } model PrismaNames { guild_id BigInt @id singular_bullet String @default("Truth Bullet") plural_bullet String @default("Truth Bullets") singular_truth_bullet_finder String @default("{{bullet_name}} Finder") plural_truth_bullet_finder String @default("{{bullet_name}} Finders") best_bullet_finder String @default("Best {{bullet_finder}}") singular_currency_name String @default("Coin") plural_currency_name String @default("Coins") main_config PrismaGuildConfig? @relation(fields: [guild_id], references: [guild_id], onDelete: Cascade) @@map("thianames") } model PrismaBulletConfig { guild_id BigInt @id bullet_chan_id BigInt? best_bullet_finder_role BigInt? bullets_enabled Boolean @default(false) investigation_type Int @default(1) @db.SmallInt show_best_finders Boolean @default(true) main_config PrismaGuildConfig? @relation(fields: [guild_id], references: [guild_id], onDelete: Cascade) @@map("thiabulletconfig") } model PrismaItemsSystemItem { id Int @id @default(autoincrement()) guild_id BigInt name String description String image String? takeable Boolean @default(true) relations PrismaItemRelation[] items_config PrismaItemsConfig? @relation(fields: [guild_id], references: [guild_id], onDelete: Cascade) @@index([guild_id]) @@index([name]) @@map("thiaitemssystemitems") } enum ItemsRelationType { CHANNEL USER } model PrismaItemRelation { id Int @id @default(autoincrement()) item PrismaItemsSystemItem @relation(fields: [item_id], references: [id], onDelete: Cascade) item_id Int guild_id BigInt object_id BigInt object_type ItemsRelationType @@index([item_id]) @@index([guild_id]) @@index([object_id]) @@map("thiaitemrelation") } model PrismaItemsConfig { guild_id BigInt @id enabled Boolean @default(false) items PrismaItemsSystemItem[] main_config PrismaGuildConfig? @relation(fields: [guild_id], references: [guild_id], onDelete: Cascade) @@map("thiaitemsconfig") } enum Rarity { COMMON UNCOMMON RARE SUPER_RARE LEGENDARY } model PrismaGachaItem { id Int @id @default(autoincrement()) guild_id BigInt name String description String image String? rarity Rarity @default(COMMON) amount Int @default(-1) players PrismaItemToPlayer[] gacha_config PrismaGachaConfig? @relation(fields: [guild_id], references: [guild_id], onDelete: Cascade) @@index([guild_id]) @@index([name]) @@index([amount]) @@map("thiagachaitems") } model PrismaGachaPlayer { id Int @id @default(autoincrement()) guild_id BigInt user_id BigInt currency_amount Int @default(0) items PrismaItemToPlayer[] gacha_config PrismaGachaConfig? @relation(fields: [guild_id], references: [guild_id], onDelete: Cascade) @@index([guild_id]) @@index([guild_id, user_id]) @@map("thiagachaplayers") } model PrismaItemToPlayer { id Int @id @default(autoincrement()) item PrismaGachaItem @relation(fields: [item_id], references: [id], onDelete: Cascade) item_id Int player PrismaGachaPlayer @relation(fields: [player_id], references: [id], onDelete: Cascade) player_id Int @@map("thiagachaitemtoplayer") } model PrismaGachaConfig { guild_id BigInt @id enabled Boolean @default(false) currency_cost Int @default(1) draw_duplicates Boolean @default(true) items PrismaGachaItem[] players PrismaGachaPlayer[] main_config PrismaGuildConfig? @relation(fields: [guild_id], references: [guild_id], onDelete: Cascade) @@map("thiagachaconfig") } model PrismaMessageLink { id Int @id @default(autoincrement()) guild_id BigInt user_id BigInt channel_id BigInt message_config PrismaMessageConfig? @relation(fields: [guild_id], references: [guild_id], onDelete: Cascade) @@index([guild_id]) @@index([guild_id, user_id]) @@map("thiamessagelink") } model PrismaMessageConfig { guild_id BigInt @id enabled Boolean @default(false) anon_enabled Boolean @default(false) ping_for_message Boolean @default(false) links PrismaMessageLink[] main_config PrismaGuildConfig? @relation(fields: [guild_id], references: [guild_id], onDelete: Cascade) @@map("thiamessageconfig") } model PrismaDiceEntry { id Int @id @default(autoincrement()) guild_id BigInt user_id BigInt name String value String dice_config PrimsaDiceConfig? @relation(fields: [guild_id], references: [guild_id], onDelete: Cascade) @@index([guild_id]) @@index([guild_id, user_id]) @@map("thiadicenetry") } model PrimsaDiceConfig { guild_id BigInt @id visible Boolean @default(true) entries PrismaDiceEntry[] main_config PrismaGuildConfig? @relation(fields: [guild_id], references: [guild_id], onDelete: Cascade) @@map("thiadiceconfig") } model PrismaGuildConfig { guild_id BigInt @id player_role BigInt? names PrismaNames? bullets PrismaBulletConfig? gacha PrismaGachaConfig? messages PrismaMessageConfig? dice PrimsaDiceConfig? items PrismaItemsConfig? @@map("thiaguildconfig") } model PrismaTruthBullet { id Int @id @default(autoincrement()) trigger String @db.VarChar(100) aliases String[] @db.VarChar(40) description String channel_id BigInt guild_id BigInt found Boolean finder BigInt? hidden Boolean @default(false) @@index([channel_id]) @@index([guild_id]) @@index([found]) @@map("thiatruthbullets") }