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-08-30 23:58:25 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
cd1224e8992b1a341eb0eb5b9aa62f625f4f24db
cd1224e8
1 parent
18d69659
add creator column
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
14 deletions
back/prisma/schema.prisma
back/prisma/schema.prisma
View file @
cd1224e
...
...
@@ -9,26 +9,29 @@ datasource db {
}
model User {
id Int @default(autoincrement()) @id
avatarUrl String? @default("")
username String
email String @unique
password String
phoneNum String @default("") @unique
emailSecret String? @default("")
phoneSecret String? @default("")
bio String? @default("")
groups Group[] @relation(references: [id])
messages Message[]
directMessages DirectMessage[]
createdAt DateTime? @default(now())
id Int @default(autoincrement()) @id
avatarUrl String? @default("")
username String
email String @unique
password String
phoneNum String @default("") @unique
emailSecret String? @default("")
phoneSecret String? @default("")
bio String? @default("")
participatedGroup Group[] @relation("group-participants", references: [id])
createdGroup Group[] @relation("group-creator")
messages Message[]
directMessages DirectMessage[]
createdAt DateTime? @default(now())
}
model Group {
id Int @default(autoincrement()) @id
name String @unique
participants User[]
participants User[]
@relation("group-participants")
messages Message[]
creator User @relation("group-creator", fields: [creatorId])
creatorId Int
files String? @default("")
createdAt DateTime? @default(now())
}
...
...
Please
register
or
login
to post a comment