Added article

This commit is contained in:
Frederick Holland
2025-10-16 21:30:49 +11:00
parent fec40f8b74
commit ee34f9a33f

13
models/article.go Normal file
View File

@@ -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"`
}