Selaa lähdekoodia

Reminder

develop
Guillaume 3 vuotta sitten
vanhempi
commit
c04203996c
4 muutettua tiedostoa jossa 102 lisäystä ja 1 poistoa
  1. +4
    -1
      config/services.yaml
  2. +47
    -0
      migrations/Version20210616070418.php
  3. +50
    -0
      src/Repository/ReminderRepository.php
  4. +1
    -0
      webpack.config.js

+ 4
- 1
config/services.yaml Näytä tiedosto

@@ -53,4 +53,7 @@ services:
class: App\Definition\MerchantSettingDefinition

Lc\SovBundle\Definition\SiteSettingDefinition:
class: App\Definition\SiteSettingDefinition
class: App\Definition\SiteSettingDefinition

Lc\SovBundle\Factory\Reminder\ReminderFactoryInterface:
class: Lc\CaracoleBundle\Factory\Reminder\ReminderFactory

+ 47
- 0
migrations/Version20210616070418.php Näytä tiedosto

@@ -0,0 +1,47 @@
<?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 Version20210616070418 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 news DROP is_sent');
$this->addSql('ALTER TABLE reminder ADD section_id INT DEFAULT NULL, ADD crud_action VARCHAR(64) DEFAULT NULL, ADD crud_controller_fqcn VARCHAR(255) DEFAULT NULL, DROP entity_name, DROP entity_action');
$this->addSql('ALTER TABLE reminder ADD CONSTRAINT FK_40374F40D823E37A FOREIGN KEY (section_id) REFERENCES section (id)');
$this->addSql('CREATE INDEX IDX_40374F40D823E37A ON reminder (section_id)');
$this->addSql('ALTER TABLE ticket DROP FOREIGN KEY FK_97A0ADA36796D554');
$this->addSql('ALTER TABLE ticket DROP FOREIGN KEY FK_97A0ADA3BB6C6D96');
$this->addSql('DROP INDEX IDX_97A0ADA36796D554 ON ticket');
$this->addSql('DROP INDEX IDX_97A0ADA3BB6C6D96 ON ticket');
$this->addSql('ALTER TABLE ticket DROP merchant_id, DROP order_shop_id');
}

public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE news ADD is_sent TINYINT(1) DEFAULT NULL');
$this->addSql('ALTER TABLE reminder DROP FOREIGN KEY FK_40374F40D823E37A');
$this->addSql('DROP INDEX IDX_40374F40D823E37A ON reminder');
$this->addSql('ALTER TABLE reminder ADD entity_action VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, DROP section_id, DROP crud_action, CHANGE crud_controller_fqcn entity_name VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE ticket ADD merchant_id INT NOT NULL, ADD order_shop_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE ticket ADD CONSTRAINT FK_97A0ADA36796D554 FOREIGN KEY (merchant_id) REFERENCES merchant (id)');
$this->addSql('ALTER TABLE ticket ADD CONSTRAINT FK_97A0ADA3BB6C6D96 FOREIGN KEY (order_shop_id) REFERENCES order_shop (id)');
$this->addSql('CREATE INDEX IDX_97A0ADA36796D554 ON ticket (merchant_id)');
$this->addSql('CREATE INDEX IDX_97A0ADA3BB6C6D96 ON ticket (order_shop_id)');
}
}

+ 50
- 0
src/Repository/ReminderRepository.php Näytä tiedosto

@@ -0,0 +1,50 @@
<?php

namespace App\Repository;

use App\Entity\Reminder;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;

/**
* @method Reminder|null find($id, $lockMode = null, $lockVersion = null)
* @method Reminder|null findOneBy(array $criteria, array $orderBy = null)
* @method Reminder[] findAll()
* @method Reminder[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/
class ReminderRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, Reminder::class);
}

// /**
// * @return Reminder[] Returns an array of Reminder objects
// */
/*
public function findByExampleField($value)
{
return $this->createQueryBuilder('r')
->andWhere('r.exampleField = :val')
->setParameter('val', $value)
->orderBy('r.id', 'ASC')
->setMaxResults(10)
->getQuery()
->getResult()
;
}
*/

/*
public function findOneBySomeField($value): ?Reminder
{
return $this->createQueryBuilder('r')
->andWhere('r.exampleField = :val')
->setParameter('val', $value)
->getQuery()
->getOneOrNullResult()
;
}
*/
}

+ 1
- 0
webpack.config.js Näytä tiedosto

@@ -48,6 +48,7 @@ Encore
.addEntry('adminlte-sort', './Lc/SovBundle/Resources/assets/app/adminlte/sort/app.sort.js')
.addEntry('adminlte-field-filemanager', './Lc/SovBundle/Resources/assets/app/adminlte/field/filemanager/app.filemanager.js')
.addEntry('adminlte-field-collection', './Lc/SovBundle/Resources/assets/app/adminlte/field/collection/app.collection.js')
.addEntry('adminlte-reminder', './Lc/SovBundle/Resources/assets/app/adminlte/reminder/app.reminder.js')
.addEntry('carac-switch-merchant', './Lc/CaracoleBundle/Resources/assets/app/switchmerchant/app.switchmerchant.js')
.addEntry('carac-common', './Lc/CaracoleBundle/Resources/assets/app/adminlte/common/app.common.js')


Loading…
Peruuta
Tallenna