diff --git a/Inventory_frontend b/Inventory_frontend index 7e67b12..b0124c1 160000 --- a/Inventory_frontend +++ b/Inventory_frontend @@ -1 +1 @@ -Subproject commit 7e67b124f3258b08c9428cefd0c6e61808992990 +Subproject commit b0124c11ba3b9fb51db323213992ccb3164f5b70 diff --git a/config/reference.php b/config/reference.php index 42493cb..36f4935 100644 --- a/config/reference.php +++ b/config/reference.php @@ -1,7 +1,5 @@ , - * } * @psalm-type ConfigType = array{ * imports?: ImportsConfig, * parameters?: ParametersConfig, @@ -1664,7 +1656,6 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param; * nelmio_cors?: NelmioCorsConfig, * api_platform?: ApiPlatformConfig, * lexik_jwt_authentication?: LexikJwtAuthenticationConfig, - * dama_doctrine_test?: DamaDoctrineTestConfig, * }, * ...addSql("ALTER TABLE sites ADD COLUMN IF NOT EXISTS color VARCHAR(7) NOT NULL DEFAULT ''"); + } + + public function down(Schema $schema): void + { + $this->addSql('ALTER TABLE sites DROP COLUMN IF EXISTS color'); + } +} diff --git a/src/Entity/Site.php b/src/Entity/Site.php index 689ef2e..9bfd446 100644 --- a/src/Entity/Site.php +++ b/src/Entity/Site.php @@ -66,6 +66,9 @@ class Site #[ORM\Column(type: Types::STRING, length: 100, options: ['default' => ''], name: 'contactCity')] private string $contactCity = ''; + #[ORM\Column(type: Types::STRING, length: 7, options: ['default' => ''], name: 'color')] + private string $color = ''; + #[ORM\Column(type: Types::DATETIME_IMMUTABLE, name: 'createdAt')] private DateTimeImmutable $createdAt; @@ -164,6 +167,18 @@ class Site return $this; } + public function getColor(): string + { + return $this->color; + } + + public function setColor(string $color): static + { + $this->color = $color; + + return $this; + } + /** * @return Collection */