From f251e6eb0d5a74cb78d8bfd530207c8e4b3f8d9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20=C3=81lvarez?= Date: Mon, 23 May 2022 15:22:36 +0200 Subject: [PATCH] simulation model --- README.md | 3 ++ migrations/Version20220523093709.php | 49 +++++++++++++++++ migrations/Version20220523110817.php | 36 +++++++++++++ migrations/Version20220523114408.php | 32 +++++++++++ public/favicon.ico | Bin 0 -> 13535 bytes src/Controller/IndexController.php | 8 ++- src/DataFixtures/InheritanceFixtures.php | 2 +- src/DataFixtures/MerFixtures.php | 44 +++++++++++++++ src/Entity/Employee1.php | 2 +- src/Entity/Employee2.php | 2 +- src/Entity/Employee3.php | 2 +- src/Entity/MerBeDM.php | 37 +++++++++++++ src/Entity/MerDM.php | 35 ++++++++++++ src/Entity/MerDT.php | 35 ++++++++++++ src/Entity/MerParaDM.php | 37 +++++++++++++ src/Entity/MerParaDT.php | 37 +++++++++++++ src/Entity/MerParaSub.php | 51 ++++++++++++++++++ src/Entity/MerService.php | 57 ++++++++++++++++++++ src/Entity/Person1.php | 2 +- src/Entity/Person2.php | 2 +- src/Entity/Person3.php | 2 +- src/Entity/Toothbrush1.php | 2 +- src/Entity/Toothbrush2.php | 2 +- src/Entity/Toothbrush3.php | 2 +- src/Repository/MerBeDMRepository.php | 65 ++++++++++++++++++++++ src/Repository/MerDMRepository.php | 65 ++++++++++++++++++++++ src/Repository/MerDTRepository.php | 65 ++++++++++++++++++++++ src/Repository/MerParaDMRepository.php | 65 ++++++++++++++++++++++ src/Repository/MerParaDTRepository.php | 65 ++++++++++++++++++++++ src/Repository/MerParaSubRepository.php | 66 +++++++++++++++++++++++ src/Repository/MerServiceRepository.php | 65 ++++++++++++++++++++++ templates/base.html.twig | 2 +- 32 files changed, 927 insertions(+), 12 deletions(-) create mode 100644 migrations/Version20220523093709.php create mode 100644 migrations/Version20220523110817.php create mode 100644 migrations/Version20220523114408.php create mode 100644 public/favicon.ico create mode 100644 src/DataFixtures/MerFixtures.php create mode 100644 src/Entity/MerBeDM.php create mode 100644 src/Entity/MerDM.php create mode 100644 src/Entity/MerDT.php create mode 100644 src/Entity/MerParaDM.php create mode 100644 src/Entity/MerParaDT.php create mode 100644 src/Entity/MerParaSub.php create mode 100644 src/Entity/MerService.php create mode 100644 src/Repository/MerBeDMRepository.php create mode 100644 src/Repository/MerDMRepository.php create mode 100644 src/Repository/MerDTRepository.php create mode 100644 src/Repository/MerParaDMRepository.php create mode 100644 src/Repository/MerParaDTRepository.php create mode 100644 src/Repository/MerParaSubRepository.php create mode 100644 src/Repository/MerServiceRepository.php diff --git a/README.md b/README.md index ef8b1fe..012d12f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,10 @@ ``` symfony server:start symfony console list make + symfony console make:migration symfony console doctrine:migrations:migrate +symfony console doctrine:migrations:up-to-date + symfony console doctrine:fixtures:load ``` \ No newline at end of file diff --git a/migrations/Version20220523093709.php b/migrations/Version20220523093709.php new file mode 100644 index 0000000..11133c9 --- /dev/null +++ b/migrations/Version20220523093709.php @@ -0,0 +1,49 @@ +addSql('CREATE TABLE mer_service (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, mcc_mnc INTEGER DEFAULT NULL, metadata CLOB DEFAULT NULL --(DC2Type:json) + , discr VARCHAR(255) NOT NULL, product_code VARCHAR(255) DEFAULT NULL, offer_id INTEGER DEFAULT NULL, api_key VARCHAR(255) DEFAULT NULL, service_id VARCHAR(255) DEFAULT NULL)'); + $this->addSql('DROP TABLE employee1'); + $this->addSql('DROP TABLE employee3'); + $this->addSql('DROP TABLE person2'); + $this->addSql('DROP TABLE person3'); + $this->addSql('DROP TABLE toothbrush1'); + $this->addSql('DROP TABLE toothbrush2'); + $this->addSql('DROP TABLE toothbrush3'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('CREATE TABLE employee1 (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, toothbrush1_id INTEGER DEFAULT NULL, job VARCHAR(255) NOT NULL COLLATE BINARY, age INTEGER NOT NULL, name VARCHAR(255) NOT NULL COLLATE BINARY)'); + $this->addSql('CREATE UNIQUE INDEX UNIQ_2250E3BCA25DC38 ON employee1 (toothbrush1_id)'); + $this->addSql('CREATE TABLE employee3 (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, job VARCHAR(255) NOT NULL COLLATE BINARY)'); + $this->addSql('CREATE TABLE person2 (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, toothbrush2_id INTEGER DEFAULT NULL, age INTEGER NOT NULL, name VARCHAR(255) NOT NULL COLLATE BINARY, discr VARCHAR(255) NOT NULL COLLATE BINARY, job VARCHAR(255) DEFAULT NULL COLLATE BINARY)'); + $this->addSql('CREATE INDEX IDX_A387B6D5189073D6 ON person2 (toothbrush2_id)'); + $this->addSql('CREATE TABLE person3 (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, toothbrush3_id INTEGER DEFAULT NULL, age INTEGER NOT NULL, name VARCHAR(255) NOT NULL COLLATE BINARY, discr VARCHAR(255) NOT NULL COLLATE BINARY)'); + $this->addSql('CREATE UNIQUE INDEX UNIQ_D4808643A02C14B3 ON person3 (toothbrush3_id)'); + $this->addSql('CREATE TABLE toothbrush1 (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, brand VARCHAR(255) NOT NULL COLLATE BINARY)'); + $this->addSql('CREATE TABLE toothbrush2 (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, brand VARCHAR(255) NOT NULL COLLATE BINARY)'); + $this->addSql('CREATE TABLE toothbrush3 (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, brand VARCHAR(255) NOT NULL COLLATE BINARY)'); + $this->addSql('DROP TABLE mer_service'); + } +} diff --git a/migrations/Version20220523110817.php b/migrations/Version20220523110817.php new file mode 100644 index 0000000..66037a0 --- /dev/null +++ b/migrations/Version20220523110817.php @@ -0,0 +1,36 @@ +addSql('ALTER TABLE mer_service ADD COLUMN activation_code VARCHAR(255) DEFAULT NULL'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('CREATE TEMPORARY TABLE __temp__mer_service AS SELECT id, mcc_mnc, metadata, discr, product_code, offer_id, api_key, service_id FROM mer_service'); + $this->addSql('DROP TABLE mer_service'); + $this->addSql('CREATE TABLE mer_service (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, mcc_mnc INTEGER DEFAULT NULL, metadata CLOB DEFAULT NULL --(DC2Type:json) + , discr VARCHAR(255) NOT NULL, product_code VARCHAR(255) DEFAULT NULL, offer_id INTEGER DEFAULT NULL, api_key VARCHAR(255) DEFAULT NULL, service_id VARCHAR(255) DEFAULT NULL)'); + $this->addSql('INSERT INTO mer_service (id, mcc_mnc, metadata, discr, product_code, offer_id, api_key, service_id) SELECT id, mcc_mnc, metadata, discr, product_code, offer_id, api_key, service_id FROM __temp__mer_service'); + $this->addSql('DROP TABLE __temp__mer_service'); + } +} diff --git a/migrations/Version20220523114408.php b/migrations/Version20220523114408.php new file mode 100644 index 0000000..caeafa6 --- /dev/null +++ b/migrations/Version20220523114408.php @@ -0,0 +1,32 @@ +addSql('CREATE TABLE mer_para_sub (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, service_id INTEGER NOT NULL, red_code VARCHAR(255) DEFAULT NULL)'); + $this->addSql('CREATE INDEX IDX_E4F82A3DED5CA9E6 ON mer_para_sub (service_id)'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('DROP TABLE mer_para_sub'); + } +} diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..59cc277a7f4648238ff3931444a28b6b39d61888 GIT binary patch literal 13535 zcmV<5G$6}~P)CccJ;evKV9K&o!u z@2D7Tl6uZsd#|FhFsA(&_LE#W zjQh%A(wBaId=z{)9j==L=PiWK%b~4;>(;>MU&8)2`2IQg{s7#!i4FJhSX4^zyI;bw zHE?Vdw3TpdA$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1Y<(W!Hx5choo3f4RJ{lx#Z4CI`31D@;X$6pGa^L-p0 zdTJn3N;8B(B1hqv33KpT$jr)2q|)is9FKYfrP!?o=Dth}iUQmA^Uu^k4g}-A5^pB6)CQkGJKEdp1pA2gy%yPl_xhJwjcMRoQE zz;9WP^_JkgqN5Z`yZ)u1VA?1sS2H zuyiFVao3@=jY@}TS=VjMCMS<@^(^i18Ej+iU3?d+l!E2-??gWYSL0$)A5m3R>m>Ul z;k%oS+WlFOKnl{1kI^=Kyj&MOPWGc>rEGLivZ&H&n>2mW=#^)#VH`Cgo5m}zrpn%s zwq7UKb)6kncyC--V}Wr1#aMOwXK>yMxaMNmpW+3|P`N8uV8|b+s2}Ygnm-)@7(Hh? z)vYl1kkB<(Lgz1s@4tgf;Udv^4n~`v;|Og3>qW5qQSbT#v{UK!w$VY9{t@qh=RAr_ z?co{=Sgb*Ye$8m7sZ7A<4r$o>us0uFXjM#8MADZLo<0gj+H_nE4fYqp`OBfL!c{Wi z_%Go2Rv_GSxN^1{?b^aPppPY6BXv%^2F_arpI742YPh-getSchemaManager(); $entity8 = $repo->findOneByName('entity 8'); + $sub = $subRepo->findOneById(1); + dump($sub); + dump($sub->getService()); + return $this->render('index/index.html.twig', [ 'controller_name' => 'IndexController', 'entity8' => $entity8, diff --git a/src/DataFixtures/InheritanceFixtures.php b/src/DataFixtures/InheritanceFixtures.php index 1d54a93..be4d2ba 100644 --- a/src/DataFixtures/InheritanceFixtures.php +++ b/src/DataFixtures/InheritanceFixtures.php @@ -11,7 +11,7 @@ use App\Entity\Toothbrush3; use Doctrine\Bundle\FixturesBundle\Fixture; use Doctrine\Persistence\ObjectManager; -class InheritanceFixtures extends Fixture +class InheritanceFixtures //extends Fixture { public function load(ObjectManager $manager): void { diff --git a/src/DataFixtures/MerFixtures.php b/src/DataFixtures/MerFixtures.php new file mode 100644 index 0000000..f1ea7a0 --- /dev/null +++ b/src/DataFixtures/MerFixtures.php @@ -0,0 +1,44 @@ +setMccMnc(12345)->setOfferId(223)->setProductCode('code2'); + $manager->persist($tmp); + + $tmp = new MerParaDT(); + $tmp->setMccMnc(12345)->setServiceId('ser-vi-ce1')->setApiKey('api1'); + $manager->persist($tmp); + + $tmp = new MerParaDT(); + $tmp->setMccMnc(12341)->setServiceId('ser-vi-ce2')->setApiKey('api2'); + $manager->persist($tmp); + + $tmp = new MerBeDM(); + $tmp->setMccMnc(12341)->setOfferId(112)->setActivationCode('active1'); + $manager->persist($tmp); + + $tmp = new MerParaDM(); + $tmp->setMccMnc(12345)->setOfferId(221)->setProductCode('code1'); + $manager->persist($tmp); + + $sub = new MerParaSub(); + $sub->setService($tmp)->setRedCode('redcode1'); + $manager->persist($sub); + + $manager->flush(); + } +} + +// symfony console doctrine:fixtures:load diff --git a/src/Entity/Employee1.php b/src/Entity/Employee1.php index dbfd745..b8da323 100644 --- a/src/Entity/Employee1.php +++ b/src/Entity/Employee1.php @@ -4,7 +4,7 @@ namespace App\Entity; use Doctrine\ORM\Mapping as ORM; -#[ORM\Entity] +////#[ORM\Entity] class Employee1 extends Person1 { #[ORM\Id] diff --git a/src/Entity/Employee2.php b/src/Entity/Employee2.php index 5a22219..dcfcee4 100644 --- a/src/Entity/Employee2.php +++ b/src/Entity/Employee2.php @@ -4,7 +4,7 @@ namespace App\Entity; use Doctrine\ORM\Mapping as ORM; -#[ORM\Entity] +////#[ORM\Entity] class Employee2 extends Person2 { #[ORM\Id] diff --git a/src/Entity/Employee3.php b/src/Entity/Employee3.php index e5dff6e..49264ff 100644 --- a/src/Entity/Employee3.php +++ b/src/Entity/Employee3.php @@ -4,7 +4,7 @@ namespace App\Entity; use Doctrine\ORM\Mapping as ORM; -#[ORM\Entity] +////#[ORM\Entity] class Employee3 extends Person3 { #[ORM\Id] diff --git a/src/Entity/MerBeDM.php b/src/Entity/MerBeDM.php new file mode 100644 index 0000000..2240e3b --- /dev/null +++ b/src/Entity/MerBeDM.php @@ -0,0 +1,37 @@ +id; +// } + + public function getActivationCode(): ?string + { + return $this->activationCode; + } + + public function setActivationCode(string $activationCode): self + { + $this->activationCode = $activationCode; + + return $this; + } +} diff --git a/src/Entity/MerDM.php b/src/Entity/MerDM.php new file mode 100644 index 0000000..b4854b4 --- /dev/null +++ b/src/Entity/MerDM.php @@ -0,0 +1,35 @@ +id; +// } + + public function getOfferId(): ?int + { + return $this->offerId; + } + + public function setOfferId(int $offerId): self + { + $this->offerId = $offerId; + + return $this; + } +} diff --git a/src/Entity/MerDT.php b/src/Entity/MerDT.php new file mode 100644 index 0000000..d581761 --- /dev/null +++ b/src/Entity/MerDT.php @@ -0,0 +1,35 @@ +id; +// } + + public function getServiceId(): ?string + { + return $this->serviceId; + } + + public function setServiceId(string $serviceId): self + { + $this->serviceId = $serviceId; + + return $this; + } +} diff --git a/src/Entity/MerParaDM.php b/src/Entity/MerParaDM.php new file mode 100644 index 0000000..207b9bb --- /dev/null +++ b/src/Entity/MerParaDM.php @@ -0,0 +1,37 @@ +id; +// } + + public function getProductCode(): ?string + { + return $this->productCode; + } + + public function setProductCode(string $productCode): self + { + $this->productCode = $productCode; + + return $this; + } +} diff --git a/src/Entity/MerParaDT.php b/src/Entity/MerParaDT.php new file mode 100644 index 0000000..d545e6e --- /dev/null +++ b/src/Entity/MerParaDT.php @@ -0,0 +1,37 @@ +id; +// } + + public function getApiKey(): ?string + { + return $this->apiKey; + } + + public function setApiKey(string $apiKey): self + { + $this->apiKey = $apiKey; + + return $this; + } +} diff --git a/src/Entity/MerParaSub.php b/src/Entity/MerParaSub.php new file mode 100644 index 0000000..416ae56 --- /dev/null +++ b/src/Entity/MerParaSub.php @@ -0,0 +1,51 @@ +id; + } + + public function getRedCode(): ?string + { + return $this->redCode; + } + + public function setRedCode(?string $redCode): self + { + $this->redCode = $redCode; + + return $this; + } + + public function getService(): ?MerService + { + return $this->service; + } + + public function setService(?MerService $service): self + { + $this->service = $service; + + return $this; + } +} diff --git a/src/Entity/MerService.php b/src/Entity/MerService.php new file mode 100644 index 0000000..9386ea4 --- /dev/null +++ b/src/Entity/MerService.php @@ -0,0 +1,57 @@ + MerParaDM::class, + 'para_dt' => MerParaDT::class, + 'be_dm' => MerBeDM::class +])] +#[ORM\Entity(repositoryClass: MerServiceRepository::class)] +abstract class MerService +{ + #[ORM\Id] + #[ORM\GeneratedValue] + #[ORM\Column(type: 'integer')] + private $id; + + #[ORM\Column(type: 'integer', nullable: true)] + private $mcc_mnc; + + #[ORM\Column(type: 'json', nullable: true)] + private $metadata = []; + + public function getId(): ?int + { + return $this->id; + } + + public function getMccMnc(): ?int + { + return $this->mcc_mnc; + } + + public function setMccMnc(?int $mcc_mnc): self + { + $this->mcc_mnc = $mcc_mnc; + + return $this; + } + + public function getMetadata(): ?array + { + return $this->metadata; + } + + public function setMetadata(?array $metadata): self + { + $this->metadata = $metadata; + + return $this; + } +} diff --git a/src/Entity/Person1.php b/src/Entity/Person1.php index bc5fdc2..9d5209f 100644 --- a/src/Entity/Person1.php +++ b/src/Entity/Person1.php @@ -4,7 +4,7 @@ namespace App\Entity; use Doctrine\ORM\Mapping as ORM; -#[ORM\MappedSuperclass] +////#[ORM\MappedSuperclass] class Person1 { #[ORM\Column(type: 'integer')] diff --git a/src/Entity/Person2.php b/src/Entity/Person2.php index 83b5fa6..adc8dc1 100644 --- a/src/Entity/Person2.php +++ b/src/Entity/Person2.php @@ -4,7 +4,7 @@ namespace App\Entity; use Doctrine\ORM\Mapping as ORM; -#[ORM\Entity] +////#[ORM\Entity] #[ORM\InheritanceType('SINGLE_TABLE')] #[ORM\DiscriminatorColumn(name: 'discr', type: 'string')] #[ORM\DiscriminatorMap(['person2' => 'Person2', 'employee2' => 'Employee2'])] diff --git a/src/Entity/Person3.php b/src/Entity/Person3.php index 314ab0a..c8e1bab 100644 --- a/src/Entity/Person3.php +++ b/src/Entity/Person3.php @@ -4,7 +4,7 @@ namespace App\Entity; use Doctrine\ORM\Mapping as ORM; -#[ORM\Entity] +////#[ORM\Entity] #[ORM\InheritanceType('JOINED')] #[ORM\DiscriminatorColumn(name: 'discr', type: 'string')] #[ORM\DiscriminatorMap(['person3' => 'Person3', 'employee3' => 'Employee3'])] diff --git a/src/Entity/Toothbrush1.php b/src/Entity/Toothbrush1.php index bcf4488..9ca0c2d 100644 --- a/src/Entity/Toothbrush1.php +++ b/src/Entity/Toothbrush1.php @@ -4,7 +4,7 @@ namespace App\Entity; use Doctrine\ORM\Mapping as ORM; -#[ORM\Entity] +////#[ORM\Entity] class Toothbrush1 { #[ORM\Id] diff --git a/src/Entity/Toothbrush2.php b/src/Entity/Toothbrush2.php index 33b8ef6..90b65e4 100644 --- a/src/Entity/Toothbrush2.php +++ b/src/Entity/Toothbrush2.php @@ -4,7 +4,7 @@ namespace App\Entity; use Doctrine\ORM\Mapping as ORM; -#[ORM\Entity] +////#[ORM\Entity] class Toothbrush2 { #[ORM\Id] diff --git a/src/Entity/Toothbrush3.php b/src/Entity/Toothbrush3.php index 348e14b..4dd57a2 100644 --- a/src/Entity/Toothbrush3.php +++ b/src/Entity/Toothbrush3.php @@ -4,7 +4,7 @@ namespace App\Entity; use Doctrine\ORM\Mapping as ORM; -#[ORM\Entity] +////#[ORM\Entity] class Toothbrush3 { #[ORM\Id] diff --git a/src/Repository/MerBeDMRepository.php b/src/Repository/MerBeDMRepository.php new file mode 100644 index 0000000..36eaa3b --- /dev/null +++ b/src/Repository/MerBeDMRepository.php @@ -0,0 +1,65 @@ + + * @method MerBeDM|null find($id, $lockMode = null, $lockVersion = null) + * @method MerBeDM|null findOneBy(array $criteria, array $orderBy = null) + * @method MerBeDM[] findAll() + * @method MerBeDM[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) + */ +class MerBeDMRepository extends ServiceEntityRepository +{ + public function __construct(ManagerRegistry $registry) + { + parent::__construct($registry, MerBeDM::class); + } + + public function add(MerBeDM $entity, bool $flush = false): void + { + $this->getEntityManager()->persist($entity); + + if ($flush) { + $this->getEntityManager()->flush(); + } + } + + public function remove(MerBeDM $entity, bool $flush = false): void + { + $this->getEntityManager()->remove($entity); + + if ($flush) { + $this->getEntityManager()->flush(); + } + } + +// /** +// * @return MerBeDM[] Returns an array of MerBeDM objects +// */ +// public function findByExampleField($value): array +// { +// return $this->createQueryBuilder('m') +// ->andWhere('m.exampleField = :val') +// ->setParameter('val', $value) +// ->orderBy('m.id', 'ASC') +// ->setMaxResults(10) +// ->getQuery() +// ->getResult() +// ; +// } + +// public function findOneBySomeField($value): ?MerBeDM +// { +// return $this->createQueryBuilder('m') +// ->andWhere('m.exampleField = :val') +// ->setParameter('val', $value) +// ->getQuery() +// ->getOneOrNullResult() +// ; +// } +} diff --git a/src/Repository/MerDMRepository.php b/src/Repository/MerDMRepository.php new file mode 100644 index 0000000..682bdad --- /dev/null +++ b/src/Repository/MerDMRepository.php @@ -0,0 +1,65 @@ + + * @method MerDM|null find($id, $lockMode = null, $lockVersion = null) + * @method MerDM|null findOneBy(array $criteria, array $orderBy = null) + * @method MerDM[] findAll() + * @method MerDM[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) + */ +class MerDMRepository extends ServiceEntityRepository +{ + public function __construct(ManagerRegistry $registry) + { + parent::__construct($registry, MerDM::class); + } + + public function add(MerDM $entity, bool $flush = false): void + { + $this->getEntityManager()->persist($entity); + + if ($flush) { + $this->getEntityManager()->flush(); + } + } + + public function remove(MerDM $entity, bool $flush = false): void + { + $this->getEntityManager()->remove($entity); + + if ($flush) { + $this->getEntityManager()->flush(); + } + } + +// /** +// * @return MerDM[] Returns an array of MerDM objects +// */ +// public function findByExampleField($value): array +// { +// return $this->createQueryBuilder('m') +// ->andWhere('m.exampleField = :val') +// ->setParameter('val', $value) +// ->orderBy('m.id', 'ASC') +// ->setMaxResults(10) +// ->getQuery() +// ->getResult() +// ; +// } + +// public function findOneBySomeField($value): ?MerDM +// { +// return $this->createQueryBuilder('m') +// ->andWhere('m.exampleField = :val') +// ->setParameter('val', $value) +// ->getQuery() +// ->getOneOrNullResult() +// ; +// } +} diff --git a/src/Repository/MerDTRepository.php b/src/Repository/MerDTRepository.php new file mode 100644 index 0000000..11fc067 --- /dev/null +++ b/src/Repository/MerDTRepository.php @@ -0,0 +1,65 @@ + + * @method MerDT|null find($id, $lockMode = null, $lockVersion = null) + * @method MerDT|null findOneBy(array $criteria, array $orderBy = null) + * @method MerDT[] findAll() + * @method MerDT[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) + */ +class MerDTRepository extends ServiceEntityRepository +{ + public function __construct(ManagerRegistry $registry) + { + parent::__construct($registry, MerDT::class); + } + + public function add(MerDT $entity, bool $flush = false): void + { + $this->getEntityManager()->persist($entity); + + if ($flush) { + $this->getEntityManager()->flush(); + } + } + + public function remove(MerDT $entity, bool $flush = false): void + { + $this->getEntityManager()->remove($entity); + + if ($flush) { + $this->getEntityManager()->flush(); + } + } + +// /** +// * @return MerDT[] Returns an array of MerDT objects +// */ +// public function findByExampleField($value): array +// { +// return $this->createQueryBuilder('m') +// ->andWhere('m.exampleField = :val') +// ->setParameter('val', $value) +// ->orderBy('m.id', 'ASC') +// ->setMaxResults(10) +// ->getQuery() +// ->getResult() +// ; +// } + +// public function findOneBySomeField($value): ?MerDT +// { +// return $this->createQueryBuilder('m') +// ->andWhere('m.exampleField = :val') +// ->setParameter('val', $value) +// ->getQuery() +// ->getOneOrNullResult() +// ; +// } +} diff --git a/src/Repository/MerParaDMRepository.php b/src/Repository/MerParaDMRepository.php new file mode 100644 index 0000000..24bcd10 --- /dev/null +++ b/src/Repository/MerParaDMRepository.php @@ -0,0 +1,65 @@ + + * @method MerParaDM|null find($id, $lockMode = null, $lockVersion = null) + * @method MerParaDM|null findOneBy(array $criteria, array $orderBy = null) + * @method MerParaDM[] findAll() + * @method MerParaDM[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) + */ +class MerParaDMRepository extends ServiceEntityRepository +{ + public function __construct(ManagerRegistry $registry) + { + parent::__construct($registry, MerParaDM::class); + } + + public function add(MerParaDM $entity, bool $flush = false): void + { + $this->getEntityManager()->persist($entity); + + if ($flush) { + $this->getEntityManager()->flush(); + } + } + + public function remove(MerParaDM $entity, bool $flush = false): void + { + $this->getEntityManager()->remove($entity); + + if ($flush) { + $this->getEntityManager()->flush(); + } + } + +// /** +// * @return MerParaDM[] Returns an array of MerParaDM objects +// */ +// public function findByExampleField($value): array +// { +// return $this->createQueryBuilder('m') +// ->andWhere('m.exampleField = :val') +// ->setParameter('val', $value) +// ->orderBy('m.id', 'ASC') +// ->setMaxResults(10) +// ->getQuery() +// ->getResult() +// ; +// } + +// public function findOneBySomeField($value): ?MerParaDM +// { +// return $this->createQueryBuilder('m') +// ->andWhere('m.exampleField = :val') +// ->setParameter('val', $value) +// ->getQuery() +// ->getOneOrNullResult() +// ; +// } +} diff --git a/src/Repository/MerParaDTRepository.php b/src/Repository/MerParaDTRepository.php new file mode 100644 index 0000000..f30b8b4 --- /dev/null +++ b/src/Repository/MerParaDTRepository.php @@ -0,0 +1,65 @@ + + * @method MerParaDT|null find($id, $lockMode = null, $lockVersion = null) + * @method MerParaDT|null findOneBy(array $criteria, array $orderBy = null) + * @method MerParaDT[] findAll() + * @method MerParaDT[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) + */ +class MerParaDTRepository extends ServiceEntityRepository +{ + public function __construct(ManagerRegistry $registry) + { + parent::__construct($registry, MerParaDT::class); + } + + public function add(MerParaDT $entity, bool $flush = false): void + { + $this->getEntityManager()->persist($entity); + + if ($flush) { + $this->getEntityManager()->flush(); + } + } + + public function remove(MerParaDT $entity, bool $flush = false): void + { + $this->getEntityManager()->remove($entity); + + if ($flush) { + $this->getEntityManager()->flush(); + } + } + +// /** +// * @return MerParaDT[] Returns an array of MerParaDT objects +// */ +// public function findByExampleField($value): array +// { +// return $this->createQueryBuilder('m') +// ->andWhere('m.exampleField = :val') +// ->setParameter('val', $value) +// ->orderBy('m.id', 'ASC') +// ->setMaxResults(10) +// ->getQuery() +// ->getResult() +// ; +// } + +// public function findOneBySomeField($value): ?MerParaDT +// { +// return $this->createQueryBuilder('m') +// ->andWhere('m.exampleField = :val') +// ->setParameter('val', $value) +// ->getQuery() +// ->getOneOrNullResult() +// ; +// } +} diff --git a/src/Repository/MerParaSubRepository.php b/src/Repository/MerParaSubRepository.php new file mode 100644 index 0000000..895f628 --- /dev/null +++ b/src/Repository/MerParaSubRepository.php @@ -0,0 +1,66 @@ + + * + * @method MerParaSub|null find($id, $lockMode = null, $lockVersion = null) + * @method MerParaSub|null findOneBy(array $criteria, array $orderBy = null) + * @method MerParaSub[] findAll() + * @method MerParaSub[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) + */ +class MerParaSubRepository extends ServiceEntityRepository +{ + public function __construct(ManagerRegistry $registry) + { + parent::__construct($registry, MerParaSub::class); + } + + public function add(MerParaSub $entity, bool $flush = false): void + { + $this->getEntityManager()->persist($entity); + + if ($flush) { + $this->getEntityManager()->flush(); + } + } + + public function remove(MerParaSub $entity, bool $flush = false): void + { + $this->getEntityManager()->remove($entity); + + if ($flush) { + $this->getEntityManager()->flush(); + } + } + +// /** +// * @return MerParaSub[] Returns an array of MerParaSub objects +// */ +// public function findByExampleField($value): array +// { +// return $this->createQueryBuilder('m') +// ->andWhere('m.exampleField = :val') +// ->setParameter('val', $value) +// ->orderBy('m.id', 'ASC') +// ->setMaxResults(10) +// ->getQuery() +// ->getResult() +// ; +// } + + public function findOneById(int $id): ?MerParaSub + { + return $this->createQueryBuilder('m') + ->andWhere('m.id = :val') + ->setParameter('val', $id) + ->getQuery() + ->getOneOrNullResult() + ; + } +} diff --git a/src/Repository/MerServiceRepository.php b/src/Repository/MerServiceRepository.php new file mode 100644 index 0000000..aba062d --- /dev/null +++ b/src/Repository/MerServiceRepository.php @@ -0,0 +1,65 @@ + + * @method MerService|null find($id, $lockMode = null, $lockVersion = null) + * @method MerService|null findOneBy(array $criteria, array $orderBy = null) + * @method MerService[] findAll() + * @method MerService[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) + */ +class MerServiceRepository extends ServiceEntityRepository +{ + public function __construct(ManagerRegistry $registry) + { + parent::__construct($registry, MerService::class); + } + + public function add(MerService $entity, bool $flush = false): void + { + $this->getEntityManager()->persist($entity); + + if ($flush) { + $this->getEntityManager()->flush(); + } + } + + public function remove(MerService $entity, bool $flush = false): void + { + $this->getEntityManager()->remove($entity); + + if ($flush) { + $this->getEntityManager()->flush(); + } + } + +// /** +// * @return MerService[] Returns an array of MerService objects +// */ +// public function findByExampleField($value): array +// { +// return $this->createQueryBuilder('m') +// ->andWhere('m.exampleField = :val') +// ->setParameter('val', $value) +// ->orderBy('m.id', 'ASC') +// ->setMaxResults(10) +// ->getQuery() +// ->getResult() +// ; +// } + +// public function findOneBySomeField($value): ?MerService +// { +// return $this->createQueryBuilder('m') +// ->andWhere('m.exampleField = :val') +// ->setParameter('val', $value) +// ->getQuery() +// ->getOneOrNullResult() +// ; +// } +} diff --git a/templates/base.html.twig b/templates/base.html.twig index 0b851f3..8578144 100644 --- a/templates/base.html.twig +++ b/templates/base.html.twig @@ -3,7 +3,7 @@ {% block title %}Welcome!{% endblock %} - +{# #} {# Run `composer require symfony/webpack-encore-bundle` to start using Symfony UX #} {% block stylesheets %} {{ encore_entry_link_tags('app') }}