Documentation ¶
Overview ¶
Package Coins
Index ¶
- Variables
- func ChangeProtectStatus(sdb *Scoredb, uid int64, statusID int64) (err error)
- func CheckUserCoins(coins int) bool
- func GetHourWord(t time.Time) (reply string)
- func GetLevel(count int) int
- func InsertOrUpdateScoreByUID(sdb *Scoredb, uid int64, score int) (err error)
- func InsertOrUpdateSignInCountByUID(sdb *Scoredb, uid int64, count int) (err error)
- func InsertUserCoins(sdb *Scoredb, uid int64, coins int) (err error)
- func UpdateUserSignInValue(sdb *Scoredb, uid int64) (err error)
- func UpdateUserTime(sdb *Scoredb, counttime int, times string) (err error)
- func UpdateWagerUserStatus(sdb *Scoredb, uid int64, time int64, coins int64) (err error)
- func WagerCoinsInsert(sdb *Scoredb, modifyCoins int, winner int, expected int) (err error)
- type Globaltable
- type ProtectModeIndex
- type Scoredb
- type Scoretable
- type Signintable
- type WagerTable
- type WagerUserInputTable
Constants ¶
This section is empty.
Variables ¶
View Source
var (
LevelArray = [...]int{0, 1, 2, 5, 10, 20, 35, 55, 75, 100, 120, 180, 260, 360, 480, 600}
)
Functions ¶
func ChangeProtectStatus ¶
func CheckUserCoins ¶
func GetHourWord ¶
func InsertOrUpdateScoreByUID ¶
InsertOrUpdateScoreByUID 插入或更新打卡累计 初始化更新临时保存
func InsertOrUpdateSignInCountByUID ¶
InsertOrUpdateSignInCountByUID 插入或更新签到次数
func UpdateUserSignInValue ¶
func UpdateWagerUserStatus ¶
UpdateWagerUserStatus update WagerUserStatus
Types ¶
type Globaltable ¶
Globaltable 总体结构体
func GetCurrentCount ¶
func GetCurrentCount(sdb *Scoredb, times string) (si Globaltable)
GetCurrentCount 取得现在的人数
type ProtectModeIndex ¶
type ProtectModeIndex struct { UID int64 `gorm:"column:uid;primary_key"` Time int64 `gorm:"column:time;default:0"` Status int64 `gorm:"column:status;default:0"` // 1 mean enabled || else none. }
ProtectModeIndex Protect User From taking part in games, user can only change their mode in 24h.
func GetProtectModeStatus ¶
func GetProtectModeStatus(sdb *Scoredb, uid int64) (s ProtectModeIndex)
GetProtectModeStatus Get Status
func (ProtectModeIndex) TableName ¶
func (ProtectModeIndex) TableName() string
type Scoretable ¶
type Scoretable struct { UID int64 `gorm:"column:uid;primary_key"` Score int `gorm:"column:score;default:0"` }
Scoretable 分数结构体
type Signintable ¶
type Signintable struct { UID int64 `gorm:"column:uid;primary_key"` Count int `gorm:"column:count;default:0"` Coins int `gorm:"column:coins;default:0"` SignUpdated int64 `gorm:"column:sign;default:0"` // fix : score shown error. UpdatedAt time.Time }
Signintable 签到结构体
func GetSignInByUID ¶
func GetSignInByUID(sdb *Scoredb, uid int64) (si Signintable)
GetSignInByUID 取得签到次数
func GetUserIsSignInToday ¶
func GetUserIsSignInToday(sdb *Scoredb, uid int64) (getStat bool, si Signintable)
GetUserIsSignInToday Check user is signin today.
type WagerTable ¶
type WagerTable struct { Wagercount int `gorm:"column:wagercount;default:0"` Expected int `gorm:"column:expected;default:0"` Winner int `gorm:"column:winner;default:0"` }
WagerTable wager Table Struct
func GetWagerStatus ¶
func GetWagerStatus(sdb *Scoredb) (si WagerTable)
GetWagerStatus Get Status (total)
func (WagerTable) TableName ¶
func (WagerTable) TableName() string
type WagerUserInputTable ¶
type WagerUserInputTable struct { UID int64 `gorm:"column:uid;primary_key"` InputCountNumber int64 `gorm:"column:coin;default:0"` UserExistedStoppedTime int64 `gorm:"column:time;default:0"` }
WagerUserInputTable Get Wager Table User Input In Times
func GetWagerUserStatus ¶
func GetWagerUserStatus(sdb *Scoredb, uid int64) (si WagerUserInputTable)
GetWagerUserStatus Get Status
func (WagerUserInputTable) TableName ¶
func (WagerUserInputTable) TableName() string
Click to show internal directories.
Click to hide internal directories.