Documentation ¶
Index ¶
- Variables
- func DeleteByID(args *ArgsDeleteByID) (err error)
- func DeleteByReceive(args *ArgsDeleteByReceive) (err error)
- func DeleteBySend(args *ArgsDeleteBySend) (err error)
- func GetReceiveCountByUserID(userID int64) (count int64)
- func Init()
- func UpdateAudit(args *ArgsUpdateAudit) (err error)
- func UpdateByID(args *ArgsUpdateByID) (err error)
- func UpdatePost(args *ArgsUpdatePost) (err error)
- func UpdateReceiveRead(args *ArgsUpdateReceiveRead) (err error)
- func UpdateReceiveReads(args *ArgsUpdateReceiveReads) (err error)
- type ArgsCreate
- type ArgsDeleteByID
- type ArgsDeleteByReceive
- type ArgsDeleteBySend
- type ArgsGetByID
- type ArgsGetList
- type ArgsUpdateAudit
- type ArgsUpdateByID
- type ArgsUpdatePost
- type ArgsUpdateReceiveRead
- type ArgsUpdateReceiveReads
- type FieldsMessage
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //OpenAnalysis 是否启动analysis OpenAnalysis = false //OpenSub 是否启动订阅 OpenSub = false )
Functions ¶
func DeleteByReceive ¶
func DeleteByReceive(args *ArgsDeleteByReceive) (err error)
DeleteByReceive 删除ID
func GetReceiveCountByUserID ¶
GetReceiveCountByUserID 获取用户收到的消息数量
func UpdateReceiveRead ¶
func UpdateReceiveRead(args *ArgsUpdateReceiveRead) (err error)
UpdateReceiveRead 已经阅读
func UpdateReceiveReads ¶
func UpdateReceiveReads(args *ArgsUpdateReceiveReads) (err error)
UpdateReceiveReads 批量设置已读
Types ¶
type ArgsCreate ¶
type ArgsCreate struct { //预计发送时间 WaitSendAt time.Time `db:"wait_send_at" json:"waitSendAt" check:"isoTime" empty:"true"` //发送人 // 如果为0则为系统消息,同时自动跳过时间差验证机制 SendUserID int64 `db:"send_user_id" json:"sendUserID" check:"id"` //接收人 ReceiveUserID int64 `db:"receive_user_id" json:"receiveUserID" check:"id"` //标题 Title string `db:"title" json:"title" check:"des" min:"1" max:"300"` //内容 Content string `db:"content" json:"content" check:"des" min:"1" max:"1500"` //附件文件列 Files pq.Int64Array `db:"files" json:"files" check:"ids" empty:"true"` //扩展参数 Params CoreSQLConfig.FieldsConfigsType `db:"params" json:"params"` }
ArgsCreate 创建新的消息参数
type ArgsDeleteByID ¶
type ArgsDeleteByID struct { //ID ID int64 `db:"id" json:"id" check:"id"` }
ArgsDeleteByID 接收人删除参数
type ArgsDeleteByReceive ¶
type ArgsDeleteByReceive struct { //IDs IDs pq.Int64Array `db:"ids" json:"ids" check:"ids"` //接收人 ReceiveUserID int64 `db:"receive_user_id" json:"receiveUserID" check:"id" empty:"true"` }
ArgsDeleteByReceive 接收人删除参数
type ArgsDeleteBySend ¶
type ArgsDeleteBySend struct { //IDs IDs pq.Int64Array `db:"ids" json:"ids" check:"ids"` //发送人ID SendUserID int64 `db:"send_user_id" json:"sendUserID" check:"id" empty:"true"` }
ArgsDeleteBySend 删除ID参数
type ArgsGetByID ¶
type ArgsGetByID struct { //ID ID int64 `db:"id" json:"id" check:"id"` //发送人ID SendUserID int64 `db:"send_user_id" json:"sendUserID" check:"id" empty:"true"` //接收人ID ReceiveUserID int64 `db:"receive_user_id" json:"receiveUserID" check:"id" empty:"true"` }
ArgsGetByID 获取ID参数
type ArgsGetList ¶
type ArgsGetList struct { //分页 Pages CoreSQLPages.ArgsDataList `json:"pages"` //发送用户ID SendUserID int64 `db:"send_user_id" json:"sendUserID" check:"id" empty:"true"` //预计发送时间 WaitSendAt time.Time `db:"wait_send_at" json:"waitSendAt" check:"isoTime" empty:"true"` //发送状态 // 发送完成后,发送人无法删除,接收人可以标记已读或删除,具体其他字段完成该操作 // 0 草稿; 1 等待审核; 2 发送成功 Status int `db:"status" json:"status"` //接收人ID ReceiveUserID int64 `db:"receive_user_id" json:"receiveUserID" check:"id" empty:"true"` //接收人阅读时间 ReceiveReadAt time.Time `db:"receive_read_at" json:"receiveReadAt" check:"isoTime" empty:"true"` //接收人删除状态 ReceiveDeleteAt time.Time `db:"receive_delete_at" json:"receiveDeleteAt" check:"isoTime" empty:"true"` //是否被删除 NeedIsRemove bool `json:"needIsRemove" check:"bool" empty:"true"` IsRemove bool `db:"is_remove" json:"isRemove" check:"bool" empty:"true"` //搜索 Search string `json:"search" check:"search" empty:"true"` }
ArgsGetList 获取列表参数
type ArgsUpdateAudit ¶
type ArgsUpdateAudit struct { //ID ID int64 `db:"id" json:"id" check:"id"` }
ArgsUpdateAudit 审核消息参数
type ArgsUpdateByID ¶
type ArgsUpdateByID struct { //ID ID int64 `db:"id" json:"id" check:"id"` //发送人ID // 用于验证 SendUserID int64 `db:"send_user_id" json:"sendUserID" check:"id" empty:"true"` //接收人 ReceiveUserID int64 `db:"receive_user_id" json:"receiveUserID" check:"id"` //预计发送时间 WaitSendAt time.Time `db:"wait_send_at" json:"waitSendAt" check:"isoTime" empty:"true"` //标题 Title string `db:"title" json:"title" check:"des" min:"1" max:"300"` //内容 Content string `db:"content" json:"content" check:"des" min:"1" max:"1500"` //附件文件列 Files pq.Int64Array `db:"files" json:"files" check:"ids" empty:"true"` //扩展参数 Params CoreSQLConfig.FieldsConfigsType `db:"params" json:"params"` }
ArgsUpdateByID 更新消息内容参数 只有发送人在草稿状态下可以编辑消息
type ArgsUpdatePost ¶
type ArgsUpdatePost struct { //ID ID int64 `db:"id" json:"id" check:"id"` //发送人ID // 用于验证 SendUserID int64 `db:"send_user_id" json:"sendUserID" check:"id" empty:"true"` }
ArgsUpdatePost 推送提交参数
type ArgsUpdateReceiveRead ¶
type ArgsUpdateReceiveRead struct { //ID ID int64 `db:"id" json:"id" check:"id"` //接收人 ReceiveUserID int64 `db:"receive_user_id" json:"receiveUserID" check:"id" empty:"true"` }
ArgsUpdateReceiveRead 已经阅读参数
type ArgsUpdateReceiveReads ¶
type ArgsUpdateReceiveReads struct { //IDs IDs pq.Int64Array `db:"ids" json:"ids" check:"ids"` //接收人 ReceiveUserID int64 `db:"receive_user_id" json:"receiveUserID" check:"id" empty:"true"` }
ArgsUpdateReceiveReads 批量设置已读参数
type FieldsMessage ¶
type FieldsMessage struct { //ID ID int64 `db:"id" json:"id"` //创建时间 CreateAt time.Time `db:"create_at" json:"createAt"` //更新时间 UpdateAt time.Time `db:"update_at" json:"updateAt"` //删除时间 // 发送人删除状态 DeleteAt time.Time `db:"delete_at" json:"deleteAt"` //预计发送时间 WaitSendAt time.Time `db:"wait_send_at" json:"waitSendAt"` //发送状态 // 发送完成后,发送人无法删除,接收人可以标记已读或删除,具体其他字段完成该操作 // 0 草稿; 1 等待审核; 2 发送成功 Status int `db:"status" json:"status"` //发送人 SendUserID int64 `db:"send_user_id" json:"sendUserID"` //接收人 ReceiveUserID int64 `db:"receive_user_id" json:"receiveUserID"` //接收人阅读时间 ReceiveReadAt time.Time `db:"receive_read_at" json:"receiveReadAt"` //接收人删除状态 ReceiveDeleteAt time.Time `db:"receive_delete_at" json:"receiveDeleteAt"` //标题 Title string `db:"title" json:"title"` //内容 Content string `db:"content" json:"content"` //附件文件列 Files pq.Int64Array `db:"files" json:"files"` //扩展参数 Params CoreSQLConfig.FieldsConfigsType `db:"params" json:"params"` }
func GetList ¶
func GetList(args *ArgsGetList) (dataList []FieldsMessage, dataCount int64, err error)
GetList 获取列表
Source Files ¶
Click to show internal directories.
Click to hide internal directories.