src/Entity/UserStatus.php line 12
<?phpnamespace App\Entity;use App\Repository\UserStatusRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: UserStatusRepository::class)]class UserStatus{const STATUS_ACTIVE = 'AC';const STATUS_DISABLED = 'DS';const STATUS_IDENTITY_REQUIRED = 'IR';const STATUS_PAYMENT_AND_IDENTITY_REQUIRED = 'PI';const STATUS_PAYMENT_REQUIRED = 'PR';const STATUS_PENDING = 'PA';const STATUS_REJECTED = 'RJ';const STATUS_WAITING_RENEW = 'RN';const STATUS_WITHDRAW_MEMBERSHIP = 'WM';const STATUS_EXPIRED = 'EX';#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column(length: 2)]private ?string $userStatusCode = null;#[ORM\Column(length: 255)]private ?string $name = null;#[ORM\Column(type: Types::DATETIME_MUTABLE)]private ?\DateTimeInterface $updated = null;#[ORM\Column]private ?int $updatedBy = null;#[ORM\OneToMany(mappedBy: 'userStatus', targetEntity: User::class)]#[ORM\JoinColumn(name:"user_status_code", referencedColumnName: "user_status_code")]private Collection $users;public function __construct(){$this->users = new ArrayCollection();}public function getUserStatusCode(): ?string{return $this->userStatusCode;}public function setUserStatusCode(string $userStatusCode): static{$this->userStatusCode = $userStatusCode;return $this;}public function getName(): ?string{return $this->name;}public function setName(string $name): static{$this->name = $name;return $this;}public function getUpdated(): ?\DateTimeInterface{return $this->updated;}public function setUpdated(\DateTimeInterface $updated): static{$this->updated = $updated;return $this;}public function getUpdatedBy(): ?int{return $this->updatedBy;}public function setUpdatedBy(int $updatedBy): static{$this->updatedBy = $updatedBy;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->setUserStatus($this);}return $this;}public function removeUser(User $user): static{if ($this->users->removeElement($user)) {// set the owning side to null (unless already changed)if ($user->getUserStatus() === $this) {$user->setUserStatus(null);}}return $this;}}