feat: 增加个人品牌信任内容管理接口
This commit is contained in:
1 parent
60db0a85db
commit
b7fbfa1646
5 files changed
+60
-1
No files matched your search
@@ -0,0 +1,2 @@
|
||||
CREATE TABLE "TrustContent" ("id" TEXT NOT NULL,"brandId" TEXT NOT NULL,"type" TEXT NOT NULL,"title" TEXT NOT NULL,"summary" TEXT,"content" TEXT NOT NULL,"coverUrl" TEXT,"sortOrder" INTEGER NOT NULL DEFAULT 0,"isPublished" BOOLEAN NOT NULL DEFAULT true,"config" JSONB,"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,"updatedAt" TIMESTAMP(3) NOT NULL,CONSTRAINT "TrustContent_pkey" PRIMARY KEY ("id"),CONSTRAINT "TrustContent_brandId_fkey" FOREIGN KEY ("brandId") REFERENCES "BrandProfile"("id") ON DELETE CASCADE ON UPDATE CASCADE);
|
||||
CREATE INDEX "TrustContent_brandId_type_sortOrder_idx" ON "TrustContent"("brandId","type","sortOrder");
|
||||
@@ -51,6 +51,7 @@ model BrandProfile {
|
||||
bookings Booking[]
|
||||
customerUsers CustomerUser[]
|
||||
tags Tag[]
|
||||
trustContents TrustContent[]
|
||||
}
|
||||
|
||||
model Service {
|
||||
@@ -75,6 +76,23 @@ model Service {
|
||||
@@index([brandId, isEnabled, sortOrder])
|
||||
}
|
||||
|
||||
model TrustContent {
|
||||
id String @id @default(uuid())
|
||||
brandId String
|
||||
brand BrandProfile @relation(fields: [brandId], references: [id], onDelete: Cascade)
|
||||
type String
|
||||
title String
|
||||
summary String?
|
||||
content String
|
||||
coverUrl String?
|
||||
sortOrder Int @default(0)
|
||||
isPublished Boolean @default(true)
|
||||
config Json?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
@@index([brandId, type, sortOrder])
|
||||
}
|
||||
|
||||
model CustomerUser {
|
||||
id String @id @default(uuid())
|
||||
brandId String
|
||||
|
||||
Reference in new issue
Block a user