<?php
namespace App\Entity;
use App\Repository\UserEstablishmentRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=UserEstablishmentRepository::class)
*/
class UserEstablishment
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="datetime")
*/
private $createdAt;
/**
* @ORM\ManyToOne(targetEntity=UserStatus::class, inversedBy="userEstablishments")
*/
private $status;
/**
* @ORM\ManyToOne(targetEntity=Users::class, inversedBy="userEstablishments")
*/
private $user;
/**
* @ORM\ManyToOne(targetEntity=Establishments::class, inversedBy="userEstablishments")
*/
private $establishment;
/**
* @ORM\Column(type="boolean")
*/
private $deleted = false;
/**
* @ORM\ManyToOne(targetEntity=Roles::class, inversedBy="userEstablishments")
*/
private $role;
public function __construct()
{
$this->createdAt = new \DateTime();
}
public function getId(): ?int
{
return $this->id;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeInterface $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getStatus(): ?UserStatus
{
return $this->status;
}
public function setStatus(?UserStatus $status): self
{
$this->status = $status;
return $this;
}
public function getUser(): ?Users
{
return $this->user;
}
public function setUser(?Users $user): self
{
$this->user = $user;
return $this;
}
public function getEstablishment(): ?Establishments
{
return $this->establishment;
}
public function setEstablishment(?Establishments $establishment): self
{
$this->establishment = $establishment;
return $this;
}
public function isDeleted(): ?bool
{
return $this->deleted;
}
public function setDeleted(bool $deleted): self
{
$this->deleted = $deleted;
return $this;
}
public function getRole(): ?Roles
{
return $this->role;
}
public function setRole(?Roles $role): self
{
$this->role = $role;
return $this;
}
}