src/Entity/JobOffer.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use DateTime;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Symfony\Component\Validator\Constraints as Assert;
  6. use Gedmo\Mapping\Annotation as Gedmo;
  7. use Doctrine\ORM\Mapping as ORM;
  8. /**
  9.  * @ORM\Entity
  10.  * @ORM\Table(name="cal_job_offer")
  11.  */
  12. class JobOffer
  13. {
  14.     /**
  15.      * @ORM\Id
  16.      * @ORM\GeneratedValue
  17.      * @ORM\Column(type="integer")
  18.      */
  19.     private $id;
  20.     /**
  21.      * @ORM\Column(type="string", length=255)
  22.      */
  23.     private $status "";
  24.     /**
  25.      * @ORM\OneToOne(targetEntity="App\Entity\Media", cascade={"persist"}, orphanRemoval=true)
  26.      */
  27.     private $image;
  28.     /**
  29.      * @Assert\NotBlank()
  30.      * @Assert\Length(max=100)
  31.      * @ORM\Column(type="string", length=100)
  32.      */
  33.     private $type "";
  34.     /**
  35.      * @ORM\OneToOne(targetEntity="App\Entity\Translation", cascade={"persist"}, orphanRemoval=true)
  36.      */
  37.     private $name;
  38.     /**
  39.      * @ORM\OneToOne(targetEntity="App\Entity\Translation", cascade={"persist"}, orphanRemoval=true)
  40.      */
  41.     private $exerpt;
  42.     /**
  43.      * @ORM\OneToOne(targetEntity="App\Entity\Translation", cascade={"persist"}, orphanRemoval=true)
  44.      */
  45.     private $description;
  46.     /**
  47.      * @var DateTime $createdAt
  48.      *
  49.      * @Gedmo\Timestampable(on="create")
  50.      * @ORM\Column(type="datetime")
  51.      */
  52.     private $createdAt;
  53.     /**
  54.      * @var DateTime $updated
  55.      *
  56.      * @Gedmo\Timestampable(on="update")
  57.      * @ORM\Column(type="datetime")
  58.      */
  59.     private $updatedAt;
  60.     /**
  61.      * @ORM\OneToMany(targetEntity="App\Entity\JobApplication", mappedBy="jobOffer")
  62.      */
  63.     private $applications;
  64.     //--------------------------------------------------------------
  65.     // Utilities
  66.     //--------------------------------------------------------------
  67.     public function __construct()
  68.     {
  69.         $this->applications = new ArrayCollection();
  70.     }
  71.     //--------------------------------------------------------------
  72.     // Getters and setters
  73.     //--------------------------------------------------------------
  74.     /**
  75.      * @return mixed
  76.      */
  77.     public function getId()
  78.     {
  79.         return $this->id;
  80.     }
  81.     /**
  82.      * @param mixed $id
  83.      */
  84.     public function setId($id): void
  85.     {
  86.         $this->id $id;
  87.     }
  88.     /**
  89.      * @return string
  90.      */
  91.     public function getStatus(): string
  92.     {
  93.         return $this->status;
  94.     }
  95.     /**
  96.      * @param string $status
  97.      */
  98.     public function setStatus(string $status): void
  99.     {
  100.         $this->status $status;
  101.     }
  102.     /**
  103.      * @return mixed
  104.      */
  105.     public function getImage()
  106.     {
  107.         return $this->image;
  108.     }
  109.     /**
  110.      * @param mixed $image
  111.      */
  112.     public function setImage($image): void
  113.     {
  114.         $this->image $image;
  115.     }
  116.     /**
  117.      * @return string
  118.      */
  119.     public function getType(): string
  120.     {
  121.         return $this->type;
  122.     }
  123.     /**
  124.      * @param string $type
  125.      */
  126.     public function setType(string $type): void
  127.     {
  128.         $this->type $type;
  129.     }
  130.     /**
  131.      * @return string
  132.      */
  133.     public function getName()
  134.     {
  135.         return $this->name;
  136.     }
  137.     /**
  138.      * @param string $name
  139.      */
  140.     public function setName($name): void
  141.     {
  142.         $this->name $name;
  143.     }
  144.     /**
  145.      * @return string
  146.      */
  147.     public function getExerpt()
  148.     {
  149.         return $this->exerpt;
  150.     }
  151.     /**
  152.      * @param string $exerpt
  153.      */
  154.     public function setExerpt($exerpt): void
  155.     {
  156.         $this->exerpt $exerpt;
  157.     }
  158.     /**
  159.      * @return string
  160.      */
  161.     public function getDescription()
  162.     {
  163.         return $this->description;
  164.     }
  165.     /**
  166.      * @param string $description
  167.      */
  168.     public function setDescription($description): void
  169.     {
  170.         $this->description $description;
  171.     }
  172.     /**
  173.      * @return DateTime
  174.      */
  175.     public function getCreatedAt(): DateTime
  176.     {
  177.         return $this->createdAt;
  178.     }
  179.     /**
  180.      * @param DateTime $createdAt
  181.      */
  182.     public function setCreatedAt(DateTime $createdAt): void
  183.     {
  184.         $this->createdAt $createdAt;
  185.     }
  186.     /**
  187.      * @return DateTime
  188.      */
  189.     public function getUpdatedAt(): DateTime
  190.     {
  191.         return $this->updatedAt;
  192.     }
  193.     /**
  194.      * @param DateTime $updatedAt
  195.      */
  196.     public function setUpdatedAt(DateTime $updatedAt): void
  197.     {
  198.         $this->updatedAt $updatedAt;
  199.     }
  200.     /**
  201.      * @return ArrayCollection
  202.      */
  203.     public function getApplications()
  204.     {
  205.         return $this->applications;
  206.     }
  207.     /**
  208.      * @param ArrayCollection $applications
  209.      */
  210.     public function setApplications($applications): void
  211.     {
  212.         $this->applications $applications;
  213.     }
  214. }