76 lines
1.6 KiB
Plaintext
76 lines
1.6 KiB
Plaintext
// Don't forget to tell Prisma about your edits to this file using
|
|
// `yarn rw prisma migrate dev` or `yarn rw prisma db push`.
|
|
// `migrate` is like committing while `push` is for prototyping.
|
|
// Read more about both here:
|
|
// https://www.prisma.io/docs/orm/prisma-migrate
|
|
|
|
datasource db {
|
|
provider = "postgresql"
|
|
url = env("DATABASE_URL")
|
|
}
|
|
|
|
generator client {
|
|
provider = "prisma-client-js"
|
|
binaryTargets = "native"
|
|
}
|
|
|
|
enum Handle {
|
|
x
|
|
threads
|
|
instagram
|
|
facebook
|
|
tiktok
|
|
youtube
|
|
linkedin
|
|
github
|
|
email
|
|
custom
|
|
}
|
|
|
|
model User {
|
|
id Int @id @default(autoincrement())
|
|
username String @unique
|
|
email String @unique
|
|
hashedPassword String
|
|
salt String
|
|
resetToken String?
|
|
resetTokenExpiresAt DateTime?
|
|
}
|
|
|
|
model Social {
|
|
id Int @id @default(autoincrement())
|
|
name String
|
|
type Handle
|
|
username String
|
|
}
|
|
|
|
model Portrait {
|
|
id Int @id @default(autoincrement())
|
|
fileId String
|
|
}
|
|
|
|
model Tag {
|
|
id Int @id @default(autoincrement())
|
|
tag String
|
|
color String
|
|
projects Project[]
|
|
}
|
|
|
|
model ProjectImage {
|
|
id Int @id @default(autoincrement())
|
|
fileId String
|
|
|
|
Project Project? @relation(fields: [projectId], references: [id])
|
|
projectId Int?
|
|
}
|
|
|
|
model Project {
|
|
id Int @id @default(autoincrement())
|
|
title String
|
|
description String @default("No description provided")
|
|
images ProjectImage[]
|
|
date DateTime
|
|
links String[] @default([])
|
|
tags Tag[]
|
|
}
|