diff --git a/src/Entity/CommunityResource.php b/src/Entity/CommunityResource.php index 8533d65..9241f11 100644 --- a/src/Entity/CommunityResource.php +++ b/src/Entity/CommunityResource.php @@ -3,6 +3,7 @@ namespace App\Entity; use App\Enums\County; +use App\Enums\ResourceType; use App\Enums\State; use App\Repository\CommunityResourceRepository; use DateTime; @@ -99,6 +100,9 @@ class CommunityResource #[ORM\Column(length: 255, nullable: true)] private ?string $servicesAvailable = null; + #[ORM\Column(type: Types::SIMPLE_ARRAY, enumType: ResourceType::class)] + private array $type = []; + public function __construct( private DateTime $today ) { @@ -623,4 +627,19 @@ class CommunityResource return $this; } + + /** + * @return ResourceType[] + */ + public function getType(): array + { + return $this->type; + } + + public function setType(array $type): static + { + $this->type = $type; + + return $this; + } } diff --git a/src/Enums/ResourceType.php b/src/Enums/ResourceType.php new file mode 100644 index 0000000..13832db --- /dev/null +++ b/src/Enums/ResourceType.php @@ -0,0 +1,12 @@ +