Newer
Older
pokemon-go-trade / internal / model / model.go
Simon Lindgren on 21 Feb 2021 365 bytes Added have to db
package model

import "fmt"

type Pokemon struct {
	ID         int       `json:"id"`
	DexNumber  int       `json:"dex_number"`
	Name       string    `json:"name"`
	Shiny      bool      `json:"shiny"`
	Url        string    `json:"url"`
	Variations []Pokemon `json:"variations, omitempty"`
}

func (p *Pokemon) FormatUrl() {
	p.Url = fmt.Sprintf("image/%s", p.Url)
}