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-01 13:21:12 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f9f1065f6904d979297c506fb50f800c5e1c7eac
f9f1065f
1 parent
370564d6
update prisma schema
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
9 deletions
back/prisma/schema.prisma
back/prisma/schema.prisma
View file @
f9f1065
...
...
@@ -19,9 +19,8 @@ model User {
phoneSecret String? @default("")
bio String? @default("")
rooms Room[] @relation(references: [id])
messages Message[]
sender Message @relation("Sender")
receiver Message[] @relation("Receiver")
sendMessage Message[] @relation("Sender")
receiveMessage Message[] @relation("Receiver")
createdAt DateTime? @default(now())
}
...
...
@@ -40,12 +39,9 @@ model Category {
model Message {
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
from User[] @relation("Sender", references: [id])
to User[] @relation("Receiver", references: [id])
room Room @relation(fields: [roomId], references: [id])
roomId Int
createdAt DateTime?
userId Int?
createdAt DateTime? @default(now())
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment