-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
160 additions
and
257 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,46 @@ | ||
// This is your Prisma schema file, | ||
// learn more about it in the docs: https://pris.ly/d/prisma-schema | ||
|
||
// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions? | ||
// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init | ||
|
||
generator client { | ||
provider = "prisma-client-js" | ||
} | ||
|
||
datasource db { | ||
provider = "postgresql" | ||
url=env("DATABASE_URL") | ||
provider = "postgresql" | ||
url = env("DATABASE_URL") | ||
directUrl = env("DIRECT_URL") | ||
} | ||
|
||
|
||
// url = env("POSTGRES_PRISMA_URL") // uses connection pooling | ||
// directUrl = env("POSTGRES_URL_NON_POOLING") // uses a direct connection | ||
model FeedBack { | ||
id Int @id @default(autoincrement()) | ||
feedback String | ||
vote Int @default(0) | ||
id Int @id @default(autoincrement()) | ||
feedback String | ||
vote Int @default(0) | ||
} | ||
|
||
enum Provider{ | ||
KAKAO | ||
} | ||
model User { | ||
id Int @id @default(autoincrement()) | ||
username String | ||
provider Provider | ||
email String? @unique | ||
profile_Image String? @unique | ||
createdAt DateTime @default(now()) | ||
access_token String? | ||
refresh_token String? | ||
upLoaded_Posts Quote[] @relation("Upload") | ||
liked_Posts Quote[] @relation("Completed") | ||
completedPosts Quote[] @relation("Liked") | ||
id Int @id @default(autoincrement()) | ||
username String | ||
provider String? | ||
email String? @unique | ||
profile_Image String? @unique | ||
auth_id String @unique | ||
upLoaded_Posts Quote[] @relation("Upload") | ||
Quote_Quote_completed_UserIdToUser Quote[] @relation("Quote_completed_UserIdToUser") | ||
Quote_Quote_liked_userIdToUser Quote[] @relation("Quote_liked_userIdToUser") | ||
} | ||
|
||
model Quote { | ||
id Int @id @default(autoincrement()) | ||
upload_userId Int | ||
author String | ||
content String | ||
createdAt DateTime @default(now()) | ||
private Boolean? | ||
view Int @default(0) | ||
upload_User User @relation("Upload", fields: [upload_userId], references: [id]) | ||
User_Quote_completed_UserIdToUser User[] @relation("Quote_completed_UserIdToUser") | ||
User_Quote_liked_userIdToUser User[] @relation("Quote_liked_userIdToUser") | ||
} | ||
|
||
model Quote{ | ||
id Int @id | ||
upload_User User @relation("Upload",fields: [upload_userId], references: [id]) | ||
completed_User User[] @relation("Completed") | ||
liked_User User[] @relation("Liked") | ||
upload_userId Int | ||
completed_UserId Int | ||
liked_userId Int | ||
author String | ||
content String | ||
createdAt DateTime @default(now()) | ||
private Boolean | ||
view Int @default(0) | ||
enum Provider { | ||
KAKAO | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.