添加公众号助手

This commit is contained in:
Jackzhou
2026-08-26 10:35:46 +08:00
parent 4f33b036d1
commit b00e55f0e5
16 changed files with 4905 additions and 49 deletions
@@ -0,0 +1,32 @@
package model
import "time"
// OfficialAccountArticle 公众号文章状态表,对齐工作流中的主题/标题/提纲/正文显式传递。
type OfficialAccountArticle struct {
ID uint `gorm:"primaryKey" json:"id"`
TaskID uint `gorm:"not null;uniqueIndex" json:"task_id"`
SpecialistKey string `gorm:"size:64;not null;index" json:"specialist_key"`
BusinessDomain string `gorm:"size:32;not null;default:ai;index" json:"business_domain"`
Keyword string `gorm:"size:256;not null" json:"keyword"`
Audience string `gorm:"size:128;not null" json:"audience"`
Goal string `gorm:"size:128;not null" json:"goal"`
Tone string `gorm:"size:128;not null" json:"tone"`
Requirements string `gorm:"type:text" json:"requirements"`
TopicCandidatesJSON string `gorm:"type:text" json:"topic_candidates_json"`
HotspotsJSON string `gorm:"type:text" json:"hotspots_json"`
SelectedTopic string `gorm:"size:256" json:"selected_topic"`
TopicHeat string `gorm:"size:64" json:"topic_heat"`
TitleCandidatesJSON string `gorm:"type:text" json:"title_candidates_json"`
SelectedTitle string `gorm:"size:256" json:"selected_title"`
OutlineStyle string `gorm:"size:64;not null;default:问题拆解型" json:"outline_style"`
OutlineWords int `gorm:"not null;default:600" json:"outline_words"`
Outline string `gorm:"type:text" json:"outline"`
ContentTargetWords int `gorm:"not null;default:1400" json:"content_target_words"`
Content string `gorm:"type:text" json:"content"`
Status string `gorm:"size:32;not null;default:draft;index" json:"status"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
func (OfficialAccountArticle) TableName() string { return "official_account_article" }
@@ -0,0 +1,25 @@
package model
import "time"
// OfficialAccountHotspot 业务域热点缓存表,承接 RSS/网页抓取结果及领域评分。
type OfficialAccountHotspot struct {
ID uint `gorm:"primaryKey" json:"id"`
BusinessDomain string `gorm:"size:32;not null;default:ai;index" json:"business_domain"`
SourceKey string `gorm:"size:64;not null;index;uniqueIndex:idx_hotspot_source_url" json:"source_key"`
SourceLabel string `gorm:"size:128;not null" json:"source_label"`
SourceType string `gorm:"size:16;not null" json:"source_type"`
Title string `gorm:"size:512;not null" json:"title"`
URL string `gorm:"size:1024;not null;uniqueIndex:idx_hotspot_source_url" json:"url"`
Summary string `gorm:"type:text" json:"summary"`
PublishedAt *time.Time `json:"published_at"`
RawScore float64 `gorm:"not null;default:0" json:"raw_score"`
DomainScore float64 `gorm:"not null;default:0" json:"domain_score"`
HeatLabel string `gorm:"size:32;default:''" json:"heat_label"`
TagsJSON string `gorm:"type:text" json:"tags_json"`
FetchedAt time.Time `gorm:"index" json:"fetched_at"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
func (OfficialAccountHotspot) TableName() string { return "official_account_hotspot" }