mirror of
https://github.com/t3xhno/nestjs-auth.git
synced 2025-09-03 10:23:43 +00:00
initial commit
This commit is contained in:
39
prisma/schema.prisma
Normal file
39
prisma/schema.prisma
Normal file
@@ -0,0 +1,39 @@
|
||||
// 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")
|
||||
}
|
Reference in New Issue
Block a user