From ee34f9a33fd8ca519949fc131b70e6c61f03e541 Mon Sep 17 00:00:00 2001 From: Frederick Holland Date: Thu, 16 Oct 2025 21:30:49 +1100 Subject: [PATCH] Added article --- models/article.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 models/article.go diff --git a/models/article.go b/models/article.go new file mode 100644 index 0000000..15898ad --- /dev/null +++ b/models/article.go @@ -0,0 +1,13 @@ +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"` +}