inbox

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
View Source
const GroupBy_fuid = "fuid"
View Source
const GroupBy_mid = "mid"

Variables

This section is empty.

Functions

func Prefix

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

Types

type AddTask

type AddTask struct {
	Uid     int64       `json:"uid" name:"uid" title:"用户ID"`
	Type    int64       `json:"type" name:"type" title:"类型"`
	Mid     int64       `json:"mid" name:"mid" title:"内容ID"`
	Iid     interface{} `json:"iid,omitempty" name:"iid" title:"内容项ID"`
	Fuid    int64       `json:"fuid" name:"fuid" title:"发布者ID"`
	Options interface{} `json:"options,omitempty" name:"options" title:"其他数据 JSON 叠加数据"`
	Ctime   interface{} `json:"ctime,omitempty" name:"ctime" title:"创建时间"`
}

func (*AddTask) GetName

func (T *AddTask) GetName() string

func (*AddTask) GetTitle

func (T *AddTask) GetTitle() string

type CleanTask

type CleanTask struct {
	Uid  int64       `json:"uid" name:"uid" title:"用户ID"`
	Type interface{} `json:"type,omitempty" name:"type" title:"类型 type1 | type2 | type3"`
	Mid  interface{} `json:"mid,omitempty" name:"mid" title:"内容ID"`
	Fuid interface{} `json:"fuid,omitempty" name:"fuid" 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 CountTask

type CountTask struct {
	Uid     int64       `json:"uid" name:"uid" title:"用户ID"`
	Fuid    interface{} `json:"fuid,omitempty" name:"fuid" title:"发布者ID"`
	Type    interface{} `json:"type,omitempty" name:"type" title:"类型 type1 | type2 | type3"`
	Mid     interface{} `json:"mid,omitempty" name:"mid" title:"内容ID"`
	Iid     interface{} `json:"iid,omitempty" name:"iid" title:"内容项ID"`
	TopId   interface{} `json:"topId,omitempty" name:"topid" title:"顶部ID"`
	GroupBy interface{} `json:"groupBy,omitempty" name:"groupby" title:"分组"`
}

func (*CountTask) GetName

func (T *CountTask) GetName() string

func (*CountTask) GetTitle

func (T *CountTask) 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 Inbox

type Inbox struct {
	db.Object
	Type    int64       `json:"type" name:"type" title:"收件类型" index:"desc"`
	Uid     int64       `json:"uid" name:"uid" title:"接受者ID" index:"desc"`
	Fuid    int64       `json:"fuid" name:"fuid" title:"发布者ID" index:"desc"`
	Mid     int64       `json:"mid" name:"mid" title:"内容ID" index:"desc"`
	Iid     int64       `json:"iid" name:"iid" title:"内容项ID" index:"desc"`
	Options interface{} `json:"options,omitempty" name:"options" title:"其他数据" length:"-1"`
	Ctime   int64       `json:"ctime" name:"ctime" title:"创建时间" index:"desc"`
}

func (*Inbox) GetName

func (O *Inbox) GetName() string

func (*Inbox) GetTitle

func (O *Inbox) GetTitle() string

type InboxCountData

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

type InboxQueryData

type InboxQueryData struct {
	Items []*Inbox `json:"items,omitempty" name:"items" title:"收件"`
	Page  *TopPage `json:"page,omitempty" name:"page" title:"分页"`
}

type NewInboxCountData

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

type NewcountTask

type NewcountTask struct {
	Uid     int64       `json:"uid" name:"uid" title:"用户ID"`
	Fuid    interface{} `json:"fuid,omitempty" name:"fuid" title:"发布者ID"`
	Type    interface{} `json:"type,omitempty" name:"type" title:"类型 type1 | type2 | type3"`
	TopId   int64       `json:"topId" name:"topid" title:"顶部ID"`
	GroupBy interface{} `json:"groupBy,omitempty" name:"groupby" title:"分组"`
}

func (*NewcountTask) GetName

func (T *NewcountTask) GetName() string

func (*NewcountTask) GetTitle

func (T *NewcountTask) GetTitle() string

type Page

type Page 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:"总记录数"`
}

type QueryTask

type QueryTask struct {
	Uid     int64       `json:"uid" name:"uid" title:"用户ID"`
	Fuid    interface{} `json:"fuid,omitempty" name:"fuid" title:"发布者ID"`
	Type    interface{} `json:"type,omitempty" name:"type" title:"类型 type1 | type2 | type3"`
	Mid     interface{} `json:"mid,omitempty" name:"mid" title:"内容ID"`
	Iid     interface{} `json:"iid,omitempty" name:"iid" title:"内容项ID"`
	P       interface{} `json:"p,omitempty" name:"p" title:"分页位置, 从1开始, 0 不处理分页"`
	N       interface{} `json:"n,omitempty" name:"n" title:"分页大小,默认 20"`
	TopId   interface{} `json:"topId,omitempty" name:"topid" title:"顶部ID"`
	GroupBy interface{} `json:"groupBy,omitempty" name:"groupby" title:"分组"`
}

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) Add

func (S *Service) Add(app micro.IContext, task *AddTask) (*Inbox, error)

func (*Service) Clean

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

func (*Service) Count

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

func (*Service) Get

func (S *Service) Get(app micro.IContext, task *GetTask) (*Inbox, 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) (*NewInboxCountData, error)

func (*Service) Query

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

func (*Service) Rm

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

func (*Service) Set

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

func (*Service) UserCount

func (S *Service) UserCount(app micro.IContext, task *UserCountTask) (*UserCountData, error)

func (*Service) UserQuery

func (S *Service) UserQuery(app micro.IContext, task *UserQueryTask) (*UserQueryData, error)

type SetTask

type SetTask struct {
	Id      int64       `json:"id" name:"id" title:"ID"`
	Uid     int64       `json:"uid" name:"uid" title:"用户ID"`
	Fuid    interface{} `json:"fuid,omitempty" name:"fuid" title:"发布者ID"`
	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"`
}

type User

type User struct {
	Uid   int64 `json:"uid" name:"uid" title:"用户ID"`
	Mid   int64 `json:"mid" name:"mid" title:"内容ID"`
	Iid   int64 `json:"iid" name:"iid" title:"内容项ID"`
	Ctime int64 `json:"ctime" name:"ctime" title:"最后时间"`
	Fuid  int64 `json:"fuid" name:"fuid" title:"发布者ID"`
}

type UserCountData

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

type UserCountTask

type UserCountTask struct {
	Type int64       `json:"type" name:"type" title:"类型"`
	Mid  interface{} `json:"mid,omitempty" name:"mid" title:"内容ID"`
	Iid  interface{} `json:"iid,omitempty" name:"iid" title:"内容项ID"`
}

func (*UserCountTask) GetName

func (T *UserCountTask) GetName() string

func (*UserCountTask) GetTitle

func (T *UserCountTask) GetTitle() string

type UserQueryData

type UserQueryData struct {
	Items []*User `json:"items,omitempty" name:"items" title:"用户"`
	Page  *Page   `json:"page,omitempty" name:"page" title:"分页"`
}

type UserQueryTask

type UserQueryTask struct {
	Type int64       `json:"type" name:"type" title:"类型"`
	Mid  interface{} `json:"mid,omitempty" name:"mid" title:"内容ID"`
	Iid  interface{} `json:"iid,omitempty" name:"iid" title:"内容项ID"`
	P    interface{} `json:"p,omitempty" name:"p" title:"分页位置, 从1开始, 0 不处理分页"`
	N    interface{} `json:"n,omitempty" name:"n" title:"分页大小,默认 20"`
}

func (*UserQueryTask) GetName

func (T *UserQueryTask) GetName() string

func (*UserQueryTask) GetTitle

func (T *UserQueryTask) GetTitle() string

Jump to

Keyboard shortcuts

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