Files
tcgdex-golang/models/card.go
2025-08-12 18:57:23 +02:00

89 lines
2.1 KiB
Go

package models
// Card contains every informations about a specific card.
type Card struct {
// ID Globally unique card ID based on the set ID and the cards ID within the set.
ID string `json:"id"`
// LocalID indexing this card within its set, usually just its number.
LocalID string `json:"localId"`
// Name is the card name
Name string `json:"name"`
// Image url without the extension and quality.
Image *string `json:"image"`
// Illustrator of the card.
Illustrator *string `json:"illustrator"`
// Rarity of the card.
Rarity string `json:"rarity"`
// Category of the card.
Category string `json:"category"`
// Variants possible card variants
Variants *CardVariant `json:"variants"`
// Set the card belongs to.
Set SetResume `json:"set"`
// DexID Pokémon Pokédex IDs (multiple if multiple pokémon appears on the card).
DexID []int `json:"dexId"`
// Hp of the pokemon
Hp int `json:"hp"`
// Types of the pokemon.
Types []string `json:"types"`
// EvolveFrom Name of the pokemon this one evolves from.
EvolveFrom *string `json:"evolveFrom"`
// Description of Pokémon like in Pokédex
Description *string `json:"description"`
// Level of the Pokémon.
Level *string `json:"level"`
// Stage of the Pokémon.
Stage *string `json:"stage"`
// Suffix of the Pokémon.
Suffix *string `json:"suffix"`
// Item the Pokémon have.
Item CardItem `json:"item"`
// Abilities of the card.
Abilities []CardAbility `json:"abilities"`
// Attacks of the card.
Attacks []CardAttack `json:"attacks"`
// Weaknesses of the card.
Weaknesses []CardWeakResistance `json:"weaknesses"`
// Resistances of the card.
Resistances []CardWeakResistance `json:"resistances"`
// Retreat cost of the card.
Retreat int `json:"retreat"`
// Effect of the card.
Effect *string `json:"effect"`
// TrainerType ???.
TrainerType *string `json:"trainerType"`
// EnergyType of the card.
EnergyType *string `json:"energyType"`
// RegulationMark of the card.
RegulationMark *string `json:"regulationMark"`
// Legal card ability to be played in tournaments.
Legal Legal `json:"legal"`
}