Last active
March 3, 2021 15:20
-
-
Save dyarfi/adfd3915f176c834ffda5faa8107a596 to your computer and use it in GitHub Desktop.
prisma/schema.prisma
This file contains hidden or 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
| generator client { | |
| provider = "prisma-client-js" | |
| } | |
| datasource db { | |
| provider = "postgresql" | |
| url = env("DATABASE_URL") | |
| } | |
| model Job { | |
| id Int @id @default(autoincrement()) | |
| title String @db.VarChar | |
| slug String @db.VarChar | |
| description String | |
| userId Int? | |
| createdAt String? @db.VarChar | |
| user User? @relation(fields: [usersId], references: [id]) | |
| usersId Int? | |
| @@map(name: "jobs") | |
| } | |
| model Post { | |
| id Int @id @default(autoincrement()) | |
| title String? @db.VarChar | |
| slug String? @db.VarChar | |
| description String? | |
| createdAt String? @db.VarChar | |
| userId Int? | |
| user User? @relation(fields: [usersId], references: [id]) | |
| usersId Int? | |
| @@map(name: "posts") | |
| } | |
| model User { | |
| id Int @id @default(autoincrement()) | |
| username String @db.VarChar | |
| password String @db.VarChar | |
| email String? @db.VarChar | |
| createdAt String? @db.VarChar | |
| profile Profile? | |
| posts Post[] | |
| jobs Job[] | |
| @@map(name: "users") | |
| } | |
| model Profile { | |
| id Int @id @default(autoincrement()) | |
| firstName String @db.VarChar | |
| lastName String @db.VarChar | |
| bio String? | |
| userId Int @unique | |
| user User @relation(fields: [userId], references: [id]) | |
| @@map(name: "profile") | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment