prisma schema

This commit is contained in:
Mathis H (Avnyr) 2024-02-27 16:44:03 +01:00
parent 5a6470a3ce
commit 7f1440ed65
Signed by: Mathis
GPG Key ID: 9B3849C18C153DDD

View File

@ -14,15 +14,18 @@ datasource db {
} }
model User { model User {
id Int @id @default(autoincrement()) id Int @id @unique @default(autoincrement())
createdAt DateTime @default(now()) createdAt DateTime @default(now())
updatedAt DateTime @updatedAt updatedAt DateTime @updatedAt
email String email String @unique
hash String hash String
firstName String? firstName String?
lastName String? lastName String?
@@map("users")
bookmarks Bookmark[]
} }
model Bookmark { model Bookmark {
@ -33,4 +36,9 @@ model Bookmark {
title String title String
description String? description String?
link String link String
userId Int
user User @relation(fields: [userId], references: [id])
@@map("bookmarks")
} }