feat: add jwt

This commit is contained in:
fallen-angle
2022-02-10 17:08:42 +08:00
parent 77f7d0caad
commit 2d43931fc8
10 changed files with 165 additions and 5 deletions

16
models/article.go Normal file
View File

@@ -0,0 +1,16 @@
package models
import "time"
type Article struct {
ID int `gorm:"primaryKey;column:id" json:"-"` // 文章id
CreateTime time.Time `gorm:"column:create_time" json:"createTime"` // 文章新建时间
CreateUser string `gorm:"column:create_user" json:"createUser"` // 文章创建者id
ModifyTime time.Time `gorm:"column:modify_time" json:"modifyTime"` // 文章最后更新时间
ModifyUser string `gorm:"column:modify_user" json:"modifyUser"` // 文章最后更新者id
Title string `gorm:"column:title" json:"title"` // 文章标题
Tags string `gorm:"column:tags" json:"tags"` // 文章Tag
Resume string `gorm:"column:resume" json:"resume"` // 文章简述
Cover string `gorm:"column:cover" json:"cover"` // 文章封面
Content string `gorm:"column:content" json:"content"` // 文章内容(如有需要可迁移至对象存储)
}