thebadspace/src/Entity/Location.php
Ro 3410abd70a Location Editing Part. 1
Now that full-text searching is set up in the DB, the next step is
data population. The adding and editing templates were added as long as
routes and base functionality to add single locations.

Adding works and editing is almost there but both still need to cleaned
up. The basic plumbing will be completed and then the tweaking to
account for roles and login status for the sake of security.

Part 2 will include clean up and and bulk uploads through the use of CSV
files.
2022-12-30 14:41:49 -08:00

186 lines
3.3 KiB
PHP

<?php
namespace App\Entity;
use App\Repository\LocationRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: LocationRepository::class)]
class Location
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255)]
private ?string $uuid = null;
#[ORM\Column(length: 255)]
private ?string $name = null;
#[ORM\Column(length: 255)]
private ?string $url = null;
#[ORM\Column(type: Types::TEXT)]
private ?string $description = null;
#[ORM\Column(nullable: true)]
private array $images = [];
#[ORM\Column]
private ?bool $active = null;
#[ORM\Column(length: 255)]
private ?string $rating = null;
#[ORM\Column]
private ?int $addedBy = null;
#[ORM\Column]
private ?\DateTimeImmutable $createdAt = null;
#[ORM\Column]
private ?\DateTimeImmutable $updatedAt = null;
#[ORM\Column(length: 255)]
private ?string $tags = null;
public function getId(): ?int
{
return $this->id;
}
public function getUuid(): ?string
{
return $this->uuid;
}
public function setUuid(string $uuid): self
{
$this->uuid = $uuid;
return $this;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getUrl(): ?string
{
return $this->url;
}
public function setUrl(string $url): self
{
$this->url = $url;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(string $description): self
{
$this->description = $description;
return $this;
}
public function getImages(): array
{
return $this->images;
}
public function setImages(?array $images): self
{
$this->images = $images;
return $this;
}
public function isActive(): ?bool
{
return $this->active;
}
public function setActive(bool $active): self
{
$this->active = $active;
return $this;
}
public function getRating(): ?string
{
return $this->rating;
}
public function setRating(string $rating): self
{
$this->rating = $rating;
return $this;
}
public function getAddedBy(): ?int
{
return $this->addedBy;
}
public function setAddedBy(int $addedBy): self
{
$this->addedBy = $addedBy;
return $this;
}
public function getCreatedAt(): ?\DateTimeImmutable
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeImmutable $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getUpdatedAt(): ?\DateTimeImmutable
{
return $this->updatedAt;
}
public function setUpdatedAt(\DateTimeImmutable $updatedAt): self
{
$this->updatedAt = $updatedAt;
return $this;
}
public function getTags(): ?string
{
return $this->tags;
}
public function setTags(string $tags): self
{
$this->tags = $tags;
return $this;
}
}