Refactor portfolio admin and views

This commit is contained in:
MOH
2026-03-11 17:46:35 +01:00
parent 3c53430b12
commit 7956b073e9
27 changed files with 1972 additions and 1779 deletions
+15 -8
View File
@@ -27,6 +27,12 @@ enum PortfolioAssetKind {
DOCUMENT
}
enum PortfolioProjectViewMode {
GRID
STORY
CASE_STUDY
}
enum MediaSource {
UPLOAD
EXTERNAL
@@ -61,9 +67,10 @@ model Category {
}
model PortfolioProject {
id String @id @default(cuid())
id String @id @default(cuid())
categoryId String
slug String @unique
slug String @unique
viewMode PortfolioProjectViewMode @default(GRID)
titleAr String
titleEn String
titleDe String
@@ -77,13 +84,13 @@ model PortfolioProject {
serviceLabelDe String
previewUrl String?
coverImagePath String?
isFeatured Boolean @default(false)
isPublished Boolean @default(false)
isFeatured Boolean @default(false)
isPublished Boolean @default(false)
publishedAt DateTime?
sortOrder Int @default(0)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
category Category @relation(fields: [categoryId], references: [id], onDelete: Restrict)
sortOrder Int @default(0)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
category Category @relation(fields: [categoryId], references: [id], onDelete: Restrict)
sections PortfolioSection[]
assets PortfolioAsset[]