2026-06-30 07:09:44 +00:00
|
|
|
package entity
|
|
|
|
|
|
|
|
|
|
const CollectionName = "publish_queue"
|
|
|
|
|
|
|
|
|
|
const (
|
|
|
|
|
StatusScheduled = "scheduled"
|
|
|
|
|
StatusPublishing = "publishing"
|
|
|
|
|
StatusPublished = "published"
|
|
|
|
|
StatusFailed = "failed"
|
|
|
|
|
StatusCancelled = "cancelled"
|
2026-06-30 09:10:23 +00:00
|
|
|
StatusMissed = "missed"
|
2026-06-30 07:09:44 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type QueueItem struct {
|
2026-06-30 09:10:23 +00:00
|
|
|
ID string `bson:"_id"`
|
|
|
|
|
TenantID string `bson:"tenant_id"`
|
|
|
|
|
OwnerUID string `bson:"owner_uid"`
|
|
|
|
|
AccountID string `bson:"account_id"`
|
|
|
|
|
PersonaID string `bson:"persona_id,omitempty"`
|
|
|
|
|
CopyMissionID string `bson:"copy_mission_id,omitempty"`
|
|
|
|
|
CopyDraftID string `bson:"copy_draft_id,omitempty"`
|
|
|
|
|
Text string `bson:"text"`
|
|
|
|
|
ScheduledAt int64 `bson:"scheduled_at"`
|
|
|
|
|
Status string `bson:"status"`
|
|
|
|
|
MediaID string `bson:"media_id,omitempty"`
|
|
|
|
|
Permalink string `bson:"permalink,omitempty"`
|
|
|
|
|
PublishedAt int64 `bson:"published_at,omitempty"`
|
|
|
|
|
ErrorMessage string `bson:"error_message,omitempty"`
|
|
|
|
|
RetryCount int `bson:"retry_count,omitempty"`
|
|
|
|
|
LastAttemptAt int64 `bson:"last_attempt_at,omitempty"`
|
|
|
|
|
NextAttemptAt int64 `bson:"next_attempt_at,omitempty"`
|
|
|
|
|
MissedAt int64 `bson:"missed_at,omitempty"`
|
|
|
|
|
PausedReason string `bson:"paused_reason,omitempty"`
|
|
|
|
|
CreateAt int64 `bson:"create_at"`
|
|
|
|
|
UpdateAt int64 `bson:"update_at"`
|
2026-06-30 07:09:44 +00:00
|
|
|
}
|