28 lines
807 B
Go
28 lines
807 B
Go
|
|
package entity
|
||
|
|
|
||
|
|
const CollectionName = "publish_queue"
|
||
|
|
|
||
|
|
const (
|
||
|
|
StatusScheduled = "scheduled"
|
||
|
|
StatusPublishing = "publishing"
|
||
|
|
StatusPublished = "published"
|
||
|
|
StatusFailed = "failed"
|
||
|
|
StatusCancelled = "cancelled"
|
||
|
|
)
|
||
|
|
|
||
|
|
type QueueItem struct {
|
||
|
|
ID string `bson:"_id"`
|
||
|
|
TenantID string `bson:"tenant_id"`
|
||
|
|
OwnerUID string `bson:"owner_uid"`
|
||
|
|
AccountID string `bson:"account_id"`
|
||
|
|
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"`
|
||
|
|
CreateAt int64 `bson:"create_at"`
|
||
|
|
UpdateAt int64 `bson:"update_at"`
|
||
|
|
}
|