fix: sqlite error

This commit is contained in:
henry.chen
2021-07-25 10:45:33 +08:00
parent cdbe082764
commit e2046d0d39
5 changed files with 16 additions and 15 deletions

View File

@@ -5,11 +5,11 @@ import "time"
// 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"` // 专题名
Desc string `gorm:"column:desc;not null" bson:"desc"` // 专题描述
CreatedAt time.Time `gorm:"column:created_at;default:now()" bson:"created_at"` // 创建时间
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"` // 专题名
Desc string `gorm:"column:desc;not null" bson:"desc"` // 专题描述
CreatedAt time.Time `gorm:"column:created_at;default:current_timestamp" bson:"created_at"` // 创建时间
Articles SortedArticles `gorm:"-" bson:"-"` // 专题下的文章
}