Added article
This commit is contained in:
13
models/article.go
Normal file
13
models/article.go
Normal 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"`
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user