src/Entity/Services.php line 13

  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Component\Validator\Constraints as Assert;
  7. /**
  8.  * @ORM\Entity(repositoryClass="App\Repository\ServicesRepository")
  9.  */
  10. class Services
  11. {
  12.     public function __construct(){
  13.                                                                                                   $this->isEnabled false;
  14.                                                                                               }
  15.     /**
  16.      * @ORM\Column(name="id", type="integer")
  17.      * @ORM\Id
  18.      * @ORM\GeneratedValue(strategy="AUTO")
  19.      */
  20.     private $id;
  21.     /**
  22.      * @ORM\Column(name="title", type="string", length=255, nullable=true)
  23.      */
  24.     private $title;
  25.     /**
  26.      * @ORM\Column(name="description", type="text", nullable=true)
  27.      */
  28.     private $description;
  29.     /**
  30.      * @ORM\Column(name="content", type="text", nullable=true)
  31.      */
  32.     private $content;
  33.     /**
  34.      * @ORM\OneToOne(targetEntity="App\Entity\Picture", cascade={"persist","remove"}, orphanRemoval=true)
  35.      * @ORM\JoinColumn(nullable=true)
  36.      */
  37.     private $banner;
  38.     /**
  39.      * @ORM\OneToOne(targetEntity="App\Entity\Picture", cascade={"persist","remove"}, orphanRemoval=true)
  40.      * @ORM\JoinColumn(nullable=true)
  41.      */
  42.     private $icon;
  43.     /**
  44.      * @ORM\Column(name="isEnabled", type="boolean", nullable=true)
  45.      */
  46.     private $isEnabled;
  47.     /**
  48.      * @ORM\Column(name="createdAt", type="datetime", nullable=true)
  49.      */
  50.     private $createdAt;
  51.     /**
  52.      * @ORM\Column(name="lastUpdate", type="datetime", nullable=true)
  53.      */
  54.     private $lastUpdate;
  55.     /**
  56.      * @ORM\Column(type="string", length=255, nullable=true)
  57.      */
  58.     private $btnText;
  59.     /**
  60.      * @ORM\Column(type="string", length=255, nullable=true)
  61.      */
  62.     private $btnLink;
  63.     /**
  64.      * @ORM\Column(type="string", length=255, nullable=true)
  65.      */
  66.     private $color;
  67.     /**
  68.      * @ORM\Column(type="text", nullable=true)
  69.      */
  70.     private $tasks;
  71.     /**
  72.      * @ORM\Column(type="text", nullable=true)
  73.      */
  74.     private $resume;
  75.     /**
  76.      * @ORM\Column(type="text", nullable=true)
  77.      */
  78.     private $missions;
  79.     /**
  80.      * @ORM\Column(type="text", nullable=true)
  81.      */
  82.     private $benefits;
  83.     /**
  84.      * @ORM\Column(type="string", length=255, nullable=true)
  85.      */
  86.     private $slug;
  87.     
  88.      /**
  89.      * @var string
  90.      *
  91.      * @ORM\Column(length=255, nullable=true)
  92.      */
  93.     private $time;
  94.     /**
  95.      * @var string
  96.      *
  97.      * @ORM\Column(length=255, nullable=true)
  98.      */
  99.     private $cost;
  100.     
  101.     /**
  102.      * @var string
  103.      *
  104.      * @ORM\Column(type="string", length=255, nullable=true)
  105.      */
  106.     private $department;
  107.     /**
  108.      * @ORM\ManyToOne(targetEntity=ServicesCategories::class, inversedBy="resources", fetch="EAGER")
  109.      * @ORM\JoinColumn(nullable=true)
  110.      */
  111.     private $category;
  112.     public function getId(): ?int
  113.     {
  114.         return $this->id;
  115.     }
  116.     public function getTitle(): ?string
  117.     {
  118.         return $this->title;
  119.     }
  120.     public function setTitle(?string $title): self
  121.     {
  122.         $this->title $title;
  123.         return $this;
  124.     }
  125.     public function getDescription(): ?string
  126.     {
  127.         return $this->description;
  128.     }
  129.     public function setDescription(?string $description): self
  130.     {
  131.         $this->description $description;
  132.         return $this;
  133.     }
  134.     public function getContent(): ?string
  135.     {
  136.         return $this->content;
  137.     }
  138.     public function setContent(?string $content): self
  139.     {
  140.         $this->content $content;
  141.         return $this;
  142.     }
  143.     public function getBanner(): ?Picture
  144.     {
  145.         return $this->banner;
  146.     }
  147.     public function setBanner(?Picture $banner): self
  148.     {
  149.         if($banner->getTarget()){
  150.             $this->banner $banner;
  151.             $this->banner->setDir('upload/images/services');
  152.             $this->banner->setThumbnailDir('upload/thumbnails/services');
  153.         }
  154.         return $this;
  155.     }
  156.     public function getIcon(): ?Picture
  157.     {
  158.         return $this->icon;
  159.     }
  160.     public function setIcon(?Picture $icon): self
  161.     {
  162.         if($icon->getTarget()){
  163.             $this->icon $icon;
  164.             $this->icon->setDir('upload/images/services');
  165.             $this->icon->setThumbnailDir('upload/thumbnails/services');
  166.         }
  167.         return $this;
  168.     }
  169.     public function getIsEnabled(): ?bool
  170.     {
  171.         return $this->isEnabled;
  172.     }
  173.     public function setIsEnabled(?bool $isEnabled): self
  174.     {
  175.         $this->isEnabled $isEnabled;
  176.         return $this;
  177.     }
  178.     public function getCreatedAt(): ?\DateTimeInterface
  179.     {
  180.         return $this->createdAt;
  181.     }
  182.     public function setCreatedAt(?\DateTimeInterface $createdAt): self
  183.     {
  184.         $this->createdAt $createdAt;
  185.         return $this;
  186.     }
  187.     public function getLastUpdate(): ?\DateTimeInterface
  188.     {
  189.         return $this->lastUpdate;
  190.     }
  191.     public function setLastUpdate(?\DateTimeInterface $lastUpdate): self
  192.     {
  193.         $this->lastUpdate $lastUpdate;
  194.         return $this;
  195.     }
  196.     public function getBtnText(): ?string
  197.     {
  198.         return $this->btnText;
  199.     }
  200.     public function setBtnText(?string $btnText): self
  201.     {
  202.         $this->btnText $btnText;
  203.         return $this;
  204.     }
  205.     public function getBtnLink(): ?string
  206.     {
  207.         return $this->btnLink;
  208.     }
  209.     public function setBtnLink(?string $btnLink): self
  210.     {
  211.         $this->btnLink $btnLink;
  212.         return $this;
  213.     }
  214.     public function getColor(): ?string
  215.     {
  216.         return $this->color;
  217.     }
  218.     public function setColor(?string $color): self
  219.     {
  220.         $this->color $color;
  221.         return $this;
  222.     }
  223.     public function getTasks(): ?string
  224.     {
  225.         return $this->tasks;
  226.     }
  227.     public function setTasks(?string $tasks): self
  228.     {
  229.         $this->tasks $tasks;
  230.         return $this;
  231.     }
  232.     public function getResume(): ?string
  233.     {
  234.         return $this->resume;
  235.     }
  236.     public function setResume(?string $resume): self
  237.     {
  238.         $this->resume $resume;
  239.         return $this;
  240.     }
  241.     public function getMissions(): ?string
  242.     {
  243.         return $this->missions;
  244.     }
  245.     public function setMissions(?string $missions): self
  246.     {
  247.         $this->missions $missions;
  248.         return $this;
  249.     }
  250.     public function getBenefits(): ?string
  251.     {
  252.         return $this->benefits;
  253.     }
  254.     public function setBenefits(?string $benefits): self
  255.     {
  256.         $this->benefits $benefits;
  257.         return $this;
  258.     }
  259.     public function getSlug(): ?string
  260.     {
  261.         return $this->slug;
  262.     }
  263.     public function setSlug(?string $slug): self
  264.     {
  265.         $this->slug $slug;
  266.         return $this;
  267.     }
  268.     public function getCategory(): ?ServicesCategories
  269.     {
  270.         return $this->category;
  271.     }
  272.     public function setCategory(?ServicesCategories $category): self
  273.     {
  274.         $this->category $category;
  275.         return $this;
  276.     }
  277.     public function getTime(): ?string
  278.     {
  279.         return $this->time;
  280.     }
  281.     public function setTime(?string $time): self
  282.     {
  283.         $this->time $time;
  284.         return $this;
  285.     }
  286.     public function getCost(): ?string
  287.     {
  288.         return $this->cost;
  289.     }
  290.     public function setCost(?string $cost): self
  291.     {
  292.         $this->cost $cost;
  293.         return $this;
  294.     }
  295.     public function getDepartment(): ?string
  296.     {
  297.         return $this->department;
  298.     }
  299.     public function setDepartment(?string $department): self
  300.     {
  301.         $this->department $department;
  302.         return $this;
  303.     }
  304. }