model User { id String @id @default(uuid()) publicId String @unique firstname String lastname String email String @unique password String vatsimCid Int? @map(name: "vatsim_cid") emailVerified DateTime? @map(name: "email_verified") image String? createdAt DateTime @default(now()) @map(name: "created_at") updatedAt DateTime @default(now()) @map(name: "updated_at") // relations: oauthTokens OAuthToken[] discordAccounts DiscordAccount[] participants Participant[] @@map(name: "users") } model DiscordAccount { id Int @id @default(autoincrement()) discordId String @unique @map(name: "discord_id") userId String @map(name: "user_id") email String @map(name: "email") username String @map(name: "username") avatar String? @map(name: "avatar") globalName String @map(name: "global_name") verified Boolean @default(false) accessToken String @map(name: "access_token") refreshToken String @map(name: "refresh_token") tokenType String @map(name: "token_type") createdAt DateTime @default(now()) @map(name: "created_at") updatedAt DateTime @default(now()) @map(name: "updated_at") // relations: user User @relation(fields: [userId], references: [id]) // Beziehung zu User @@map(name: "discord_accounts") }