faucet

package
Version: v0.0.0-...-418b934 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClaimHistory

type ClaimHistory struct {
	entity.Base
	EntityID uuid.UUID `gorm:"not null"`
	Amount   float64   `gorm:"not null"`
}

ClaimHistory claim history entity

func (*ClaimHistory) MarshalBinary

func (e *ClaimHistory) MarshalBinary() ([]byte, error)

MarshalBinary for redis

func (*ClaimHistory) ToDTO

func (e *ClaimHistory) ToDTO() (*module.HistoryDTO, error)

ToDTO dto

func (*ClaimHistory) UnmarshalBinary

func (e *ClaimHistory) UnmarshalBinary(data []byte) error

UnmarshalBinary for redis

type IPAddress

type IPAddress struct {
	entity.Base
	IPAddress string `gorm:"primary_key"`
	IsBanned  bool   `gorm:"not null;default:false"`

	Players []*Player
}

IPAddress IP Address entity

func (*IPAddress) MarshalBinary

func (e *IPAddress) MarshalBinary() ([]byte, error)

MarshalBinary for redis

func (*IPAddress) UnmarshalBinary

func (e *IPAddress) UnmarshalBinary(data []byte) error

UnmarshalBinary for redis

type Player

type Player struct {
	entity.Base
	EntityID uuid.UUID `gorm:"not null"`
	Type     string    `gorm:"not null"`

	LastClaim          time.Time `gorm:"not null"`
	BonusAmountPct     uint32    `gorm:"not null;default:1"`
	ReferalID          uint64    `gorm:"not null;auto_increment;unique_index"`
	ReferalCount       uint64    `gorm:"not null;default:0"`
	ReferalClaimAmount float64   `gorm:"not null;default:0"`

	ReferedByID uuid.UUID

	Histories     []*ClaimHistory
	IPAddressList []*IPAddress
}

Player player entity

func (*Player) MarshalBinary

func (e *Player) MarshalBinary() ([]byte, error)

MarshalBinary for redis

func (*Player) ToDTO

func (e *Player) ToDTO() (*module.PlayerDTO, error)

ToDTO dto

func (*Player) UnmarshalBinary

func (e *Player) UnmarshalBinary(data []byte) error

UnmarshalBinary for redis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL