sdy

update DB schema

...@@ -27,14 +27,15 @@ model User { ...@@ -27,14 +27,15 @@ model User {
27 model Room { 27 model Room {
28 id Int @default(autoincrement()) @id 28 id Int @default(autoincrement()) @id
29 participants User[] @relation(references: [id]) 29 participants User[] @relation(references: [id])
30 - categories Category[] @relation(references: [id]) 30 + categories Category[]
31 Message Message[] 31 Message Message[]
32 } 32 }
33 33
34 model Category { 34 model Category {
35 - id Int @default(autoincrement()) @id 35 + id Int @default(autoincrement()) @id
36 - name String? @default("") 36 + name String? @default("")
37 - rooms Room[] @relation(references: [id]) 37 + SubRoom Int
38 + room Room @relation(fields: [SubRoom], references: [id])
38 } 39 }
39 40
40 model Message { 41 model Message {
......