Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MessageList ¶
type MessageList struct { ID string Title string Content string CreatorID string CreatorName string // 1、系统消息 2、通知通告 Types constant.MessageTypes // 1、草稿 2、发送中 3、 已发送 Status constant.MessageStatus // 接收人 Receivers Receivers // 总人数 SendNum int // 成功人数 Success int // 失败人数 Fail int // 消息附件 Files Files CreatedAt int64 }
MessageList MessageList
type MessageRepo ¶
type MessageRepo interface { Create(*gorm.DB, *MessageList) error Get(*gorm.DB, string) (*MessageList, error) Delete(*gorm.DB, string) error List(*gorm.DB, int8, int8, string, int, int) ([]*MessageList, int64, error) UpdateCount(*gorm.DB, *MessageList) error }
MessageRepo MessageRepo
type Receiver ¶
type Receiver struct { // Type 1: 人员 2:部门 Type ReceiverType `json:"type,omitempty"` ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` }
Receiver receiver 定义
type Record ¶
type Record struct { ID string ListID string ReceiverID string ReceiverName string Types constant.MessageTypes ReadStatus constant.ReadStatus // 1 not read 2 read CreatedAt int64 }
Record 消息记录
type RecordRepo ¶
type RecordRepo interface { Create(*gorm.DB, *Record) error GetByID(*gorm.DB, string) (*Record, error) GetNumber(*gorm.DB, string) ([]*Result, error) UpdateReadStatus(*gorm.DB, string) error DeleteByIDs(*gorm.DB, []string) error ReadByIDs(*gorm.DB, []string) error List(*gorm.DB, int, int, int, int, string) ([]*Record, int64, error) ReadByID(*gorm.DB, string) error GetByCondition(*gorm.DB, string, string) (*Record, error) }
RecordRepo 消息实体操作接口定义
type Template ¶
type Template struct { ID string Name string Title string Content string CreateBy string Status int CreatedAt int64 UpdatedAt int64 }
Template tempalate
type TemplateRepo ¶
type TemplateRepo interface { Create(*gorm.DB, *Template) error UpdateTemplate(*gorm.DB, *Template) error Get(*gorm.DB, string) (*Template, error) Delete(*gorm.DB, string) error QueryTemplate(*gorm.DB, string, int, int) ([]*Template, int64, error) }
TemplateRepo TemplateRepo
Click to show internal directories.
Click to hide internal directories.