src/Entity/Webmail/AccountAccess.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Webmail;
  3. use App\Entity\User;
  4. use App\Repository\Webmail\AccountAccessRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassAccountAccessRepository::class)]
  7. #[ORM\Table(name'webmail_account_access')]
  8. class AccountAccess
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\ManyToOne(inversedBy'accountAccesses')]
  15.     #[ORM\JoinColumn(nullablefalse)]
  16.     private ?Account $account null;
  17.     #[ORM\ManyToOne(inversedBy'webmailAccountAccesses')]
  18.     #[ORM\JoinColumn(nullablefalse)]
  19.     private ?User $user null;
  20.     #[ORM\Column(length255enumTypeRole::class, options: ['default' => Role::ReadOnly])]
  21.     private ?Role $role Role::ReadWrite;
  22.     #[ORM\Column(options: ['default' => false])]
  23.     private ?bool $preferred true;
  24.     public function getId(): ?int
  25.     {
  26.         return $this->id;
  27.     }
  28.     public function getAccount(): ?Account
  29.     {
  30.         return $this->account;
  31.     }
  32.     public function setAccount(?Account $account): self
  33.     {
  34.         $this->account $account;
  35.         return $this;
  36.     }
  37.     public function getUser(): ?User
  38.     {
  39.         return $this->user;
  40.     }
  41.     public function setUser(?User $user): self
  42.     {
  43.         $this->user $user;
  44.         return $this;
  45.     }
  46.     public function getRole(): ?Role
  47.     {
  48.         return $this->role;
  49.     }
  50.     public function setRole(Role $role): self
  51.     {
  52.         $this->role $role;
  53.         return $this;
  54.     }
  55.     public function isPreferred(): ?bool
  56.     {
  57.         return $this->preferred;
  58.     }
  59.     public function setPreferred(bool $preferred): self
  60.     {
  61.         $this->preferred $preferred;
  62.         return $this;
  63.     }
  64. }