notice

package
v0.0.0-...-0e6b51b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const ERROR_NOT_FOUND = 0x0001

Variables

This section is empty.

Functions

func Prefix

func Prefix(app micro.IContext, prefix string, uid int64) string

Types

type CleanByTypesTask

type CleanByTypesTask struct {
	Type string `json:"type" name:"type" title:"类型, 多个逗号分割"`
	Fid  int64  `json:"fid" name:"fid" title:"消息来源ID , 多个逗号分割"`
	Iid  int64  `json:"iid" name:"iid" title:"消息来源项ID , 多个逗号分割"`
}

func (*CleanByTypesTask) GetName

func (T *CleanByTypesTask) GetName() string

func (*CleanByTypesTask) GetTitle

func (T *CleanByTypesTask) GetTitle() string

type CleanTask

type CleanTask struct {
	Uid  int64       `json:"uid" name:"uid" title:"用户ID"`
	Type interface{} `json:"type,omitempty" name:"type" title:"类型, 多个逗号分割"`
	Fid  interface{} `json:"fid,omitempty" name:"fid" title:"消息来源ID , 多个逗号分割"`
	Iid  interface{} `json:"iid,omitempty" name:"iid" title:"消息来源项ID , 多个逗号分割"`
}

func (*CleanTask) GetName

func (T *CleanTask) GetName() string

func (*CleanTask) GetTitle

func (T *CleanTask) GetTitle() string

type CountData

type CountData struct {
	Total int32 `json:"total" name:"total" title:"总记录数"`
}

type CountTask

type CountTask struct {
	Uid   int64       `json:"uid" name:"uid" title:"用户ID"`
	Ids   interface{} `json:"ids,omitempty" name:"ids" title:"ID,多个逗号分割"`
	Type  interface{} `json:"type,omitempty" name:"type" title:"类型, 多个逗号分割"`
	Fid   interface{} `json:"fid,omitempty" name:"fid" title:"消息来源ID , 多个逗号分割"`
	Iid   interface{} `json:"iid,omitempty" name:"iid" title:"消息来源项ID , 多个逗号分割"`
	Q     interface{} `json:"q,omitempty" name:"q" title:"模糊匹配关键字"`
	TopId interface{} `json:"topId,omitempty" name:"topid" title:"顶部ID"`
}

func (*CountTask) GetName

func (T *CountTask) GetName() string

func (*CountTask) GetTitle

func (T *CountTask) GetTitle() string

type CreateTask

type CreateTask struct {
	Uid     int64       `json:"uid" name:"uid" title:"用户ID"`
	Type    interface{} `json:"type,omitempty" name:"type" title:"通知类型 默认 0"`
	Fid     interface{} `json:"fid,omitempty" name:"fid" title:"消息来源ID 默认 0"`
	Iid     interface{} `json:"iid,omitempty" name:"iid" title:"消息来源项ID 默认 0"`
	Body    string      `json:"body" name:"body" title:"通知内容"`
	Options interface{} `json:"options,omitempty" name:"options" title:"其他数据 JSON 叠加数据"`
}

func (*CreateTask) GetName

func (T *CreateTask) GetName() string

func (*CreateTask) GetTitle

func (T *CreateTask) GetTitle() string

type GetTask

type GetTask struct {
	Id  int64 `json:"id" name:"id" title:"ID"`
	Uid int64 `json:"uid" name:"uid" title:"用户ID"`
}

func (*GetTask) GetName

func (T *GetTask) GetName() string

func (*GetTask) GetTitle

func (T *GetTask) GetTitle() string

type NewCountByTypesData

type NewCountByTypesData struct {
	Items []*NewCountByTypesItem `json:"items,omitempty" name:"items" title:""`
}

type NewCountByTypesItem

type NewCountByTypesItem struct {
	Type  int32 `json:"type" name:"type" title:"类型"`
	Count int32 `json:"count" name:"count" title:"记录数"`
}

type NewcountByTypesTask

type NewcountByTypesTask struct {
	Uid   int64       `json:"uid" name:"uid" title:"用户ID"`
	Ids   interface{} `json:"ids,omitempty" name:"ids" title:"ID,多个逗号分割"`
	Type  interface{} `json:"type,omitempty" name:"type" title:"类型, 多个逗号分割"`
	Fid   interface{} `json:"fid,omitempty" name:"fid" title:"消息来源ID , 多个逗号分割"`
	Iid   interface{} `json:"iid,omitempty" name:"iid" title:"消息来源项ID , 多个逗号分割"`
	Q     interface{} `json:"q,omitempty" name:"q" title:"模糊匹配关键字"`
	TopId int64       `json:"topId" name:"topid" title:"顶部ID"`
}

func (*NewcountByTypesTask) GetName

func (T *NewcountByTypesTask) GetName() string

func (*NewcountByTypesTask) GetTitle

func (T *NewcountByTypesTask) GetTitle() string

type NewcountTask

type NewcountTask struct {
	Uid   int64       `json:"uid" name:"uid" title:"用户ID"`
	Ids   interface{} `json:"ids,omitempty" name:"ids" title:"ID,多个逗号分割"`
	Type  interface{} `json:"type,omitempty" name:"type" title:"类型, 多个逗号分割"`
	Fid   interface{} `json:"fid,omitempty" name:"fid" title:"消息来源ID , 多个逗号分割"`
	Iid   interface{} `json:"iid,omitempty" name:"iid" title:"消息来源项ID , 多个逗号分割"`
	Q     interface{} `json:"q,omitempty" name:"q" title:"模糊匹配关键字"`
	TopId int64       `json:"topId" name:"topid" title:"顶部ID"`
}

func (*NewcountTask) GetName

func (T *NewcountTask) GetName() string

func (*NewcountTask) GetTitle

func (T *NewcountTask) GetTitle() string

type Notice

type Notice struct {
	db.Object
	Type    int32       `json:"type" name:"type" title:"通知类型" index:"ASC"`
	Fid     int64       `json:"fid" name:"fid" title:"消息来源ID" index:"ASC"`
	Iid     int64       `json:"iid" name:"iid" title:"消息来源项ID" index:"ASC"`
	Uid     int64       `json:"uid" name:"uid" title:"用户ID" index:"ASC"`
	Body    string      `json:"body" name:"body" title:"通知内容" length:"-1"`
	Options interface{} `json:"options,omitempty" name:"options" title:"其他数据" length:"-1"`
	Ctime   int64       `json:"ctime" name:"ctime" title:"创建时间"`
}

func (*Notice) GetName

func (O *Notice) GetName() string

func (*Notice) GetTitle

func (O *Notice) GetTitle() string

type QueryData

type QueryData struct {
	Items []*Notice `json:"items,omitempty" name:"items" title:"通知"`
	Page  *TopPage  `json:"page,omitempty" name:"page" title:"分页"`
}

type QueryDataPage

type QueryDataPage struct {
	P     int32 `json:"p,omitempty" title:"分页位置"`
	N     int32 `json:"n,omitempty" title:"单页记录数"`
	Count int32 `json:"count,omitempty" title:"总页数"`
	Total int32 `json:"total,omitempty" title:"总记录数"`
}

type QueryTask

type QueryTask struct {
	Uid   int64       `json:"uid" name:"uid" title:"用户ID"`
	Ids   interface{} `json:"ids,omitempty" name:"ids" title:"ID,多个逗号分割"`
	Type  interface{} `json:"type,omitempty" name:"type" title:"类型, 多个逗号分割"`
	Fid   interface{} `json:"fid,omitempty" name:"fid" title:"消息来源ID , 多个逗号分割"`
	Iid   interface{} `json:"iid,omitempty" name:"iid" title:"消息来源项ID , 多个逗号分割"`
	Q     interface{} `json:"q,omitempty" name:"q" title:"模糊匹配关键字"`
	TopId interface{} `json:"topId,omitempty" name:"topid" title:"顶部ID"`
	P     interface{} `json:"p,omitempty" name:"p" title:"分页位置, 从1开始, 0 不处理分页"`
	N     interface{} `json:"n,omitempty" name:"n" title:"分页大小,默认 20"`
}

func (*QueryTask) GetName

func (T *QueryTask) GetName() string

func (*QueryTask) GetTitle

func (T *QueryTask) GetTitle() string

type RmTask

type RmTask struct {
	Id  int64 `json:"id" name:"id" title:"ID"`
	Uid int64 `json:"uid" name:"uid" title:"用户ID"`
}

func (*RmTask) GetName

func (T *RmTask) GetName() string

func (*RmTask) GetTitle

func (T *RmTask) GetTitle() string

type Service

type Service struct {
}

func (*Service) Clean

func (S *Service) Clean(app micro.IContext, task *CleanTask) (interface{}, error)

func (*Service) CleanByTypes

func (S *Service) CleanByTypes(app micro.IContext, task *CleanByTypesTask) (interface{}, error)

func (*Service) Count

func (S *Service) Count(app micro.IContext, task *CountTask) (*CountData, error)

func (*Service) Create

func (S *Service) Create(app micro.IContext, task *CreateTask) (*Notice, error)

func (*Service) Get

func (S *Service) Get(app micro.IContext, task *GetTask) (*Notice, error)

func (*Service) GetName

func (S *Service) GetName() string

func (*Service) GetTitle

func (S *Service) GetTitle() string

func (*Service) Newcount

func (S *Service) Newcount(app micro.IContext, task *NewcountTask) (*CountData, error)

func (*Service) NewcountByTypes

func (S *Service) NewcountByTypes(app micro.IContext, task *NewcountByTypesTask) (*NewCountByTypesData, error)

func (*Service) Query

func (S *Service) Query(app micro.IContext, task *QueryTask) (*QueryData, error)

func (*Service) Rm

func (S *Service) Rm(app micro.IContext, task *RmTask) (*Notice, error)

func (*Service) Set

func (S *Service) Set(app micro.IContext, task *SetTask) (*Notice, error)

type SetTask

type SetTask struct {
	Id      int64       `json:"id" name:"id" title:"分组ID"`
	Uid     int64       `json:"uid" name:"uid" title:"用户ID"`
	Type    interface{} `json:"type,omitempty" name:"type" title:"通知类型"`
	Fid     interface{} `json:"fid,omitempty" name:"fid" title:"消息来源ID"`
	Iid     interface{} `json:"iid,omitempty" name:"iid" title:"消息来源项ID"`
	Body    interface{} `json:"body,omitempty" name:"body" title:"通知内容"`
	Options interface{} `json:"options,omitempty" name:"options" title:"其他数据 JSON 叠加数据"`
}

func (*SetTask) GetName

func (T *SetTask) GetName() string

func (*SetTask) GetTitle

func (T *SetTask) GetTitle() string

type TopPage

type TopPage struct {
	P     int32 `json:"p" name:"p" title:"分页位置"`
	N     int32 `json:"n" name:"n" title:"单页记录数"`
	Count int32 `json:"count" name:"count" title:"总页数"`
	Total int32 `json:"total" name:"total" title:"总记录数"`
	TopId int64 `json:"topId" name:"topid" title:"顶部ID"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL