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-04-29 20:45:50 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e90a54e3139290536c2d508a4ad3b031cee8f0f2
e90a54e3
1 parent
82cef18d
update prisma schema
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
back/prisma/schema.prisma
back/prisma/schema.prisma
View file @
e90a54e
...
...
@@ -20,6 +20,8 @@ model User {
bio String? @default("")
rooms Room[] @relation(references: [id])
messages Message[]
sender Message @relation("Sender")
receiver Message[] @relation("Receiver")
createdAt DateTime? @default(now())
}
...
...
@@ -36,8 +38,14 @@ model Category {
}
model Message {
id Int @default(autoincrement()) @id
text String? @default("")
sender User @relation(fields: [senderId], references: [id])
senderId Int
id Int @default(autoincrement()) @id
text String? @default("")
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?
userId Int?
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment