mirror of
https://github.com/eiblog/eiblog.git
synced 2026-02-14 10:22:26 +08:00
chore: update html
This commit is contained in:
@@ -7,15 +7,15 @@ import "time"
|
||||
|
||||
// Article 文章
|
||||
type Article struct {
|
||||
ID int `gorm:"column:id;primaryKey" bson:"id"` // 自增ID
|
||||
Author string `gorm:"column:author;not null" bson:"author"` // 作者名
|
||||
Slug string `gorm:"column:slug;not null;uniqueIndex" bson:"slug"` // 文章缩略名
|
||||
Title string `gorm:"column:title;not null" bson:"title"` // 标题
|
||||
Count int `gorm:"column:count;not null" bson:"count"` // 评论数量
|
||||
Content string `gorm:"column:content;not null" bson:"content"` // markdown内容
|
||||
SeriesID int `gorm:"column:series_id;not null" bson:"series_id"` // 专题ID
|
||||
Tags string `gorm:"column:tags;not null" bson:"tags"` // tag,以逗号隔开
|
||||
IsDraft bool `gorm:"column:is_draft;not null" bson:"is_draft"` // 是否是草稿
|
||||
ID int `gorm:"column:id;primaryKey" bson:"id"` // 自增ID
|
||||
Author string `gorm:"column:author;not null" bson:"author"` // 作者名
|
||||
Slug string `gorm:"column:slug;not null;uniqueIndex" bson:"slug"` // 文章缩略名
|
||||
Title string `gorm:"column:title;not null" bson:"title"` // 标题
|
||||
Count int `gorm:"column:count;not null" bson:"count"` // 评论数量
|
||||
Content string `gorm:"column:content;not null" bson:"content"` // markdown内容
|
||||
SerieID int `gorm:"column:serie_id;not null" bson:"serie_id"` // 专题ID
|
||||
Tags string `gorm:"column:tags;not null" bson:"tags"` // tag,以逗号隔开
|
||||
IsDraft bool `gorm:"column:is_draft;not null" bson:"is_draft"` // 是否是草稿
|
||||
|
||||
DeletedAt time.Time `gorm:"column:deleted_at;default:null" bson:"deleted_at"` // 删除时间
|
||||
UpdatedAt time.Time `gorm:"column:updated_at;default:now()" bson:"updated_at"` // 更新时间
|
||||
|
||||
@@ -9,6 +9,6 @@ type Blogger struct {
|
||||
BTitle string `gorm:"column:b_title;not null" bson:"b_title"` // 底部title
|
||||
Copyright string `gorm:"column:copyright;not null" bson:"copyright"` // 版权声明
|
||||
|
||||
SeriesSay string `gorm:"column:series_say;not null" bson:"series_say"` // 专题说明
|
||||
ArchiveSay string `gorm:"column:archive_say;not null" bson:"archive_say"` // 归档说明
|
||||
SeriesSay string `gorm:"column:series_say;not null" bson:"series_say"` // 专题说明
|
||||
ArchivesSay string `gorm:"column:archives_say;not null" bson:"archives_say"` // 归档说明
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@ package model
|
||||
|
||||
import "time"
|
||||
|
||||
// Series 专题
|
||||
type Series struct {
|
||||
// Serie 专题
|
||||
type Serie struct {
|
||||
ID int `gorm:"column:id;primaryKey" bson:"id"` // 自增ID
|
||||
Slug string `gorm:"column:slug;not null;uniqueIndex" bson:"slug"` // 缩略名
|
||||
Name string `gorm:"column:name;not null" bson:"name"` // 专题名
|
||||
@@ -15,7 +15,7 @@ type Series struct {
|
||||
}
|
||||
|
||||
// SortedSeries 排序后专题
|
||||
type SortedSeries []*Series
|
||||
type SortedSeries []*Serie
|
||||
|
||||
// Len 长度
|
||||
func (s SortedSeries) Len() int { return len(s) }
|
||||
|
||||
Reference in New Issue
Block a user