Files
sql/docker-entrypoint-initdb.d/initdb.sql
2025-08-29 22:12:55 +02:00

41 lines
768 B
SQL

create table adherent (
id int primary key,
nom text,
prenom text,
genre smallint,
naissance date,
codepostal text
);
create table famille (
code text primary key,
famille text,
code_parent text -- references famille(code)
);
create table article (
code text primary key,
article text,
famille_code text, -- references famille(code)
factpoids int,
unitevente int,
prix decimal,
unitepoids int,
suivistock int
);
create table ticket (
id int primary key,
date_ticket timestamp,
adherent_id int, -- references adherent(id)
mode_rglt int
);
create table ligne (
id int primary key,
ticket_id int, --references ticket (id),
article_code text, -- references article (code)
prix_unitaire decimal,
quantite decimal
);