This commit is contained in:
2025-10-03 07:42:55 +02:00
parent 39c73db7e8
commit f27fd27d1f
3 changed files with 91 additions and 13 deletions

9
cocagne/agrimer.http Normal file
View File

@@ -0,0 +1,9 @@
# H Source
# 26 : Strasbourg Bio
# 3027 : Détail Bio
# 3002 : France Bio
POST https://rnm.franceagrimer.fr/prix
Content-Type: application/x-www-form-urlencoded
H=26&C=4180201&DEB=01-01-2025&FIN=31-12-2025

View File

@@ -22,6 +22,9 @@ drop table if exists planning;
drop table if exists abonnement; drop table if exists abonnement;
drop table if exists livraison; drop table if exists livraison;
drop table if exists composition;
drop table if exists article;
select load_extension('mod_spatialite'); select load_extension('mod_spatialite');
select InitSpatialMetaData(); select InitSpatialMetaData();
@@ -333,12 +336,12 @@ insert into tournee values
create table distribution create table distribution
( (
id integer primary key, id integer primary key,
distribution text not null, distribution text not null,
tournee_id integer not null references tournee(id), tournee_id integer not null references tournee(id),
depot_id integer, depot_id integer,
adherent_id integer, adherent_id integer,
ordre integer not null ordre integer not null
); );
create table planning create table planning
@@ -351,8 +354,8 @@ create table planning
create table abonnement create table abonnement
( (
id integer primary key, id integer primary key,
adherent_id integer not null references adherent(id), adherent_id integer not null references adherent(id),
panier_id integer, panier_id integer references panier(id),
date_debut date not null, date_debut date not null,
nombre integer not null, nombre integer not null,
montant numeric(8, 2) not null, montant numeric(8, 2) not null,
@@ -370,3 +373,73 @@ create table livraison
livre etat_livraison not null default 'à livrer', livre etat_livraison not null default 'à livrer',
planning_id integer not null references planning(id) planning_id integer not null references planning(id)
); );
create table composition
(
produit_id integer
);
create table article
(
articles_id integer,
article text
prix_revient numeric(8, 2)
);
insert into article (article) values
('aubergine', 57231901),
('artichaut', 57221689),
('ail violet', 57225792),
('basilic vert', 3980160),
('laitue batavia', 57230557),
('laitue feuille de chêne blonde', 57230558),
('bette', 57230528),
('betterave rouge', 57230529),
('carotte', 57230530),
('carotte botte', 4090201),
('céleri rave', 57230534),
('chou blanc', 4180201),
('chou brocoli', 4190201),
('chou chinois', 57229034),
('chou de Bruxelles', 380123),
('chou fleur', 453002),
('chou rave', 4740201),
('chou rouge', 2040201),
('claytone / pourpier'),
('concombre', 57222102),
('courge butternut', 57231340),
('courge potimarron', 57231297),
('courgette',57231779),
('échalote', 57231525),
('endive', 57221547),
('épinard', 4310201),
('fenouil', 57230542),
('haricot beurre'),
('haricot plat'),
('haricot vert', 57230543),
('mâche', 1340110),
('mesclum de jeune pousse', 4280160),
('marron', 57208112),
('navet violet', 57230546),
('oignon blanc', 710123),
('oignon jaune', 57230547),
('oignon rouge', 57231434),
('panais', 57231567),
('persil', 57230550),
('pissenlit', 10450027),
('pleurote', 57201340),
('poireau', 57230552),
('poivron rouge', 57209490),
('poivron vert', 57233283),
('pomme de terre', 57230553),
('radis asiatique rouge', 57223902),
('radis noir', 57230554),
('radis rose', 57223902),
('rhubarbe', 57220648),
('roquette', 8620058),
('rutabaga', 180160),
('shiitake', 57202139),
('tomate allongée coeur',57225536),
('tomate cerise', 6250201),
('tomate ronde', 5840201),
('topinambour', 1990160);

View File

@@ -2,7 +2,7 @@
@token=d45dfa10-575b-4f29-b84f-85e98cb26ebe @token=d45dfa10-575b-4f29-b84f-85e98cb26ebe
@id=92784ec9-d956-40e3-8d9c-4607da3a48a3 @id=92784ec9-d956-40e3-8d9c-4607da3a48a3
### Récupérer la valeur setup-token ### 1. Récupérer la valeur setup-token
GET /api/session/properties GET /api/session/properties
Host: {{baseUrl}} Host: {{baseUrl}}
Content-Type: application/json Content-Type: application/json
@@ -65,10 +65,6 @@ X-Metabase-Session: {{id}}
} }
} }
### Login ### Login
POST /api/session POST /api/session
Host: {{baseUrl}} Host: {{baseUrl}}