Skip to content

Commit

Permalink
Topic and Definition schema
Browse files Browse the repository at this point in the history
  • Loading branch information
hopperelec committed Jan 22, 2024
1 parent 326b1ee commit 9436fa8
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,18 @@ model Door {
@@id([map_id, room1_id, room2_id])
}

model Topic {
id Int @id @default(autoincrement()) @db.UnsignedInt
name String @unique
definitions Definition[]
}

model Definition {
id Int @id @default(autoincrement()) @db.UnsignedInt
topic Topic @relation(fields: [topic_id], references: [id])
topic_id Int @db.UnsignedInt
definition String @db.Text
difficulty Int @db.TinyInt
answer_regex String
}

0 comments on commit 9436fa8

Please sign in to comment.