This commit is contained in:
Your Name committed 2026-06-07 17:17:01 +07:00
1 parent d325cd8763
commit c6bf2f70ac
45 files changed
+5195 -338

No files matched your search

+31
View File
@@ -165,6 +165,7 @@ model Order {
totalAmount Float
status String @default("PENDING_PAYMENT")
paymentSlipUrl String?
trackingNo String?
customerId Int?
customer Customer? @relation(fields: [customerId], references: [id])
@@ -420,3 +421,33 @@ model Review {
@@index([productId])
@@index([customerId])
}
model Page {
id Int @id @default(autoincrement())
slug String @unique // e.g., "home", "about-us"
title String
sections PageSection[]
isPublished Boolean @default(true)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model PageSection {
id Int @id @default(autoincrement())
pageId Int
page Page @relation(fields: [pageId], references: [id], onDelete: Cascade)
type String // e.g., "HERO", "CATEGORIES", "PRODUCTS", "BANNER", "TEXT"
order Int // Display order
payload Json // Dynamic JSON payload
isActive Boolean @default(true)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model NewsletterSubscription {
id Int @id @default(autoincrement())
email String @unique
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}