Documentation ¶
Index ¶
- type Dao
- func (dao *Dao) Checkin(ctx context.Context, t time.Time, gid, uid uint64) (todayFirstCheckin bool, err error)
- func (dao *Dao) CreateGuildUser(ctx context.Context, gid, uid int64) (int64, error)
- func (dao *Dao) GetGuildUserByGidAndUid(ctx context.Context, gid, uid int64) (*GuildUser, error)
- func (dao *Dao) GetUserCheckinInfo(ctx context.Context, t time.Time, gid, uid uint64) (*GuildUserCheckin, error)
- func (dao *Dao) ListUserCheckinInfos(ctx context.Context, gid, uid uint64) ([]GuildUserCheckin, error)
- type GuildUser
- type GuildUserCheckin
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dao ¶
type Dao struct {
// contains filtered or unexported fields
}
func (*Dao) Checkin ¶
func (dao *Dao) Checkin(ctx context.Context, t time.Time, gid, uid uint64) (todayFirstCheckin bool, err error)
Checkin 用户签到
func (*Dao) CreateGuildUser ¶
CreateGuildUser 创建频道用户信息
func (*Dao) GetGuildUserByGidAndUid ¶
GetGuildUserByGidAndUid 根据频道id和用户id获取用户信息 当获取不到数据时返回 nil, nil
func (*Dao) GetUserCheckinInfo ¶
func (dao *Dao) GetUserCheckinInfo(ctx context.Context, t time.Time, gid, uid uint64) (*GuildUserCheckin, error)
GetUserCheckinInfo 获取用户签到信息 当获取不到数据时返回 nil, nil
func (*Dao) ListUserCheckinInfos ¶
func (dao *Dao) ListUserCheckinInfos(ctx context.Context, gid, uid uint64) ([]GuildUserCheckin, error)
ListUserCheckinInfos 获取用户历史签到信息
type GuildUser ¶
type GuildUser struct { ID int64 `db:"id"` GuildID uint64 `db:"guild_id"` UserID uint64 `db:"user_id"` ContCheckinCnt int `db:"cont_checkin_cnt"` Experience int `db:"experience"` CreateTime time.Time `db:"create_time"` UpdateTime time.Time `db:"update_time"` }
GuildUser guild_users 表结构体
type GuildUserCheckin ¶
type GuildUserCheckin struct { ID int64 `db:"id"` GuildID uint64 `db:"guild_id"` UserID uint64 `db:"user_id"` Yearmonth int `db:"yearmonth"` Days uint32 `db:"days"` CreateTime time.Time `db:"create_time"` UpdateTime time.Time `db:"update_time"` }
GuildUserCheckin guild_users_checkin 表结构体
Click to show internal directories.
Click to hide internal directories.