c6b7090536
Add a cover mode to schedule tasks so auto-publish can pick a random cover image instead of a fixed one, scoped to all images or a specific folder. - migration: add cover_mode / cover_random_scope / cover_random_folder_id columns and check constraints on schedule_tasks - backend: validate cover mode/scope/folder on create & update; the dispatch worker resolves a random active image (signed asset URL) at enqueue time - frontend: new CoverSourceSelector component wired into GenerateTaskDrawer and PublishArticleModal, plus coverSource i18n strings Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
42 lines
1.1 KiB
Go
42 lines
1.1 KiB
Go
package domain
|
|
|
|
import "time"
|
|
|
|
type ScheduleTask struct {
|
|
ID int64
|
|
TenantID int64
|
|
WorkspaceID *int64
|
|
OperatorID *int64
|
|
TargetType string
|
|
PromptRuleID *int64
|
|
SubscriptionPromptID *int64
|
|
BrandID *int64
|
|
Name string
|
|
CronExpr string
|
|
ScheduleKind string
|
|
ScheduleDays []string
|
|
ScheduleTimeMode string
|
|
RandomWindowStart string
|
|
RandomWindowEnd string
|
|
GenerationInput map[string]interface{}
|
|
AutoPublish bool
|
|
PublishAccountIDs []string
|
|
CoverAssetURL *string
|
|
CoverImageAssetID *int64
|
|
CoverMode string
|
|
CoverRandomScope string
|
|
CoverRandomFolderID *int64
|
|
EnableWebSearch bool
|
|
GenerateCount int
|
|
StartAt *time.Time
|
|
EndAt *time.Time
|
|
NextRunAt *time.Time
|
|
LastRunAt *time.Time
|
|
LastDispatchStatus *string
|
|
LastDispatchError *string
|
|
ConsecutiveFailures int
|
|
Status string
|
|
CreatedAt time.Time
|
|
UpdatedAt time.Time
|
|
}
|