YGGtracker/src/Entity/User.php

134 lines
2.3 KiB
PHP
Raw Normal View History

2023-10-02 13:13:55 +00:00
<?php
namespace App\Entity;
use App\Repository\UserRepository;
2023-10-03 19:35:13 +00:00
use Doctrine\DBAL\Types\Types;
2023-10-02 13:13:55 +00:00
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: UserRepository::class)]
class User
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255)]
private ?string $address = null;
#[ORM\Column]
private ?int $added = null;
#[ORM\Column]
private ?bool $moderator = null;
#[ORM\Column]
private ?bool $approved = null;
#[ORM\Column]
private ?bool $status = null;
2023-10-03 19:35:13 +00:00
#[ORM\Column(length: 2)]
private ?string $locale = null;
#[ORM\Column(type: Types::ARRAY)]
private array $locales = [];
2023-10-02 13:13:55 +00:00
public function getId(): ?int
{
return $this->id;
}
public function setId(string $id): static
{
$this->id = $id;
return $this;
}
public function getAddress(): ?string
{
return $this->address;
}
public function setAddress(string $address): static
{
$this->address = $address;
return $this;
}
public function getAdded(): ?int
{
return $this->added;
}
public function setAdded(int $added): static
{
$this->added = $added;
return $this;
}
2023-10-03 19:35:13 +00:00
public function isModerator(): ?bool
2023-10-02 13:13:55 +00:00
{
2023-10-03 19:35:13 +00:00
return $this->moderator;
2023-10-02 13:13:55 +00:00
}
2023-10-03 19:35:13 +00:00
public function setModerator(bool $moderator): static
2023-10-02 13:13:55 +00:00
{
2023-10-03 19:35:13 +00:00
$this->moderator = $moderator;
2023-10-02 13:13:55 +00:00
return $this;
}
2023-10-03 19:35:13 +00:00
public function isApproved(): ?bool
2023-10-02 13:13:55 +00:00
{
2023-10-03 19:35:13 +00:00
return $this->approved;
2023-10-02 13:13:55 +00:00
}
2023-10-03 19:35:13 +00:00
public function setApproved(bool $approved): static
2023-10-02 13:13:55 +00:00
{
2023-10-03 19:35:13 +00:00
$this->approved = $approved;
2023-10-02 13:13:55 +00:00
return $this;
}
2023-10-03 19:35:13 +00:00
public function isStatus(): ?bool
2023-10-02 13:13:55 +00:00
{
2023-10-03 19:35:13 +00:00
return $this->status;
2023-10-02 13:13:55 +00:00
}
2023-10-03 19:35:13 +00:00
public function setStatus(bool $status): static
2023-10-02 13:13:55 +00:00
{
2023-10-03 19:35:13 +00:00
$this->status = $status;
2023-10-02 13:13:55 +00:00
return $this;
}
2023-10-03 19:35:13 +00:00
public function getLocale(): ?string
2023-10-02 13:13:55 +00:00
{
2023-10-03 19:35:13 +00:00
return $this->locale;
2023-10-02 13:13:55 +00:00
}
2023-10-03 19:35:13 +00:00
public function setLocale(string $locale): static
2023-10-02 13:13:55 +00:00
{
2023-10-03 19:35:13 +00:00
$this->locale = $locale;
2023-10-02 13:13:55 +00:00
return $this;
}
2023-10-03 19:35:13 +00:00
public function getLocales(): array
2023-10-02 13:13:55 +00:00
{
2023-10-03 19:35:13 +00:00
return $this->locales;
2023-10-02 13:13:55 +00:00
}
2023-10-03 19:35:13 +00:00
public function setLocales(array $locales): static
2023-10-02 13:13:55 +00:00
{
2023-10-03 19:35:13 +00:00
$this->locales = $locales;
2023-10-02 13:13:55 +00:00
return $this;
}
}