class implementation with fixes and prisma schema changes
This commit is contained in:
@@ -8,30 +8,29 @@ datasource db {
|
||||
}
|
||||
|
||||
model badges {
|
||||
badge_id Int @id
|
||||
badge_id Int @id
|
||||
badge_name String
|
||||
badge_description String
|
||||
badge_type Int @default(0)
|
||||
given_badges given_badges[] @ignore
|
||||
badge_type Int @default(0)
|
||||
givenbadges givenbadges[]
|
||||
}
|
||||
|
||||
/// The underlying table does not contain a valid unique identifier and can therefore currently not be handled by the Prisma Client.
|
||||
model given_badges {
|
||||
user_id String
|
||||
badge_id Int
|
||||
badges badges @relation(fields: [badge_id], references: [badge_id], onDelete: NoAction, onUpdate: NoAction, map: "badge_id")
|
||||
users users @relation(fields: [user_id], references: [user_id], onDelete: NoAction, onUpdate: NoAction, map: "user_id")
|
||||
model givenbadges {
|
||||
user_id String
|
||||
badge_id Int
|
||||
date_of_confer DateTime @id @db.Date
|
||||
badges badges @relation(fields: [badge_id], references: [badge_id], onDelete: NoAction, onUpdate: NoAction, map: "badge_id")
|
||||
users users @relation(fields: [user_id], references: [user_id], onDelete: NoAction, onUpdate: NoAction, map: "user_id")
|
||||
|
||||
@@index([badge_id], map: "fki_badge_id")
|
||||
@@index([user_id], map: "fki_user_id")
|
||||
@@ignore
|
||||
}
|
||||
|
||||
model users {
|
||||
user_id String @id(map: "user_pkey")
|
||||
exp Int @default(0)
|
||||
msg_count Int @default(0)
|
||||
voice_time Int @default(0)
|
||||
lvl Int @default(0)
|
||||
given_badges given_badges[] @ignore
|
||||
user_id String @id(map: "user_pkey")
|
||||
exp Int @default(0)
|
||||
msg_count Int @default(0)
|
||||
voice_time Int @default(0)
|
||||
lvl Int @default(0)
|
||||
givenbadges givenbadges[]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user