package models type Article struct { Id string `gorm:"primaryKey" json:"id"` Author User `json:"author"` Title string `json:"title"` Sections []ArticleSection `gorm:"serializer:json" json:"sections"` } type ArticleSection struct { Type string `json:"type"` Content string `json:"content"` }