拓展类型
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"time"
|
||||
"work_cation/pkg/gormx"
|
||||
)
|
||||
|
||||
type BaseCard struct {
|
||||
UUID string `json:"uuid"` // id ip加时间戳生成
|
||||
UserID string `json:"user_id"` // 用户id 标识
|
||||
Title string `json:"title"` // 标题
|
||||
Text string `json:"text"` // 内容
|
||||
Covers gormx.ListString `json:"covers"` // 封面
|
||||
ToolType string `json:"tool_type"` // 工具类型
|
||||
UpdateTx time.Time `json:"update_tx"` // 更新时间
|
||||
Number int `json:"number"` // 数量
|
||||
Goods int `json:"goods"` // 点赞数
|
||||
Collection int `json:"collection"` // 收藏数
|
||||
}
|
||||
|
||||
const (
|
||||
ToolTypeErlang = "erlangCard" // 卡片
|
||||
)
|
||||
@@ -4,7 +4,7 @@ import "work_cation/pkg/gormx"
|
||||
|
||||
type ErlangCards struct {
|
||||
UUID string `json:"uuid"` // id ip加时间戳生成
|
||||
UserIp string `json:"user_ip"` // 用户ip
|
||||
UserID string `json:"user_id"` // 用户id
|
||||
Title string `json:"title"` // 标题
|
||||
Text string `json:"text"` // 内容
|
||||
Covers gormx.ListString `json:"covers"` // 封面
|
||||
@@ -12,8 +12,4 @@ type ErlangCards struct {
|
||||
VarName gormx.ListString `json:"var_name"` // 变量
|
||||
VarContent gormx.ListString `json:"var_content"` // 变量内容
|
||||
IsShowOut bool `json:"is_show_out"` // 是否展示
|
||||
|
||||
Number int `json:"number"` // 数量
|
||||
Goods int `json:"goods"` // 点赞
|
||||
Collection int `json:"collection"` // 收藏
|
||||
}
|
||||
|
||||
+2
-1
@@ -1,7 +1,8 @@
|
||||
package models
|
||||
|
||||
type Users struct {
|
||||
Ip string `gorm:"primarykey" json:"ip"`
|
||||
ID string `gorm:"primarykey" json:"id"`
|
||||
Ip string `json:"ip"`
|
||||
Name string `json:"name"` // 昵称
|
||||
Avatar string `json:"avatar"` // 头像
|
||||
Cover string `json:"cover"` // 封面
|
||||
|
||||
Reference in New Issue
Block a user