add ResourceType for filtering later
This commit is contained in:
parent
d7bddc0328
commit
d193e9ba79
@ -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;
|
||||
}
|
||||
}
|
||||
|
12
src/Enums/ResourceType.php
Normal file
12
src/Enums/ResourceType.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
enum ResourceType: int
|
||||
{
|
||||
case FOOD_PANTRY = 0;
|
||||
case CLOTHES_CLOSET = 1;
|
||||
case JOB_OPENINGS = 2;
|
||||
case HOUSING = 3;
|
||||
case PARENT_SUPPORT = 4;
|
||||
}
|
Loading…
Reference in New Issue
Block a user