chore: store mongodb

This commit is contained in:
deepzz0
2021-04-26 23:02:24 +08:00
parent 68e01cdf1f
commit e2df642a46
20 changed files with 488 additions and 193 deletions

View File

@@ -5,7 +5,7 @@ import "time"
// Article 文章
type Article struct {
ID int32 `gorm:"primaryKey;autoIncrement"` // 自增ID
ID int `gorm:"primaryKey;autoIncrement"` // 自增ID
Author string `gorm:"not null"` // 作者名
Slug string `gorm:"not null;uniqueIndex"` // 文章缩略名
Title string `gorm:"not null"` // 标题

View File

@@ -5,7 +5,7 @@ import "time"
// Series 专题
type Series struct {
ID int32 `gorm:"primaryKey;autoIncrement"` // 自增ID
ID int `gorm:"primaryKey;autoIncrement"` // 自增ID
Slug string `gorm:"not null;uniqueIndex"` // 缩略名
Name string `gorm:"not null"` // 专题名
Desc string `gorm:"not null"` // 专题描述