generator client { provider = "prisma-client-js" binaryTargets = ["native", "debian-openssl-3.0.x"] } datasource db { provider = "postgresql" url = env("DATABASE_URL") } model GuildSettings { guildId String @id welcomeChannelId String? logChannelId String? automodEnabled Boolean? automodConfig Json? levelingEnabled Boolean? ticketsEnabled Boolean? musicEnabled Boolean? statuspageEnabled Boolean? statuspageConfig Json? dynamicVoiceEnabled Boolean? dynamicVoiceConfig Json? supportLoginConfig Json? birthdayEnabled Boolean? birthdayConfig Json? reactionRolesEnabled Boolean? reactionRolesConfig Json? eventsEnabled Boolean? supportRoleId String? updatedAt DateTime @updatedAt createdAt DateTime @default(now()) } model Ticket { id String @id @default(cuid()) ticketNumber Int @default(autoincrement()) userId String channelId String guildId String topic String? priority String @default("normal") status String claimedBy String? transcript String? createdAt DateTime @default(now()) updatedAt DateTime @updatedAt } model Level { id String @id @default(cuid()) userId String guildId String xp Int @default(0) level Int @default(0) createdAt DateTime @default(now()) updatedAt DateTime @updatedAt @@unique([userId, guildId], name: "userId_guildId") } model TicketSupportSession { id String @id @default(cuid()) guildId String userId String roleId String startedAt DateTime @default(now()) endedAt DateTime? durationSeconds Int? @@index([guildId, userId, endedAt]) } model Birthday { id String @id @default(cuid()) userId String guildId String birthDate String createdAt DateTime @default(now()) updatedAt DateTime @updatedAt @@unique([userId, guildId], name: "birthday_user_guild") @@index([guildId]) } model ReactionRoleSet { id String @id @default(cuid()) guildId String channelId String messageId String? title String? description String? entries Json createdAt DateTime @default(now()) updatedAt DateTime @updatedAt @@index([guildId]) @@index([guildId, messageId]) } model Event { id String @id @default(cuid()) guildId String title String description String? channelId String startTime DateTime repeatType String @default("none") repeatConfig Json? reminderOffsetMinutes Int @default(60) roleId String? isActive Boolean @default(true) lastReminderAt DateTime? createdAt DateTime @default(now()) updatedAt DateTime @updatedAt signups EventSignup[] @@index([guildId]) @@index([guildId, startTime]) } model EventSignup { id String @id @default(cuid()) eventId String guildId String userId String createdAt DateTime @default(now()) canceledAt DateTime? event Event @relation(fields: [eventId], references: [id]) @@unique([eventId, userId]) @@index([guildId, eventId]) }