mirror of
https://github.com/t3xhno/nestjs-auth.git
synced 2024-11-22 18:33:41 +00:00
40 lines
808 B
Plaintext
40 lines
808 B
Plaintext
|
// This is your Prisma schema file,
|
||
|
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
||
|
|
||
|
generator client {
|
||
|
provider = "prisma-client-js"
|
||
|
}
|
||
|
|
||
|
datasource db {
|
||
|
provider = "postgresql"
|
||
|
url = env("DATABASE_URL")
|
||
|
}
|
||
|
|
||
|
model User {
|
||
|
id Int @id @default(autoincrement())
|
||
|
createdAt DateTime @default(now())
|
||
|
updatedAt DateTime @updatedAt
|
||
|
email String @unique
|
||
|
hash String
|
||
|
firstName String?
|
||
|
lastName String?
|
||
|
|
||
|
bookmarks Bookmark[]
|
||
|
|
||
|
@@map("users")
|
||
|
}
|
||
|
|
||
|
model Bookmark {
|
||
|
id Int @id @default(autoincrement())
|
||
|
createdAt DateTime @default(now())
|
||
|
updatedAt DateTime @updatedAt
|
||
|
title String
|
||
|
description String?
|
||
|
link String
|
||
|
|
||
|
userId Int
|
||
|
user User @relation(fields: [userId], references: [id])
|
||
|
|
||
|
@@map("bookmarks")
|
||
|
}
|