Feat: Display deck list in decks
This commit is contained in:
parent
9014c17a07
commit
ae76b3db1e
5 changed files with 203 additions and 59 deletions
|
@ -5,53 +5,53 @@ import (
|
|||
)
|
||||
|
||||
type MtgSet struct {
|
||||
ID string `db:"id" json:"id"`
|
||||
Code string `db:"code" json:"code"`
|
||||
Name string `db:"name" json:"name"`
|
||||
SanitizedName string `db:"sanitized_name" json:"sanitized_name"`
|
||||
ReleasedAt string `db:"release_at" json:"released_at"`
|
||||
IconUri string `db:"icon_uri" json:"icon_uri"`
|
||||
SetType string `db:"type" json:"type"`
|
||||
ID string `db:"id" json:"id,omitempty"`
|
||||
Code string `db:"code" json:"code,omitempty"`
|
||||
Name string `db:"name" json:"name,omitempty"`
|
||||
SanitizedName string `db:"sanitized_name" json:"sanitized_name,omitempty"`
|
||||
ReleasedAt string `db:"release_at" json:"released_at,omitempty"`
|
||||
IconUri string `db:"icon_uri" json:"icon_uri,omitempty"`
|
||||
SetType string `db:"type" json:"type,omitempty"`
|
||||
}
|
||||
|
||||
type Brawlset struct {
|
||||
ID string `db:"id" json:"id"`
|
||||
Name string `db:"name" json:"name"`
|
||||
SanitizedName string `db:"sanitized_name" json:"sanitized_name"`
|
||||
Sets types.JSONArray[string] `db:"sets" json:"sets"`
|
||||
ID string `db:"id" json:"id,omitempty"`
|
||||
Name string `db:"name" json:"name,omitempty"`
|
||||
SanitizedName string `db:"sanitized_name" json:"sanitized_name,omitempty"`
|
||||
Sets types.JSONArray[string] `db:"sets" json:"sets,omitempty"`
|
||||
}
|
||||
|
||||
type Carte struct {
|
||||
ID string `db:"id" json:"id"`
|
||||
Name string `db:"name" json:"name"`
|
||||
SanitizedName string `db:"sanitized_name" json:"sanitized_name"`
|
||||
Layout string `db:"layout" json:"layout"`
|
||||
SmallImage string `db:"small_image" json:"small_image"`
|
||||
SmallImageBack string `db:"small_image_back" json:"small_image_back"`
|
||||
NormalImage string `db:"normal_image" json:"normal_image"`
|
||||
NormalImageBack string `db:"normal_image_back" json:"normal_image_back"`
|
||||
CardType string `db:"type" json:"type"`
|
||||
ColorIdentity types.JSONArray[string] `db:"color_identity" json:"color_identity"`
|
||||
ReleasedAt string `db:"released_at" json:"released_at"`
|
||||
MtgSet string `db:"mtg_set" json:"mtg_set"`
|
||||
SetCode string `db:"set_code" json:"set_code"`
|
||||
Price string `db:"price" json:"price"`
|
||||
CardmarketUri string `db:"cardmarket_url" json:"cardmarket_url"`
|
||||
CanBeCommander bool `db:"can_be_commander" json:"can_be_commander"`
|
||||
Banned bool `db:"banned" json:"banned"`
|
||||
ID string `db:"id" json:"id,omitempty"`
|
||||
Name string `db:"name" json:"name,omitempty"`
|
||||
SanitizedName string `db:"sanitized_name" json:"sanitized_name,omitempty"`
|
||||
Layout string `db:"layout" json:"layout,omitempty"`
|
||||
SmallImage string `db:"small_image" json:"small_image,omitempty"`
|
||||
SmallImageBack string `db:"small_image_back" json:"small_image_back,omitempty"`
|
||||
NormalImage string `db:"normal_image" json:"normal_image,omitempty"`
|
||||
NormalImageBack string `db:"normal_image_back" json:"normal_image_back,omitempty"`
|
||||
CardType string `db:"type" json:"type,omitempty"`
|
||||
ColorIdentity types.JSONArray[string] `db:"color_identity" json:"color_identity,omitempty"`
|
||||
ReleasedAt string `db:"released_at" json:"released_at,omitempty"`
|
||||
MtgSet string `db:"mtg_set" json:"mtg_set,omitempty"`
|
||||
SetCode string `db:"set_code" json:"set_code,omitempty"`
|
||||
Price string `db:"price" json:"price,omitempty"`
|
||||
CardmarketUri string `db:"cardmarket_url" json:"cardmarket_url,omitempty"`
|
||||
CanBeCommander bool `db:"can_be_commander" json:"can_be_commander,omitempty"`
|
||||
Banned bool `db:"banned" json:"banned,omitempty"`
|
||||
}
|
||||
|
||||
type DeckCard struct {
|
||||
ID string `json:"id"`
|
||||
Amount int `json:"amount"`
|
||||
ID string `json:"id,omitempty"`
|
||||
Amount int `json:"amount,omitempty"`
|
||||
}
|
||||
|
||||
type Deck struct {
|
||||
ID string `db:"id"`
|
||||
Name string `db:"name"`
|
||||
ColorIdentity types.JSONArray[string] `db:"color_identity"`
|
||||
Owner string `db:"owner"`
|
||||
Commander string `db:"commander"`
|
||||
Brawlset string `db:"brawlset"`
|
||||
Cards types.JSONArray[DeckCard] `db:"cartes"`
|
||||
ID string `db:"id" json:"id,omitempty"`
|
||||
Name string `db:"name" json:"name,omitempty"`
|
||||
ColorIdentity types.JSONArray[string] `db:"color_identity" json:"color_identity,omitempty"`
|
||||
Owner string `db:"owner" json:"owner,omitempty"`
|
||||
Commander string `db:"commander" json:"commander,omitempty"`
|
||||
Brawlset string `db:"brawlset" json:"brawslet,omitempty"`
|
||||
Cards types.JSONArray[DeckCard] `db:"cartes" json:"cartes,omitempty"`
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue