Files
my-portfolio/prisma/schema.prisma
T
luna 912e5edb81
Build Check / build (pull_request) Successful in 34s
Build Check / push-image (pull_request) Has been skipped
Build Check / deploy-coolify (pull_request) Has been skipped
Add blog CMS with tracked public posts
2026-07-17 22:02:25 +00:00

81 lines
2.1 KiB
Plaintext

// Prisma 7 (rust-free `prisma-client` generator + driver adapter).
// Client is generated into src/generated/prisma (gitignored) and imported
// from "../generated/prisma/client".
generator client {
provider = "prisma-client"
output = "../src/generated/prisma"
}
datasource db {
provider = "postgresql"
}
enum ProjectSize {
Big
MediumSized
Small
}
model Project {
id String @id @default(cuid())
name String
label String // free-type string, e.g. "Dev Tool", "SaaS"
size ProjectSize @default(MediumSized)
imageUrl String? // shown fully, nothing overlapping
link String
linkIsDemo Boolean @default(false)
sourceCode String? // github or gitea link
description String
why String
note String? // free note, replaces old {color, content}
tags String[] // max 3 enforced in the API
loc Int? // manually provided line-of-code count
locEndpoint String? // URL the backend hits for a plaintext LoC number
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model WorkExperience {
id String @id @default(cuid())
company String
role String
fromDate DateTime
toDate DateTime? // null = Present
url String?
iconUrl String?
summary String
tags String[] // max 6 enforced in the API
sortIndex Int @default(0)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model Affiliate {
id String @id @default(cuid())
name String
link String
icon String
location String
provides String[]
good String[]
bad String[]
sortIndex Int @default(0)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model BlogPost {
id String @id @default(cuid())
title String
slug String @unique
excerpt String
coverImageUrl String?
content String @db.Text
isPublished Boolean @default(true)
views Int @default(0)
publishedAt DateTime?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}