package entity

const CollectionName = "content_formulas"

const (
	SourcePaste         = "paste"
	SourceOwnPost       = "own_post"
	SourceScanPost      = "scan_post"
	SourceKeywordSearch = "keyword_search"
)

type SourceMetrics struct {
	LikeCount   int `bson:"like_count,omitempty"`
	ReplyCount  int `bson:"reply_count,omitempty"`
	Views       int `bson:"views,omitempty"`
	RepostCount int `bson:"repost_count,omitempty"`
	QuoteCount  int `bson:"quote_count,omitempty"`
	Shares      int `bson:"shares,omitempty"`
}

type ContentFormula struct {
	ID              string         `bson:"_id"`
	TenantID        string         `bson:"tenant_id"`
	OwnerUID        string         `bson:"owner_uid"`
	AccountID       string         `bson:"account_id"`
	Label           string         `bson:"label"`
	SourceType      string         `bson:"source_type"`
	SourceRef       string         `bson:"source_ref,omitempty"`
	SourcePostText  string         `bson:"source_post_text,omitempty"`
	SourceAuthor    string         `bson:"source_author,omitempty"`
	SourcePermalink string         `bson:"source_permalink,omitempty"`
	SourceMetrics   *SourceMetrics `bson:"source_metrics,omitempty"`
	Summary         string         `bson:"summary"`
	Wins            []string       `bson:"wins,omitempty"`
	Improvements    []string       `bson:"improvements,omitempty"`
	Formula         string         `bson:"formula"`
	PostTemplate    string         `bson:"post_template"`
	HookPattern     string         `bson:"hook_pattern"`
	Structure       string         `bson:"structure"`
	ReplicationTips []string       `bson:"replication_tips,omitempty"`
	Avoid           []string       `bson:"avoid,omitempty"`
	Tags            []string       `bson:"tags,omitempty"`
	CreateAt        int64          `bson:"create_at"`
	UpdateAt        int64          `bson:"update_at"`
}
