package entity

const CollectionName = "publish_queue_events"

const (
	EventCreated      = "created"
	EventRetry        = "retry"
	EventPublishing   = "publishing"
	EventPublished    = "published"
	EventFailed       = "failed"
	EventCancelled    = "cancelled"
	EventMissed       = "missed"
	EventGuardDelayed = "guard_delayed"
)

type Event struct {
	ID         string `bson:"_id"`
	TenantID   string `bson:"tenant_id"`
	OwnerUID   string `bson:"owner_uid"`
	AccountID  string `bson:"account_id"`
	QueueID    string `bson:"queue_id"`
	EventType  string `bson:"event_type"`
	FromStatus string `bson:"from_status,omitempty"`
	ToStatus   string `bson:"to_status,omitempty"`
	Message    string `bson:"message,omitempty"`
	CreateAt   int64  `bson:"create_at"`
}
