From 212d296cac501db55143053a54882a41921650fc Mon Sep 17 00:00:00 2001 From: How Date: Mon, 7 Sep 2026 08:40:16 +0000 Subject: [PATCH] minor adjustments done --- uy.txt | 59 +++++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 21 deletions(-) diff --git a/uy.txt b/uy.txt index 034b84e..c5ff2c4 100644 --- a/uy.txt +++ b/uy.txt @@ -1,24 +1,41 @@ -Сущность - card --name: TEXT --height: NUMERIC --weight: NUMERIC --card_hp: INT --rarity: TEXT +Сущность: card +- card_id: INT [primary key, auto_increment] +- card_name: TEXT UNIQUE NOT NULL +- stage: TEXT NOT NULL +- hp: INT or NUMERIC NOT NULL CHECK +- pokedex_number: INT UNIQUE NOT NULL +- category: TEXT NOT NULL +- height: numeric NOT NULL +- weight: numeric NOT NULL +- retreat_cost: INT or NUMERIC +- release_date: DATE NOT NULL -Сущность - cars_set --releaced date: DATE --set_name: TEXT --set_code: INT - -Сущность: - attack --attack_name: TEXT --attack_base_damage: text --attack_effect: TEXT - -Сущность - element_type --element_type_name: TEXT - -Сущность: - illustrator --illustrator_name: TEXT +- illustrator_name: TEXT [foreign key references illustrator(illustrator_name)] NOT NULL +- set_id: INT [foreign key references card_set(set_id)] NOT NULL +CONSTRAINT check_hp CHECK (hp > 0) +CONSTAINT check_antropometrics CHECK (height > 0 AND weight > 0) + + +Сущность card_set +- set_id: INT [primary key, auto_increment] +- set_name: TEXT UNIQUE NOT NULL +- set_code: INT NOT NULL +- card_amount: INT NOT NULL +- release_date: DATE NOT NULL + +Сущность: attack +- attack_id: INT [primary key, auto_increment] +- attack_name: TEXT NOT NULL +- base_damage: TEXT NOT NULL +- text_effect: TEXT + + +Сущность: element_type: +- element_id: INT [primary key, auto_increment] +- element_name: TEXT NOT NULL + +Сущность: illustrator +- illustrator_id: INT [primary key, auto_increment] +- illustrator_name: TEXT NOT NULL UNIQUE \ No newline at end of file