feat(produit): Ajoute l'entité Produit, son repository et la migration associée.

This commit is contained in:
Serreau Jovann
2026-01-16 13:44:08 +01:00
parent 93f9a35130
commit 7a43efc9b7
3 changed files with 200 additions and 0 deletions

View 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 Version20260116124335 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 product (id SERIAL NOT NULL, ref VARCHAR(255) NOT NULL, category VARCHAR(255) NOT NULL, name VARCHAR(255) NOT NULL, price_day DOUBLE PRECISION NOT NULL, price_sup DOUBLE PRECISION NOT NULL, installation DOUBLE PRECISION NOT NULL, caution DOUBLE PRECISION NOT NULL, PRIMARY KEY(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('DROP TABLE product');
}
}