feat(customer): Ajoute l'entité CustomerWallet et la vue porte-monnaie.
♻️ refactor(template): Renomme external.twig en wallet.twig.
 feat(website): Ajoute une option pour afficher les options du site.
🐛 fix(serverCard): Affiche correctement le statut en temps réel via MQTT.
🌐 i18n: Corrige une faute de frappe dans la traduction de "Newsletter".
```
This commit is contained in:
Serreau Jovann
2025-11-06 15:31:08 +01:00
parent a34589721f
commit 5c0500dc19
13 changed files with 380 additions and 23 deletions

View 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 Version20251106072345 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 customer_wallet (id SERIAL NOT NULL, customer_id INT DEFAULT NULL, ammount DOUBLE PRECISION NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE UNIQUE INDEX UNIQ_CDAD4E4E9395C3F3 ON customer_wallet (customer_id)');
$this->addSql('CREATE TABLE customer_wallet_history (id SERIAL NOT NULL, wallet_id INT DEFAULT NULL, entry_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, operation VARCHAR(255) NOT NULL, ammount DOUBLE PRECISION NOT NULL, author VARCHAR(255) NOT NULL, descrition VARCHAR(255) NOT NULL, paiment_id VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE INDEX IDX_CFD66197712520F3 ON customer_wallet_history (wallet_id)');
$this->addSql('COMMENT ON COLUMN customer_wallet_history.entry_at IS \'(DC2Type:datetime_immutable)\'');
$this->addSql('ALTER TABLE customer_wallet ADD CONSTRAINT FK_CDAD4E4E9395C3F3 FOREIGN KEY (customer_id) REFERENCES customer (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE customer_wallet_history ADD CONSTRAINT FK_CFD66197712520F3 FOREIGN KEY (wallet_id) REFERENCES customer_wallet (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('ALTER TABLE customer_wallet DROP CONSTRAINT FK_CDAD4E4E9395C3F3');
$this->addSql('ALTER TABLE customer_wallet_history DROP CONSTRAINT FK_CFD66197712520F3');
$this->addSql('DROP TABLE customer_wallet');
$this->addSql('DROP TABLE customer_wallet_history');
}
}