mirror of
https://github.com/eiblog/eiblog.git
synced 2026-03-01 00:34:58 +08:00
fix: sqlite error
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
*.dylib
|
||||
*.DS_Store
|
||||
*.tar.gz
|
||||
*.db
|
||||
backend
|
||||
|
||||
# Test binary, built with `go test -c`
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
appname: eiblog
|
||||
database:
|
||||
driver: postgres
|
||||
source: host=localhost port=5432 user=postgres dbname=eiblog sslmode=disable password=MTI3LjAuMC4x
|
||||
driver: sqlite
|
||||
source: ./eiblog.db
|
||||
eshost:
|
||||
eiblogapp:
|
||||
mode:
|
||||
|
||||
@@ -16,6 +16,6 @@ type Account struct {
|
||||
LogoutAt time.Time `gorm:"column:logout_at;not null" bson:"logout_at"` // 登出时间
|
||||
LoginIP string `gorm:"column:login_ip;not null" bson:"login_ip"` // 最近登录IP
|
||||
LoginUA string `gorm:"column:login_ua;not null" bson:"login_ua"` // 最近登录IP
|
||||
LoginAt time.Time `gorm:"column:login_at;default:now()" bson:"login_at"` // 最近登录时间
|
||||
CreatedAt time.Time `gorm:"column:created_at;default:now()" bson:"created_at"` // 创建时间
|
||||
LoginAt time.Time `gorm:"column:login_at;default:current_timestamp" bson:"login_at"` // 最近登录时间
|
||||
CreatedAt time.Time `gorm:"column:created_at;default:current_timestamp" bson:"created_at"` // 创建时间
|
||||
}
|
||||
|
||||
@@ -22,8 +22,8 @@ type Article struct {
|
||||
IsDraft bool `gorm:"column:is_draft;not null" bson:"is_draft"` // 是否是草稿
|
||||
|
||||
DeletedAt time.Time `gorm:"column:deleted_at;not null" bson:"deleted_at"` // 删除时间
|
||||
UpdatedAt time.Time `gorm:"column:updated_at;default:now()" bson:"updated_at"` // 更新时间
|
||||
CreatedAt time.Time `gorm:"column:created_at;default:now()" bson:"created_at"` // 创建时间
|
||||
UpdatedAt time.Time `gorm:"column:updated_at;default:current_timestamp" bson:"updated_at"` // 更新时间
|
||||
CreatedAt time.Time `gorm:"column:created_at;default:current_timestamp" bson:"created_at"` // 创建时间
|
||||
|
||||
Header string `gorm:"-" bson:"-"` // header
|
||||
Excerpt string `gorm:"-" bson:"-"` // 预览信息
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ type Serie struct {
|
||||
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"` // 创建时间
|
||||
CreatedAt time.Time `gorm:"column:created_at;default:current_timestamp" bson:"created_at"` // 创建时间
|
||||
|
||||
Articles SortedArticles `gorm:"-" bson:"-"` // 专题下的文章
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user