字段中的blob和JSON类型映射为[]byte和dbs.JSON

This commit is contained in:
刘祥超
2022-03-21 21:39:36 +08:00
parent 74e585263c
commit 8582715be7
105 changed files with 1537 additions and 1156 deletions

View File

@@ -1,23 +1,25 @@
package models
import "github.com/iwind/TeaGo/dbs"
// Message 消息通知
type Message struct {
Id uint64 `field:"id"` // ID
AdminId uint32 `field:"adminId"` // 管理员ID
UserId uint32 `field:"userId"` // 用户ID
Role string `field:"role"` // 角色
ClusterId uint32 `field:"clusterId"` // 集群ID
NodeId uint32 `field:"nodeId"` // 节点ID
Level string `field:"level"` // 级别
Subject string `field:"subject"` // 标题
Body string `field:"body"` // 内容
Type string `field:"type"` // 消息类型
Params string `field:"params"` // 额外的参数
IsRead uint8 `field:"isRead"` // 是否已读
State uint8 `field:"state"` // 状态
CreatedAt uint64 `field:"createdAt"` // 创建时间
Day string `field:"day"` // 日期YYYYMMDD
Hash string `field:"hash"` // 消息内容的Hash
Id uint64 `field:"id"` // ID
AdminId uint32 `field:"adminId"` // 管理员ID
UserId uint32 `field:"userId"` // 用户ID
Role string `field:"role"` // 角色
ClusterId uint32 `field:"clusterId"` // 集群ID
NodeId uint32 `field:"nodeId"` // 节点ID
Level string `field:"level"` // 级别
Subject string `field:"subject"` // 标题
Body string `field:"body"` // 内容
Type string `field:"type"` // 消息类型
Params dbs.JSON `field:"params"` // 额外的参数
IsRead uint8 `field:"isRead"` // 是否已读
State uint8 `field:"state"` // 状态
CreatedAt uint64 `field:"createdAt"` // 创建时间
Day string `field:"day"` // 日期YYYYMMDD
Hash string `field:"hash"` // 消息内容的Hash
}
type MessageOperator struct {