✨ feat(AvisPaymentState): Ajoute champ isRecover pour suivi des relances.
✨ feat(Customer): Ajoute relation avec FaultPayment pour suivi des impayés. 🐛 fix(CheckAvisPaymentStateCommand): Crée FaultPayment et relance si nécessaire. 🎨 style(customer.twig): Affiche si le client a des factures impayées. `
This commit is contained in:
36
migrations/Version20251113132634.php
Normal file
36
migrations/Version20251113132634.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 Version20251113132634 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 fault_payment (id SERIAL NOT NULL, customer_id INT DEFAULT NULL, id_advert_payment INT NOT NULL, entry_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, PRIMARY KEY(id))');
|
||||
$this->addSql('CREATE INDEX IDX_873651E99395C3F3 ON fault_payment (customer_id)');
|
||||
$this->addSql('COMMENT ON COLUMN fault_payment.entry_at IS \'(DC2Type:datetime_immutable)\'');
|
||||
$this->addSql('ALTER TABLE fault_payment ADD CONSTRAINT FK_873651E99395C3F3 FOREIGN KEY (customer_id) REFERENCES customer (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 fault_payment DROP CONSTRAINT FK_873651E99395C3F3');
|
||||
$this->addSql('DROP TABLE fault_payment');
|
||||
}
|
||||
}
|
||||
32
migrations/Version20251113133056.php
Normal file
32
migrations/Version20251113133056.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?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 Version20251113133056 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 avis_payment_state ADD is_recover BOOLEAN DEFAULT NULL');
|
||||
}
|
||||
|
||||
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 avis_payment_state DROP is_recover');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user