<?php
namespace App\Entity;
use App\Repository\MineRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=MineRepository::class)
*/
class Mine
{
use \App\Traits\Enableable;
use \App\Traits\Timestampable;
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $libelle;
/**
* @ORM\OneToMany(targetEntity=UtilisateurMine::class, mappedBy="mine")
*/
private $utilisateurMine;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $adresse;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $codepostal;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $ville;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $telephone;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $mail;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $remote_id;
/**
* @ORM\OneToMany(targetEntity=Log::class, mappedBy="mine")
*/
private $logs;
/**
* @ORM\OneToMany(targetEntity=Notification::class, mappedBy="mine")
*/
private $notifications;
// /**
// * @ORM\OneToMany(targetEntity=Contact::class, mappedBy="mine")
// */
// private $contacts;
/**
* @ORM\ManyToOne(targetEntity=Pays::class, inversedBy="mine")
* @ORM\JoinColumn(nullable=true)
*/
private $pays;
public function __construct()
{
$this->utilisateurMine = new ArrayCollection();
$this->logs = new ArrayCollection();
$this->notifications = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getLibelle(): ?string
{
return $this->libelle;
}
public function setLibelle(?string $libelle): self
{
$this->libelle = $libelle;
return $this;
}
/**
* @return Collection|UtilisateurMine[]
*/
public function getUtilisateurMine(): Collection
{
return $this->utilisateurMine;
}
public function addUtilisateurMine(UtilisateurMine $utilisateurMine): self
{
if (!$this->utilisateurMine->contains($utilisateurMine)) {
$this->utilisateurMine[] = $utilisateurMine;
$utilisateurMine->setMine($this);
}
return $this;
}
public function removeUtilisateurMine(UtilisateurMine $utilisateurMine): self
{
if ($this->utilisateurMine->removeElement($utilisateurMine)) {
// set the owning side to null (unless already changed)
if ($utilisateurMine->getMine() === $this) {
$utilisateurMine->setMine(null);
}
}
return $this;
}
public function getAdresse(): ?string
{
return $this->adresse;
}
public function setAdresse(?string $adresse): self
{
$this->adresse = $adresse;
return $this;
}
public function getCodepostal(): ?string
{
return $this->codepostal;
}
public function setCodepostal(?string $codepostal): self
{
$this->codepostal = $codepostal;
return $this;
}
public function getVille(): ?string
{
return $this->ville;
}
public function setVille(?string $ville): self
{
$this->ville = $ville;
return $this;
}
public function getTelephone(): ?string
{
return $this->telephone;
}
public function setTelephone(?string $telephone): self
{
$this->telephone = $telephone;
return $this;
}
public function getMail(): ?string
{
return $this->mail;
}
public function setMail(?string $mail): self
{
$this->mail = $mail;
return $this;
}
public function getRemoteId(): ?int
{
return $this->remote_id;
}
public function setRemoteId(int $remote_id): self
{
$this->remote_id = $remote_id;
return $this;
}
/**
* @return Collection<int, Log>
*/
public function getLogs(): Collection
{
return $this->logs;
}
public function addLog(Log $log): self
{
if (!$this->logs->contains($log)) {
$this->logs[] = $log;
$log->setMine($this);
}
return $this;
}
public function removeLog(Log $log): self
{
if ($this->logs->removeElement($log)) {
// set the owning side to null (unless already changed)
if ($log->getMine() === $this) {
$log->setMine(null);
}
}
return $this;
}
/**
* @return Collection<int, Notification>
*/
public function getNotifications(): Collection
{
return $this->notifications;
}
public function addNotification(Notification $notification): self
{
if (!$this->notifications->contains($notification)) {
$this->notifications[] = $notification;
$notification->setMine($this);
}
return $this;
}
public function removeNotification(Notification $notification): self
{
if ($this->notifications->removeElement($notification)) {
// set the owning side to null (unless already changed)
if ($notification->getMine() === $this) {
$notification->setMine(null);
}
}
return $this;
}
// /**
// * @return Collection<int, Contact>
// */
// public function getContacts(): Collection
// {
// return $this->contacts;
// }
// public function addContact(Contact $contact): self
// {
// if (!$this->contacts->contains($contact)) {
// $this->contacts[] = $contact;
// $contact->setMine($this);
// }
// return $this;
// }
// public function removeContact(Contact $contact): self
// {
// if ($this->contacts->removeElement($contact)) {
// // set the owning side to null (unless already changed)
// if ($contact->getMine() === $this) {
// $contact->setMine(null);
// }
// }
// return $this;
// }
/**
* Get /*
*/
public function getPays()
{
return $this->pays;
}
/**
* Set /*
*
* @return self
*/
public function setPays($pays)
{
$this->pays = $pays;
return $this;
}
}