diff --git a/migrations/Version20260402202703.php b/migrations/Version20260402202703.php new file mode 100644 index 0000000..7155224 --- /dev/null +++ b/migrations/Version20260402202703.php @@ -0,0 +1,31 @@ +addSql('CREATE TABLE price_automatic (id INT GENERATED BY DEFAULT AS IDENTITY NOT NULL, type VARCHAR(50) NOT NULL, title VARCHAR(255) NOT NULL, description TEXT DEFAULT NULL, price_ht NUMERIC(10, 2) 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('DROP TABLE price_automatic'); + } +} diff --git a/src/Entity/PriceAutomatic.php b/src/Entity/PriceAutomatic.php new file mode 100644 index 0000000..7f0a60f --- /dev/null +++ b/src/Entity/PriceAutomatic.php @@ -0,0 +1,72 @@ +id; + } + + public function getType(): string + { + return $this->type; + } + + public function setType(string $type): void + { + $this->type = $type; + } + + public function getTitle(): string + { + return $this->title; + } + + public function setTitle(string $title): void + { + $this->title = $title; + } + + public function getDescription(): ?string + { + return $this->description; + } + + public function setDescription(?string $description): void + { + $this->description = $description; + } + + public function getPriceHt(): string + { + return $this->priceHt; + } + + public function setPriceHt(string $priceHt): void + { + $this->priceHt = $priceHt; + } +} diff --git a/src/Repository/PriceAutomaticRepository.php b/src/Repository/PriceAutomaticRepository.php new file mode 100644 index 0000000..9f48f10 --- /dev/null +++ b/src/Repository/PriceAutomaticRepository.php @@ -0,0 +1,18 @@ + + */ +class PriceAutomaticRepository extends ServiceEntityRepository +{ + public function __construct(ManagerRegistry $registry) + { + parent::__construct($registry, PriceAutomatic::class); + } +}