github.com/SupenBysz/gf-admin-community@v0.7.4/sys_service/sys_invite.go (about) 1 // ================================================================================ 2 // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 // You can delete these comments if you wish manually maintain this interface file. 4 // ================================================================================ 5 6 package sys_service 7 8 import ( 9 "context" 10 11 "github.com/SupenBysz/gf-admin-community/sys_model" 12 "github.com/SupenBysz/gf-admin-community/sys_model/sys_enum" 13 "github.com/SupenBysz/gf-admin-community/sys_model/sys_hook" 14 "github.com/kysion/base-library/base_model" 15 ) 16 17 type ( 18 ISysInvite interface { 19 InstallInviteStateHook(actionType sys_enum.InviteState, hookFunc sys_hook.InviteStateHookFunc) 20 // GetInviteById 根据id获取邀约 21 GetInviteById(ctx context.Context, id int64) (*sys_model.InviteRes, error) 22 // QueryInviteList 查询邀约|列表 23 QueryInviteList(ctx context.Context, filter *base_model.SearchParams) (*sys_model.InviteListRes, error) 24 // CreateInvite 创建邀约信息 25 CreateInvite(ctx context.Context, info *sys_model.Invite) (*sys_model.InviteRes, error) 26 // DeleteInvite 删除邀约信息 27 DeleteInvite(ctx context.Context, inviteId int64) (bool, error) 28 // SetInviteState 修改邀约信息状态 29 SetInviteState(ctx context.Context, id int64, state int) (bool, error) 30 // SetInviteNumber 修改邀约剩余次数 31 SetInviteNumber(ctx context.Context, id int64, num int, isAdd bool) (res bool, err error) 32 } 33 ) 34 35 var ( 36 localSysInvite ISysInvite 37 ) 38 39 func SysInvite() ISysInvite { 40 if localSysInvite == nil { 41 panic("implement not found for interface ISysInvite, forgot register?") 42 } 43 return localSysInvite 44 } 45 46 func RegisterSysInvite(i ISysInvite) { 47 localSysInvite = i 48 }