Обновить works/lab-01/work2

This commit is contained in:
Arf
2026-09-07 10:53:19 +00:00
parent eced29ca27
commit 0c33ec27bc
+39 -1
View File
@@ -1,5 +1,6 @@
Table card {
set_id int [pk, not null]
element_id int [primary key]
card_id int [primary key]
card_name text [NOT NULL]
card_stage text [NOT NULL]
@@ -13,11 +14,13 @@ Table card {
illustrator_id int [primary key]
}
Table card_set {
set_id int [pk, not null]
card_code_set int [ primary key]
card_set_name text [NOT NULL]
card_date date
}
Table attack {
element_id int [primary key]
attack_id int [primary key]
attack_name text [NOT NULL]
damage int [NOT NULL, check:`damage>0`]
@@ -33,3 +36,38 @@ Table illustrator {
illustrator_name text [NOT NULL]
}
Table card_attack {
attack_id int [NOT NULL]
card_id int [NOT NULL]
card_attack_id int [pk]
}
Table element_attack {
attack_id int [NOT NULL]
element_id int [NOT NULL]
cost int [NOT NULL]
element_attack_id int [pk]
}
Ref: "card"."illustrator_id" -? "illustrator"."illustrator_id"
Ref: "element_type"."element_id" - "attack"."element_id"
Ref: "element_type"."element_id" - "card"."element_id"
Ref: "card_attack"."attack_id" > "attack"."attack_id"
Ref: "card_attack"."card_id" ?> "card"."card_id"
Ref: "element_attack"."attack_id" > "attack"."attack_id"
Ref: "element_attack"."element_id" ?> "element_type"."element_id"
Ref: "card"."set_id" - "card_set"."set_id"