Обновить works/lab-02/Readme.md

This commit is contained in:
2026-09-07 10:29:08 +00:00
parent 9c5c89c849
commit 9d3dd81ffb
+6 -1
View File
@@ -6,6 +6,7 @@
--- ---
## Ключевой код ## Ключевой код
Table card { Table card {
card_id int [primary key] card_id int [primary key]
card_hp int [check:`card_hp>0`] card_hp int [check:`card_hp>0`]
@@ -44,6 +45,7 @@ Table element_type{
Table attack_energy{ Table attack_energy{
attack_id int [unique] attack_id int [unique]
attack_energy_cost numeric [not null]
} }
Table card_attack{ Table card_attack{
@@ -54,6 +56,7 @@ Table card_attack{
attack_card_id int [unique] attack_card_id int [unique]
attack_dmg int [check: `attack_dmg>0`] attack_dmg int [check: `attack_dmg>0`]
attack_damage_modifier text [not null] attack_damage_modifier text [not null]
attack_energy_cost numeric [primary key]
} }
@@ -73,4 +76,6 @@ Ref: "card_attack"."attack_dmg" ?>? "card_attack"."attack_card_id"
Ref: "card"."card_element_type_id" ?-? "element_type"."element_type_id" Ref: "card"."card_element_type_id" ?-? "element_type"."element_type_id"
Ref: "card"."card_attack" ?>? "card_attack"."attack_id" Ref: "card"."card_attack" ?>? "card_attack"."attack_id"
Ref: "card_attack"."attack_energy_cost" <? "attack_energy"."attack_energy_cost"