src/Entity/Projects.php line 13

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ProjectsRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=ProjectsRepository::class)
  9.  */
  10. class Projects
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=255, nullable=true)
  20.      */
  21.     private $name;
  22.     /**
  23.      * @ORM\Column(type="text", nullable=true)
  24.      */
  25.     private $description;
  26.     /**
  27.      * @ORM\Column(type="string", length=255, nullable=true)
  28.      */
  29.     private $place;
  30.     /**
  31.      * @ORM\Column(type="text", nullable=true)
  32.      */
  33.     private $details;
  34.     /**
  35.      * @ORM\OneToOne(targetEntity=Albums::class, cascade={"persist", "remove"})
  36.      */
  37.     private $album;
  38.     /**
  39.      * @ORM\ManyToOne(targetEntity=Users::class)
  40.      */
  41.     private $user;
  42.     /**
  43.      * @ORM\Column(type="datetime")
  44.      */
  45.     private $createdAt;
  46.     
  47.     /**
  48.      * @var \DateTime
  49.      *
  50.      * @ORM\Column(name="lastUpdate", type="datetime", nullable=true)
  51.      */
  52.     private $lastUpdate;
  53.     
  54.     /**
  55.      * @ORM\ManyToOne(targetEntity="App\Entity\Users")
  56.      * @ORM\JoinColumn(name="updatedBy",nullable=true)
  57.      */
  58.     private $updatedBy;
  59.     /**
  60.      * @ORM\Column(type="string", length=255, nullable=true)
  61.      */
  62.     private $slug;
  63.     /**
  64.      * @ORM\Column(type="boolean", nullable=true)
  65.      */
  66.     private $isEnabled;
  67.     /**
  68.      * @ORM\OneToOne(targetEntity=Picture::class, cascade={"persist", "remove"})
  69.      */
  70.     private $banner;
  71.     /**
  72.      * @ORM\Column(type="date", nullable=true)
  73.      */
  74.     private $startingDate;
  75.     /**
  76.      * @ORM\Column(type="date", nullable=true)
  77.      */
  78.     private $endDate;
  79.     /**
  80.      * @ORM\Column(type="string", length=255, nullable=true)
  81.      */
  82.     private $runtime;
  83.     /**
  84.      * @ORM\Column(type="string", length=255, nullable=true)
  85.      */
  86.     private $cost;
  87.     /**
  88.      * @ORM\Column(type="string", length=255, nullable=true)
  89.      */
  90.     private $startDate;
  91.     /**
  92.      * @ORM\OneToOne(targetEntity="App\Entity\File", cascade={"persist","remove"}, orphanRemoval=true)
  93.      * @ORM\JoinColumn(nullable=true)
  94.      */
  95.     private $document;
  96.     /**
  97.      * @ORM\Column(type="string", length=255, nullable=true)
  98.      */
  99.     private $status;
  100.     public function __construct()
  101.     {
  102.         $this->othersStructures = new ArrayCollection();
  103.     }
  104.     public function getId(): ?int
  105.     {
  106.         return $this->id;
  107.     }
  108.     public function getName(): ?string
  109.     {
  110.         return $this->name;
  111.     }
  112.     public function setName(?string $name): self
  113.     {
  114.         $this->name $name;
  115.         return $this;
  116.     }
  117.     public function getDescription(): ?string
  118.     {
  119.         return $this->description;
  120.     }
  121.     public function setDescription(?string $description): self
  122.     {
  123.         $this->description $description;
  124.         return $this;
  125.     }
  126.     public function getOwner(): ?string
  127.     {
  128.         return $this->owner;
  129.     }
  130.     public function setOwner(?string $owner): self
  131.     {
  132.         $this->owner $owner;
  133.         return $this;
  134.     }
  135.     public function getPlace(): ?string
  136.     {
  137.         return $this->place;
  138.     }
  139.     public function setPlace(?string $place): self
  140.     {
  141.         $this->place $place;
  142.         return $this;
  143.     }
  144.     public function getDetails(): ?string
  145.     {
  146.         return $this->details;
  147.     }
  148.     public function setDetails(?string $details): self
  149.     {
  150.         $this->details $details;
  151.         return $this;
  152.     }
  153.     public function getAlbum(): ?Albums
  154.     {
  155.         return $this->album;
  156.     }
  157.     public function setAlbum(?Albums $album): self
  158.     {
  159.         $this->album $album;
  160.         return $this;
  161.     }
  162.     public function getUser(): ?Users
  163.     {
  164.         return $this->user;
  165.     }
  166.     public function setUser(?Users $user): self
  167.     {
  168.         $this->user $user;
  169.         return $this;
  170.     }
  171.     public function getCreatedAt(): ?\DateTimeInterface
  172.     {
  173.         return $this->createdAt;
  174.     }
  175.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  176.     {
  177.         $this->createdAt $createdAt;
  178.         return $this;
  179.     }
  180.     public function getLastUpdate(): ?\DateTimeInterface
  181.     {
  182.         return $this->lastUpdate;
  183.     }
  184.     public function setLastUpdate(\DateTimeInterface $lastUpdate): self
  185.     {
  186.         $this->lastUpdate $lastUpdate;
  187.         return $this;
  188.     }
  189.     
  190.     public function getUpdatedBy(): ?Users
  191.     {
  192.         return $this->updatedBy;
  193.     }
  194.     public function setUpdatedBy(?Users $updatedBy): self
  195.     {
  196.         $this->updatedBy $updatedBy;
  197.         return $this;
  198.     }
  199.     public function getSlug(): ?string
  200.     {
  201.         return $this->slug;
  202.     }
  203.     public function setSlug(?string $slug): self
  204.     {
  205.         $this->slug $slug;
  206.         return $this;
  207.     }
  208.     public function getIsEnabled(): ?bool
  209.     {
  210.         return $this->isEnabled;
  211.     }
  212.     public function setIsEnabled(?bool $isEnabled): self
  213.     {
  214.         $this->isEnabled $isEnabled;
  215.         return $this;
  216.     }
  217.     public function getBanner(): ?Picture
  218.     {
  219.         return $this->banner;
  220.     }
  221.     public function setBanner(?Picture $banner): self
  222.     {
  223.         if($banner->getTarget()){
  224.             $this->banner $banner;
  225.             $this->banner->setDir('upload/images/projects/');
  226.             $this->banner->setThumbnailDir('upload/thumbnails/projects/');
  227.         }
  228.         return $this;
  229.     }
  230.     public function getStartingDate(): ?\DateTimeInterface
  231.     {
  232.         return $this->startingDate;
  233.     }
  234.     public function setStartingDate(?\DateTimeInterface $startingDate): self
  235.     {
  236.         $this->startingDate $startingDate;
  237.         return $this;
  238.     }
  239.     public function getEndDate(): ?\DateTimeInterface
  240.     {
  241.         return $this->endDate;
  242.     }
  243.     public function setEndDate(?\DateTimeInterface $endDate): self
  244.     {
  245.         $this->endDate $endDate;
  246.         return $this;
  247.     }
  248.     public function getRuntime(): ?string
  249.     {
  250.         return $this->runtime;
  251.     }
  252.     public function setRuntime(?string $runtime): self
  253.     {
  254.         $this->runtime $runtime;
  255.         return $this;
  256.     }
  257.     public function getCost(): ?string
  258.     {
  259.         return $this->cost;
  260.     }
  261.     public function setCost(?string $cost): self
  262.     {
  263.         $this->cost $cost;
  264.         return $this;
  265.     }
  266.     public function getStartDate(): ?string
  267.     {
  268.         return $this->startDate;
  269.     }
  270.     public function setStartDate(?string $startDate): self
  271.     {
  272.         $this->startDate $startDate;
  273.         return $this;
  274.     }
  275.     public function getDocument(): ?File
  276.     {
  277.         return $this->document;
  278.     }
  279.     public function setDocument(?File $document): self
  280.     {
  281.         if($document->getTarget()){
  282.             $this->document $document;
  283.             $this->document->setDir('upload/files/projects');
  284.         }
  285.         return $this;
  286.     }
  287.     public function getStatus(): ?string
  288.     {
  289.         return $this->status;
  290.     }
  291.     public function setStatus(?string $status): self
  292.     {
  293.         $this->status $status;
  294.         return $this;
  295.     }
  296. }