src/Entity/Events.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\EventsRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=EventsRepository::class)
  7.  */
  8. class Events
  9. {
  10.     /**
  11.      * @ORM\Id
  12.      * @ORM\GeneratedValue
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @ORM\ManyToOne(targetEntity=Cars::class, inversedBy="title")
  18.      */
  19.     private $car;
  20.     /**
  21.      * @ORM\Column(type="string", length=255)
  22.      */
  23.     private $title;
  24.     /**
  25.      * @ORM\Column(type="text", nullable=true)
  26.      */
  27.     private $note;
  28.     /**
  29.      * @ORM\Column(type="date")
  30.      */
  31.     private $due;
  32.     /**
  33.      * @ORM\Column(type="datetime")
  34.      */
  35.     private $created;
  36.     /**
  37.      * @ORM\Column(type="boolean", nullable=true, options={"default"=true})
  38.      */
  39.     private $internal_mail;
  40.     /**
  41.      * @ORM\Column(type="datetime", nullable=true)
  42.      */
  43.     private $sended;
  44.     /**
  45.      * @ORM\Column(type="integer")
  46.      */
  47.     private $notiBeforeDays;
  48.     public function __construct()
  49.     {
  50.         $this->created = new \DateTime();
  51.         $this->notiBeforeDays = 1;
  52.     }
  53.     public function getId(): ?int
  54.     {
  55.         return $this->id;
  56.     }
  57.     public function getCar(): ?Cars
  58.     {
  59.         return $this->car;
  60.     }
  61.     public function setCar(?Cars $car): self
  62.     {
  63.         $this->car = $car;
  64.         return $this;
  65.     }
  66.     public function getTitle(): ?string
  67.     {
  68.         return $this->title;
  69.     }
  70.     public function setTitle(string $title): self
  71.     {
  72.         $this->title = $title;
  73.         return $this;
  74.     }
  75.     public function getNote(): ?string
  76.     {
  77.         return $this->note;
  78.     }
  79.     public function setNote(?string $note): self
  80.     {
  81.         $this->note = $note;
  82.         return $this;
  83.     }
  84.     public function getDue(): ?\DateTimeInterface
  85.     {
  86.         return $this->due;
  87.     }
  88.     public function setDue(\DateTimeInterface $due): self
  89.     {
  90.         $this->due = $due;
  91.         return $this;
  92.     }
  93.     public function getCreated(): ?\DateTimeInterface
  94.     {
  95.         return $this->created;
  96.     }
  97.     public function setCreated(\DateTimeInterface $created): self
  98.     {
  99.         $this->created = $created;
  100.         return $this;
  101.     }
  102.     public function getInternalMail(): ?bool
  103.     {
  104.         return $this->internal_mail == null ? true : $this->internal_mail;
  105.     }
  106.     public function setInternalMail(?bool $internal_mail): self
  107.     {
  108.         $this->internal_mail = $internal_mail;
  109.         return $this;
  110.     }
  111.     public function getSended(): ?\DateTimeInterface
  112.     {
  113.         return $this->sended;
  114.     }
  115.     public function setSended(?\DateTimeInterface $sended): self
  116.     {
  117.         $this->sended = $sended;
  118.         return $this;
  119.     }
  120.     public function getNotiBeforeDays(): ?int
  121.     {
  122.         return $this->notiBeforeDays;
  123.     }
  124.     public function setNotiBeforeDays(int $notiBeforeDays): self
  125.     {
  126.         $this->notiBeforeDays = $notiBeforeDays;
  127.         return $this;
  128.     }
  129. }