mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-12-02 22:50:26 +08:00
字段中的blob和JSON类型映射为[]byte和dbs.JSON
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user