Files
2026-01-26 10:06:53 +01:00

43 lines
1.6 KiB
Go

package models
import "time"
// IdeaSource represents a source used to derive a post idea.
type IdeaSource struct {
Title string `json:"title"`
URL string `json:"url"`
Subreddit string `json:"subreddit,omitempty"`
Author string `json:"author,omitempty"`
Score int `json:"score,omitempty"`
CreatedAt string `json:"created_at,omitempty"`
}
// ArticleDraft represents a generated article draft in a specific language.
type ArticleDraft struct {
Language string `json:"language"`
Title string `json:"title"`
SEOTitle string `json:"seo_title"`
MetaDescription string `json:"meta_description"`
Excerpt string `json:"excerpt"`
ContentHTML string `json:"content_html"`
References []string `json:"references,omitempty"`
}
// PostIdea represents an SEO-focused post idea derived from sources.
type PostIdea struct {
ID string `json:"id"`
SEOTitle string `json:"seo_title"`
Summary string `json:"summary"`
PrimaryKW string `json:"primary_keyword"`
Sources []IdeaSource `json:"sources"`
References []string `json:"references,omitempty"`
Status string `json:"status"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
DraftPostID int `json:"draft_post_id,omitempty"`
DraftPostIDEs int `json:"draft_post_id_es,omitempty"`
PublishedAt *time.Time `json:"published_at,omitempty"`
ArticleEN *ArticleDraft `json:"article_en,omitempty"`
ArticleES *ArticleDraft `json:"article_es,omitempty"`
}