models

package
v0.0.0-...-6fcfc1a Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAndReplaceInParty

func CreateAndReplaceInParty(toReplace *PokemonModel, newMember *PokemonModel) error

func CreatePokemon

func CreatePokemon(pokemon *PokemonModel) error

func GetAllPokemon

func GetAllPokemon(pokemon *[]PokemonModel) error

func GetDB

func GetDB() *gorm.DB

func GetParty

func GetParty(pokemon *[]PokemonModel) error

func ReplaceInParty

func ReplaceInParty(toReplace *PokemonModel, newMember *PokemonModel) error

func UpdatePokemon

func UpdatePokemon(pokemon *PokemonModel) error

Types

type PokemonModel

type PokemonModel struct {
	gorm.Model
	PokeId              uint16
	Name                string
	Nickname            string
	AsciiFrontSpriteUrl string
	AsciiBackSpriteUrl  string
	EvolvesTo           string
	IsShiny             bool
	Type1               string
	Type2               string
	IsInParty           bool
}

func NewPokemonModelFromFetch

func NewPokemonModelFromFetch(fetched structs.Pokemon, evolvesTo string, isShiny bool) *PokemonModel

func (*PokemonModel) EvolveInto

func (p *PokemonModel) EvolveInto(evolution *PokemonModel) error

func (*PokemonModel) TableName

func (p *PokemonModel) TableName() string

Jump to

Keyboard shortcuts

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