src/Entity/Email/EmailRetour.php line 18

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Email;
  3. use ApiPlatform\Core\Annotation\ApiResource;
  4. use App\Entity\Auth\AuthUser;
  5. use App\Entity\Mailling;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\Component\Serializer\Annotation\Groups;
  8. /**
  9.  * @ORM\Entity(repositoryClass="App\Repository\EmailRetourRepository")
  10.  * @ApiResource(attributes={
  11.  *     "normalization_context"={"groups"={"email_retour"}},
  12.  *     "filters"= { "email.retour.search"},
  13.  * })
  14.  */
  15. class EmailRetour
  16. {
  17.     /**
  18.      * @ORM\Id()
  19.      * @ORM\GeneratedValue()
  20.      * @ORM\Column(type="integer")
  21.      */
  22.     private $id;
  23.     /**
  24.      * @ORM\Column (name="email", type="string", length=255)
  25.      * @Groups({"email_retour"})
  26.      */
  27.     private $email;
  28.     /**
  29.      * @ORM\Column (name="raison", type="string", length=255)
  30.      * @Groups({"email_retour"})
  31.      */
  32.     private $raison;
  33.     /**
  34.      * @ORM\Column (name="date_erreur", type="datetime", nullable=true)
  35.      * @Groups({"email_retour"})
  36.      */
  37.     private $dateErreur;
  38.     /**
  39.      * @ORM\ManyToOne(targetEntity="App\Entity\Auth\AuthUser")
  40.      * @ORM\JoinColumn(name="authUser_id", referencedColumnName="id")
  41.      */
  42.     private $author;
  43.     /**
  44.      * @ORM\Column(name="date_absence", type="date", nullable=true)
  45.      */
  46.     private $dateAbsence;
  47.     /**
  48.      * @ORM\Column(name="mailing_id", type="integer", nullable=true)
  49.      */
  50.     private $mailingID;
  51.     /**
  52.      * @ORM\Column(name="contact_id", type="integer", nullable=true)
  53.      * @Groups({"email_retour"})
  54.      */
  55.     private $contactID;
  56.     /**
  57.      * @Groups({"email_retour"})
  58.     */
  59.     private $nomContact;
  60.     /**
  61.      * EmailRetour constructor.
  62.      */
  63.     public function __construct()
  64.     {
  65.         $this->dateErreur = new \DateTime('now');
  66.     }
  67.     public function getId(): ?int
  68.     {
  69.         return $this->id;
  70.     }
  71.     public function getEmail(): ?string
  72.     {
  73.         return $this->email;
  74.     }
  75.     public function setEmail(string $email): self
  76.     {
  77.         $this->email $email;
  78.         return $this;
  79.     }
  80.     public function getRaison(): ?string
  81.     {
  82.         return $this->raison;
  83.     }
  84.     public function setRaison(string $raison): self
  85.     {
  86.         $this->raison $raison;
  87.         return $this;
  88.     }
  89.     public function getDate(): ?\DateTimeInterface
  90.     {
  91.         return $this->dateErreur;
  92.     }
  93.     public function setDate(\DateTimeInterface $dateErreur): self
  94.     {
  95.         $this->date $dateErreur;
  96.         return $this;
  97.     }
  98.     public function getAuthor(): ?AuthUser
  99.     {
  100.         return $this->author;
  101.     }
  102.     public function setAuthor(?AuthUser $author): self
  103.     {
  104.         $this->author $author;
  105.         return $this;
  106.     }
  107.     public function getDateAbsence(): ?\DateTimeInterface
  108.     {
  109.         return $this->dateAbsence;
  110.     }
  111.     public function setDateAbsence(?\DateTimeInterface $dateAbsence): self
  112.     {
  113.         $this->dateAbsence $dateAbsence;
  114.         return $this;
  115.     }
  116.     /**
  117.      * @return mixed
  118.      */
  119.     public function getMailingID()
  120.     {
  121.         return $this->mailingID;
  122.     }
  123.     /**
  124.      * @param mixed $mailingID
  125.      */
  126.     public function setMailingID($mailingID): void
  127.     {
  128.         $this->mailingID $mailingID;
  129.     }
  130.     /**
  131.      * @return mixed
  132.      */
  133.     public function getContactID()
  134.     {
  135.         return $this->contactID;
  136.     }
  137.     /**
  138.      * @param mixed $contactID
  139.      */
  140.     public function setContactID($contactID): void
  141.     {
  142.         $this->contactID $contactID;
  143.     }
  144.     /**
  145.      * @return mixed
  146.      */
  147.     public function getNomContact()
  148.     {
  149.         return $this->nomContact;
  150.     }
  151.     /**
  152.      * @param mixed $nomContact
  153.      */
  154.     public function setNomContact($nomContact): void
  155.     {
  156.         $this->nomContact $nomContact;
  157.     }
  158. }