| 1 | model Task { |
| 2 | id Int @id @default(autoincrement()) |
| 3 | title String |
| 4 | type String |
| 5 | |
| 6 | @@discriminator(type) |
| 7 | @@map("tasks") |
| 8 | } |
| 9 | |
| 10 | model Bug { |
| 11 | severity String |
| 12 | assigneeId Int? |
| 13 | assignee Assignee? @relation(fields: [assigneeId], references: [id]) |
| 14 | |
| 15 | @@base(Task, "bug") |
| 16 | } |
| 17 | |
| 18 | model Feature { |
| 19 | priority Int |
| 20 | |
| 21 | @@base(Task, "feature") |
| 22 | @@map("features") |
| 23 | } |
| 24 | |
| 25 | model Assignee { |
| 26 | id Int @id @default(autoincrement()) |
| 27 | name String |
| 28 | bugs Bug[] |
| 29 | } |