generated from admin/template
Обновить works/lab
This commit is contained in:
@@ -11,6 +11,8 @@ Table card {
|
||||
card_image_url text
|
||||
card_set_id int [not null, ref: > card_set.card_set_id]
|
||||
illustrator_id int [not null, ref: > illustrator.illustrator_id]
|
||||
card_pokemon_id int [not null]
|
||||
trainer_id int
|
||||
}
|
||||
Table card_set {
|
||||
card_set_id int [primary key, not null]
|
||||
@@ -23,8 +25,9 @@ Table card_set {
|
||||
Table attack {
|
||||
attack_id int [primary key, not null]
|
||||
attack_name text [not null]
|
||||
attack_base_damage text [null, check: `attack_base_damege >= 0`]
|
||||
attack_base_damage text [null, check: `attack_base_damage >= 0`]
|
||||
attack_effect text
|
||||
attack_retreat_cost int [null]
|
||||
}
|
||||
|
||||
Table card_attack {
|
||||
@@ -44,3 +47,51 @@ Table illustrator {
|
||||
illustrator_id int [primary key, not null]
|
||||
illustrator_nationality text [null]
|
||||
}
|
||||
Table attack_energy_cost {
|
||||
attack_energy_cost_id int [primary key]
|
||||
attack_id int [not null]
|
||||
element_type_id int [not null]
|
||||
|
||||
}
|
||||
|
||||
Table pokemon {
|
||||
pokemon_id int [primary key,not null]
|
||||
pokemon_name text [not null]
|
||||
pokemon_hp int [not null, check: `card_hp > 0`]
|
||||
pokemon_hieght numeric
|
||||
pokemon_weight numeric
|
||||
pokemon_rarity text
|
||||
pokemon_number text [not null]
|
||||
pokemon_artist text
|
||||
pokemon_release_date date
|
||||
energy_type_id int [not null]
|
||||
attack_energy_cost_id int [not null]
|
||||
attack_id int [not null]
|
||||
pokemon_rare text [not null]
|
||||
trainer_id int [not null]
|
||||
card_pokemon_category text [not null]
|
||||
card_pokemon_pokedex_id int
|
||||
}
|
||||
Table trainer {
|
||||
tranier_id int [primary key,not null]
|
||||
trainer_name text [not null, unique]
|
||||
trainer_skill text [not null]
|
||||
trainer_specification text [not null]
|
||||
trainer_description text [not null]
|
||||
trainer_type text [not null]
|
||||
trainer_released_date date [not null]
|
||||
trainer_rare text [not null]
|
||||
}
|
||||
|
||||
|
||||
Ref: "pokemon"."pokemon_id" <? "card"."card_pokemon_id"
|
||||
|
||||
Ref: "pokemon"."attack_energy_cost_id" ?> "attack_energy_cost"."attack_energy_cost_id"
|
||||
|
||||
Ref: "pokemon"."attack_id" ?> "attack"."attack_id"
|
||||
|
||||
Ref: "pokemon"."energy_type_id" ?> "energy_type"."element_type_id"
|
||||
|
||||
Ref: "trainer"."tranier_id" <? "pokemon"."trainer_id"
|
||||
|
||||
Ref: "card"."trainer_id" ?>? "trainer"."tranier_id"
|
||||
Reference in New Issue
Block a user