2025-08-28 11:45:01 +02:00
|
|
|
create table adherent (
|
|
|
|
|
id int primary key,
|
|
|
|
|
nom text,
|
|
|
|
|
prenom text,
|
2025-08-29 07:30:55 +02:00
|
|
|
genre smallint,
|
2025-08-28 11:45:01 +02:00
|
|
|
naissance date,
|
2025-08-28 15:01:31 +02:00
|
|
|
codepostal text
|
2025-08-28 11:45:01 +02:00
|
|
|
);
|
|
|
|
|
|
2025-08-28 07:13:19 +02:00
|
|
|
create table famille (
|
2025-08-28 13:54:30 +02:00
|
|
|
code text primary key,
|
|
|
|
|
famille text,
|
|
|
|
|
code_parent text
|
2025-08-28 07:13:19 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
|
|
create table article (
|
|
|
|
|
code text primary key,
|
|
|
|
|
article text,
|
2025-08-29 07:44:17 +02:00
|
|
|
famille_code text, -- references famille(famille)
|
2025-08-28 07:13:19 +02:00
|
|
|
factpoids int,
|
|
|
|
|
unitevente int,
|
|
|
|
|
prix decimal,
|
|
|
|
|
unitepoids int,
|
|
|
|
|
publie int,
|
|
|
|
|
suivistock int,
|
|
|
|
|
sommeil int
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
create table ticket (
|
|
|
|
|
id int primary key,
|
2025-08-28 11:45:01 +02:00
|
|
|
date_ticket timestamp,
|
2025-08-29 07:44:17 +02:00
|
|
|
adherent_id int,
|
2025-08-28 11:29:31 +02:00
|
|
|
mode_rglt int
|
2025-08-28 07:13:19 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
|
|
create table ligne (
|
|
|
|
|
id int primary key,
|
|
|
|
|
ticket_id int, --references ticket (id),
|
2025-08-29 07:44:17 +02:00
|
|
|
article_code text, -- references article (code)
|
2025-08-28 07:13:19 +02:00
|
|
|
prix_unitaire decimal,
|
2025-08-28 09:38:07 +02:00
|
|
|
quantite decimal
|
2025-08-28 07:13:19 +02:00
|
|
|
);
|