src\Entity\NewsletterTypeUsers.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\NewsletterTypeUsersRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=NewsletterTypeUsersRepository::class)
  7.  */
  8. class NewsletterTypeUsers
  9. {
  10.     /**
  11.      * @ORM\Id()
  12.      * @ORM\GeneratedValue()
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @ORM\ManyToOne(targetEntity=user::class, inversedBy="newsletterTypeUsers")
  18.      * @ORM\JoinColumn(nullable=false)
  19.      */
  20.     private $user;
  21.     /**
  22.      * @ORM\ManyToOne(targetEntity=NewsletterType::class, inversedBy="newsletterTypeUsers")
  23.      * @ORM\JoinColumn(nullable=false)
  24.      */
  25.     private $type;
  26.     /**
  27.      * @ORM\Column(type="datetime")
  28.      */
  29.     private $created_at;
  30.     /**
  31.      * @ORM\Column(type="datetime", nullable=true)
  32.      */
  33.     private $updated_at;
  34.     public function __construct()
  35.     {
  36.         $this->created_at=new \DateTime();
  37.     }
  38.     public function getId(): ?int
  39.     {
  40.         return $this->id;
  41.     }
  42.     public function getUser(): ?user
  43.     {
  44.         return $this->user;
  45.     }
  46.     public function setUser(?user $user): self
  47.     {
  48.         $this->user $user;
  49.         return $this;
  50.     }
  51.     public function getType(): ?NewsletterType
  52.     {
  53.         return $this->type;
  54.     }
  55.     public function setType(?NewsletterType $type): self
  56.     {
  57.         $this->type $type;
  58.         return $this;
  59.     }
  60.     public function getCreatedAt(): ?\DateTimeInterface
  61.     {
  62.         return $this->created_at;
  63.     }
  64.     public function setCreatedAt(\DateTimeInterface $created_at): self
  65.     {
  66.         $this->created_at $created_at;
  67.         return $this;
  68.     }
  69.     public function getUpdatedAt(): ?\DateTimeInterface
  70.     {
  71.         return $this->updated_at;
  72.     }
  73.     public function setUpdatedAt(?\DateTimeInterface $updated_at): self
  74.     {
  75.         $this->updated_at $updated_at;
  76.         return $this;
  77.     }
  78. }