Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-1-capstone-design1
/
Triz_Project1
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
sdy
2020-05-06 00:17:11 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
21c71213adb6caa654f180dd4e70119d54f204c8
21c71213
1 parent
78ec265d
update prisma schema
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
back/prisma/schema.prisma
back/prisma/schema.prisma
View file @
21c7121
...
...
@@ -28,6 +28,7 @@ model Room {
id Int @default(autoincrement()) @id
participants User[] @relation(references: [id])
categories Category[] @relation(references: [id])
Message Message[]
}
model Category {
...
...
@@ -39,8 +40,10 @@ model Category {
model Message {
id Int @default(autoincrement()) @id
text String? @default("")
from User[] @relation("Sender", references: [id])
to User[] @relation("Receiver", references: [id])
from User @relation("Sender", fields: [fromId], references: [id])
fromId Int
to User? @relation("Receiver", fields: [toId], references: [id])
toId Int?
room Room @relation(fields: [roomId], references: [id])
roomId Int
createdAt DateTime? @default(now())
...
...
Please
register
or
login
to post a comment