models

package
v0.0.0-...-d26b62e Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SlotGame

type SlotGame struct {
	mgm.DefaultModel `bson:",inline"`
	ID               string `json:"id" bson:"id"`
	Time             int64  `json:"time" bson:"time"`
	Numbers          []uint `json:"numbers" bson:"numbers"`
	Win              int64  `json:"win" bson:"win"`
	Proof            string `json:"proof" bson:"proof"`
	Alpha            string `json:"alpha" bson:"alpha"`
	Beta             string `json:"beta" bson:"beta"`
}

func NewSlotGame

func NewSlotGame(gameId string, numbers []uint, win int64, proof, alpha, beta string, time int64) *SlotGame

func (SlotGame) Validate

func (game SlotGame) Validate() error

type User

type User struct {
	mgm.DefaultModel `bson:",inline"`
	Username         string `json:"username" bson:"username"`
	Email            string `json:"email" bson:"email"`
	Hash             string `json:"-" bson:"hash"`
	FullName         string `json:"fullName" bson:"fullName"`
	Birthdate        int64  `json:"birthdate" bson:"bithdate"`
	Verified         byte   `json:"verified" bson:"verified"`
	Banned           byte   `json:"banned" bson:"banned"`
}

func NewUser

func NewUser(username, email, fullName string, birthdate int64) *User

NewUser creates a new user with the given details. IMPORTANT THIS DOES NOT SAVE OR HASH THE PASSWORD. This has to be done seperatly

func (*User) GetBirthdate

func (user *User) GetBirthdate() time.Time

func (User) Validate

func (user User) Validate() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL