<?phpnamespace App\Entity\Webmail;use App\Entity\Section;use App\Repository\Webmail\AccountRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: AccountRepository::class)]#[ORM\Table('webmail_account')]class Account{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(length: 255)] private ?string $email = null; #[ORM\Column(length: 255)] private ?string $login = null; #[ORM\Column(length: 255)] private ?string $host = null; #[ORM\Column(length: 255)] private ?string $password = null; #[ORM\ManyToOne(inversedBy: 'webmailAccounts')] private ?Section $section = null; #[ORM\OneToMany(mappedBy: 'account', targetEntity: AccountAccess::class)] private Collection $accountAccesses; #[ORM\Column(length: 255)] private ?string $smtpLogin = null; #[ORM\Column(length: 255)] private ?string $smtpHost = null; #[ORM\Column(length: 255)] private ?string $smtpPassword = null; public function __construct() { $this->accountAccesses = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getEmail(): ?string { return $this->email; } public function setEmail(string $email): self { $this->email = $email; return $this; } public function getLogin(): ?string { return $this->login; } public function setLogin(string $login): self { $this->login = $login; return $this; } public function getHost(): ?string { return $this->host; } public function setHost(string $host): self { $this->host = $host; return $this; } public function getPassword(): ?string { return $this->password; } public function setPassword(string $password): self { $this->password = $password; return $this; } public function getSection(): ?Section { return $this->section; } public function setSection(?Section $section): self { $this->section = $section; return $this; } /** * @return Collection<int, AccountAccess> */ public function getAccountAccesses(): Collection { return $this->accountAccesses; } public function addAccountAccess(AccountAccess $accountAccess): self { if (!$this->accountAccesses->contains($accountAccess)) { $this->accountAccesses->add($accountAccess); $accountAccess->setAccount($this); } return $this; } public function removeAccountAccess(AccountAccess $accountAccess): self { if ($this->accountAccesses->removeElement($accountAccess)) { // set the owning side to null (unless already changed) if ($accountAccess->getAccount() === $this) { $accountAccess->setAccount(null); } } return $this; } public function getSmtpLogin(): ?string { return $this->smtpLogin; } public function setSmtpLogin(string $smtpLogin): self { $this->smtpLogin = $smtpLogin; return $this; } public function getSmtpHost(): ?string { return $this->smtpHost; } public function setSmtpHost(string $smtpHost): self { $this->smtpHost = $smtpHost; return $this; } public function getSmtpPassword(): ?string { return $this->smtpPassword; } public function setSmtpPassword(string $smtpPassword): self { $this->smtpPassword = $smtpPassword; return $this; }}