feat(db): ads 写权威表与 ads_ov 投影表(含迁移)

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
浅念
2026-09-28 22:43:25 +08:00
parent 001d3aaf73
commit 726f6a1be8
4 changed files with 75 additions and 0 deletions
+17
View File
@@ -364,3 +364,20 @@ model embed_slot_members {
@@unique([slotId, userId])
@@index([userId])
}
// —— 广告位域(2026-09-28 设计 §2.1):全局/定向投放,写权威 ——
// albumIds null=全局(归一化:空数组存 null);绑定相册删除不级联清理
// (该相册观众页已 404,后台编辑过滤失效项——设计 §2.1 登记)。
model ads {
id String @id @default(cuid())
title String? @db.VarChar(120)
imageObjectKey String @db.VarChar(512)
linkUrl String @db.VarChar(2048)
enabled Boolean @default(true)
sortOrder Int @default(0)
albumIds Json?
entityVersion Int @default(1)
createdAt DateTime @default(now()) @db.DateTime(6)
updatedAt DateTime @updatedAt @db.DateTime(6)
@@index([sortOrder, createdAt])
}