Documentation ¶
Index ¶
- Variables
- func GetCardLevelAndAmountPerSec(card CardMaster, totalExp int64) (int, int)
- func InitAllGachaItemMaster()
- func InitCardMaster()
- func InitUserPresentAllMaster()
- func PresentBulkCreate(userPresents *[]UserPresent) error
- func PresentReceivedBulkCreate(userPresents *[]UserPresent) error
- func UserCardBulkCreate(userCards *[]UserCard) error
- func UserItemBulkCreate(userItems *[]UserItem) error
- func UserPresentAllReceivedHistoryBulkCreate(UserPresentAllReceivedHistories *[]UserPresentAllReceivedHistory) error
- type CardMaster
- type CardMasters
- type ExpItemMaster
- type ExpItemMasters
- type GachaAllItemMasters
- type GachaData
- type GachaItemMaster
- type GachaMaster
- type GachaMasters
- type Json
- type JsonArray
- type JsonPlatform
- type JsonValidate
- type JsonValidates
- type LoginBonusMaster
- type LoginBonusRewardMaster
- type LoginBonusRewardMasters
- type Platform
- type PresentAllMaster
- type PresentAllMasters
- type User
- type UserBan
- type UserCard
- type UserDeck
- type UserDevice
- type UserItem
- type UserLoginBonus
- type UserPresent
- type UserPresentAllMaster
- type UserPresentAllReceivedHistory
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Db *sqlx.DB
)
View Source
var UserPresentAllMasters []UserPresentAllMaster
Functions ¶
func GetCardLevelAndAmountPerSec ¶
func GetCardLevelAndAmountPerSec(card CardMaster, totalExp int64) (int, int)
func InitAllGachaItemMaster ¶
func InitAllGachaItemMaster()
func InitCardMaster ¶
func InitCardMaster()
func InitUserPresentAllMaster ¶
func InitUserPresentAllMaster()
func PresentBulkCreate ¶
func PresentBulkCreate(userPresents *[]UserPresent) error
func PresentReceivedBulkCreate ¶
func PresentReceivedBulkCreate(userPresents *[]UserPresent) error
func UserCardBulkCreate ¶
func UserItemBulkCreate ¶
func UserPresentAllReceivedHistoryBulkCreate ¶
func UserPresentAllReceivedHistoryBulkCreate(UserPresentAllReceivedHistories *[]UserPresentAllReceivedHistory) error
Types ¶
type CardMaster ¶
type CardMaster struct { CardID int `json:"id" db:"id"` BaseExpPerLevel int `json:"baseExpPerLevel" db:"base_exp_per_level"` MaxAmountPerSec int `json:"maxAmountPerSec" db:"max_amount_per_sec"` BaseAmountPerSec int `json:"amountPerSec" db:"amount_per_sec"` MaxLevel int `json:"maxLevel" db:"max_level"` }
func GetCardMaster ¶
func GetCardMaster(cardID int) CardMaster
type CardMasters ¶
type CardMasters []CardMaster
func GetCardMasters ¶
func GetCardMasters() CardMasters
func (CardMasters) Commit ¶
func (cm CardMasters) Commit(outdir string) error
func (CardMasters) Rename ¶
func (cm CardMasters) Rename(fileName string) error
type ExpItemMaster ¶
type ExpItemMasters ¶
type ExpItemMasters []ExpItemMaster
func GetExpItemMaster ¶
func GetExpItemMaster() ExpItemMasters
func (ExpItemMasters) Commit ¶
func (eim ExpItemMasters) Commit(outdir string) error
func (ExpItemMasters) Rename ¶
func (eim ExpItemMasters) Rename(fileName string) error
type GachaAllItemMasters ¶
type GachaAllItemMasters []GachaData
func GetGachaAllItemMasters ¶
func GetGachaAllItemMasters() GachaAllItemMasters
func (GachaAllItemMasters) Commit ¶
func (gaim GachaAllItemMasters) Commit(outdir string) error
func (GachaAllItemMasters) Rename ¶
func (gaim GachaAllItemMasters) Rename(fileName string) error
type GachaData ¶
type GachaData struct { Gacha GachaMaster `json:"gacha"` GachaItem []GachaItemMaster `json:"gachaItemList"` }
type GachaItemMaster ¶
type GachaItemMaster struct { ID int64 `json:"id" db:"id"` GachaID int64 `json:"gachaId" db:"gacha_id"` ItemType int `json:"itemType" db:"item_type"` ItemID int `json:"itemId" db:"item_id"` Amount int `json:"amount" db:"amount"` Weight int `json:"weight" db:"weight"` CreatedAt int64 `json:"createdAt" db:"created_at"` }
func DrawGacha ¶
func DrawGacha(gachaID int) GachaItemMaster
func DrawManyGacha ¶
func DrawManyGacha(gachaID int, drawCount int) []GachaItemMaster
type GachaMaster ¶
type GachaMasters ¶
type GachaMasters []GachaMaster
type JsonPlatform ¶
type JsonPlatform []*Platform
func (*JsonPlatform) Commit ¶
func (j *JsonPlatform) Commit(outdir string) error
func (*JsonPlatform) Rename ¶
func (j *JsonPlatform) Rename(fileName string) error
type JsonValidate ¶
type JsonValidate struct { UserType string `json:"user_type"` UserID int64 `json:"user_id"` ViewerID string `json:"viewer_id"` UserLoginBonuses []UserLoginBonus `json:"userLoginBonuses,omitempty"` UserLoginAppendPresents []UserPresent `json:"userLoginAppendPresents,omitempty"` JsonUser User `json:"user,omitempty"` UserDeck UserDeck `json:"userDeck,omitempty"` UserDevices []UserDevice `json:"userDevices,omitempty"` TotalAmountPerSec int64 `json:"totalAmountPerSec,omitempty"` GetItemList []UserItem `json:"userItem,omitempty"` UserCards []UserCard `json:"userCard,omitempty"` UserPresents []UserPresent `json:"userPresent,omitempty"` UserAllPresents []UserPresent `json:"userAllPresents,omitempty"` UserPresentAllReceiveHistories []UserPresentAllReceivedHistory `json:"userPresentAllReceivedHistory,omitempty"` }
type JsonValidates ¶
type JsonValidates []*JsonValidate
func (*JsonValidates) Commit ¶
func (j *JsonValidates) Commit(outdir string) error
func (*JsonValidates) Rename ¶
func (j *JsonValidates) Rename(fileName string) error
type LoginBonusMaster ¶
type LoginBonusMaster struct { ID int64 `db:"id"` LoginBonusType int `db:"login_bonus_type"` StartAt int64 `db:"start_at"` EndAt int64 `db:"end_at"` ColumnCount int `db:"column_count"` Looped int `db:"looped"` CreatedAt int64 `db:"created_at"` }
func GetLoginBonusMasters ¶
func GetLoginBonusMasters() []LoginBonusMaster
type LoginBonusRewardMaster ¶
type LoginBonusRewardMaster struct { ID int64 `json:"id" db:"id"` LoginBonusID int64 `json:"loginBonusId" db:"login_bonus_id"` RewardSequence int `json:"rewardSequence" db:"reward_sequence"` ItemType int `json:"itemType" db:"item_type"` ItemID int64 `json:"itemId" db:"item_id"` Amount int64 `json:"amount" db:"amount"` }
type LoginBonusRewardMasters ¶
type LoginBonusRewardMasters []LoginBonusRewardMaster
func GetLoginBonusRewardMaster ¶
func GetLoginBonusRewardMaster() LoginBonusRewardMasters
func (LoginBonusRewardMasters) Commit ¶
func (lbrm LoginBonusRewardMasters) Commit(outdir string) error
func (LoginBonusRewardMasters) Rename ¶
func (lbrm LoginBonusRewardMasters) Rename(fileName string) error
type PresentAllMaster ¶
type PresentAllMaster struct { ID int64 `json:"id" db:"id"` RegisteredStartAt int64 `json:"registeredStartAt" db:"registered_start_at"` RegisteredEndAt int64 `json:"registeredEndAt" db:"registered_end_at"` ItemType int `json:"itemType" db:"item_type"` ItemID int64 `json:"itemId" db:"item_id"` Amount int64 `json:"amount" db:"amount"` PresentMessage string `json:"presentMessage" db:"present_message"` CreatedAt int64 `json:"createdAt" db:"created_at"` }
type PresentAllMasters ¶
type PresentAllMasters []PresentAllMaster
func GetPresentAllMasters ¶
func GetPresentAllMasters() PresentAllMasters
func (PresentAllMasters) Commit ¶
func (pam PresentAllMasters) Commit(outdir string) error
func (PresentAllMasters) Rename ¶
func (pam PresentAllMasters) Rename(fileName string) error
type User ¶
type UserBan ¶
type UserCard ¶
type UserCard struct { ID int64 `db:"id"` UserID int64 `db:"user_id"` CardID int `db:"card_id"` AmountPerSec int `db:"amount_per_sec"` Level int `db:"level"` TotalExp int64 `db:"total_exp"` CreatedAt int64 `db:"created_at"` UpdatedAt int64 `db:"updated_at"` }
func NewUserCard ¶
type UserDeck ¶
type UserDeck struct { ID int64 `json:"id" db:"id"` UserID int64 `json:"userId" db:"user_id"` CardID1 int64 `json:"cardId1" db:"user_card_id_1"` CardID2 int64 `json:"cardId2" db:"user_card_id_2"` CardID3 int64 `json:"cardId3" db:"user_card_id_3"` CreatedAt int64 `json:"createdAt" db:"created_at"` UpdatedAt int64 `json:"updatedAt" db:"updated_at"` }
func NewUserDeck ¶
type UserDevice ¶
type UserDevice struct { ID int64 `db:"id"` UserID int64 `db:"user_id"` PlatformID string `db:"platform_id"` PlatformType int `db:"platform_type"` CreatedAt int64 `db:"created_at"` UpdatedAt int64 `db:"updated_at"` }
func NewUserDevice ¶
func NewUserDevice(i int64, user User, platformID string) UserDevice
func NewUserDeviceOther ¶
func NewUserDeviceOther(i int64, user User, platformID string, platformType int) UserDevice
func (UserDevice) Create ¶
func (u UserDevice) Create() error
type UserItem ¶
type UserItem struct { ID int64 `db:"id"` UserID int64 `db:"user_id"` ItemType int `db:"item_type"` ItemID int `db:"item_id"` Amount int `db:"amount"` CreatedAt int64 `db:"created_at"` UpdatedAt int64 `db:"updated_at"` }
func NewUserItem ¶
type UserLoginBonus ¶
type UserLoginBonus struct { ID int64 `json:"id" db:"id"` UserID int64 `json:"userId" db:"user_id"` LoginBonusID int `json:"loginBonusId" db:"login_bonus_id"` LastRewardSequence int `json:"lastRewardSequence" db:"last_reward_sequence"` LoopCount int `json:"loopCount" db:"loop_count"` CreatedAt int64 `json:"createdAt" db:"created_at"` UpdatedAt int64 `json:"updatedAt" db:"updated_at"` }
func NewUserLoginBonus ¶
func (UserLoginBonus) Create ¶
func (u UserLoginBonus) Create() error
type UserPresent ¶
type UserPresent struct { ID int64 `db:"id"` UserID int64 `db:"user_id"` SentAt int64 `db:"sent_at"` ItemType int `db:"item_type"` ItemID int `db:"item_id"` Amount int `db:"amount"` PresentMessage string `db:"present_message"` CreatedAt int64 `db:"created_at"` UpdatedAt int64 `db:"updated_at"` DeletedAt *int64 `db:"deleted_at"` }
func NewUserPresent ¶
func (UserPresent) Create ¶
func (u UserPresent) Create() error
func (UserPresent) ReceivedCreate ¶
func (u UserPresent) ReceivedCreate() error
type UserPresentAllMaster ¶
type UserPresentAllMaster struct { ID int `db:"id"` RegisteredStartAt int64 `db:"registered_start_at"` RegisteredEndAt int64 `db:"registered_end_at"` ItemType int `db:"item_type"` ItemID int `db:"item_id"` Amount int `db:"amount"` PresentMessage string `db:"present_message"` CreatedAt int64 `db:"created_at"` }
type UserPresentAllReceivedHistory ¶
type UserPresentAllReceivedHistory struct { ID int64 `json:"id" db:"id"` UserID int64 `json:"userId" db:"user_id"` PresentAllID int64 `json:"presentAllId" db:"present_all_id"` ReceivedAt int64 `json:"receivedAt" db:"received_at"` CreatedAt int64 `json:"createdAt" db:"created_at"` UpdatedAt int64 `json:"updatedAt" db:"updated_at"` DeletedAt *int64 `json:"deletedAt,omitempty" db:"deleted_at"` }
func (UserPresentAllReceivedHistory) Create ¶
func (u UserPresentAllReceivedHistory) Create() error
func (UserPresentAllReceivedHistory) CreateDeleted ¶
func (u UserPresentAllReceivedHistory) CreateDeleted() error
Source Files ¶
- cardmaster.go
- expitemmaster.go
- gachaitemmaster.go
- global.go
- json.go
- jsonPlatform.go
- jsonvalidate.go
- loginbonusmaster.go
- loginbonusrewardmaster.go
- presentallmaster.go
- user.go
- userban.go
- usercard.go
- userdeck.go
- userdevice.go
- useritem.go
- userloginbonus.go
- userpresent.go
- userpresentallmaster.go
- userpresentallreceivedhistory.go
Click to show internal directories.
Click to hide internal directories.