Merge remote-tracking branch 'origin/release/Login' into release/Login
This commit is contained in:
commit
8213037f96
6
.gitignore
vendored
6
.gitignore
vendored
@ -161,7 +161,6 @@ fabric.properties
|
|||||||
/bin/*
|
/bin/*
|
||||||
!bin/console
|
!bin/console
|
||||||
!bin/symfony_requirements
|
!bin/symfony_requirements
|
||||||
/vendor/
|
|
||||||
|
|
||||||
# Assets and user uploads
|
# Assets and user uploads
|
||||||
/web/bundles/
|
/web/bundles/
|
||||||
@ -188,5 +187,6 @@ fabric.properties
|
|||||||
/web/js/
|
/web/js/
|
||||||
|
|
||||||
# End of https://www.toptal.com/developers/gitignore/api/symfony,phpstorm,git
|
# End of https://www.toptal.com/developers/gitignore/api/symfony,phpstorm,git
|
||||||
|
/vendor/
|
||||||
.idea/
|
.idea/
|
||||||
|
.env.local
|
56
migrations/Version20241017131649.php
Normal file
56
migrations/Version20241017131649.php
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
<?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 Version20241017131649 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('DROP SEQUENCE customer_id_seq CASCADE');
|
||||||
|
$this->addSql('DROP SEQUENCE discount_id_seq CASCADE');
|
||||||
|
$this->addSql('DROP SEQUENCE dishes_id_seq CASCADE');
|
||||||
|
$this->addSql('DROP SEQUENCE order_id_seq CASCADE');
|
||||||
|
$this->addSql('DROP SEQUENCE order_detail_id_seq CASCADE');
|
||||||
|
$this->addSql('DROP SEQUENCE reservation_id_seq CASCADE');
|
||||||
|
$this->addSql('DROP SEQUENCE status_order_id_seq CASCADE');
|
||||||
|
$this->addSql('DROP SEQUENCE status_table_id_seq CASCADE');
|
||||||
|
$this->addSql('DROP SEQUENCE table_id_seq CASCADE');
|
||||||
|
$this->addSql('DROP SEQUENCE user_id_seq CASCADE');
|
||||||
|
$this->addSql('ALTER TABLE utilisateurs ADD tabl_id INT DEFAULT NULL');
|
||||||
|
$this->addSql('ALTER TABLE utilisateurs ADD CONSTRAINT FK_497B315E4DE1870D FOREIGN KEY (tabl_id) REFERENCES tables (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||||
|
$this->addSql('CREATE INDEX IDX_497B315E4DE1870D ON utilisateurs (tabl_id)');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
// this down() migration is auto-generated, please modify it to your needs
|
||||||
|
$this->addSql('CREATE SCHEMA public');
|
||||||
|
$this->addSql('CREATE SEQUENCE customer_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
||||||
|
$this->addSql('CREATE SEQUENCE discount_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
||||||
|
$this->addSql('CREATE SEQUENCE dishes_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
||||||
|
$this->addSql('CREATE SEQUENCE order_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
||||||
|
$this->addSql('CREATE SEQUENCE order_detail_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
||||||
|
$this->addSql('CREATE SEQUENCE reservation_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
||||||
|
$this->addSql('CREATE SEQUENCE status_order_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
||||||
|
$this->addSql('CREATE SEQUENCE status_table_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
||||||
|
$this->addSql('CREATE SEQUENCE table_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
||||||
|
$this->addSql('CREATE SEQUENCE user_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
||||||
|
$this->addSql('ALTER TABLE utilisateurs DROP CONSTRAINT FK_497B315E4DE1870D');
|
||||||
|
$this->addSql('DROP INDEX IDX_497B315E4DE1870D');
|
||||||
|
$this->addSql('ALTER TABLE utilisateurs DROP tabl_id');
|
||||||
|
}
|
||||||
|
}
|
37
migrations/Version20241017131858.php
Normal file
37
migrations/Version20241017131858.php
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
<?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 Version20241017131858 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 SEQUENCE statut_tables_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
||||||
|
$this->addSql('CREATE TABLE statut_tables (id INT NOT NULL, tabl_id INT DEFAULT NULL, libellé VARCHAR(255) NOT NULL, PRIMARY KEY(id))');
|
||||||
|
$this->addSql('CREATE INDEX IDX_33C8A3754DE1870D ON statut_tables (tabl_id)');
|
||||||
|
$this->addSql('ALTER TABLE statut_tables ADD CONSTRAINT FK_33C8A3754DE1870D FOREIGN KEY (tabl_id) REFERENCES tables (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
// this down() migration is auto-generated, please modify it to your needs
|
||||||
|
$this->addSql('CREATE SCHEMA public');
|
||||||
|
$this->addSql('DROP SEQUENCE statut_tables_id_seq CASCADE');
|
||||||
|
$this->addSql('ALTER TABLE statut_tables DROP CONSTRAINT FK_33C8A3754DE1870D');
|
||||||
|
$this->addSql('DROP TABLE statut_tables');
|
||||||
|
}
|
||||||
|
}
|
41
migrations/Version20241017132345.php
Normal file
41
migrations/Version20241017132345.php
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
<?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 Version20241017132345 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 SEQUENCE commandes_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
||||||
|
$this->addSql('CREATE SEQUENCE statut_commandes_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
||||||
|
$this->addSql('CREATE TABLE commandes (id INT NOT NULL, date_heure TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, statut BOOLEAN NOT NULL, total DOUBLE PRECISION NOT NULL, PRIMARY KEY(id))');
|
||||||
|
$this->addSql('CREATE TABLE statut_commandes (id INT NOT NULL, commande_id INT DEFAULT NULL, libellé VARCHAR(255) NOT NULL, PRIMARY KEY(id))');
|
||||||
|
$this->addSql('CREATE INDEX IDX_947ABDEE82EA2E54 ON statut_commandes (commande_id)');
|
||||||
|
$this->addSql('ALTER TABLE statut_commandes ADD CONSTRAINT FK_947ABDEE82EA2E54 FOREIGN KEY (commande_id) REFERENCES commandes (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
// this down() migration is auto-generated, please modify it to your needs
|
||||||
|
$this->addSql('CREATE SCHEMA public');
|
||||||
|
$this->addSql('DROP SEQUENCE commandes_id_seq CASCADE');
|
||||||
|
$this->addSql('DROP SEQUENCE statut_commandes_id_seq CASCADE');
|
||||||
|
$this->addSql('ALTER TABLE statut_commandes DROP CONSTRAINT FK_947ABDEE82EA2E54');
|
||||||
|
$this->addSql('DROP TABLE commandes');
|
||||||
|
$this->addSql('DROP TABLE statut_commandes');
|
||||||
|
}
|
||||||
|
}
|
45
migrations/Version20241017132656.php
Normal file
45
migrations/Version20241017132656.php
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
<?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 Version20241017132656 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 SEQUENCE details_commande_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
||||||
|
$this->addSql('CREATE TABLE commandes_clients (commandes_id INT NOT NULL, clients_id INT NOT NULL, PRIMARY KEY(commandes_id, clients_id))');
|
||||||
|
$this->addSql('CREATE INDEX IDX_C665A6248BF5C2E6 ON commandes_clients (commandes_id)');
|
||||||
|
$this->addSql('CREATE INDEX IDX_C665A624AB014612 ON commandes_clients (clients_id)');
|
||||||
|
$this->addSql('CREATE TABLE details_commande (id INT NOT NULL, commande_id INT DEFAULT NULL, quantite INT NOT NULL, prix_unitaire DOUBLE PRECISION NOT NULL, PRIMARY KEY(id))');
|
||||||
|
$this->addSql('CREATE INDEX IDX_4BCD5F682EA2E54 ON details_commande (commande_id)');
|
||||||
|
$this->addSql('ALTER TABLE commandes_clients ADD CONSTRAINT FK_C665A6248BF5C2E6 FOREIGN KEY (commandes_id) REFERENCES commandes (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||||
|
$this->addSql('ALTER TABLE commandes_clients ADD CONSTRAINT FK_C665A624AB014612 FOREIGN KEY (clients_id) REFERENCES clients (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||||
|
$this->addSql('ALTER TABLE details_commande ADD CONSTRAINT FK_4BCD5F682EA2E54 FOREIGN KEY (commande_id) REFERENCES commandes (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
// this down() migration is auto-generated, please modify it to your needs
|
||||||
|
$this->addSql('CREATE SCHEMA public');
|
||||||
|
$this->addSql('DROP SEQUENCE details_commande_id_seq CASCADE');
|
||||||
|
$this->addSql('ALTER TABLE commandes_clients DROP CONSTRAINT FK_C665A6248BF5C2E6');
|
||||||
|
$this->addSql('ALTER TABLE commandes_clients DROP CONSTRAINT FK_C665A624AB014612');
|
||||||
|
$this->addSql('ALTER TABLE details_commande DROP CONSTRAINT FK_4BCD5F682EA2E54');
|
||||||
|
$this->addSql('DROP TABLE commandes_clients');
|
||||||
|
$this->addSql('DROP TABLE details_commande');
|
||||||
|
}
|
||||||
|
}
|
49
migrations/Version20241017133242.php
Normal file
49
migrations/Version20241017133242.php
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
<?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 Version20241017133242 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 SEQUENCE plats_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
||||||
|
$this->addSql('CREATE SEQUENCE reductions_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
||||||
|
$this->addSql('CREATE TABLE plats (id INT NOT NULL, reduction_id INT DEFAULT NULL, nom VARCHAR(255) NOT NULL, description VARCHAR(255) NOT NULL, prix DOUBLE PRECISION NOT NULL, categorie VARCHAR(255) NOT NULL, statut BOOLEAN NOT NULL, nb_de_commande INT NOT NULL, PRIMARY KEY(id))');
|
||||||
|
$this->addSql('CREATE INDEX IDX_854A620AC03CB092 ON plats (reduction_id)');
|
||||||
|
$this->addSql('CREATE TABLE plats_commandes (plats_id INT NOT NULL, commandes_id INT NOT NULL, PRIMARY KEY(plats_id, commandes_id))');
|
||||||
|
$this->addSql('CREATE INDEX IDX_7F8CABAAAA14E1C8 ON plats_commandes (plats_id)');
|
||||||
|
$this->addSql('CREATE INDEX IDX_7F8CABAA8BF5C2E6 ON plats_commandes (commandes_id)');
|
||||||
|
$this->addSql('CREATE TABLE reductions (id INT NOT NULL, description VARCHAR(255) NOT NULL, prix DOUBLE PRECISION NOT NULL, pourcentage INT NOT NULL, montant_fixe VARCHAR(255) NOT NULL, date_debut TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, date_fin TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, PRIMARY KEY(id))');
|
||||||
|
$this->addSql('ALTER TABLE plats ADD CONSTRAINT FK_854A620AC03CB092 FOREIGN KEY (reduction_id) REFERENCES reductions (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||||
|
$this->addSql('ALTER TABLE plats_commandes ADD CONSTRAINT FK_7F8CABAAAA14E1C8 FOREIGN KEY (plats_id) REFERENCES plats (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||||
|
$this->addSql('ALTER TABLE plats_commandes ADD CONSTRAINT FK_7F8CABAA8BF5C2E6 FOREIGN KEY (commandes_id) REFERENCES commandes (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
// this down() migration is auto-generated, please modify it to your needs
|
||||||
|
$this->addSql('CREATE SCHEMA public');
|
||||||
|
$this->addSql('DROP SEQUENCE plats_id_seq CASCADE');
|
||||||
|
$this->addSql('DROP SEQUENCE reductions_id_seq CASCADE');
|
||||||
|
$this->addSql('ALTER TABLE plats DROP CONSTRAINT FK_854A620AC03CB092');
|
||||||
|
$this->addSql('ALTER TABLE plats_commandes DROP CONSTRAINT FK_7F8CABAAAA14E1C8');
|
||||||
|
$this->addSql('ALTER TABLE plats_commandes DROP CONSTRAINT FK_7F8CABAA8BF5C2E6');
|
||||||
|
$this->addSql('DROP TABLE plats');
|
||||||
|
$this->addSql('DROP TABLE plats_commandes');
|
||||||
|
$this->addSql('DROP TABLE reductions');
|
||||||
|
}
|
||||||
|
}
|
44
migrations/Version20241017141106.php
Normal file
44
migrations/Version20241017141106.php
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
<?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 Version20241017141106 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 tables_tables (tables_source INT NOT NULL, tables_target INT NOT NULL, PRIMARY KEY(tables_source, tables_target))');
|
||||||
|
$this->addSql('CREATE INDEX IDX_D19ED3B4A53AEE6 ON tables_tables (tables_source)');
|
||||||
|
$this->addSql('CREATE INDEX IDX_D19ED3B413B6FE69 ON tables_tables (tables_target)');
|
||||||
|
$this->addSql('ALTER TABLE tables_tables ADD CONSTRAINT FK_D19ED3B4A53AEE6 FOREIGN KEY (tables_source) REFERENCES tables (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||||
|
$this->addSql('ALTER TABLE tables_tables ADD CONSTRAINT FK_D19ED3B413B6FE69 FOREIGN KEY (tables_target) REFERENCES tables (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||||
|
$this->addSql('ALTER TABLE utilisateurs DROP CONSTRAINT fk_497b315e4de1870d');
|
||||||
|
$this->addSql('DROP INDEX idx_497b315e4de1870d');
|
||||||
|
$this->addSql('ALTER TABLE utilisateurs DROP tabl_id');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
// this down() migration is auto-generated, please modify it to your needs
|
||||||
|
$this->addSql('CREATE SCHEMA public');
|
||||||
|
$this->addSql('ALTER TABLE tables_tables DROP CONSTRAINT FK_D19ED3B4A53AEE6');
|
||||||
|
$this->addSql('ALTER TABLE tables_tables DROP CONSTRAINT FK_D19ED3B413B6FE69');
|
||||||
|
$this->addSql('DROP TABLE tables_tables');
|
||||||
|
$this->addSql('ALTER TABLE utilisateurs ADD tabl_id INT DEFAULT NULL');
|
||||||
|
$this->addSql('ALTER TABLE utilisateurs ADD CONSTRAINT fk_497b315e4de1870d FOREIGN KEY (tabl_id) REFERENCES tables (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||||
|
$this->addSql('CREATE INDEX idx_497b315e4de1870d ON utilisateurs (tabl_id)');
|
||||||
|
}
|
||||||
|
}
|
46
migrations/Version20241017141339.php
Normal file
46
migrations/Version20241017141339.php
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
<?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 Version20241017141339 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 utilisateurs_tables (utilisateurs_id INT NOT NULL, tables_id INT NOT NULL, PRIMARY KEY(utilisateurs_id, tables_id))');
|
||||||
|
$this->addSql('CREATE INDEX IDX_A9A665291E969C5 ON utilisateurs_tables (utilisateurs_id)');
|
||||||
|
$this->addSql('CREATE INDEX IDX_A9A6652985405FD2 ON utilisateurs_tables (tables_id)');
|
||||||
|
$this->addSql('ALTER TABLE utilisateurs_tables ADD CONSTRAINT FK_A9A665291E969C5 FOREIGN KEY (utilisateurs_id) REFERENCES utilisateurs (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||||
|
$this->addSql('ALTER TABLE utilisateurs_tables ADD CONSTRAINT FK_A9A6652985405FD2 FOREIGN KEY (tables_id) REFERENCES tables (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||||
|
$this->addSql('ALTER TABLE tables_tables DROP CONSTRAINT fk_d19ed3b4a53aee6');
|
||||||
|
$this->addSql('ALTER TABLE tables_tables DROP CONSTRAINT fk_d19ed3b413b6fe69');
|
||||||
|
$this->addSql('DROP TABLE tables_tables');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
// this down() migration is auto-generated, please modify it to your needs
|
||||||
|
$this->addSql('CREATE SCHEMA public');
|
||||||
|
$this->addSql('CREATE TABLE tables_tables (tables_source INT NOT NULL, tables_target INT NOT NULL, PRIMARY KEY(tables_source, tables_target))');
|
||||||
|
$this->addSql('CREATE INDEX idx_d19ed3b413b6fe69 ON tables_tables (tables_target)');
|
||||||
|
$this->addSql('CREATE INDEX idx_d19ed3b4a53aee6 ON tables_tables (tables_source)');
|
||||||
|
$this->addSql('ALTER TABLE tables_tables ADD CONSTRAINT fk_d19ed3b4a53aee6 FOREIGN KEY (tables_source) REFERENCES tables (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||||
|
$this->addSql('ALTER TABLE tables_tables ADD CONSTRAINT fk_d19ed3b413b6fe69 FOREIGN KEY (tables_target) REFERENCES tables (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||||
|
$this->addSql('ALTER TABLE utilisateurs_tables DROP CONSTRAINT FK_A9A665291E969C5');
|
||||||
|
$this->addSql('ALTER TABLE utilisateurs_tables DROP CONSTRAINT FK_A9A6652985405FD2');
|
||||||
|
$this->addSql('DROP TABLE utilisateurs_tables');
|
||||||
|
}
|
||||||
|
}
|
38
migrations/Version20241017141858.php
Normal file
38
migrations/Version20241017141858.php
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
<?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 Version20241017141858 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 commandes ADD statut_commande_id INT DEFAULT NULL');
|
||||||
|
$this->addSql('ALTER TABLE commandes ADD CONSTRAINT FK_35D4282CFB435DFD FOREIGN KEY (statut_commande_id) REFERENCES statut_commandes (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||||
|
$this->addSql('CREATE INDEX IDX_35D4282CFB435DFD ON commandes (statut_commande_id)');
|
||||||
|
$this->addSql('ALTER TABLE statut_commandes RENAME COLUMN libellé TO libelle');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
// this down() migration is auto-generated, please modify it to your needs
|
||||||
|
$this->addSql('CREATE SCHEMA public');
|
||||||
|
$this->addSql('ALTER TABLE statut_commandes RENAME COLUMN libelle TO "libellé"');
|
||||||
|
$this->addSql('ALTER TABLE commandes DROP CONSTRAINT FK_35D4282CFB435DFD');
|
||||||
|
$this->addSql('DROP INDEX IDX_35D4282CFB435DFD');
|
||||||
|
$this->addSql('ALTER TABLE commandes DROP statut_commande_id');
|
||||||
|
}
|
||||||
|
}
|
36
migrations/Version20241017142439.php
Normal file
36
migrations/Version20241017142439.php
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
<?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 Version20241017142439 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 commandes DROP CONSTRAINT fk_35d4282cfb435dfd');
|
||||||
|
$this->addSql('DROP INDEX idx_35d4282cfb435dfd');
|
||||||
|
$this->addSql('ALTER TABLE commandes DROP statut_commande_id');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
// this down() migration is auto-generated, please modify it to your needs
|
||||||
|
$this->addSql('CREATE SCHEMA public');
|
||||||
|
$this->addSql('ALTER TABLE commandes ADD statut_commande_id INT DEFAULT NULL');
|
||||||
|
$this->addSql('ALTER TABLE commandes ADD CONSTRAINT fk_35d4282cfb435dfd FOREIGN KEY (statut_commande_id) REFERENCES statut_commandes (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||||
|
$this->addSql('CREATE INDEX idx_35d4282cfb435dfd ON commandes (statut_commande_id)');
|
||||||
|
}
|
||||||
|
}
|
42
migrations/Version20241017142915.php
Normal file
42
migrations/Version20241017142915.php
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
<?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 Version20241017142915 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 commandes ADD statut_commande_id INT DEFAULT NULL');
|
||||||
|
$this->addSql('ALTER TABLE commandes ADD CONSTRAINT FK_35D4282CFB435DFD FOREIGN KEY (statut_commande_id) REFERENCES statut_commandes (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||||
|
$this->addSql('CREATE INDEX IDX_35D4282CFB435DFD ON commandes (statut_commande_id)');
|
||||||
|
$this->addSql('ALTER TABLE statut_commandes DROP CONSTRAINT fk_947abdee82ea2e54');
|
||||||
|
$this->addSql('DROP INDEX idx_947abdee82ea2e54');
|
||||||
|
$this->addSql('ALTER TABLE statut_commandes DROP commande_id');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
// this down() migration is auto-generated, please modify it to your needs
|
||||||
|
$this->addSql('CREATE SCHEMA public');
|
||||||
|
$this->addSql('ALTER TABLE statut_commandes ADD commande_id INT DEFAULT NULL');
|
||||||
|
$this->addSql('ALTER TABLE statut_commandes ADD CONSTRAINT fk_947abdee82ea2e54 FOREIGN KEY (commande_id) REFERENCES commandes (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||||
|
$this->addSql('CREATE INDEX idx_947abdee82ea2e54 ON statut_commandes (commande_id)');
|
||||||
|
$this->addSql('ALTER TABLE commandes DROP CONSTRAINT FK_35D4282CFB435DFD');
|
||||||
|
$this->addSql('DROP INDEX IDX_35D4282CFB435DFD');
|
||||||
|
$this->addSql('ALTER TABLE commandes DROP statut_commande_id');
|
||||||
|
}
|
||||||
|
}
|
1
src/Controller/IndexController.php
Normal file
1
src/Controller/IndexController.php
Normal file
@ -0,0 +1 @@
|
|||||||
|
<?php
|
151
src/Entity/Clients.php
Normal file
151
src/Entity/Clients.php
Normal file
@ -0,0 +1,151 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Entity;
|
||||||
|
|
||||||
|
use App\Repository\ClientsRepository;
|
||||||
|
use Doctrine\Common\Collections\ArrayCollection;
|
||||||
|
use Doctrine\Common\Collections\Collection;
|
||||||
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
|
||||||
|
#[ORM\Entity(repositoryClass: ClientsRepository::class)]
|
||||||
|
class Clients
|
||||||
|
{
|
||||||
|
#[ORM\Id]
|
||||||
|
#[ORM\GeneratedValue]
|
||||||
|
#[ORM\Column]
|
||||||
|
private ?int $id = null;
|
||||||
|
|
||||||
|
#[ORM\Column(length: 255)]
|
||||||
|
private ?string $Prenom = null;
|
||||||
|
|
||||||
|
#[ORM\Column(length: 255)]
|
||||||
|
private ?string $Nom = null;
|
||||||
|
|
||||||
|
#[ORM\Column(length: 255)]
|
||||||
|
private ?string $Email = null;
|
||||||
|
|
||||||
|
#[ORM\Column(length: 255)]
|
||||||
|
private ?string $Telephone = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var Collection<int, Tables>
|
||||||
|
*/
|
||||||
|
#[ORM\ManyToMany(targetEntity: Tables::class, inversedBy: 'Tabl')]
|
||||||
|
private Collection $Tabl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var Collection<int, Commandes>
|
||||||
|
*/
|
||||||
|
#[ORM\ManyToMany(targetEntity: Commandes::class, mappedBy: 'Client')]
|
||||||
|
private Collection $commandes;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->Tabl = new ArrayCollection();
|
||||||
|
$this->commandes = new ArrayCollection();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getId(): ?int
|
||||||
|
{
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getPrenom(): ?string
|
||||||
|
{
|
||||||
|
return $this->Prenom;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setPrenom(string $Prenom): static
|
||||||
|
{
|
||||||
|
$this->Prenom = $Prenom;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getNom(): ?string
|
||||||
|
{
|
||||||
|
return $this->Nom;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setNom(string $Nom): static
|
||||||
|
{
|
||||||
|
$this->Nom = $Nom;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getEmail(): ?string
|
||||||
|
{
|
||||||
|
return $this->Email;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setEmail(string $Email): static
|
||||||
|
{
|
||||||
|
$this->Email = $Email;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getTelephone(): ?string
|
||||||
|
{
|
||||||
|
return $this->Telephone;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setTelephone(string $Telephone): static
|
||||||
|
{
|
||||||
|
$this->Telephone = $Telephone;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Collection<int, Tables>
|
||||||
|
*/
|
||||||
|
public function getTabl(): Collection
|
||||||
|
{
|
||||||
|
return $this->Tabl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function addTabl(Tables $tabl): static
|
||||||
|
{
|
||||||
|
if (!$this->Tabl->contains($tabl)) {
|
||||||
|
$this->Tabl->add($tabl);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function removeTabl(Tables $tabl): static
|
||||||
|
{
|
||||||
|
$this->Tabl->removeElement($tabl);
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Collection<int, Commandes>
|
||||||
|
*/
|
||||||
|
public function getCommandes(): Collection
|
||||||
|
{
|
||||||
|
return $this->commandes;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function addCommande(Commandes $commande): static
|
||||||
|
{
|
||||||
|
if (!$this->commandes->contains($commande)) {
|
||||||
|
$this->commandes->add($commande);
|
||||||
|
$commande->addClient($this);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function removeCommande(Commandes $commande): static
|
||||||
|
{
|
||||||
|
if ($this->commandes->removeElement($commande)) {
|
||||||
|
$commande->removeClient($this);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
}
|
189
src/Entity/Commandes.php
Normal file
189
src/Entity/Commandes.php
Normal file
@ -0,0 +1,189 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Entity;
|
||||||
|
|
||||||
|
use App\Repository\CommandesRepository;
|
||||||
|
use Doctrine\Common\Collections\ArrayCollection;
|
||||||
|
use Doctrine\Common\Collections\Collection;
|
||||||
|
use Doctrine\DBAL\Types\Types;
|
||||||
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
|
||||||
|
#[ORM\Entity(repositoryClass: CommandesRepository::class)]
|
||||||
|
class Commandes
|
||||||
|
{
|
||||||
|
#[ORM\Id]
|
||||||
|
#[ORM\GeneratedValue]
|
||||||
|
#[ORM\Column]
|
||||||
|
private ?int $id = null;
|
||||||
|
|
||||||
|
#[ORM\Column(type: Types::DATETIME_MUTABLE)]
|
||||||
|
private ?\DateTimeInterface $DateHeure = null;
|
||||||
|
|
||||||
|
#[ORM\Column]
|
||||||
|
private ?bool $Statut = null;
|
||||||
|
|
||||||
|
#[ORM\Column]
|
||||||
|
private ?float $Total = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var Collection<int, Clients>
|
||||||
|
*/
|
||||||
|
#[ORM\ManyToMany(targetEntity: Clients::class, inversedBy: 'commandes')]
|
||||||
|
private Collection $Client;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var Collection<int, DetailsCommande>
|
||||||
|
*/
|
||||||
|
#[ORM\OneToMany(targetEntity: DetailsCommande::class, mappedBy: 'Commande')]
|
||||||
|
private Collection $detailsCommandes;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var Collection<int, Plats>
|
||||||
|
*/
|
||||||
|
#[ORM\ManyToMany(targetEntity: Plats::class, mappedBy: 'Commande')]
|
||||||
|
private Collection $plats;
|
||||||
|
|
||||||
|
#[ORM\ManyToOne(inversedBy: 'commandes')]
|
||||||
|
private ?StatutCommandes $StatutCommande = null;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->Client = new ArrayCollection();
|
||||||
|
$this->detailsCommandes = new ArrayCollection();
|
||||||
|
$this->plats = new ArrayCollection();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getId(): ?int
|
||||||
|
{
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDateHeure(): ?\DateTimeInterface
|
||||||
|
{
|
||||||
|
return $this->DateHeure;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setDateHeure(\DateTimeInterface $DateHeure): static
|
||||||
|
{
|
||||||
|
$this->DateHeure = $DateHeure;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function isStatut(): ?bool
|
||||||
|
{
|
||||||
|
return $this->Statut;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setStatut(bool $Statut): static
|
||||||
|
{
|
||||||
|
$this->Statut = $Statut;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getTotal(): ?float
|
||||||
|
{
|
||||||
|
return $this->Total;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setTotal(float $Total): static
|
||||||
|
{
|
||||||
|
$this->Total = $Total;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Collection<int, Clients>
|
||||||
|
*/
|
||||||
|
public function getClient(): Collection
|
||||||
|
{
|
||||||
|
return $this->Client;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function addClient(Clients $client): static
|
||||||
|
{
|
||||||
|
if (!$this->Client->contains($client)) {
|
||||||
|
$this->Client->add($client);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function removeClient(Clients $client): static
|
||||||
|
{
|
||||||
|
$this->Client->removeElement($client);
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Collection<int, DetailsCommande>
|
||||||
|
*/
|
||||||
|
public function getDetailsCommandes(): Collection
|
||||||
|
{
|
||||||
|
return $this->detailsCommandes;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function addDetailsCommande(DetailsCommande $detailsCommande): static
|
||||||
|
{
|
||||||
|
if (!$this->detailsCommandes->contains($detailsCommande)) {
|
||||||
|
$this->detailsCommandes->add($detailsCommande);
|
||||||
|
$detailsCommande->setCommande($this);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function removeDetailsCommande(DetailsCommande $detailsCommande): static
|
||||||
|
{
|
||||||
|
if ($this->detailsCommandes->removeElement($detailsCommande)) {
|
||||||
|
// set the owning side to null (unless already changed)
|
||||||
|
if ($detailsCommande->getCommande() === $this) {
|
||||||
|
$detailsCommande->setCommande(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Collection<int, Plats>
|
||||||
|
*/
|
||||||
|
public function getPlats(): Collection
|
||||||
|
{
|
||||||
|
return $this->plats;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function addPlat(Plats $plat): static
|
||||||
|
{
|
||||||
|
if (!$this->plats->contains($plat)) {
|
||||||
|
$this->plats->add($plat);
|
||||||
|
$plat->addCommande($this);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function removePlat(Plats $plat): static
|
||||||
|
{
|
||||||
|
if ($this->plats->removeElement($plat)) {
|
||||||
|
$plat->removeCommande($this);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getStatutCommande(): ?StatutCommandes
|
||||||
|
{
|
||||||
|
return $this->StatutCommande;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setStatutCommande(?StatutCommandes $StatutCommande): static
|
||||||
|
{
|
||||||
|
$this->StatutCommande = $StatutCommande;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
}
|
65
src/Entity/DetailsCommande.php
Normal file
65
src/Entity/DetailsCommande.php
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Entity;
|
||||||
|
|
||||||
|
use App\Repository\DetailsCommandeRepository;
|
||||||
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
|
||||||
|
#[ORM\Entity(repositoryClass: DetailsCommandeRepository::class)]
|
||||||
|
class DetailsCommande
|
||||||
|
{
|
||||||
|
#[ORM\Id]
|
||||||
|
#[ORM\GeneratedValue]
|
||||||
|
#[ORM\Column]
|
||||||
|
private ?int $id = null;
|
||||||
|
|
||||||
|
#[ORM\Column]
|
||||||
|
private ?int $Quantite = null;
|
||||||
|
|
||||||
|
#[ORM\Column]
|
||||||
|
private ?float $PrixUnitaire = null;
|
||||||
|
|
||||||
|
#[ORM\ManyToOne(inversedBy: 'detailsCommandes')]
|
||||||
|
private ?Commandes $Commande = null;
|
||||||
|
|
||||||
|
public function getId(): ?int
|
||||||
|
{
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getQuantite(): ?int
|
||||||
|
{
|
||||||
|
return $this->Quantite;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setQuantite(int $Quantite): static
|
||||||
|
{
|
||||||
|
$this->Quantite = $Quantite;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getPrixUnitaire(): ?float
|
||||||
|
{
|
||||||
|
return $this->PrixUnitaire;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setPrixUnitaire(float $PrixUnitaire): static
|
||||||
|
{
|
||||||
|
$this->PrixUnitaire = $PrixUnitaire;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getCommande(): ?Commandes
|
||||||
|
{
|
||||||
|
return $this->Commande;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setCommande(?Commandes $Commande): static
|
||||||
|
{
|
||||||
|
$this->Commande = $Commande;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
}
|
162
src/Entity/Plats.php
Normal file
162
src/Entity/Plats.php
Normal file
@ -0,0 +1,162 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Entity;
|
||||||
|
|
||||||
|
use App\Repository\PlatsRepository;
|
||||||
|
use Doctrine\Common\Collections\ArrayCollection;
|
||||||
|
use Doctrine\Common\Collections\Collection;
|
||||||
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
|
||||||
|
#[ORM\Entity(repositoryClass: PlatsRepository::class)]
|
||||||
|
class Plats
|
||||||
|
{
|
||||||
|
#[ORM\Id]
|
||||||
|
#[ORM\GeneratedValue]
|
||||||
|
#[ORM\Column]
|
||||||
|
private ?int $id = null;
|
||||||
|
|
||||||
|
#[ORM\Column(length: 255)]
|
||||||
|
private ?string $Nom = null;
|
||||||
|
|
||||||
|
#[ORM\Column(length: 255)]
|
||||||
|
private ?string $Description = null;
|
||||||
|
|
||||||
|
#[ORM\Column]
|
||||||
|
private ?float $Prix = null;
|
||||||
|
|
||||||
|
#[ORM\Column(length: 255)]
|
||||||
|
private ?string $Categorie = null;
|
||||||
|
|
||||||
|
#[ORM\Column]
|
||||||
|
private ?bool $Statut = null;
|
||||||
|
|
||||||
|
#[ORM\Column]
|
||||||
|
private ?int $Nb_de_commande = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var Collection<int, Commandes>
|
||||||
|
*/
|
||||||
|
#[ORM\ManyToMany(targetEntity: Commandes::class, inversedBy: 'plats')]
|
||||||
|
private Collection $Commande;
|
||||||
|
|
||||||
|
#[ORM\ManyToOne(inversedBy: 'plats')]
|
||||||
|
private ?Reductions $Reduction = null;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->Commande = new ArrayCollection();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getId(): ?int
|
||||||
|
{
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getNom(): ?string
|
||||||
|
{
|
||||||
|
return $this->Nom;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setNom(string $Nom): static
|
||||||
|
{
|
||||||
|
$this->Nom = $Nom;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDescription(): ?string
|
||||||
|
{
|
||||||
|
return $this->Description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setDescription(string $Description): static
|
||||||
|
{
|
||||||
|
$this->Description = $Description;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getPrix(): ?float
|
||||||
|
{
|
||||||
|
return $this->Prix;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setPrix(float $Prix): static
|
||||||
|
{
|
||||||
|
$this->Prix = $Prix;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getCategorie(): ?string
|
||||||
|
{
|
||||||
|
return $this->Categorie;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setCategorie(string $Categorie): static
|
||||||
|
{
|
||||||
|
$this->Categorie = $Categorie;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function isStatut(): ?bool
|
||||||
|
{
|
||||||
|
return $this->Statut;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setStatut(bool $Statut): static
|
||||||
|
{
|
||||||
|
$this->Statut = $Statut;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getNbDeCommande(): ?int
|
||||||
|
{
|
||||||
|
return $this->Nb_de_commande;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setNbDeCommande(int $Nb_de_commande): static
|
||||||
|
{
|
||||||
|
$this->Nb_de_commande = $Nb_de_commande;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Collection<int, Commandes>
|
||||||
|
*/
|
||||||
|
public function getCommande(): Collection
|
||||||
|
{
|
||||||
|
return $this->Commande;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function addCommande(Commandes $commande): static
|
||||||
|
{
|
||||||
|
if (!$this->Commande->contains($commande)) {
|
||||||
|
$this->Commande->add($commande);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function removeCommande(Commandes $commande): static
|
||||||
|
{
|
||||||
|
$this->Commande->removeElement($commande);
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getReduction(): ?Reductions
|
||||||
|
{
|
||||||
|
return $this->Reduction;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setReduction(?Reductions $Reduction): static
|
||||||
|
{
|
||||||
|
$this->Reduction = $Reduction;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
}
|
154
src/Entity/Reductions.php
Normal file
154
src/Entity/Reductions.php
Normal file
@ -0,0 +1,154 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Entity;
|
||||||
|
|
||||||
|
use App\Repository\ReductionsRepository;
|
||||||
|
use Doctrine\Common\Collections\ArrayCollection;
|
||||||
|
use Doctrine\Common\Collections\Collection;
|
||||||
|
use Doctrine\DBAL\Types\Types;
|
||||||
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
|
||||||
|
#[ORM\Entity(repositoryClass: ReductionsRepository::class)]
|
||||||
|
class Reductions
|
||||||
|
{
|
||||||
|
#[ORM\Id]
|
||||||
|
#[ORM\GeneratedValue]
|
||||||
|
#[ORM\Column]
|
||||||
|
private ?int $id = null;
|
||||||
|
|
||||||
|
#[ORM\Column(length: 255)]
|
||||||
|
private ?string $Description = null;
|
||||||
|
|
||||||
|
#[ORM\Column]
|
||||||
|
private ?float $Prix = null;
|
||||||
|
|
||||||
|
#[ORM\Column]
|
||||||
|
private ?int $Pourcentage = null;
|
||||||
|
|
||||||
|
#[ORM\Column(length: 255)]
|
||||||
|
private ?string $MontantFixe = null;
|
||||||
|
|
||||||
|
#[ORM\Column(type: Types::DATETIME_MUTABLE)]
|
||||||
|
private ?\DateTimeInterface $DateDebut = null;
|
||||||
|
|
||||||
|
#[ORM\Column(type: Types::DATETIME_MUTABLE)]
|
||||||
|
private ?\DateTimeInterface $DateFin = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var Collection<int, Plats>
|
||||||
|
*/
|
||||||
|
#[ORM\OneToMany(targetEntity: Plats::class, mappedBy: 'Reduction')]
|
||||||
|
private Collection $plats;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->plats = new ArrayCollection();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getId(): ?int
|
||||||
|
{
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDescription(): ?string
|
||||||
|
{
|
||||||
|
return $this->Description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setDescription(string $Description): static
|
||||||
|
{
|
||||||
|
$this->Description = $Description;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getPrix(): ?float
|
||||||
|
{
|
||||||
|
return $this->Prix;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setPrix(float $Prix): static
|
||||||
|
{
|
||||||
|
$this->Prix = $Prix;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getPourcentage(): ?int
|
||||||
|
{
|
||||||
|
return $this->Pourcentage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setPourcentage(int $Pourcentage): static
|
||||||
|
{
|
||||||
|
$this->Pourcentage = $Pourcentage;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getMontantFixe(): ?string
|
||||||
|
{
|
||||||
|
return $this->MontantFixe;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setMontantFixe(string $MontantFixe): static
|
||||||
|
{
|
||||||
|
$this->MontantFixe = $MontantFixe;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDateDebut(): ?\DateTimeInterface
|
||||||
|
{
|
||||||
|
return $this->DateDebut;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setDateDebut(\DateTimeInterface $DateDebut): static
|
||||||
|
{
|
||||||
|
$this->DateDebut = $DateDebut;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDateFin(): ?\DateTimeInterface
|
||||||
|
{
|
||||||
|
return $this->DateFin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setDateFin(\DateTimeInterface $DateFin): static
|
||||||
|
{
|
||||||
|
$this->DateFin = $DateFin;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Collection<int, Plats>
|
||||||
|
*/
|
||||||
|
public function getPlats(): Collection
|
||||||
|
{
|
||||||
|
return $this->plats;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function addPlat(Plats $plat): static
|
||||||
|
{
|
||||||
|
if (!$this->plats->contains($plat)) {
|
||||||
|
$this->plats->add($plat);
|
||||||
|
$plat->setReduction($this);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function removePlat(Plats $plat): static
|
||||||
|
{
|
||||||
|
if ($this->plats->removeElement($plat)) {
|
||||||
|
// set the owning side to null (unless already changed)
|
||||||
|
if ($plat->getReduction() === $this) {
|
||||||
|
$plat->setReduction(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
}
|
106
src/Entity/Reservations.php
Normal file
106
src/Entity/Reservations.php
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Entity;
|
||||||
|
|
||||||
|
use App\Repository\ReservationsRepository;
|
||||||
|
use Doctrine\Common\Collections\ArrayCollection;
|
||||||
|
use Doctrine\Common\Collections\Collection;
|
||||||
|
use Doctrine\DBAL\Types\Types;
|
||||||
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
|
||||||
|
#[ORM\Entity(repositoryClass: ReservationsRepository::class)]
|
||||||
|
class Reservations
|
||||||
|
{
|
||||||
|
#[ORM\Id]
|
||||||
|
#[ORM\GeneratedValue]
|
||||||
|
#[ORM\Column]
|
||||||
|
private ?int $id = null;
|
||||||
|
|
||||||
|
#[ORM\Column(type: Types::DATETIME_MUTABLE)]
|
||||||
|
private ?\DateTimeInterface $DateHeure = null;
|
||||||
|
|
||||||
|
#[ORM\Column]
|
||||||
|
private ?int $Nb_de_prsn = null;
|
||||||
|
|
||||||
|
#[ORM\ManyToOne(inversedBy: 'reservations')]
|
||||||
|
private ?Tables $Tabl = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var Collection<int, Utilisateurs>
|
||||||
|
*/
|
||||||
|
#[ORM\ManyToMany(targetEntity: Utilisateurs::class, mappedBy: 'Reservation')]
|
||||||
|
private Collection $utilisateurs;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->utilisateurs = new ArrayCollection();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getId(): ?int
|
||||||
|
{
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDateHeure(): ?\DateTimeInterface
|
||||||
|
{
|
||||||
|
return $this->DateHeure;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setDateHeure(\DateTimeInterface $DateHeure): static
|
||||||
|
{
|
||||||
|
$this->DateHeure = $DateHeure;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getNbDePrsn(): ?int
|
||||||
|
{
|
||||||
|
return $this->Nb_de_prsn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setNbDePrsn(int $Nb_de_prsn): static
|
||||||
|
{
|
||||||
|
$this->Nb_de_prsn = $Nb_de_prsn;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getTabl(): ?Tables
|
||||||
|
{
|
||||||
|
return $this->Tabl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setTabl(?Tables $Tabl): static
|
||||||
|
{
|
||||||
|
$this->Tabl = $Tabl;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Collection<int, Utilisateurs>
|
||||||
|
*/
|
||||||
|
public function getUtilisateurs(): Collection
|
||||||
|
{
|
||||||
|
return $this->utilisateurs;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function addUtilisateur(Utilisateurs $utilisateur): static
|
||||||
|
{
|
||||||
|
if (!$this->utilisateurs->contains($utilisateur)) {
|
||||||
|
$this->utilisateurs->add($utilisateur);
|
||||||
|
$utilisateur->addReservation($this);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function removeUtilisateur(Utilisateurs $utilisateur): static
|
||||||
|
{
|
||||||
|
if ($this->utilisateurs->removeElement($utilisateur)) {
|
||||||
|
$utilisateur->removeReservation($this);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
}
|
78
src/Entity/StatutCommandes.php
Normal file
78
src/Entity/StatutCommandes.php
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Entity;
|
||||||
|
|
||||||
|
use App\Repository\StatutCommandesRepository;
|
||||||
|
use Doctrine\Common\Collections\ArrayCollection;
|
||||||
|
use Doctrine\Common\Collections\Collection;
|
||||||
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
|
||||||
|
#[ORM\Entity(repositoryClass: StatutCommandesRepository::class)]
|
||||||
|
class StatutCommandes
|
||||||
|
{
|
||||||
|
#[ORM\Id]
|
||||||
|
#[ORM\GeneratedValue]
|
||||||
|
#[ORM\Column]
|
||||||
|
private ?int $id = null;
|
||||||
|
|
||||||
|
#[ORM\Column(length: 255)]
|
||||||
|
private ?string $Libelle = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var Collection<int, Commandes>
|
||||||
|
*/
|
||||||
|
#[ORM\OneToMany(targetEntity: Commandes::class, mappedBy: 'StatutCommande')]
|
||||||
|
private Collection $commandes;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->commandes = new ArrayCollection();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getId(): ?int
|
||||||
|
{
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getLibelle(): ?string
|
||||||
|
{
|
||||||
|
return $this->Libelle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setLibelle(string $Libelle): static
|
||||||
|
{
|
||||||
|
$this->Libelle = $Libelle;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Collection<int, Commandes>
|
||||||
|
*/
|
||||||
|
public function getCommandes(): Collection
|
||||||
|
{
|
||||||
|
return $this->commandes;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function addCommande(Commandes $commande): static
|
||||||
|
{
|
||||||
|
if (!$this->commandes->contains($commande)) {
|
||||||
|
$this->commandes->add($commande);
|
||||||
|
$commande->setStatutCommande($this);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function removeCommande(Commandes $commande): static
|
||||||
|
{
|
||||||
|
if ($this->commandes->removeElement($commande)) {
|
||||||
|
// set the owning side to null (unless already changed)
|
||||||
|
if ($commande->getStatutCommande() === $this) {
|
||||||
|
$commande->setStatutCommande(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
}
|
50
src/Entity/StatutTables.php
Normal file
50
src/Entity/StatutTables.php
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Entity;
|
||||||
|
|
||||||
|
use App\Repository\StatutTablesRepository;
|
||||||
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
|
||||||
|
#[ORM\Entity(repositoryClass: StatutTablesRepository::class)]
|
||||||
|
class StatutTables
|
||||||
|
{
|
||||||
|
#[ORM\Id]
|
||||||
|
#[ORM\GeneratedValue]
|
||||||
|
#[ORM\Column]
|
||||||
|
private ?int $id = null;
|
||||||
|
|
||||||
|
#[ORM\Column(length: 255)]
|
||||||
|
private ?string $Libellé = null;
|
||||||
|
|
||||||
|
#[ORM\ManyToOne(inversedBy: 'statutTables')]
|
||||||
|
private ?Tables $Tabl = null;
|
||||||
|
|
||||||
|
public function getId(): ?int
|
||||||
|
{
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getLibellé(): ?string
|
||||||
|
{
|
||||||
|
return $this->Libellé;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setLibellé(string $Libellé): static
|
||||||
|
{
|
||||||
|
$this->Libellé = $Libellé;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getTabl(): ?Tables
|
||||||
|
{
|
||||||
|
return $this->Tabl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setTabl(?Tables $Tabl): static
|
||||||
|
{
|
||||||
|
$this->Tabl = $Tabl;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
}
|
168
src/Entity/Tables.php
Normal file
168
src/Entity/Tables.php
Normal file
@ -0,0 +1,168 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Entity;
|
||||||
|
|
||||||
|
use App\Repository\TablesRepository;
|
||||||
|
use Doctrine\Common\Collections\ArrayCollection;
|
||||||
|
use Doctrine\Common\Collections\Collection;
|
||||||
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
|
||||||
|
#[ORM\Entity(repositoryClass: TablesRepository::class)]
|
||||||
|
class Tables
|
||||||
|
{
|
||||||
|
#[ORM\Id]
|
||||||
|
#[ORM\GeneratedValue]
|
||||||
|
#[ORM\Column]
|
||||||
|
private ?int $id = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var Collection<int, Clients>
|
||||||
|
*/
|
||||||
|
#[ORM\ManyToMany(targetEntity: Clients::class, mappedBy: 'Tabl')]
|
||||||
|
private Collection $Clients;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var Collection<int, Reservations>
|
||||||
|
*/
|
||||||
|
#[ORM\OneToMany(targetEntity: Reservations::class, mappedBy: 'Tabl')]
|
||||||
|
private Collection $reservations;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var Collection<int, StatutTables>
|
||||||
|
*/
|
||||||
|
#[ORM\OneToMany(targetEntity: StatutTables::class, mappedBy: 'Tabl')]
|
||||||
|
private Collection $statutTables;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var Collection<int, Utilisateurs>
|
||||||
|
*/
|
||||||
|
#[ORM\ManyToMany(targetEntity: Utilisateurs::class, mappedBy: 'tabl')]
|
||||||
|
private Collection $utilisateurs;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->Clients = new ArrayCollection();
|
||||||
|
$this->reservations = new ArrayCollection();
|
||||||
|
$this->statutTables = new ArrayCollection();
|
||||||
|
$this->utilisateurs = new ArrayCollection();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getId(): ?int
|
||||||
|
{
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Collection<int, Clients>
|
||||||
|
*/
|
||||||
|
public function getClient(): Collection
|
||||||
|
{
|
||||||
|
return $this->Clients;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function addClient(Clients $tabl): static
|
||||||
|
{
|
||||||
|
if (!$this->Clients->contains($tabl)) {
|
||||||
|
$this->Clients->add($tabl);
|
||||||
|
$tabl->addTabl($this);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function removeClient(Clients $tabl): static
|
||||||
|
{
|
||||||
|
if ($this->Clients->removeElement($tabl)) {
|
||||||
|
$tabl->removeTabl($this);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Collection<int, Reservations>
|
||||||
|
*/
|
||||||
|
public function getReservations(): Collection
|
||||||
|
{
|
||||||
|
return $this->reservations;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function addReservation(Reservations $reservation): static
|
||||||
|
{
|
||||||
|
if (!$this->reservations->contains($reservation)) {
|
||||||
|
$this->reservations->add($reservation);
|
||||||
|
$reservation->setTabl($this);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function removeReservation(Reservations $reservation): static
|
||||||
|
{
|
||||||
|
if ($this->reservations->removeElement($reservation)) {
|
||||||
|
// set the owning side to null (unless already changed)
|
||||||
|
if ($reservation->getTabl() === $this) {
|
||||||
|
$reservation->setTabl(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Collection<int, StatutTables>
|
||||||
|
*/
|
||||||
|
public function getStatutTables(): Collection
|
||||||
|
{
|
||||||
|
return $this->statutTables;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function addStatutTable(StatutTables $statutTable): static
|
||||||
|
{
|
||||||
|
if (!$this->statutTables->contains($statutTable)) {
|
||||||
|
$this->statutTables->add($statutTable);
|
||||||
|
$statutTable->setTabl($this);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function removeStatutTable(StatutTables $statutTable): static
|
||||||
|
{
|
||||||
|
if ($this->statutTables->removeElement($statutTable)) {
|
||||||
|
// set the owning side to null (unless already changed)
|
||||||
|
if ($statutTable->getTabl() === $this) {
|
||||||
|
$statutTable->setTabl(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Collection<int, Utilisateurs>
|
||||||
|
*/
|
||||||
|
public function getUtilisateurs(): Collection
|
||||||
|
{
|
||||||
|
return $this->utilisateurs;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function addUtilisateur(Utilisateurs $utilisateur): static
|
||||||
|
{
|
||||||
|
if (!$this->utilisateurs->contains($utilisateur)) {
|
||||||
|
$this->utilisateurs->add($utilisateur);
|
||||||
|
$utilisateur->addTabl($this);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function removeUtilisateur(Utilisateurs $utilisateur): static
|
||||||
|
{
|
||||||
|
if ($this->utilisateurs->removeElement($utilisateur)) {
|
||||||
|
$utilisateur->removeTabl($this);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
}
|
163
src/Entity/Utilisateurs.php
Normal file
163
src/Entity/Utilisateurs.php
Normal file
@ -0,0 +1,163 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Entity;
|
||||||
|
|
||||||
|
use App\Repository\UtilisateursRepository;
|
||||||
|
use Doctrine\Common\Collections\ArrayCollection;
|
||||||
|
use Doctrine\Common\Collections\Collection;
|
||||||
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
|
||||||
|
#[ORM\Entity(repositoryClass: UtilisateursRepository::class)]
|
||||||
|
class Utilisateurs
|
||||||
|
{
|
||||||
|
#[ORM\Id]
|
||||||
|
#[ORM\GeneratedValue]
|
||||||
|
#[ORM\Column]
|
||||||
|
private ?int $id = null;
|
||||||
|
|
||||||
|
#[ORM\Column(length: 255)]
|
||||||
|
private ?string $Nom = null;
|
||||||
|
|
||||||
|
#[ORM\Column(length: 255)]
|
||||||
|
private ?string $Prenom = null;
|
||||||
|
|
||||||
|
#[ORM\Column(length: 255)]
|
||||||
|
private ?string $Mail = null;
|
||||||
|
|
||||||
|
#[ORM\Column(length: 255)]
|
||||||
|
private ?string $MotDePasse = null;
|
||||||
|
|
||||||
|
#[ORM\Column(length: 255)]
|
||||||
|
private ?string $Role = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var Collection<int, Reservations>
|
||||||
|
*/
|
||||||
|
#[ORM\ManyToMany(targetEntity: Reservations::class, inversedBy: 'utilisateurs')]
|
||||||
|
private Collection $Reservation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var Collection<int, Tables>
|
||||||
|
*/
|
||||||
|
#[ORM\ManyToMany(targetEntity: Tables::class, inversedBy: 'utilisateurs')]
|
||||||
|
private Collection $tabl;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->Reservation = new ArrayCollection();
|
||||||
|
$this->tabl = new ArrayCollection();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getId(): ?int
|
||||||
|
{
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getNom(): ?string
|
||||||
|
{
|
||||||
|
return $this->Nom;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setNom(string $Nom): static
|
||||||
|
{
|
||||||
|
$this->Nom = $Nom;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getPrenom(): ?string
|
||||||
|
{
|
||||||
|
return $this->Prenom;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setPrenom(string $Prenom): static
|
||||||
|
{
|
||||||
|
$this->Prenom = $Prenom;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getMail(): ?string
|
||||||
|
{
|
||||||
|
return $this->Mail;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setMail(string $Mail): static
|
||||||
|
{
|
||||||
|
$this->Mail = $Mail;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getMotDePasse(): ?string
|
||||||
|
{
|
||||||
|
return $this->MotDePasse;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setMotDePasse(string $MotDePasse): static
|
||||||
|
{
|
||||||
|
$this->MotDePasse = $MotDePasse;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getRole(): ?string
|
||||||
|
{
|
||||||
|
return $this->Role;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setRole(string $Role): static
|
||||||
|
{
|
||||||
|
$this->Role = $Role;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Collection<int, Reservations>
|
||||||
|
*/
|
||||||
|
public function getReservation(): Collection
|
||||||
|
{
|
||||||
|
return $this->Reservation;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function addReservation(Reservations $reservation): static
|
||||||
|
{
|
||||||
|
if (!$this->Reservation->contains($reservation)) {
|
||||||
|
$this->Reservation->add($reservation);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function removeReservation(Reservations $reservation): static
|
||||||
|
{
|
||||||
|
$this->Reservation->removeElement($reservation);
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Collection<int, Tables>
|
||||||
|
*/
|
||||||
|
public function getTabl(): Collection
|
||||||
|
{
|
||||||
|
return $this->tabl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function addTabl(Tables $tabl): static
|
||||||
|
{
|
||||||
|
if (!$this->tabl->contains($tabl)) {
|
||||||
|
$this->tabl->add($tabl);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function removeTabl(Tables $tabl): static
|
||||||
|
{
|
||||||
|
$this->tabl->removeElement($tabl);
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
}
|
43
src/Repository/ClientsRepository.php
Normal file
43
src/Repository/ClientsRepository.php
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Repository;
|
||||||
|
|
||||||
|
use App\Entity\Clients;
|
||||||
|
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||||
|
use Doctrine\Persistence\ManagerRegistry;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @extends ServiceEntityRepository<Clients>
|
||||||
|
*/
|
||||||
|
class ClientsRepository extends ServiceEntityRepository
|
||||||
|
{
|
||||||
|
public function __construct(ManagerRegistry $registry)
|
||||||
|
{
|
||||||
|
parent::__construct($registry, Clients::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * @return Commandes[] Returns an array of Commandes objects
|
||||||
|
// */
|
||||||
|
// public function findByExampleField($value): array
|
||||||
|
// {
|
||||||
|
// return $this->createQueryBuilder('c')
|
||||||
|
// ->andWhere('c.exampleField = :val')
|
||||||
|
// ->setParameter('val', $value)
|
||||||
|
// ->orderBy('c.id', 'ASC')
|
||||||
|
// ->setMaxResults(10)
|
||||||
|
// ->getQuery()
|
||||||
|
// ->getResult()
|
||||||
|
// ;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// public function findOneBySomeField($value): ?Commandes
|
||||||
|
// {
|
||||||
|
// return $this->createQueryBuilder('c')
|
||||||
|
// ->andWhere('c.exampleField = :val')
|
||||||
|
// ->setParameter('val', $value)
|
||||||
|
// ->getQuery()
|
||||||
|
// ->getOneOrNullResult()
|
||||||
|
// ;
|
||||||
|
// }
|
||||||
|
}
|
43
src/Repository/CommandesRepository.php
Normal file
43
src/Repository/CommandesRepository.php
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Repository;
|
||||||
|
|
||||||
|
use App\Entity\Commandes;
|
||||||
|
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||||
|
use Doctrine\Persistence\ManagerRegistry;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @extends ServiceEntityRepository<Commandes>
|
||||||
|
*/
|
||||||
|
class CommandesRepository extends ServiceEntityRepository
|
||||||
|
{
|
||||||
|
public function __construct(ManagerRegistry $registry)
|
||||||
|
{
|
||||||
|
parent::__construct($registry, Commandes::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * @return Commandes[] Returns an array of Commandes objects
|
||||||
|
// */
|
||||||
|
// public function findByExampleField($value): array
|
||||||
|
// {
|
||||||
|
// return $this->createQueryBuilder('c')
|
||||||
|
// ->andWhere('c.exampleField = :val')
|
||||||
|
// ->setParameter('val', $value)
|
||||||
|
// ->orderBy('c.id', 'ASC')
|
||||||
|
// ->setMaxResults(10)
|
||||||
|
// ->getQuery()
|
||||||
|
// ->getResult()
|
||||||
|
// ;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// public function findOneBySomeField($value): ?Commandes
|
||||||
|
// {
|
||||||
|
// return $this->createQueryBuilder('c')
|
||||||
|
// ->andWhere('c.exampleField = :val')
|
||||||
|
// ->setParameter('val', $value)
|
||||||
|
// ->getQuery()
|
||||||
|
// ->getOneOrNullResult()
|
||||||
|
// ;
|
||||||
|
// }
|
||||||
|
}
|
43
src/Repository/DetailsCommandeRepository.php
Normal file
43
src/Repository/DetailsCommandeRepository.php
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Repository;
|
||||||
|
|
||||||
|
use App\Entity\DetailsCommande;
|
||||||
|
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||||
|
use Doctrine\Persistence\ManagerRegistry;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @extends ServiceEntityRepository<DetailsCommande>
|
||||||
|
*/
|
||||||
|
class DetailsCommandeRepository extends ServiceEntityRepository
|
||||||
|
{
|
||||||
|
public function __construct(ManagerRegistry $registry)
|
||||||
|
{
|
||||||
|
parent::__construct($registry, DetailsCommande::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * @return DetailsCommande[] Returns an array of DetailsCommande objects
|
||||||
|
// */
|
||||||
|
// public function findByExampleField($value): array
|
||||||
|
// {
|
||||||
|
// return $this->createQueryBuilder('d')
|
||||||
|
// ->andWhere('d.exampleField = :val')
|
||||||
|
// ->setParameter('val', $value)
|
||||||
|
// ->orderBy('d.id', 'ASC')
|
||||||
|
// ->setMaxResults(10)
|
||||||
|
// ->getQuery()
|
||||||
|
// ->getResult()
|
||||||
|
// ;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// public function findOneBySomeField($value): ?DetailsCommande
|
||||||
|
// {
|
||||||
|
// return $this->createQueryBuilder('d')
|
||||||
|
// ->andWhere('d.exampleField = :val')
|
||||||
|
// ->setParameter('val', $value)
|
||||||
|
// ->getQuery()
|
||||||
|
// ->getOneOrNullResult()
|
||||||
|
// ;
|
||||||
|
// }
|
||||||
|
}
|
43
src/Repository/PlatsRepository.php
Normal file
43
src/Repository/PlatsRepository.php
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Repository;
|
||||||
|
|
||||||
|
use App\Entity\Plats;
|
||||||
|
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||||
|
use Doctrine\Persistence\ManagerRegistry;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @extends ServiceEntityRepository<Plats>
|
||||||
|
*/
|
||||||
|
class PlatsRepository extends ServiceEntityRepository
|
||||||
|
{
|
||||||
|
public function __construct(ManagerRegistry $registry)
|
||||||
|
{
|
||||||
|
parent::__construct($registry, Plats::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * @return Plats[] Returns an array of Plats objects
|
||||||
|
// */
|
||||||
|
// public function findByExampleField($value): array
|
||||||
|
// {
|
||||||
|
// return $this->createQueryBuilder('p')
|
||||||
|
// ->andWhere('p.exampleField = :val')
|
||||||
|
// ->setParameter('val', $value)
|
||||||
|
// ->orderBy('p.id', 'ASC')
|
||||||
|
// ->setMaxResults(10)
|
||||||
|
// ->getQuery()
|
||||||
|
// ->getResult()
|
||||||
|
// ;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// public function findOneBySomeField($value): ?Plats
|
||||||
|
// {
|
||||||
|
// return $this->createQueryBuilder('p')
|
||||||
|
// ->andWhere('p.exampleField = :val')
|
||||||
|
// ->setParameter('val', $value)
|
||||||
|
// ->getQuery()
|
||||||
|
// ->getOneOrNullResult()
|
||||||
|
// ;
|
||||||
|
// }
|
||||||
|
}
|
43
src/Repository/ReductionsRepository.php
Normal file
43
src/Repository/ReductionsRepository.php
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Repository;
|
||||||
|
|
||||||
|
use App\Entity\Reductions;
|
||||||
|
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||||
|
use Doctrine\Persistence\ManagerRegistry;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @extends ServiceEntityRepository<Reductions>
|
||||||
|
*/
|
||||||
|
class ReductionsRepository extends ServiceEntityRepository
|
||||||
|
{
|
||||||
|
public function __construct(ManagerRegistry $registry)
|
||||||
|
{
|
||||||
|
parent::__construct($registry, Reductions::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * @return Reductions[] Returns an array of Reductions objects
|
||||||
|
// */
|
||||||
|
// public function findByExampleField($value): array
|
||||||
|
// {
|
||||||
|
// return $this->createQueryBuilder('r')
|
||||||
|
// ->andWhere('r.exampleField = :val')
|
||||||
|
// ->setParameter('val', $value)
|
||||||
|
// ->orderBy('r.id', 'ASC')
|
||||||
|
// ->setMaxResults(10)
|
||||||
|
// ->getQuery()
|
||||||
|
// ->getResult()
|
||||||
|
// ;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// public function findOneBySomeField($value): ?Reductions
|
||||||
|
// {
|
||||||
|
// return $this->createQueryBuilder('r')
|
||||||
|
// ->andWhere('r.exampleField = :val')
|
||||||
|
// ->setParameter('val', $value)
|
||||||
|
// ->getQuery()
|
||||||
|
// ->getOneOrNullResult()
|
||||||
|
// ;
|
||||||
|
// }
|
||||||
|
}
|
43
src/Repository/ReservationsRepository.php
Normal file
43
src/Repository/ReservationsRepository.php
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Repository;
|
||||||
|
|
||||||
|
use App\Entity\Reservations;
|
||||||
|
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||||
|
use Doctrine\Persistence\ManagerRegistry;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @extends ServiceEntityRepository<Reservations>
|
||||||
|
*/
|
||||||
|
class ReservationsRepository extends ServiceEntityRepository
|
||||||
|
{
|
||||||
|
public function __construct(ManagerRegistry $registry)
|
||||||
|
{
|
||||||
|
parent::__construct($registry, Reservations::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * @return Commandes[] Returns an array of Commandes objects
|
||||||
|
// */
|
||||||
|
// public function findByExampleField($value): array
|
||||||
|
// {
|
||||||
|
// return $this->createQueryBuilder('c')
|
||||||
|
// ->andWhere('c.exampleField = :val')
|
||||||
|
// ->setParameter('val', $value)
|
||||||
|
// ->orderBy('c.id', 'ASC')
|
||||||
|
// ->setMaxResults(10)
|
||||||
|
// ->getQuery()
|
||||||
|
// ->getResult()
|
||||||
|
// ;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// public function findOneBySomeField($value): ?Commandes
|
||||||
|
// {
|
||||||
|
// return $this->createQueryBuilder('c')
|
||||||
|
// ->andWhere('c.exampleField = :val')
|
||||||
|
// ->setParameter('val', $value)
|
||||||
|
// ->getQuery()
|
||||||
|
// ->getOneOrNullResult()
|
||||||
|
// ;
|
||||||
|
// }
|
||||||
|
}
|
43
src/Repository/StatutCommandesRepository.php
Normal file
43
src/Repository/StatutCommandesRepository.php
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Repository;
|
||||||
|
|
||||||
|
use App\Entity\StatutCommandes;
|
||||||
|
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||||
|
use Doctrine\Persistence\ManagerRegistry;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @extends ServiceEntityRepository<StatutCommandes>
|
||||||
|
*/
|
||||||
|
class StatutCommandesRepository extends ServiceEntityRepository
|
||||||
|
{
|
||||||
|
public function __construct(ManagerRegistry $registry)
|
||||||
|
{
|
||||||
|
parent::__construct($registry, StatutCommandes::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * @return StatutCommandes[] Returns an array of StatutCommandes objects
|
||||||
|
// */
|
||||||
|
// public function findByExampleField($value): array
|
||||||
|
// {
|
||||||
|
// return $this->createQueryBuilder('s')
|
||||||
|
// ->andWhere('s.exampleField = :val')
|
||||||
|
// ->setParameter('val', $value)
|
||||||
|
// ->orderBy('s.id', 'ASC')
|
||||||
|
// ->setMaxResults(10)
|
||||||
|
// ->getQuery()
|
||||||
|
// ->getResult()
|
||||||
|
// ;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// public function findOneBySomeField($value): ?StatutCommandes
|
||||||
|
// {
|
||||||
|
// return $this->createQueryBuilder('s')
|
||||||
|
// ->andWhere('s.exampleField = :val')
|
||||||
|
// ->setParameter('val', $value)
|
||||||
|
// ->getQuery()
|
||||||
|
// ->getOneOrNullResult()
|
||||||
|
// ;
|
||||||
|
// }
|
||||||
|
}
|
43
src/Repository/StatutTablesRepository.php
Normal file
43
src/Repository/StatutTablesRepository.php
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Repository;
|
||||||
|
|
||||||
|
use App\Entity\StatutTables;
|
||||||
|
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||||
|
use Doctrine\Persistence\ManagerRegistry;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @extends ServiceEntityRepository<StatutTables>
|
||||||
|
*/
|
||||||
|
class StatutTablesRepository extends ServiceEntityRepository
|
||||||
|
{
|
||||||
|
public function __construct(ManagerRegistry $registry)
|
||||||
|
{
|
||||||
|
parent::__construct($registry, StatutTables::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * @return StatutTables[] Returns an array of StatutTables objects
|
||||||
|
// */
|
||||||
|
// public function findByExampleField($value): array
|
||||||
|
// {
|
||||||
|
// return $this->createQueryBuilder('s')
|
||||||
|
// ->andWhere('s.exampleField = :val')
|
||||||
|
// ->setParameter('val', $value)
|
||||||
|
// ->orderBy('s.id', 'ASC')
|
||||||
|
// ->setMaxResults(10)
|
||||||
|
// ->getQuery()
|
||||||
|
// ->getResult()
|
||||||
|
// ;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// public function findOneBySomeField($value): ?StatutTables
|
||||||
|
// {
|
||||||
|
// return $this->createQueryBuilder('s')
|
||||||
|
// ->andWhere('s.exampleField = :val')
|
||||||
|
// ->setParameter('val', $value)
|
||||||
|
// ->getQuery()
|
||||||
|
// ->getOneOrNullResult()
|
||||||
|
// ;
|
||||||
|
// }
|
||||||
|
}
|
43
src/Repository/TablesRepository.php
Normal file
43
src/Repository/TablesRepository.php
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Repository;
|
||||||
|
|
||||||
|
use App\Entity\Tables;
|
||||||
|
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||||
|
use Doctrine\Persistence\ManagerRegistry;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @extends ServiceEntityRepository<Tables>
|
||||||
|
*/
|
||||||
|
class TablesRepository extends ServiceEntityRepository
|
||||||
|
{
|
||||||
|
public function __construct(ManagerRegistry $registry)
|
||||||
|
{
|
||||||
|
parent::__construct($registry, Tables::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * @return Commandes[] Returns an array of Commandes objects
|
||||||
|
// */
|
||||||
|
// public function findByExampleField($value): array
|
||||||
|
// {
|
||||||
|
// return $this->createQueryBuilder('c')
|
||||||
|
// ->andWhere('c.exampleField = :val')
|
||||||
|
// ->setParameter('val', $value)
|
||||||
|
// ->orderBy('c.id', 'ASC')
|
||||||
|
// ->setMaxResults(10)
|
||||||
|
// ->getQuery()
|
||||||
|
// ->getResult()
|
||||||
|
// ;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// public function findOneBySomeField($value): ?Commandes
|
||||||
|
// {
|
||||||
|
// return $this->createQueryBuilder('c')
|
||||||
|
// ->andWhere('c.exampleField = :val')
|
||||||
|
// ->setParameter('val', $value)
|
||||||
|
// ->getQuery()
|
||||||
|
// ->getOneOrNullResult()
|
||||||
|
// ;
|
||||||
|
// }
|
||||||
|
}
|
43
src/Repository/UtilisateursRepository.php
Normal file
43
src/Repository/UtilisateursRepository.php
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Repository;
|
||||||
|
|
||||||
|
use App\Entity\Utilisateurs;
|
||||||
|
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||||
|
use Doctrine\Persistence\ManagerRegistry;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @extends ServiceEntityRepository<Utilisateurs>
|
||||||
|
*/
|
||||||
|
class UtilisateursRepository extends ServiceEntityRepository
|
||||||
|
{
|
||||||
|
public function __construct(ManagerRegistry $registry)
|
||||||
|
{
|
||||||
|
parent::__construct($registry, Utilisateurs::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * @return Commandes[] Returns an array of Commandes objects
|
||||||
|
// */
|
||||||
|
// public function findByExampleField($value): array
|
||||||
|
// {
|
||||||
|
// return $this->createQueryBuilder('c')
|
||||||
|
// ->andWhere('c.exampleField = :val')
|
||||||
|
// ->setParameter('val', $value)
|
||||||
|
// ->orderBy('c.id', 'ASC')
|
||||||
|
// ->setMaxResults(10)
|
||||||
|
// ->getQuery()
|
||||||
|
// ->getResult()
|
||||||
|
// ;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// public function findOneBySomeField($value): ?Commandes
|
||||||
|
// {
|
||||||
|
// return $this->createQueryBuilder('c')
|
||||||
|
// ->andWhere('c.exampleField = :val')
|
||||||
|
// ->setParameter('val', $value)
|
||||||
|
// ->getQuery()
|
||||||
|
// ->getOneOrNullResult()
|
||||||
|
// ;
|
||||||
|
// }
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user