src/Entity/JobMarket.php line 9

Open in your IDE?
  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. class JobMarket {
  7.     /**
  8.      * @var int
  9.      */
  10.     private $id;
  11.     /**
  12.      * @var string
  13.      */
  14.     private $name;
  15.     /**
  16.      * @var int
  17.      */
  18.     private $number_of_positions;
  19.     /**
  20.      * @var \DateTime|null
  21.      */
  22.     private $start_date;
  23.     /**
  24.      * @var \DateTime|null
  25.      */
  26.     private $apply_until;
  27.     /**
  28.      * @var string
  29.      */
  30.     private $description;
  31.     /**
  32.      * @var string
  33.      */
  34.     private $requirements;
  35.     /**
  36.      * @var string
  37.      */
  38.     private $salary;
  39.     /**
  40.      * @var string
  41.      */
  42.     private $details;
  43.     /**
  44.      * @var \DateTime
  45.      */
  46.     private $open_date;
  47.     /**
  48.      * @var \DateTime
  49.      */
  50.     private $closed_date;
  51.     /**
  52.      * @var string
  53.      */
  54.     private $url;
  55.     /**
  56.      * @var string
  57.      */
  58.     private $email;    
  59.     
  60.     /**
  61.      * @var \App\Entity\Media
  62.      */
  63.     private $image;
  64.     /**
  65.      * @var \App\Entity\Media
  66.      */
  67.     private $customAdvertismentImage;
  68.     /**
  69.      * @var \App\Entity\Contact
  70.      */
  71.     private $contact;
  72.     /**
  73.      * @var \App\Entity\JobMarketPositionType
  74.      */
  75.     private $jobMarketPositionType;
  76.     /**
  77.      * @var \App\Entity\JobMarketApplyType
  78.      */
  79.     private $jobMarketApplyType;
  80.     /**
  81.      * @var \App\Entity\JobMarketViewType
  82.      */
  83.     private $jobMarketViewType;
  84.     
  85.     /**
  86.      * @var \App\Entity\JobMarketStartType
  87.      */
  88.     private $jobMarketStartType;
  89.     /**
  90.      * @var \App\Entity\User
  91.      */
  92.     private $user;
  93.     /**
  94.      * @var \Doctrine\Common\Collections\Collection
  95.      */
  96.     private $addresses;
  97.     /**
  98.      * @var \Doctrine\Common\Collections\Collection
  99.      */
  100.     private $jobs;
  101.     /**
  102.      * @var \Doctrine\Common\Collections\Collection
  103.      */
  104.     private $jobSectors;
  105.     /**
  106.      * @var \App\Entity\CompanyProfile
  107.      */
  108.     private $companyProfile;
  109.     /**
  110.      * @var \App\Entity\JobMarketState
  111.      */
  112.     private $jobMarketState;
  113.     /**
  114.      * @var string
  115.      */
  116.     private $additional_info;
  117.     /**
  118.      * @var int
  119.      */
  120.     private $viewCount;
  121.     
  122.     /**
  123.      * @var int
  124.      */
  125.     private $applicationCount;
  126.     
  127.     /**
  128.      * Constructor
  129.      */
  130.     public function __construct() {
  131.         $this->addresses = new ArrayCollection();
  132.         $this->jobs = new ArrayCollection();
  133.         $this->jobSectors = new ArrayCollection();
  134.     }
  135.     /**
  136.      * Get id.
  137.      *
  138.      * @return int
  139.      */
  140.     public function getId() {
  141.         return $this->id;
  142.     }
  143.     /**
  144.      * Set name.
  145.      *
  146.      * @param string $name
  147.      *
  148.      * @return JobMarket
  149.      */
  150.     public function setName($name) {
  151.         $this->name $name;
  152.         return $this;
  153.     }
  154.     /**
  155.      * Get name.
  156.      *
  157.      * @return string
  158.      */
  159.     public function getName() {
  160.         return $this->name;
  161.     }
  162.     /**
  163.      * Set numberOfPositions.
  164.      *
  165.      * @param int $numberOfPositions
  166.      *
  167.      * @return JobMarket
  168.      */
  169.     public function setNumberOfPositions($numberOfPositions) {
  170.         $this->number_of_positions $numberOfPositions;
  171.         return $this;
  172.     }
  173.     /**
  174.      * Get numberOfPositions.
  175.      *
  176.      * @return int
  177.      */
  178.     public function getNumberOfPositions() {
  179.         return $this->number_of_positions;
  180.     }
  181.     /**
  182.      * Set startDate.
  183.      *
  184.      * @param \DateTime|null $startDate
  185.      *
  186.      * @return JobMarket
  187.      */
  188.     public function setStartDate($startDate null) {
  189.         $this->start_date $startDate;
  190.         return $this;
  191.     }
  192.     /**
  193.      * Get startDate.
  194.      *
  195.      * @return \DateTime|null
  196.      */
  197.     public function getStartDate() {
  198.         return $this->start_date;
  199.     }
  200.     /**
  201.      * Set applyUntil.
  202.      *
  203.      * @param \DateTime|null $applyUntil
  204.      *
  205.      * @return JobMarket
  206.      */
  207.     public function setApplyUntil($applyUntil null) {
  208.         $this->apply_until $applyUntil;
  209.         return $this;
  210.     }
  211.     /**
  212.      * Get applyUntil.
  213.      *
  214.      * @return \DateTime|null
  215.      */
  216.     public function getApplyUntil() {
  217.         return $this->apply_until;
  218.     }
  219.     /**
  220.      * Set description.
  221.      *
  222.      * @param string $description
  223.      *
  224.      * @return JobMarket
  225.      */
  226.     public function setDescription($description) {
  227.         $this->description $description;
  228.         return $this;
  229.     }
  230.     /**
  231.      * Get description.
  232.      *
  233.      * @return string
  234.      */
  235.     public function getDescription() {
  236.         return $this->description;
  237.     }
  238.     /**
  239.      * Set requirements.
  240.      *
  241.      * @param string $requirements
  242.      *
  243.      * @return JobMarket
  244.      */
  245.     public function setRequirements($requirements) {
  246.         $this->requirements $requirements;
  247.         return $this;
  248.     }
  249.     /**
  250.      * Get requirements.
  251.      *
  252.      * @return string
  253.      */
  254.     public function getRequirements() {
  255.         return $this->requirements;
  256.     }
  257.     /**
  258.      * Set salary.
  259.      *
  260.      * @param string $salary
  261.      *
  262.      * @return JobMarket
  263.      */
  264.     public function setSalary($salary) {
  265.         $this->salary $salary;
  266.         return $this;
  267.     }
  268.     /**
  269.      * Get salary.
  270.      *
  271.      * @return string
  272.      */
  273.     public function getSalary() {
  274.         return $this->salary;
  275.     }
  276.     /**
  277.      * Set details.
  278.      *
  279.      * @param string $details
  280.      *
  281.      * @return JobMarket
  282.      */
  283.     public function setDetails($details) {
  284.         $this->details $details;
  285.         return $this;
  286.     }
  287.     /**
  288.      * Get details.
  289.      *
  290.      * @return string
  291.      */
  292.     public function getDetails() {
  293.         return $this->details;
  294.     }
  295.     /**
  296.      * Set openDate.
  297.      *
  298.      * @param \DateTime $openDate
  299.      *
  300.      * @return JobMarket
  301.      */
  302.     public function setOpenDate($openDate) {
  303.         $this->open_date $openDate;
  304.         return $this;
  305.     }
  306.     /**
  307.      * Get openDate.
  308.      *
  309.      * @return \DateTime
  310.      */
  311.     public function getOpenDate() {
  312.         return $this->open_date;
  313.     }
  314.     /**
  315.      * Set closedDate.
  316.      *
  317.      * @param \DateTime $closedDate
  318.      *
  319.      * @return JobMarket
  320.      */
  321.     public function setClosedDate($closedDate) {
  322.         $this->closed_date $closedDate;
  323.         return $this;
  324.     }
  325.     /**
  326.      * Get closedDate.
  327.      *
  328.      * @return \DateTime
  329.      */
  330.     public function getClosedDate() {
  331.         return $this->closed_date;
  332.     }
  333.     /**
  334.      * Set url.
  335.      *
  336.      * @param string $url
  337.      *
  338.      * @return JobMarket
  339.      */
  340.     public function setUrl($url) {
  341.         $this->url $url;
  342.         return $this;
  343.     }
  344.     /**
  345.      * Get url.
  346.      *
  347.      * @return string
  348.      */
  349.     public function getUrl() {
  350.         return $this->url;
  351.     }
  352.     /**
  353.      * Set email.
  354.      *
  355.      * @param string $email
  356.      *
  357.      * @return JobMarket
  358.      */
  359.     public function setEmail($email) {
  360.         $this->email $email;
  361.         return $this;
  362.     }
  363.     /**
  364.      * Get email.
  365.      *
  366.      * @return string
  367.      */
  368.     public function getEmail() {
  369.         return $this->email;
  370.     }
  371.     
  372.     /**
  373.      * Set image.
  374.      *
  375.      * @param \App\Entity\Media|null $image
  376.      *
  377.      * @return JobMarket
  378.      */
  379.     public function setImage(\App\Entity\Media $image null) {
  380.         $this->image $image;
  381.         return $this;
  382.     }
  383.     /**
  384.      * Get image.
  385.      *
  386.      * @return \App\Entity\Media|null
  387.      */
  388.     public function getImage() {
  389.         return $this->image;
  390.     }
  391.     /**
  392.      * Set customAdvertismentImage.
  393.      *
  394.      * @param \App\Entity\Media|null $customAdvertismentImage
  395.      *
  396.      * @return JobMarket
  397.      */
  398.     public function setCustomAdvertismentImage(\App\Entity\Media $customAdvertismentImage null) {
  399.         $this->customAdvertismentImage $customAdvertismentImage;
  400.         return $this;
  401.     }
  402.     /**
  403.      * Get customAdvertismentImage.
  404.      *
  405.      * @return \App\Entity\Media|null
  406.      */
  407.     public function getCustomAdvertismentImage() {
  408.         return $this->customAdvertismentImage;
  409.     }
  410.     /**
  411.      * Set contact.
  412.      *
  413.      * @param \App\Entity\Contact|null $contact
  414.      *
  415.      * @return JobMarket
  416.      */
  417.     public function setContact(\App\Entity\Contact $contact null) {
  418.         $this->contact $contact;
  419.         return $this;
  420.     }
  421.     /**
  422.      * Get contact.
  423.      *
  424.      * @return \App\Entity\Contact|null
  425.      */
  426.     public function getContact() {
  427.         return $this->contact;
  428.     }
  429.     /**
  430.      * Set jobMarketPositionType.
  431.      *
  432.      * @param \App\Entity\JobMarketPositionType|null $jobMarketPositionType
  433.      *
  434.      * @return JobMarket
  435.      */
  436.     public function setJobMarketPositionType(\App\Entity\JobMarketPositionType $jobMarketPositionType null) {
  437.         $this->jobMarketPositionType $jobMarketPositionType;
  438.         return $this;
  439.     }
  440.     /**
  441.      * Get jobMarketPositionType.
  442.      *
  443.      * @return \App\Entity\JobMarketPositionType|null
  444.      */
  445.     public function getJobMarketPositionType() {
  446.         return $this->jobMarketPositionType;
  447.     }
  448.     /**
  449.      * Set jobMarketApplyType.
  450.      *
  451.      * @param \App\Entity\JobMarketApplyType|null $jobMarketApplyType
  452.      *
  453.      * @return JobMarket
  454.      */
  455.     public function setJobMarketApplyType(\App\Entity\JobMarketApplyType $jobMarketApplyType null) {
  456.         $this->jobMarketApplyType $jobMarketApplyType;
  457.         return $this;
  458.     }
  459.     /**
  460.      * Get jobMarketApplyType.
  461.      *
  462.      * @return \App\Entity\JobMarketApplyType|null
  463.      */
  464.     public function getJobMarketApplyType() {
  465.         return $this->jobMarketApplyType;
  466.     }
  467.     /**
  468.      * Set jobMarketViewType.
  469.      *
  470.      * @param \App\Entity\JobMarketViewType|null $jobMarketViewType
  471.      *
  472.      * @return JobMarket
  473.      */
  474.     public function setJobMarketViewType(\App\Entity\JobMarketViewType $jobMarketViewType null) {
  475.         $this->jobMarketViewType $jobMarketViewType;
  476.         return $this;
  477.     }
  478.     /**
  479.      * Get jobMarketViewType.
  480.      *
  481.      * @return \App\Entity\JobMarketViewType|null
  482.      */
  483.     public function getJobMarketViewType() {
  484.         return $this->jobMarketViewType;
  485.     }    
  486.     
  487.     /**
  488.      * Set jobMarketStartType.
  489.      *
  490.      * @param \App\Entity\JobMarketStartType|null $jobMarketStartType
  491.      *
  492.      * @return JobMarket
  493.      */
  494.     public function setJobMarketStartType(\App\Entity\JobMarketStartType $jobMarketStartType null) {
  495.         $this->jobMarketStartType $jobMarketStartType;
  496.         return $this;
  497.     }
  498.     /**
  499.      * Get jobMarketStartType.
  500.      *
  501.      * @return \App\Entity\JobMarketStartType|null
  502.      */
  503.     public function getJobMarketStartType() {
  504.         return $this->jobMarketStartType;
  505.     }
  506.     /**
  507.      * Set user.
  508.      *
  509.      * @param \App\Entity\User|null $user
  510.      *
  511.      * @return JobMarket
  512.      */
  513.     public function setUser(\App\Entity\User $user null) {
  514.         $this->user $user;
  515.         return $this;
  516.     }
  517.     /**
  518.      * Get user.
  519.      *
  520.      * @return \App\Entity\User|null
  521.      */
  522.     public function getUser() {
  523.         return $this->user;
  524.     }
  525.     /**
  526.      * Add job.
  527.      *
  528.      * @param \App\Entity\Job $job
  529.      *
  530.      * @return JobMarket
  531.      */
  532.     public function addJob(\App\Entity\Job $job) {
  533.         $this->jobs[] = $job;
  534.         return $this;
  535.     }
  536.     /**
  537.      * Remove job.
  538.      *
  539.      * @param \App\Entity\Job $job
  540.      *
  541.      * @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
  542.      */
  543.     public function removeJob(\App\Entity\Job $job) {
  544.         return $this->jobs->removeElement($job);
  545.     }
  546.     /**
  547.      * Get jobs.
  548.      *
  549.      * @return \Doctrine\Common\Collections\Collection
  550.      */
  551.     public function getJobs() {
  552.         return $this->jobs;
  553.     }
  554.     /**
  555.      * Add address.
  556.      *
  557.      * @param \App\Entity\Address $address
  558.      *
  559.      * @return JobMarket
  560.      */
  561.     public function addAddress(\App\Entity\Address $address) {
  562.         $this->addresses[] = $address;
  563.         return $this;
  564.     }
  565.     /**
  566.      * Remove address.
  567.      *
  568.      * @param \App\Entity\Address $address
  569.      *
  570.      * @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
  571.      */
  572.     public function removeAddress(\App\Entity\Address $address) {
  573.         return $this->addresses->removeElement($address);
  574.     }
  575.     /**
  576.      * Get addresses.
  577.      *
  578.      * @return \Doctrine\Common\Collections\Collection
  579.      */
  580.     public function getAddresses() {
  581.         return $this->addresses;
  582.     }
  583.     /**
  584.      * Add jobSector.
  585.      *
  586.      * @param \App\Entity\JobSector $jobSector
  587.      *
  588.      * @return JobMarket
  589.      */
  590.     public function addJobSector(\App\Entity\JobSector $jobSector) {
  591.         $this->jobSectors[] = $jobSector;
  592.         return $this;
  593.     }
  594.     /**
  595.      * Remove jobSector.
  596.      *
  597.      * @param \App\Entity\JobSector $jobSector
  598.      *
  599.      * @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
  600.      */
  601.     public function removeJobSector(\App\Entity\JobSector $jobSector) {
  602.         return $this->jobSectors->removeElement($jobSector);
  603.     }
  604.     /**
  605.      * Get jobSectors.
  606.      *
  607.      * @return \Doctrine\Common\Collections\Collection
  608.      */
  609.     public function getJobSectors() {
  610.         return $this->jobSectors;
  611.     }
  612.     /**
  613.      * Set additionalInfo.
  614.      *
  615.      * @param string $additionalInfo
  616.      *
  617.      * @return JobMarket
  618.      */
  619.     public function setAdditionalInfo($additionalInfo) {
  620.         $this->additional_info $additionalInfo;
  621.         return $this;
  622.     }
  623.     /**
  624.      * Get additionalInfo.
  625.      *
  626.      * @return string
  627.      */
  628.     public function getAdditionalInfo() {
  629.         return $this->additional_info;
  630.     }
  631.     /**
  632.      * Set jobMarketState.
  633.      *
  634.      * @param \App\Entity\JobMarketState|null $jobMarketState
  635.      *
  636.      * @return JobMarket
  637.      */
  638.     public function setJobMarketState(\App\Entity\JobMarketState $jobMarketState null) {
  639.         $this->jobMarketState $jobMarketState;
  640.         return $this;
  641.     }
  642.     /**
  643.      * Get jobMarketState.
  644.      *
  645.      * @return \App\Entity\JobMarketState|null
  646.      */
  647.     public function getJobMarketState() {
  648.         return $this->jobMarketState;
  649.     }
  650.     /**
  651.      * Set companyProfile.
  652.      *
  653.      * @param \App\Entity\CompanyProfile|null $companyProfile
  654.      *
  655.      * @return JobMarket
  656.      */
  657.     public function setCompanyProfile(\App\Entity\CompanyProfile $companyProfile null) {
  658.         $this->companyProfile $companyProfile;
  659.         return $this;
  660.     }
  661.     /**
  662.      * Get companyProfile.
  663.      *
  664.      * @return \App\Entity\CompanyProfile|null
  665.      */
  666.     public function getCompanyProfile() {
  667.         return $this->companyProfile;
  668.     }
  669.     public function getViewCount(): int {
  670.         return $this->viewCount;
  671.     }
  672.     public function setViewCount(int $viewCount): void {
  673.         $this->viewCount $viewCount;
  674.     }
  675.     
  676.     public function getApplicationCount(): int {
  677.         return $this->applicationCount;
  678.     }
  679.     public function setApplicationCount(int $applicationCount): void {
  680.         $this->applicationCount $applicationCount;
  681.     }
  682.     
  683.     /*
  684.      * Get the interest fields of the company profile
  685.      * 
  686.      * multiple jobs may be attached
  687.      *    
  688.      *      */
  689.     public function getInterestFields() {
  690.         if (empty($this->jobs)) {
  691.             return array();
  692.         }
  693.         /* @var $job \App\Entity\Job */
  694.         $job $this->jobs[0];
  695.         if (empty($job)) {
  696.             return array();
  697.         }
  698.         return $job->getInterestFields();
  699.     }
  700. }