src/Entity/Property.php line 14
<?phpnamespace App\Entity;use App\Repository\PropertyRepository;use App\Trait\SoftDeleteTrait;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: PropertyRepository::class)]#[ORM\Index(fields: ['isDeleted'])]class Property{use SoftDeleteTrait;#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(length: 255)]private ?string $name = null;#[ORM\Column(length: 255)]private ?string $slug = null;#[ORM\ManyToOne(inversedBy: 'properties')]#[ORM\JoinColumn(nullable: false)]private ?Whitelabel $whitelabel = null;#[ORM\Column(type: Types::DATETIME_MUTABLE)]private ?\DateTimeInterface $createDate = null;#[ORM\ManyToOne]#[ORM\JoinColumn(nullable: false)]private ?User $creatorUser = null;#[ORM\Column(length: 255)]private ?string $address = null;#[ORM\Column(length: 255)]private ?string $phone = null;#[ORM\ManyToOne(inversedBy: 'properties')]private ?City $city = null;#[ORM\Column(length: 255, nullable: true)]private ?string $longtitude = null;#[ORM\Column(length: 255, nullable: true)]private ?string $latitude = null;#[ORM\ManyToMany(targetEntity: File::class, inversedBy: 'properties')]private Collection $files;#[ORM\OneToMany(mappedBy: 'property', targetEntity: Menu::class)]private Collection $menus;#[ORM\ManyToMany(targetEntity: User::class, mappedBy: 'properties')]private Collection $users;#[ORM\Column(length: 255, nullable: true)]private ?string $email = null;#[ORM\Column(length: 255, nullable: true)]private ?string $workingHours = null;#[ORM\Column]private ?int $sort = null;public function __construct(){$this->files = new ArrayCollection();$this->menus = new ArrayCollection();$this->users = new ArrayCollection();}public function getId(): ?int{return $this->id;}public function __toString(){return $this->getName();}public function getName(): ?string{return $this->name;}public function setName(string $name): static{$this->name = $name;return $this;}public function getSlug(): ?string{return $this->slug;}public function setSlug(string $slug): static{$this->slug = $slug;return $this;}public function getWhitelabel(): ?Whitelabel{return $this->whitelabel;}public function setWhitelabel(?Whitelabel $whitelabel): self{$this->whitelabel = $whitelabel;return $this;}public function getCreateDate(): ?\DateTimeInterface{return $this->createDate;}public function setCreateDate(\DateTimeInterface $createDate): static{$this->createDate = $createDate;return $this;}public function getCreatorUser(): ?User{return $this->creatorUser;}public function setCreatorUser(?User $creatorUser): static{$this->creatorUser = $creatorUser;return $this;}public function getAddress(): ?string{return $this->address;}public function setAddress(string $address): static{$this->address = $address;return $this;}public function getPhone(): ?string{return $this->phone;}public function setPhone(string $phone): static{$this->phone = $phone;return $this;}public function getLongtitude(): ?string{return $this->longtitude;}public function setLongtitude(?string $longtitude): static{$this->longtitude = $longtitude;return $this;}public function getLatitude(): ?string{return $this->latitude;}public function setLatitude(?string $latitude): static{$this->latitude = $latitude;return $this;}public function getCity(): ?City{return $this->city;}public function setCity(?City $city): static{$this->city = $city;return $this;}/*** @return Collection<int, File>*/public function getFiles(): Collection{return $this->files;}public function addFile(File $file): static{if (!$this->files->contains($file)) {$this->files->add($file);}return $this;}public function removeFile(File $file): static{$this->files->removeElement($file);return $this;}/*** @return Collection<int, Menu>*/public function getMenus(): Collection{return $this->menus;}public function addMenu(Menu $menu): static{if (!$this->menus->contains($menu)) {$this->menus->add($menu);}return $this;}public function removeMenu(Menu $menu): static{$this->menus->removeElement($menu);return $this;}/*** @return Collection<int, User>*/public function getUsers(): Collection{return $this->users;}public function addUser(User $user): static{if (!$this->users->contains($user)) {$this->users->add($user);$user->addProperty($this);}return $this;}public function removeUser(User $user): static{if ($this->users->removeElement($user)) {$user->removeProperty($this);}return $this;}public function getEmail(): ?string{return $this->email;}public function setEmail(?string $email): static{$this->email = $email;return $this;}public function getWorkingHours(): ?string{return $this->workingHours;}public function setWorkingHours(?string $workingHours): static{$this->workingHours = $workingHours;return $this;}public function getSort(): ?int{return $this->sort;}public function setSort(int $sort): static{$this->sort = $sort;return $this;}}