<?php
namespace App\Entity;
use App\Repository\MailingRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: MailingRepository::class)]
class Mailing
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\ManyToOne(targetEntity: TypeMail::class, inversedBy: 'mailings')]
private $typemail;
#[ORM\Column(type: 'datetime', nullable: true)]
private $date;
#[ORM\ManyToOne(targetEntity: Atelier::class, inversedBy: 'mailings')]
private $atelier;
#[ORM\ManyToOne(targetEntity: Fournisseur::class, inversedBy: 'mailings')]
private $fournisseur;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $langue;
#[ORM\Column(type: 'text', nullable: true)]
private $var1;
#[ORM\Column(type: 'text', nullable: true)]
private $var2;
#[ORM\Column(type: 'text', nullable: true)]
private $var3;
#[ORM\Column(type: 'text', nullable: true)]
private $var4;
#[ORM\Column(type: 'text', nullable: true)]
private $var5;
#[ORM\Column(type: 'text', nullable: true)]
private $var6;
#[ORM\Column(type: 'boolean', nullable: true)]
private $envoye;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $expediteur_mail;
#[ORM\Column(type: 'text', nullable: true)]
private $content_fr;
#[ORM\Column(type: 'text', nullable: true)]
private $content_en;
#[ORM\Column(type: 'text', nullable: true)]
private $sujet_fr;
#[ORM\Column(type: 'text', nullable: true)]
private $sujet_en;
#[ORM\Column(type: 'text', nullable: true)]
private $destinataires_fr;
#[ORM\Column(type: 'text', nullable: true)]
private $destinataires_en;
#[ORM\Column(type: 'text', nullable: true)]
private $destinataires_copie_fr;
#[ORM\Column(type: 'text', nullable: true)]
private $destinataires_copie_en;
#[ORM\Column(type: 'datetime', nullable: true)]
private $date_envoi;
#[ORM\Column(type: 'text', nullable: true)]
private $var2_en;
#[ORM\ManyToMany(targetEntity: Fournisseur::class, inversedBy: 'mailings_cotraitant')]
private $cotraitants;
#[ORM\Column(type: 'boolean', nullable: true)]
private $cotraitance;
#[ORM\Column(length: 255, nullable: true)]
private ?string $piece_jointe = null;
public function __construct()
{
$this->cotraitants = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getTypemail(): ?TypeMail
{
return $this->typemail;
}
public function setTypemail(?TypeMail $typemail): self
{
$this->typemail = $typemail;
return $this;
}
public function getDate(): ?\DateTimeInterface
{
return $this->date;
}
public function setDate(?\DateTimeInterface $date): self
{
$this->date = $date;
return $this;
}
public function getAtelier(): ?Atelier
{
return $this->atelier;
}
public function setAtelier(?Atelier $atelier): self
{
$this->atelier = $atelier;
return $this;
}
public function getFournisseur(): ?Fournisseur
{
return $this->fournisseur;
}
public function setFournisseur(?Fournisseur $fournisseur): self
{
$this->fournisseur = $fournisseur;
return $this;
}
public function getLangue(): ?string
{
return $this->langue;
}
public function setLangue(?string $langue): self
{
$this->langue = $langue;
return $this;
}
public function getVar1(): ?string
{
return $this->var1;
}
public function setVar1(?string $var1): self
{
$this->var1 = $var1;
return $this;
}
public function getVar2(): ?string
{
return $this->var2;
}
public function setVar2(?string $var2): self
{
$this->var2 = $var2;
return $this;
}
public function getVar3(): ?string
{
return $this->var3;
}
public function setVar3(?string $var3): self
{
$this->var3 = $var3;
return $this;
}
public function getVar4(): ?string
{
return $this->var4;
}
public function setVar4(?string $var4): self
{
$this->var4 = $var4;
return $this;
}
public function getVar5(): ?string
{
return $this->var5;
}
public function setVar5(?string $var5): self
{
$this->var5 = $var5;
return $this;
}
public function getVar6(): ?string
{
return $this->var6;
}
public function setVar6(?string $var6): self
{
$this->var6 = $var6;
return $this;
}
public function getEnvoye(): ?bool
{
return $this->envoye;
}
public function setEnvoye(?bool $envoye): self
{
$this->envoye = $envoye;
return $this;
}
public function getExpediteurMail(): ?string
{
return $this->expediteur_mail;
}
public function setExpediteurMail(?string $expediteur_mail): self
{
$this->expediteur_mail = $expediteur_mail;
return $this;
}
public function getContentFr(): ?string
{
return $this->content_fr;
}
public function setContentFr(?string $content_fr): self
{
$this->content_fr = $content_fr;
return $this;
}
public function getContentEn(): ?string
{
return $this->content_en;
}
public function setContentEn(?string $content_en): self
{
$this->content_en = $content_en;
return $this;
}
public function getSujetFr(): ?string
{
return $this->sujet_fr;
}
public function setSujetFr(?string $sujet_fr): self
{
$this->sujet_fr = $sujet_fr;
return $this;
}
public function getSujetEn(): ?string
{
return $this->sujet_en;
}
public function setSujetEn(?string $sujet_en): self
{
$this->sujet_en = $sujet_en;
return $this;
}
public function getDestinatairesFr(): ?string
{
return $this->destinataires_fr;
}
public function setDestinatairesFr(?string $destinataires_fr): self
{
$this->destinataires_fr = $destinataires_fr;
return $this;
}
public function getDestinatairesEn(): ?string
{
return $this->destinataires_en;
}
public function setDestinatairesEn(?string $destinataires_en): self
{
$this->destinataires_en = $destinataires_en;
return $this;
}
public function getDestinatairesCopieFr(): ?string
{
return $this->destinataires_copie_fr;
}
public function setDestinatairesCopieFr(?string $destinataires_copie_fr): self
{
$this->destinataires_copie_fr = $destinataires_copie_fr;
return $this;
}
public function getDestinatairesCopieEn(): ?string
{
return $this->destinataires_copie_en;
}
public function setDestinatairesCopieEn(?string $destinataires_copie_en): self
{
$this->destinataires_copie_en = $destinataires_copie_en;
return $this;
}
public function getDateEnvoi(): ?\DateTimeInterface
{
return $this->date_envoi;
}
public function setDateEnvoi(?\DateTimeInterface $date_envoi): self
{
$this->date_envoi = $date_envoi;
return $this;
}
public function getVar2En(): ?string
{
return $this->var2_en;
}
public function setVar2En(?string $var2_en): self
{
$this->var2_en = $var2_en;
return $this;
}
/**
* @return Collection|Fournisseur[]
*/
public function getCotraitants(): Collection
{
return $this->cotraitants;
}
public function addCotraitant(Fournisseur $cotraitant): self
{
if (!$this->cotraitants->contains($cotraitant)) {
$this->cotraitants[] = $cotraitant;
}
return $this;
}
public function removeCotraitant(Fournisseur $cotraitant): self
{
$this->cotraitants->removeElement($cotraitant);
return $this;
}
public function getCotraitance(): ?bool
{
return $this->cotraitance;
}
public function setCotraitance(?bool $cotraitance): self
{
$this->cotraitance = $cotraitance;
return $this;
}
public function getPieceJointe(): ?string
{
return $this->piece_jointe;
}
public function setPieceJointe(?string $piece_jointe): static
{
$this->piece_jointe = $piece_jointe;
return $this;
}
}