This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
// internal/article/model.go
|
||||
package article
|
||||
|
||||
import (
|
||||
@@ -6,6 +5,13 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type Format string
|
||||
|
||||
const (
|
||||
FormatMarkdown Format = "markdown"
|
||||
FormatHTML Format = "html"
|
||||
)
|
||||
|
||||
type Article struct {
|
||||
Title string
|
||||
Slug string
|
||||
@@ -13,7 +19,9 @@ type Article struct {
|
||||
Cover string
|
||||
Body template.HTML
|
||||
Description string
|
||||
Counter string
|
||||
Counter int64
|
||||
Format Format
|
||||
SourcePath string
|
||||
}
|
||||
|
||||
type ListPage struct {
|
||||
@@ -21,3 +29,12 @@ type ListPage struct {
|
||||
Description string
|
||||
Articles []Article
|
||||
}
|
||||
|
||||
type StaticPage struct {
|
||||
Title string
|
||||
Slug string
|
||||
Description string
|
||||
Body template.HTML
|
||||
Format Format
|
||||
SourcePath string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user