Add review window and manual content generation

This commit is contained in:
Loma Bot Ops
2026-11-27 13:34:41 +07:00
parent 9d5bfe7d9d
commit 8086197f58
16 changed files with 357 additions and 62 deletions
@@ -0,0 +1,8 @@
-- Keep automatic content in the draft tray for review before it is placed on
-- the content calendar. Both timestamps make the 08:00 transition idempotent.
ALTER TABLE "PostGenerationJob"
ADD COLUMN "placeOnBoardAt" TIMESTAMP(3),
ADD COLUMN "boardPlacedAt" TIMESTAMP(3);
CREATE INDEX "PostGenerationJob_placeOnBoardAt_boardPlacedAt_idx"
ON "PostGenerationJob"("placeOnBoardAt", "boardPlacedAt");
+5
View File
@@ -563,6 +563,10 @@ model PostGenerationJob {
topic String
targets Platform[]
plannedAt DateTime?
// Automatic drafts stay in the draft tray until this time. Once due, the
// worker copies plannedAt to Post.plannedAt and records boardPlacedAt.
placeOnBoardAt DateTime?
boardPlacedAt DateTime?
profileSnapshot Json
status PostGenerationStatus @default(QUEUED)
stage String @default("queued")
@@ -581,4 +585,5 @@ model PostGenerationJob {
@@unique([requestedById, requestKey])
@@index([status, createdAt])
@@index([pageId, createdAt])
@@index([placeOnBoardAt, boardPlacedAt])
}