package entity

const CollectionName = "scan_posts"

const FlowViral = "viral"
const FlowPlacement = "placement"

type ScanReply struct {
	ExternalID string `bson:"external_id,omitempty"`
	Author     string `bson:"author,omitempty"`
	Text       string `bson:"text"`
	Permalink  string `bson:"permalink,omitempty"`
	LikeCount  int    `bson:"like_count,omitempty"`
	PostedAt   string `bson:"posted_at,omitempty"`
}

type ScanPost struct {
	ID                 string      `bson:"_id"`
	TenantID           string      `bson:"tenant_id"`
	OwnerUID           string      `bson:"owner_uid"`
	BrandID            string      `bson:"brand_id"`
	TopicID            string      `bson:"topic_id,omitempty"`
	LegacyPersonaID    string      `bson:"persona_id,omitempty"`
	CopyMissionID      string      `bson:"copy_mission_id,omitempty"`
	Flow               string      `bson:"flow,omitempty"`
	GraphID            string      `bson:"graph_id"`
	ScanJobID          string      `bson:"scan_job_id"`
	GraphNodeID        string      `bson:"graph_node_id"`
	SearchTag          string      `bson:"search_tag"`
	QueryDimension     string      `bson:"query_dimension"`
	ExternalID         string      `bson:"external_id"`
	Permalink          string      `bson:"permalink"`
	Author             string      `bson:"author"`
	AuthorVerified     bool        `bson:"author_verified,omitempty"`
	FollowerCount      int         `bson:"follower_count,omitempty"`
	Text               string      `bson:"text"`
	Priority           string      `bson:"priority"`
	LikeCount          int         `bson:"like_count,omitempty"`
	ReplyCount         int         `bson:"reply_count,omitempty"`
	EngagementScore    int         `bson:"engagement_score,omitempty"`
	PlacementScore     int         `bson:"placement_score"`
	ProductFitScore    int         `bson:"product_fit_score"`
	SolvedByProduct    bool        `bson:"solved_by_product"`
	Source             string      `bson:"source"`
	OutreachStatus     string      `bson:"outreach_status,omitempty"`
	PublishedReplyID   string      `bson:"published_reply_id,omitempty"`
	PublishedPermalink string      `bson:"published_permalink,omitempty"`
	OutreachUpdateAt   int64       `bson:"outreach_update_at,omitempty"`
	PostedAt           string      `bson:"posted_at,omitempty"`
	Replies            []ScanReply `bson:"replies,omitempty"`
	CreateAt           int64       `bson:"create_at"`
}

const (
	OutreachStatusPending   = "pending"
	OutreachStatusDrafted   = "drafted"
	OutreachStatusPublished = "published"
	OutreachStatusHandled   = "handled"
	OutreachStatusSkipped   = "skipped"
)
