Documentation ¶
Index ¶
- Constants
- Variables
- type APIActivity
- func (a APIActivity) CanCancel() bool
- func (a APIActivity) GetIdFromQueueV(index int) int32
- func (a APIActivity) HasBegun() bool
- func (a APIActivity) InQueueV(uid int32) bool
- func (a APIActivity) IsPlanner(uid int32) bool
- func (a APIActivity) NotEnough(uid int32, total int) bool
- func (a APIActivity) OverQuota(total int32) bool
- func (a *APIActivity) Settle(fee int32)
- type APIActivityUser
- type APIGroup
- func (g APIGroup) AddActivity(aid int32)
- func (g *APIGroup) ExistsActivity(aid int32) bool
- func (g APIGroup) IsManager(uid int32) bool
- func (g APIGroup) IsMember(uid int32) bool
- func (g APIGroup) IsOwner(uid int32) bool
- func (g APIGroup) ManagerCount() int
- func (g APIGroup) NotIn(uid int32) bool
- func (g APIGroup) NotInPendingV(index int) bool
- func (g *APIGroup) OutDB()
- func (g *APIGroup) Promote(uid int32) bool
- func (g *APIGroup) Remove(uid int32) bool
- func (g *APIGroup) RemoveActivity(aid int32) bool
- func (g *APIGroup) Transfer(uid, mid int32) bool
- type APIGroupApplication
- type APIGroupMember
- type APIMember
- type APIUser
- type BodyObject
- type Player
- type Session
Constants ¶
View Source
const ( TABLE_USER = "user" TABLE_GROUP = "group" TABLE_ACTIVITY = "activity" )
Variables ¶
View Source
var TimeFormat = "2006-01-02 15:04:05"
View Source
var TimeFormatE = "2006-01-02T15:04:05Z07:00"
Functions ¶
This section is empty.
Types ¶
type APIActivity ¶
type APIActivity struct { ID int32 `json:"id"` UserID int32 `json:"user_id"` Kind int32 `json:"kind"` // 活动分类:1羽毛球,2篮球,3足球,4聚餐... Type int32 `json:"type"` // 活动类型:1全局保护,2全局公开,3群组 Status int32 `json:"status"` // 活动状态:1进行中,2正常结算完成,3手动终止 Quota int32 `json:"quota"` // 名额 GroupID int32 `json:"group_id"` // 群组ID Ahead int32 `json:"ahead"` // 提前取消报名限制(小时) FeeType int32 `json:"fee_type"` // 结算方式:1免费,2活动前,3活动后男女平均,4活动后男固定|女平摊,5活动后男平摊|女固定 FeeMale int32 `json:"fee_male"` // 男费用 FeeFemale int32 `json:"fee_female"` // 女费用 Title string `json:"title"` Remark string `json:"remark"` Addr string `json:"addr"` BeginAt time.Time `json:"begin_at"` EndAt time.Time `json:"end_at"` Queue []int32 `json:"queue"` // 报名队列 }
func (APIActivity) GetIdFromQueueV ¶
func (a APIActivity) GetIdFromQueueV(index int) int32
GetIdFromQueueV 根据索引从报名队列中获取ID
func (APIActivity) NotEnough ¶
func (a APIActivity) NotEnough(uid int32, total int) bool
NotEnough 要取消报名的数量超过已经报名的数量
func (APIActivity) OverQuota ¶
func (a APIActivity) OverQuota(total int32) bool
OverQuota 报名的人数超过候补的限制,避免乱报名,如带100000人报名
type APIActivityUser ¶
type APIGroup ¶
type APIGroup struct { ID int32 `json:"id"` Level int `json:"level"` Scores int `json:"scores"` Name string `json:"name"` Logo string `json:"logo"` Notice string `json:"notice"` Addr string `json:"addr"` Activities []int32 `json:"activities"` Pending []int32 `json:"pending"` // 申请入群列表 Members []APIMember `json:"members"` }
func (*APIGroup) ExistsActivity ¶
ExistsActivity 是否存在活动
func (APIGroup) NotInPendingV ¶
NotInPendingV 不在申请列表
func (*APIGroup) RemoveActivity ¶
RemoveActivity 移除活动
type APIGroupApplication ¶
type APIGroupMember ¶
type APIGroupMember struct { ID int32 `json:"id"` // 成员id GroupID int32 `json:"group_id"` // 群组id UserID int32 `json:"user_id"` // 用户id Scores int32 `json:"scores"` // 积分 Position int32 `json:"position"` // 群组职位 Alias_ string `json:"alias"` // 群组中的昵称 Avatar string `json:"avatar"` // 头像 EnterAt time.Time `json:"enter_at"` // 进入群组时间 }
type APIMember ¶
type APIMember struct { ID int32 `json:"id"` UserID int32 `json:"user_id"` GroupID int32 `json:"group_id"` Scores int32 `json:"scores"` Position int32 `json:"position"` Sex int32 `json:"sex"` Avatar string `json:"avatar"` EnterAt time.Time `json:"enter_at"` WxNick string `json:"wx_nick"` Nick string `json:"nick"` }
type APIUser ¶
type APIUser struct { ID int32 `json:"id"` Sex int `json:"sex"` Scores int `json:"scores"` Username string `json:"username"` Token string `json:"token"` WxToken string `json:"wx_token"` WxNick string `json:"wx_nick"` Nick string `json:"nick"` Ip string `json:"ip"` Phone string `json:"phone"` Email string `json:"email"` Groups []int32 `json:"groups"` Activities []int32 `json:"activities"` }
type BodyObject ¶
type BodyObject struct { Token string `json:"token" form:"token"` // 用户 Username string `json:"username" form:"username"` Password string `json:"password" form:"password"` Nick string `json:"nick" form:"nick"` Sex uint `json:"sex" form:"sex"` // 分页 Page uint `json:"page" form:"page"` Num uint `json:"num" form:"num"` // 活动 GroupId uint64 `json:"group_id" form:"group_id"` Kind uint `json:"kind" form:"kind"` Type uint `json:"type" form:"type"` Status uint `json:"status" form:"status"` Quota uint `json:"quota" form:"quota"` Title string `json:"title" form:"title"` Remark string `json:"remark" form:"remark"` Fee uint `json:"fee" form:"fee"` FeeType uint `json:"fee_type" form:"fee_type"` FeeMale uint `json:"fee_male" form:"fee_male"` FeeFemale uint `json:"fee_female" form:"fee_female"` Ahead uint `json:"ahead" form:"ahead"` BeginAt string `json:"begin_at" form:"begin_at"` EndAt string `json:"end_at" form:"end_at"` MaleCount uint `json:"male_count" form:"male_count"` FemaleCount uint `json:"female_count" form:"female_count"` // 群组 GroupName string `json:"name" form:"name"` Logo string `json:"logo" form:"logo"` Addr string `json:"addr" form:"addr"` Notice string `json:"notice" form:"notice"` Pass bool `json:"pass" form:"pass"` Index uint `json:"index" form:"index"` }
func (*BodyObject) Reset ¶
func (b *BodyObject) Reset()
Click to show internal directories.
Click to hide internal directories.