src/Entity/Abonne.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * @ORM\Entity(repositoryClass="App\Repository\AbonneRepository")
  6.  */
  7. class Abonne
  8. {
  9.     /**
  10.      * @ORM\Id()
  11.      * @ORM\GeneratedValue()
  12.      * @ORM\Column(type="integer")
  13.      */
  14.     private $id;
  15.     /**
  16.      * @ORM\Column(type="string", length=255, nullable=false)
  17.      */
  18.     private $reseau;
  19.     /**
  20.      * @ORM\Column(type="integer", length=255, nullable=false)
  21.      */
  22.     private $nombre;
  23.     /**
  24.      * @ORM\Column(type="integer", length=255, nullable=true)
  25.      */
  26.     private $engagement;
  27.     /**
  28.      * @ORM\Column(type="integer", length=255, nullable=true)
  29.      */
  30.     private $publication;
  31.     /**
  32.      * @ORM\Column(type="datetime")
  33.      */
  34.     private $createdAt;
  35.     /**
  36.      * @ORM\ManyToOne(targetEntity="App\Entity\User", inversedBy="abonnes")
  37.      */
  38.     private $user;
  39.     public  function __construct(){
  40.         $this->createdAt = new \DateTime('now');
  41.     }
  42.     /**
  43.      * @return mixed
  44.      */
  45.     public function getCreatedAt()
  46.     {
  47.         return $this->createdAt;
  48.     }
  49.     /**
  50.      * @param mixed $createdAt
  51.      * @return Abonne
  52.      */
  53.     public function setCreatedAt($createdAt)
  54.     {
  55.         $this->createdAt $createdAt;
  56.         return $this;
  57.     }
  58.     /**
  59.      * @return mixed
  60.      */
  61.     public function getEngagement(): ?int
  62.     {
  63.         return $this->engagement;
  64.     }
  65.     /**
  66.      * @param mixed $engagement
  67.      * @return Abonne
  68.      */
  69.     public function setEngagement(?int $engagement)
  70.     {
  71.         $this->engagement $engagement;
  72.         return $this;
  73.     }
  74.     /**
  75.      * @return mixed
  76.      */
  77.     public function getPublication(): ?int
  78.     {
  79.         return $this->publication;
  80.     }
  81.     /**
  82.      * @param mixed $publication
  83.      * @return Abonne
  84.      */
  85.     public function setPublication(?int $publication)
  86.     {
  87.         $this->publication $publication;
  88.         return $this;
  89.     }
  90.     public function getUser(): ?User
  91.     {
  92.         return $this->user;
  93.     }
  94.     public function setUser(?User $user): self
  95.     {
  96.         $this->user $user;
  97.         return $this;
  98.     }
  99.     /**
  100.      * @return mixed
  101.      */
  102.     public function getId()
  103.     {
  104.         return $this->id;
  105.     }
  106.     /**
  107.      * @return mixed
  108.      */
  109.     public function getReseau(): ?string
  110.     {
  111.         return $this->reseau;
  112.     }
  113.     /**
  114.      * @param mixed $reseau
  115.      * @return Abonne
  116.      */
  117.     public function setReseau($reseau)
  118.     {
  119.         $this->reseau $reseau;
  120.         return $this;
  121.     }
  122.     /**
  123.      * @return mixed
  124.      */
  125.     public function getNombre() : ?int
  126.     {
  127.         return $this->nombre;
  128.     }
  129.     /**
  130.      * @param mixed $nombre
  131.      * @return Abonne
  132.      */
  133.     public function setNombre($nombre)
  134.     {
  135.         $this->nombre $nombre;
  136.         return $this;
  137.     }
  138. }