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-14 03:02:36 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f80873befcc317cde6a8e639e63748ca4032ad01
f80873be
1 parent
3ada569b
update prisma schema
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
10 deletions
back/prisma/schema.prisma
back/prisma/schema.prisma
View file @
f80873b
...
...
@@ -8,16 +8,32 @@ datasource db {
}
model User {
id Int @default(autoincrement()) @id
createdAt DateTime @default(now())
email String @unique
name String
profile Profile?
id Int @default(autoincrement()) @id
avatarUrl String
email String @unique
name String
loginSecret String
bio String
rooms Room[] @relation(references: [id])
messages Message[]
createdAt DateTime @default(now())
}
model Profile {
id Int @default(autoincrement()) @id
bio String
user User @relation(fields: [userId], references: [id])
userId Int
model Room {
id Int @default(autoincrement()) @id
participants User[] @relation(references: [id])
categories Category[] @relation(references: [id])
}
model Category {
id Int @default(autoincrement()) @id
name String
rooms Room[] @relation(references: [id])
}
model Message {
id Int @default(autoincrement()) @id
text String
sender User @relation(fields: [senderId], references: [id])
senderId Int
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment