feat(help-center): align article payloads

This commit is contained in:
2026-06-06 04:22:04 +08:00
parent 09095c5746
commit ab9a93b2be
10 changed files with 857 additions and 212 deletions
+7 -6
View File
@@ -25,11 +25,12 @@ type Article struct {
Meta json.RawMessage `gorm:"type:jsonb;serializer:json" json:"meta"`
CustomAttributes json.RawMessage `gorm:"type:jsonb;serializer:json" json:"custom_attributes"`
Portal Portal `gorm:"foreignKey:PortalID" json:"portal,omitempty"`
Category *Category `gorm:"foreignKey:CategoryID" json:"category,omitempty"`
Folder *Folder `gorm:"foreignKey:FolderID" json:"folder,omitempty"`
Author *User `gorm:"foreignKey:AuthorID" json:"author,omitempty"`
AssociatedArticle *Article `gorm:"foreignKey:AssociatedArticleID" json:"associated_article,omitempty"`
Portal Portal `gorm:"foreignKey:PortalID" json:"portal,omitempty"`
Category *Category `gorm:"foreignKey:CategoryID" json:"category,omitempty"`
Folder *Folder `gorm:"foreignKey:FolderID" json:"folder,omitempty"`
Author *User `gorm:"foreignKey:AuthorID" json:"author,omitempty"`
AssociatedArticle *Article `gorm:"foreignKey:AssociatedArticleID" json:"associated_article,omitempty"`
AssociatedArticles []Article `gorm:"foreignKey:AssociatedArticleID" json:"associated_articles,omitempty"`
}
func (Article) TableName() string { return "articles" }
func (Article) TableName() string { return "articles" }