Skip to content
Snippets Groups Projects
Commit f70e3118 authored by Lucas's avatar Lucas
Browse files

init prise en charge fichiers csv

parent 8e09ee29
No related branches found
No related tags found
No related merge requests found
Showing
with 487 additions and 43 deletions
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
###< symfony/phpunit-bridge ### ###< symfony/phpunit-bridge ###
###> symfony/asset-mapper ### ###> symfony/asset-mapper ###
/public/assets/
/assets/vendor /assets/vendor
###< symfony/asset-mapper ### ###< symfony/asset-mapper ###
......
<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20240118144245 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE abonnement (id INT AUTO_INCREMENT NOT NULL, panier_id_id INT NOT NULL, INDEX IDX_351268BB5669B1EA (panier_id_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE abonnement_adherent (abonnement_id INT NOT NULL, adherent_id INT NOT NULL, INDEX IDX_D3DA4BB7F1D74413 (abonnement_id), INDEX IDX_D3DA4BB725F06C53 (adherent_id), PRIMARY KEY(abonnement_id, adherent_id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE adherent (id INT AUTO_INCREMENT NOT NULL, raison_sociale VARCHAR(100) NOT NULL, civilite VARCHAR(10) DEFAULT NULL, nom VARCHAR(45) DEFAULT NULL, prenom VARCHAR(45) DEFAULT NULL, adresse VARCHAR(100) DEFAULT NULL, code_postal VARCHAR(10) DEFAULT NULL, ville VARCHAR(45) DEFAULT NULL, telephone VARCHAR(20) DEFAULT NULL, telephone2 VARCHAR(20) DEFAULT NULL, telephone3 VARCHAR(20) DEFAULT NULL, mail VARCHAR(45) DEFAULT NULL, profession VARCHAR(45) DEFAULT NULL, date_naissance DATE DEFAULT NULL, password VARCHAR(200) DEFAULT NULL, date_premiere_adhesion DATE DEFAULT NULL, dispense_adhesion TINYINT(1) DEFAULT NULL, adhesion_ajour TINYINT(1) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE adhesion (id INT AUTO_INCREMENT NOT NULL, periode_id_id INT NOT NULL, structure_id_id INT NOT NULL, adherent_id_id INT NOT NULL, type VARCHAR(255) NOT NULL, prix DOUBLE PRECISION NOT NULL, date_charniere DATE NOT NULL, active TINYINT(1) NOT NULL, INDEX IDX_C50CA65AC486B588 (periode_id_id), INDEX IDX_C50CA65AAA95C5C1 (structure_id_id), INDEX IDX_C50CA65A7C4E834B (adherent_id_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE frequence_type (id INT AUTO_INCREMENT NOT NULL, debut DATE NOT NULL, fin DATE NOT NULL, nom VARCHAR(255) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE groupe (id INT AUTO_INCREMENT NOT NULL, nom VARCHAR(100) NOT NULL, droit1 VARCHAR(255) NOT NULL, droit2 VARCHAR(255) DEFAULT NULL, droit3 VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE groupe_adherent (groupe_id INT NOT NULL, adherent_id INT NOT NULL, INDEX IDX_171FB107A45358C (groupe_id), INDEX IDX_171FB1025F06C53 (adherent_id), PRIMARY KEY(groupe_id, adherent_id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE jour_calendrier (id INT AUTO_INCREMENT NOT NULL, structure_id_id INT DEFAULT NULL, date DATE NOT NULL, livrable TINYINT(1) DEFAULT NULL, INDEX IDX_FDB8AD1CAA95C5C1 (structure_id_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE livraison (id INT AUTO_INCREMENT NOT NULL, abonnement_id INT NOT NULL, point_de_depot_id INT NOT NULL, tournee_id INT NOT NULL, INDEX IDX_A60C9F1FF1D74413 (abonnement_id), INDEX IDX_A60C9F1FC74221A7 (point_de_depot_id), INDEX IDX_A60C9F1FF661D013 (tournee_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE ordre_tournee (id INT AUTO_INCREMENT NOT NULL, tournee_id_id INT NOT NULL, point_depot_id_id INT NOT NULL, num_ordre INT NOT NULL, INDEX IDX_105F611CC3AC4C3E (tournee_id_id), INDEX IDX_105F611C2F6AF225 (point_depot_id_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE panier (id INT AUTO_INCREMENT NOT NULL, unite_id_id INT NOT NULL, frequence_type_id_id INT NOT NULL, nom VARCHAR(255) NOT NULL, photo LONGBLOB DEFAULT NULL, description LONGTEXT DEFAULT NULL, INDEX IDX_24CC0DF26E366321 (unite_id_id), INDEX IDX_24CC0DF2A1274777 (frequence_type_id_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE periode (id INT AUTO_INCREMENT NOT NULL, debut DATE NOT NULL, fin DATE NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE point_de_depot (id INT AUTO_INCREMENT NOT NULL, structure_id_id INT NOT NULL, adresse VARCHAR(510) NOT NULL, code_postal VARCHAR(10) NOT NULL, ville VARCHAR(255) NOT NULL, telephone VARCHAR(20) NOT NULL, nom_referent VARCHAR(255) NOT NULL, mail_referent VARCHAR(255) NOT NULL, tel_referent VARCHAR(20) NOT NULL, presentation LONGTEXT DEFAULT NULL, photo LONGBLOB DEFAULT NULL, creneau_livraison TIME NOT NULL, creneau_recup_panier TIME NOT NULL, INDEX IDX_6068E8BAA95C5C1 (structure_id_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE structure (id INT AUTO_INCREMENT NOT NULL, id_structure INT NOT NULL, nom VARCHAR(45) NOT NULL, ville VARCHAR(45) NOT NULL, raison_soc VARCHAR(255) NOT NULL, siege VARCHAR(255) DEFAULT NULL, adresse VARCHAR(255) NOT NULL, telephone VARCHAR(20) NOT NULL, mail VARCHAR(45) NOT NULL, nom_contact VARCHAR(100) NOT NULL, site_web VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE tournee (id INT AUTO_INCREMENT NOT NULL, jour_preparation_id INT NOT NULL, INDEX IDX_EBF67D7E238A7648 (jour_preparation_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE unite (id INT AUTO_INCREMENT NOT NULL, nom VARCHAR(255) NOT NULL, nb_decimale INT NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE messenger_messages (id BIGINT AUTO_INCREMENT NOT NULL, body LONGTEXT NOT NULL, headers LONGTEXT NOT NULL, queue_name VARCHAR(190) NOT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', available_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', delivered_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_75EA56E0FB7336F0 (queue_name), INDEX IDX_75EA56E0E3BD61CE (available_at), INDEX IDX_75EA56E016BA31DB (delivered_at), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE abonnement ADD CONSTRAINT FK_351268BB5669B1EA FOREIGN KEY (panier_id_id) REFERENCES panier (id)');
$this->addSql('ALTER TABLE abonnement_adherent ADD CONSTRAINT FK_D3DA4BB7F1D74413 FOREIGN KEY (abonnement_id) REFERENCES abonnement (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE abonnement_adherent ADD CONSTRAINT FK_D3DA4BB725F06C53 FOREIGN KEY (adherent_id) REFERENCES adherent (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE adhesion ADD CONSTRAINT FK_C50CA65AC486B588 FOREIGN KEY (periode_id_id) REFERENCES periode (id)');
$this->addSql('ALTER TABLE adhesion ADD CONSTRAINT FK_C50CA65AAA95C5C1 FOREIGN KEY (structure_id_id) REFERENCES structure (id)');
$this->addSql('ALTER TABLE adhesion ADD CONSTRAINT FK_C50CA65A7C4E834B FOREIGN KEY (adherent_id_id) REFERENCES adherent (id)');
$this->addSql('ALTER TABLE groupe_adherent ADD CONSTRAINT FK_171FB107A45358C FOREIGN KEY (groupe_id) REFERENCES groupe (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE groupe_adherent ADD CONSTRAINT FK_171FB1025F06C53 FOREIGN KEY (adherent_id) REFERENCES adherent (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE jour_calendrier ADD CONSTRAINT FK_FDB8AD1CAA95C5C1 FOREIGN KEY (structure_id_id) REFERENCES structure (id)');
$this->addSql('ALTER TABLE livraison ADD CONSTRAINT FK_A60C9F1FF1D74413 FOREIGN KEY (abonnement_id) REFERENCES abonnement (id)');
$this->addSql('ALTER TABLE livraison ADD CONSTRAINT FK_A60C9F1FC74221A7 FOREIGN KEY (point_de_depot_id) REFERENCES point_de_depot (id)');
$this->addSql('ALTER TABLE livraison ADD CONSTRAINT FK_A60C9F1FF661D013 FOREIGN KEY (tournee_id) REFERENCES tournee (id)');
$this->addSql('ALTER TABLE ordre_tournee ADD CONSTRAINT FK_105F611CC3AC4C3E FOREIGN KEY (tournee_id_id) REFERENCES tournee (id)');
$this->addSql('ALTER TABLE ordre_tournee ADD CONSTRAINT FK_105F611C2F6AF225 FOREIGN KEY (point_depot_id_id) REFERENCES point_de_depot (id)');
$this->addSql('ALTER TABLE panier ADD CONSTRAINT FK_24CC0DF26E366321 FOREIGN KEY (unite_id_id) REFERENCES unite (id)');
$this->addSql('ALTER TABLE panier ADD CONSTRAINT FK_24CC0DF2A1274777 FOREIGN KEY (frequence_type_id_id) REFERENCES frequence_type (id)');
$this->addSql('ALTER TABLE point_de_depot ADD CONSTRAINT FK_6068E8BAA95C5C1 FOREIGN KEY (structure_id_id) REFERENCES structure (id)');
$this->addSql('ALTER TABLE tournee ADD CONSTRAINT FK_EBF67D7E238A7648 FOREIGN KEY (jour_preparation_id) REFERENCES jour_calendrier (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE abonnement DROP FOREIGN KEY FK_351268BB5669B1EA');
$this->addSql('ALTER TABLE abonnement_adherent DROP FOREIGN KEY FK_D3DA4BB7F1D74413');
$this->addSql('ALTER TABLE abonnement_adherent DROP FOREIGN KEY FK_D3DA4BB725F06C53');
$this->addSql('ALTER TABLE adhesion DROP FOREIGN KEY FK_C50CA65AC486B588');
$this->addSql('ALTER TABLE adhesion DROP FOREIGN KEY FK_C50CA65AAA95C5C1');
$this->addSql('ALTER TABLE adhesion DROP FOREIGN KEY FK_C50CA65A7C4E834B');
$this->addSql('ALTER TABLE groupe_adherent DROP FOREIGN KEY FK_171FB107A45358C');
$this->addSql('ALTER TABLE groupe_adherent DROP FOREIGN KEY FK_171FB1025F06C53');
$this->addSql('ALTER TABLE jour_calendrier DROP FOREIGN KEY FK_FDB8AD1CAA95C5C1');
$this->addSql('ALTER TABLE livraison DROP FOREIGN KEY FK_A60C9F1FF1D74413');
$this->addSql('ALTER TABLE livraison DROP FOREIGN KEY FK_A60C9F1FC74221A7');
$this->addSql('ALTER TABLE livraison DROP FOREIGN KEY FK_A60C9F1FF661D013');
$this->addSql('ALTER TABLE ordre_tournee DROP FOREIGN KEY FK_105F611CC3AC4C3E');
$this->addSql('ALTER TABLE ordre_tournee DROP FOREIGN KEY FK_105F611C2F6AF225');
$this->addSql('ALTER TABLE panier DROP FOREIGN KEY FK_24CC0DF26E366321');
$this->addSql('ALTER TABLE panier DROP FOREIGN KEY FK_24CC0DF2A1274777');
$this->addSql('ALTER TABLE point_de_depot DROP FOREIGN KEY FK_6068E8BAA95C5C1');
$this->addSql('ALTER TABLE tournee DROP FOREIGN KEY FK_EBF67D7E238A7648');
$this->addSql('DROP TABLE abonnement');
$this->addSql('DROP TABLE abonnement_adherent');
$this->addSql('DROP TABLE adherent');
$this->addSql('DROP TABLE adhesion');
$this->addSql('DROP TABLE frequence_type');
$this->addSql('DROP TABLE groupe');
$this->addSql('DROP TABLE groupe_adherent');
$this->addSql('DROP TABLE jour_calendrier');
$this->addSql('DROP TABLE livraison');
$this->addSql('DROP TABLE ordre_tournee');
$this->addSql('DROP TABLE panier');
$this->addSql('DROP TABLE periode');
$this->addSql('DROP TABLE point_de_depot');
$this->addSql('DROP TABLE structure');
$this->addSql('DROP TABLE tournee');
$this->addSql('DROP TABLE unite');
$this->addSql('DROP TABLE messenger_messages');
}
}
<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20240118144621 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE adherent CHANGE raison_sociale raison_sociale VARCHAR(100) DEFAULT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE adherent CHANGE raison_sociale raison_sociale VARCHAR(100) NOT NULL');
}
}
prenom,nom,mail
Adrien,Aubert,adrien.aubert9@etu.univ-lorraine.fr
William,Baland,william.baland5@etu.univ-lorraine.fr
Nathan,Berthaud,nathan.berthaud9@etu.univ-lorraine.fr
Maximilien,Bleeker,maximilien.bleeker9@etu.univ-lorraine.fr
Ahmed,Chokuev,ahmed.chokuev1@etu.univ-lorraine.fr
Maxime,Curtil,maxime.curtil1@etu.univ-lorraine.fr
Lucas,Edouard,lucas.edouard5@etu.univ-lorraine.fr
Victor,Gassmann,victor.gassmann5@etu.univ-lorraine.fr
Jules,Gouerec,jules.gouerec8@etu.univ-lorraine.fr
Baptiste,Lambey,baptiste.lambey8@etu.univ-lorraine.fr
Nam-Robert,Le,nam-robert.le4@etu.univ-lorraine.fr
Samy,Midouni,samy.midouni7@etu.univ-lorraine.fr
Lucas,Poirot,lucas.poirot8@etu.univ-lorraine.fr
Anna,Renaux,anna.renaux5@etu.univ-lorraine.fr
Gregory,Wittmann,gregory.wittmann4@etu.univ-lorraine.fr
Lucas,Marchal,lucas.marchal7@etu.univ-lorraine.fr
Amadou,Sow,amadou.sow5@etu.univ-lorraine.fr
Evan,Ferroli-Touiti,evan.ferroli-touiti1@etu.univ-lorraine.fr
Tom,Rouillon,tom.rouillon3@etu.univ-lorraine.fr
Flavien,Marck,flavien.marck7@etu.univ-lorraine.fr
Ugo,Claus,ugo.claus2@etu.univ-lorraine.fr
Dorian,George,dorian.george8@etu.univ-lorraine.fr
Loris,Belgeri,loris.belgeri9@etu.univ-lorraine.fr
Camille,Duchateau,camille.duchateau9@etu.univ-lorraine.fr
Gabriel,Atgie-Moro,gabriel.atgie-moro9@etu.univ-lorraine.fr
Tristan,Berger,tristan.berger9@etu.univ-lorraine.fr
Louise,Berrada-Gouzi,louise.berrada1@etu.univ-lorraine.fr
Rolf,Bileli,rolf.bileli1@etu.univ-lorraine.fr
Louis,Canova,louis.canova9@etu.univ-lorraine.fr
Noemy,Chevalier,noemy.chevalier7@etu.univ-lorraine.fr
Quentin,Courrier,quentin.courrier2@etu.univ-lorraine.fr
Antoine,Damien,antoine.damien6@etu.univ-lorraine.fr
Samuel,Dejoux,samuel.dejoux5@etu.univ-lorraine.fr
Charles,Dommange,charles.dommange8@etu.univ-lorraine.fr
Nicolas,Duwig,nicolas.duwig3@etu.univ-lorraine.fr
Jeremie,Gavin,jeremie.gavin7@etu.univ-lorraine.fr
Kevin,Grelin,kevin.grelin5@etu.univ-lorraine.fr
Louis,Guery,louis.guery9@etu.univ-lorraine.fr
Adame,Hayaf,adame.hayaf9@etu.univ-lorraine.fr
Rinor,Januzi,rinor.januzi7@etu.univ-lorraine.fr
Bastien,Kappler,bastien.kappler4@etu.univ-lorraine.fr
Nathan,Lantz,nathan.lantz1@etu.univ-lorraine.fr
Leon,Le-Berre,leon.le-berre5@etu.univ-lorraine.fr
Gwendal,Le-Hyoncour,gwendal.le-hyoncour6@etu.univ-lorraine.fr
Rayan,Mammeri,rayan.mammeri8@etu.univ-lorraine.fr
Thomas,Oppe,thomas.oppe5@etu.univ-lorraine.fr
Kyriann,Paille,kyriann.paille9@etu.univ-lorraine.fr
Jean-Baptiste,Paquin,jean-baptiste.paquin7@etu.univ-lorraine.fr
Luka,Perlato,luka.perlato8@etu.univ-lorraine.fr
Lucas,Plateau,lucas.plateau6@etu.univ-lorraine.fr
Lobsang,Rigard,lobsang.rigard1@etu.univ-lorraine.fr
Diego,Riviere-Jombart,diego.riviere-jombart9@etu.univ-lorraine.fr
Fatih,Tastan,fatih.tastan6@etu.univ-lorraine.fr
Kenzo,Tisselin,kenzo.tisselin3@etu.univ-lorraine.fr
Ewan,Urbanc,ewan.urbanc3@etu.univ-lorraine.fr
Emile,Haas,emile.haas8@etu.univ-lorraine.fr
Ethan,Anclin,ethan.anclin1@etu.univ-lorraine.fr
Julio,Soares,julio.soares2@etu.univ-lorraine.fr
Samuel,Binckly,samuel.binckly4@etu.univ-lorraine.fr
Owenn,Bigotte,owenn.bigotte6@etu.univ-lorraine.fr
Corentin,Piquerez,corentin.piquerez1@etu.univ-lorraine.fr
id_jardin,nom
1,IUT de Saint Dié des Vosges
1,Salle des fêtes de St Michel
1,Salle polyvalente d'Étival Clairefontaine
1,La Halle aux Blés
1,Collège de Baccarat
1,Village du livre
1,Lycée d'horticulture
1,Emmaüs Rambervillers
1,Four Grand-Mère
1,Fraispertuis City
1,Le Gaming 88
1,Lycée Georges Baumont
1,Nouvelle Salaison des Hautes-Vosges
1,Brasserie de l'Abbaye
1,Château des princes de Salm
1,Château de Belval
1,Boulangerie Claulin
1,Hôtel Restaurant Julien
1,Biscuiterie du Col de Saales
1,CC de la Fave
1,Association Elan
1,Salle Multi-activités
1,INSIC
1,Salle Polyvalente
1,Le Domaine des Bans
1,Lycée Hôtellier
1,Fromagerie Gérard
1,Boucherie de la Place
1,AFPA Remiremont
1,Cabaret Bellecour
1,Le Foyer
1,Hôpital de Bruyères
1,Restaurant les Myrtilles
1,IFSI
1,Mairie de Neuvillers
1,Mairie Ban de Laveline17
1,Centre d'Animation Municipal2037
1,Musée des Eaux de Vie203831
1,Evergreen Tomatoes09
1,Hôtel au Tilleul0
1,Office du Tourisme de Munster
1,Centre les Jonquilles
1,Gîte le Vic
1,Moulin Clefcy
1,Le grenier de Papy
1,Salle des fêtes de Saulcy
1,Lycée professionnel Notre-Dame de la Providence
1,Foyer rural
1,Fromagerie Gourmand’Art
1,Maison rurale Saulxures
1,Café Canton
1,ENSTIB
1,Assotiation AMI
1,Moustache Bikes
1,Moulin de Nomexy
1,Maison du Livre
1,Centre culturel
1,Mairie de Gerbéviller
1,Mairie de Badonviller
1,Hôtel des lacs
1,La chèvre vagabonde
1,Resto du coeur
1,Les jardins de Callunes
1,Mairie d'Hurbache
2,Eglise Saint Antoine
2,Ligue de l’enseignement
2,Centre Léo Lagrange
2,APF - Local extérieur – ESAT
2,Ecodenn’ergie
2,Botanic
2,Chambre d’Agriculture
2,Pharmacie Robert
2,Association GACI
2,Office du tourisme
2,Raon aux Bois
2,Mr et Mme Boulassel
2,Jardins de Cocagne0,
2,Madame Pierot
2,"3ème Rive Café Associatif",
2,Point Vert Mafra
2,Brico Marché
2,Pro & Cie
2,M. Lecomte François
2,Maison de l'Étudiant
2,La Tête à Toto
4,Jardins de Cocagne0
4,Maison de Quartier du Vieux-Lille
4,La cave de Jules
4,Traiteur Veys
4,Polytech
4,Boucherie François
4,Un Ours et les Etoiles
4,Boulangerie Picavet
4,Bar Moulins d'Ascq
2,Secours Catholique
2,Conseil Départemental des Vosges
2,Association Rhyzome
2,Denninger
édit Agricole Épinal
2,Adinolfi
2,Papeterie Golbey Norske Skog
2,Vosgelis (Épinal)
2,Vosgelis (Remiremont)
2,Renouveau
2,DVIS
2,Maison de l'environnement
2,Peridon
2,Bouvier Emmanuel
2,La Quarterelle
2,Moustache Bikes
2,Biocoop Épinal
4,El Market
4,La Nature a du Génie
4,CCAS de Lambersart
4,Les Pieds sur Terre
4,Boucherie Ludovic Monchy
4,Le Caméléon Gourmand
4,Polygonum Fleuriste
4,Harmonie Nature
4,Boulangerie Aux Blés d'Or
4,Top Fleurs
4,Dépannage D. Buisine
4,Bio'tiful Nature
4,Allo Fleurs
4,Monsieur Vin
4,La Moulinette
4,Cuvelier & Fauvarque
4,Monsieur Vin (Lomme),
4,Biocoop HemHEM
4,Le Relais Gourmand
4,Biocoop Biovalys
4,Boucherie-Traiteur Dierickx
4,Ancolie Fleuriste
4,Monsieur Vin (Mouvaux),
4,La Maison Nouvelle
4,Biocoop Saveurs et Saisons
4,La Campusserie Pont de Bois
4,So végétal (Bondues),
4,L'olivier blanc
4,La maison du vin
4,Boulangerie Catrisse
4,Boulangerie Delmeulle
4,Boucherie Lamandin
4,L.S.I
4,Fred Réception
4,Le Trèfle à Quatre Fleurs
4,Boucherie Chez Florentin
4,Boucherie du Bourg
4,Biocoop Hénin Beaumont
4,Le Panier Fleuri
4,Ethique & Vrac
4,Biocoop Saveurs et Saisons Bouvines
4,La Chouette Librairie
4,Boulangerie Aux Délices de la Comtesse
4,Salon Cannelle
4,L'Atelier Vélo L.S.I.
4,Rêves de Mômes (Marquette-lez-Lille)
4,Artisans du Monde
4,Au Pain d'Antan
4,La Cave de Frédéric
4,Ceci n'est pas une boulangerie
4,Le bus magique
4,Le Polder
4,Boucherie du Bourg
nom,adresse
SAÉ IUT Saint-Dié des Vosges,11 Rue de l'Université
Jardins de Cocagne Thaon les Vosges,Prairie Claudel
Oasis Jardin de Cocagne,19 chemin des Muats
Le Jardin de Cocagne de la Haute Borne,Europarc de la haute Borne
Les Jardins de Cocagne en Limousin,13 Allee de Coyol
...@@ -2,17 +2,38 @@ ...@@ -2,17 +2,38 @@
namespace App\Controller; namespace App\Controller;
use App\Entity\Adherent;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Doctrine\ORM\EntityManagerInterface;
class AdherentController extends AbstractController class AdherentController extends AbstractController
{ {
#[Route('/adherent', name: 'app_adherent')] #[Route('/adherent/import', name: 'app_adherent_import')]
public function index(): Response public function importAdherents(EntityManagerInterface $entityManager): Response
{ {
return $this->render('adherent/index.html.twig', [ $root = $this->getParameter('kernel.project_dir');
'controller_name' => 'AdherentController',
]); $csvFile = fopen($root.'/public/assets/csv/adherent.csv','r');
$firstline = true;
while($row = fgetcsv($csvFile)) {
if($firstline) {
$firstline = false;
continue;
}
$adherent = new Adherent();
$adherent
->setPrenom($row[0])
->setNom($row[1])
->setMail($row[2]);
$entityManager->persist($adherent);
}
$entityManager->flush();
return new Response('Fichier csv importé !!!');
} }
} }
<?php
namespace App\Controller;
use App\Entity\PointDeDepot;
use App\Repository\PointDeDepotRepository;
use App\Repository\StructureRepository;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Doctrine\ORM\EntityManagerInterface;
class PointDeDepotController extends AbstractController
{
#[Route('/depot/import', name: 'app_depot_import')]
public function importAdherents(EntityManagerInterface $entityManager, StructureRepository $structureRepository): Response
{
$root = $this->getParameter('kernel.project_dir');
$csvFile = fopen($root.'/public/assets/csv/depot.csv','r');
$firstline = true;
while($row = fgetcsv($csvFile)) {
if($firstline) {
$firstline = false;
continue;
}
$pdd = new PointDeDepot();
$pdd->setAdresse($row[1]);
$structure = $structureRepository->findById(intval($row[0]));
dd($structure);
$pdd->setStructureId($structure);
dd($pdd);
$entityManager->persist($pdd);
}
$entityManager->flush();
return new Response('Fichier csv importé !!!');
}
}
<?php
namespace App\Controller;
use App\Entity\Structure;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Doctrine\ORM\EntityManagerInterface;
class StructureController extends AbstractController
{
#[Route('/structure/import', name: 'app_structure_import')]
public function importAdherents(EntityManagerInterface $entityManager): Response
{
$root = $this->getParameter('kernel.project_dir');
$csvFile = fopen($root.'/public/assets/csv/structure.csv','r');
$firstline = true;
while($row = fgetcsv($csvFile)) {
if($firstline) {
$firstline = false;
continue;
}
$structure = new Structure();
$structure
->setNom($row[0])
->setAdresse($row[1])
->setVille('')
->setRaisonSoc('')
->setTelephone('');
$entityManager->persist($structure);
}
$entityManager->flush();
return new Response('Fichier csv importé !!!');
}
}
...@@ -18,10 +18,10 @@ class Adherent ...@@ -18,10 +18,10 @@ class Adherent
#[ORM\Column] #[ORM\Column]
private ?int $id = null; private ?int $id = null;
#[ORM\Column(length: 100)] #[ORM\Column(length: 100, nullable: true)]
private ?string $raisonSociale = null; private ?string $raisonSociale = null;
#[ORM\Column(length: 10)] #[ORM\Column(length: 10, nullable: true)]
private ?string $civilite = null; private ?string $civilite = null;
#[ORM\Column(length: 45, nullable: true)] #[ORM\Column(length: 45, nullable: true)]
......
...@@ -17,9 +17,6 @@ class Structure ...@@ -17,9 +17,6 @@ class Structure
#[ORM\Column] #[ORM\Column]
private ?int $id = null; private ?int $id = null;
#[ORM\Column]
private ?int $idStructure = null;
#[ORM\Column(length: 45)] #[ORM\Column(length: 45)]
private ?string $nom = null; private ?string $nom = null;
...@@ -64,18 +61,6 @@ class Structure ...@@ -64,18 +61,6 @@ class Structure
return $this->id; return $this->id;
} }
public function getIdStructure(): ?int
{
return $this->idStructure;
}
public function setIdStructure(int $idStructure): static
{
$this->idStructure = $idStructure;
return $this;
}
public function getNom(): ?string public function getNom(): ?string
{ {
return $this->nom; return $this->nom;
......
...@@ -5,6 +5,7 @@ namespace App\Repository; ...@@ -5,6 +5,7 @@ namespace App\Repository;
use App\Entity\Structure; use App\Entity\Structure;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry; use Doctrine\Persistence\ManagerRegistry;
use phpDocumentor\Reflection\Types\Integer;
/** /**
* @extends ServiceEntityRepository<Structure> * @extends ServiceEntityRepository<Structure>
...@@ -21,6 +22,13 @@ class StructureRepository extends ServiceEntityRepository ...@@ -21,6 +22,13 @@ class StructureRepository extends ServiceEntityRepository
parent::__construct($registry, Structure::class); parent::__construct($registry, Structure::class);
} }
public function findById(int $id) {
$qb = $this->createQueryBuilder('s');
$qb->andWhere('s.id = :id')->setParameter('id', $id);
return $qb->getQuery()->getResult();
}
// /** // /**
// * @return Structure[] Returns an array of Structure objects // * @return Structure[] Returns an array of Structure objects
// */ // */
......
{% extends 'base.html.twig' %}
{% block title %}Hello AdherentController!{% endblock %}
{% block body %}
<style>
.example-wrapper { margin: 1em auto; max-width: 800px; width: 95%; font: 18px/1.5 sans-serif; }
.example-wrapper code { background: #F5F5F5; padding: 2px 6px; }
</style>
<div class="example-wrapper">
<h1>Hello {{ controller_name }}! ✅</h1>
This friendly message is coming from:
<ul>
<li>Your controller at <code><a href="{{ '/var/www/symfony_docker/src/Controller/AdherentController.php'|file_link(0) }}">src/Controller/AdherentController.php</a></code></li>
<li>Your template at <code><a href="{{ '/var/www/symfony_docker/templates/adherent/index.html.twig'|file_link(0) }}">templates/adherent/index.html.twig</a></code></li>
</ul>
</div>
{% endblock %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment