<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* TypeMail
*/
#[ORM\Table(name: 'type_mail')]
#[ORM\Entity(repositoryClass: \App\Repository\TypeMailRepository::class)]
class TypeMail implements \Stringable
{
#[ORM\Column(name: 'id', type: 'integer', nullable: false)]
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'IDENTITY')]
private readonly int $id;
#[ORM\Column(name: 'name_fr', type: 'text', nullable: true)]
private string $nameFr;
#[ORM\Column(name: 'name_en', type: 'text', nullable: true)]
private string $nameEn;
#[ORM\Column(name: 'name', type: 'text', nullable: true)]
private string $name;
#[ORM\Column(name: 'bu', type: 'boolean', nullable: true)]
private bool $bu = false;
#[ORM\Column(name: 'marque', type: 'boolean', nullable: true)]
private bool $marque = false;
#[ORM\Column(name: 'sujet_fr', type: 'text', nullable: true)]
private string $SujetFr;
#[ORM\Column(name: 'sujet_en', type: 'text', nullable: true)]
private string $SujetEn;
#[ORM\Column(name: 'content_fr', type: 'text', nullable: true)]
private string $ContentFr;
#[ORM\Column(name: 'content_en', type: 'text', nullable: true)]
private string $ContentEn;
#[ORM\Column(name: 'destinataires', type: 'text', nullable: true)]
private string $destinataires;
#[ORM\Column(name: 'demiJourn', type: 'boolean', nullable: true)]
private bool $demijourn = false;
#[ORM\Column(name: 'regulierDixMinutes', type: 'boolean', nullable: true)]
private bool $regulierdixminutes = false;
#[ORM\Column(name: 'actif', type: 'boolean', nullable: true)]
private bool $actif = false;
#[ORM\Column(name: 'groupe', type: 'text', nullable: true)]
private ?string $groupe = null;
#[ORM\Column(name: 'atelier', type: 'boolean', nullable: true)]
private bool $atelier = false;
#[ORM\Column(name: 'cotraitance', type: 'boolean', nullable: true)]
private bool $cotraitance = false;
#[ORM\Column(name: 'asie', type: 'boolean', nullable: true)]
private bool $asie = false;
#[ORM\JoinTable(name: 'typemail_groupe')]
#[ORM\ManyToMany(targetEntity: \App\Entity\GroupesUtilisateur::class, inversedBy: 'typeMails')]
private $groupes;
#[ORM\JoinTable(name: 'typemail_groupe_copie')]
#[ORM\ManyToMany(targetEntity: \App\Entity\GroupesUtilisateur::class, inversedBy: 'typeMailsCopie')]
private $groupes_copie;
#[ORM\OneToMany(targetEntity: Mailing::class, mappedBy: 'typemail')]
private $mailings;
public function __construct()
{
$this->groupes = new ArrayCollection();
$this->groupes_copie = new ArrayCollection();
$this->mailings = new ArrayCollection();
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set nameFr
*
* @param string $nameFr
*
* @return TypeMail
*/
public function setNameFr($nameFr)
{
$this->nameFr = $nameFr;
return $this;
}
/**
* Get nameFr
*
* @return string
*/
public function getNameFr()
{
return $this->nameFr;
}
/**
* Set nameEn
*
* @param string $nameEn
*
* @return TypeMail
*/
public function setNameEn($nameEn)
{
$this->nameEn = $nameEn;
return $this;
}
/**
* Get nameEn
*
* @return string
*/
public function getNameEn()
{
return $this->nameEn;
}
/**
* Set name
*
* @param string $name
*
* @return TypeMail
*/
public function setName($name)
{
$this->name = $name;
return $this;
}
/**
* Get name
*
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Set bu
*
* @param boolean $bu
*
* @return TypeMail
*/
public function setBu($bu)
{
$this->bu = $bu;
return $this;
}
/**
* Get bu
*
* @return boolean
*/
public function getBu()
{
return $this->bu;
}
/**
* Set marque
*
* @param boolean $marque
*
* @return TypeMail
*/
public function setMarque($marque)
{
$this->marque = $marque;
return $this;
}
/**
* Get marque
*
* @return boolean
*/
public function getMarque()
{
return $this->marque;
}
/**
* Set sujetFr
*
* @param string $sujetFr
*
* @return TypeMail
*/
public function setSujetFr($sujetFr)
{
$this->SujetFr = $sujetFr;
return $this;
}
/**
* Get sujetFr
*
* @return string
*/
public function getSujetFr()
{
return $this->SujetFr;
}
/**
* Set sujetEn
*
* @param string $sujetEn
*
* @return TypeMail
*/
public function setSujetEn($sujetEn)
{
$this->SujetEn = $sujetEn;
return $this;
}
/**
* Get sujetEn
*
* @return string
*/
public function getSujetEn()
{
return $this->SujetEn;
}
/**
* Set contentFr
*
* @param string $contentFr
*
* @return TypeMail
*/
public function setContentFr($contentFr)
{
$this->ContentFr = $contentFr;
return $this;
}
/**
* Get contentFr
*
* @return string
*/
public function getContentFr()
{
return $this->ContentFr;
}
/**
* Set contentEn
*
* @param string $contentEn
*
* @return TypeMail
*/
public function setContentEn($contentEn)
{
$this->ContentEn = $contentEn;
return $this;
}
/**
* Get contentEn
*
* @return string
*/
public function getContentEn()
{
return $this->ContentEn;
}
/**
* Set destinataires
*
* @param string $destinataires
*
* @return TypeMail
*/
public function setDestinataires($destinataires)
{
$this->destinataires = $destinataires;
return $this;
}
/**
* Get destinataires
*
* @return string
*/
public function getDestinataires()
{
return $this->destinataires;
}
/**
* Set demijourn
*
* @param boolean $demijourn
*
* @return TypeMail
*/
public function setDemijourn($demijourn)
{
$this->demijourn = $demijourn;
return $this;
}
/**
* Get demijourn
*
* @return boolean
*/
public function getDemijourn()
{
return $this->demijourn;
}
/**
* Set regulierdixminutes
*
* @param boolean $regulierdixminutes
*
* @return TypeMail
*/
public function setRegulierdixminutes($regulierdixminutes)
{
$this->regulierdixminutes = $regulierdixminutes;
return $this;
}
/**
* Get regulierdixminutes
*
* @return boolean
*/
public function getRegulierdixminutes()
{
return $this->regulierdixminutes;
}
/**
* Set actif
*
* @param boolean $actif
*
* @return TypeMail
*/
public function setActif($actif)
{
$this->actif = $actif;
return $this;
}
/**
* Get actif
*
* @return boolean
*/
public function getActif()
{
return $this->actif;
}
/**
* Set groupe
*
* @param string $groupe
*
* @return TypeMail
*/
public function setGroupe(?string $groupe)
{
$this->groupe = $groupe;
return $this;
}
/**
* Get groupe
*
* @return string
*/
public function getGroupe(): ?string
{
return $this->groupe;
}
/**
* Set atelier
*
* @param boolean $atelier
*
* @return TypeMail
*/
public function setAtelier($atelier)
{
$this->atelier = $atelier;
return $this;
}
/**
* Get atelier
*
* @return boolean
*/
public function getAtelier()
{
return $this->atelier;
}
/**
* Set cotraitance
*
* @param boolean $cotraitance
*
* @return TypeMail
*/
public function setCotraitance($cotraitance)
{
$this->cotraitance = $cotraitance;
return $this;
}
/**
* Get cotraitance
*
* @return boolean
*/
public function getCotraitance()
{
return $this->cotraitance;
}
/**
* Set asie
*
* @param boolean $asie
*
* @return TypeMail
*/
public function setAsie($asie)
{
$this->asie = $asie;
return $this;
}
/**
* Get asie
*
* @return boolean
*/
public function getAsie()
{
return $this->asie;
}
/**
* @return Collection|GroupesUtilisateur[]
*/
public function getGroupes(): Collection
{
return $this->groupes;
}
public function addGroupe(GroupesUtilisateur $groupe): self
{
if (!$this->groupes->contains($groupe)) {
$this->groupes[] = $groupe;
}
return $this;
}
public function removeGroupe(GroupesUtilisateur $groupe): self
{
if ($this->groupes->contains($groupe)) {
$this->groupes->removeElement($groupe);
}
return $this;
}
/**
* @return Collection|GroupesUtilisateur[]
*/
public function getGroupesCopie(): Collection
{
return $this->groupes_copie;
}
public function addGroupesCopie(GroupesUtilisateur $groupesCopie): self
{
if (!$this->groupes_copie->contains($groupesCopie)) {
$this->groupes_copie[] = $groupesCopie;
}
return $this;
}
public function removeGroupesCopie(GroupesUtilisateur $groupesCopie): self
{
if ($this->groupes_copie->contains($groupesCopie)) {
$this->groupes_copie->removeElement($groupesCopie);
}
return $this;
}
/**
* @return Collection|Mailing[]
*/
public function getMailings(): Collection
{
return $this->mailings;
}
public function addMailing(Mailing $mailing): self
{
if (!$this->mailings->contains($mailing)) {
$this->mailings[] = $mailing;
$mailing->setTypemail($this);
}
return $this;
}
public function removeMailing(Mailing $mailing): self
{
if ($this->mailings->removeElement($mailing)) {
// set the owning side to null (unless already changed)
if ($mailing->getTypemail() === $this) {
$mailing->setTypemail(null);
}
}
return $this;
}
public function __toString(): string
{
return $this->nameFr;
}
}