src/Entity/Offer.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Bluesquare\StorageBundle\Annotations\Storage;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass="App\Repository\OfferRepository")
  9.  *
  10.  * @ORM\HasLifecycleCallbacks()
  11.  */
  12. class Offer
  13. {
  14.     public function __construct()
  15.     {
  16.         $this->userOffers = new ArrayCollection();
  17.         $this->newsletters = new ArrayCollection();
  18.     }
  19.     /**
  20.      * @ORM\Id()
  21.      *
  22.      * @ORM\GeneratedValue()
  23.      *
  24.      * @ORM\Column(type="integer")
  25.      */
  26.     private $id;
  27.     /**
  28.      * @ORM\OneToMany(targetEntity="App\Entity\Newsletter", mappedBy="offer")
  29.      */
  30.     private $newsletters;
  31.     /**
  32.      * @ORM\Column(type="string", nullable=true, length=180)
  33.      */
  34.     private $external_link null;
  35.     /**
  36.      * @ORM\Column(type="string", nullable=true, length=180)
  37.      */
  38.     private $external_logo null;
  39.     /**
  40.      * @ORM\Column(type="string", nullable=true, length=180)
  41.      *
  42.      * @Storage(name="main", mode="public", prefix="offer")
  43.      */
  44.     public $logo null;
  45.     /**
  46.      * @ORM\Column(type="string", nullable=true, length=180)
  47.      *
  48.      * @Storage(name="main", mode="public", prefix="offer_origin")
  49.      */
  50.     public $logo_origin null;
  51.     /**
  52.      * @ORM\Column(type="string", nullable=true, length=180)
  53.      *
  54.      * @Storage(name="main", mode="public", prefix="offer_medium")
  55.      */
  56.     public $logo_medium null;
  57.     /**
  58.      * @ORM\Column(type="string", nullable=true, length=180)
  59.      *
  60.      * @Storage(name="main", mode="public", prefix="offer_small")
  61.      */
  62.     public $logo_small null;
  63.     /**
  64.      * @ORM\Column(type="string", nullable=false, length=180)
  65.      */
  66.     private $name null;
  67.     /**
  68.      * @ORM\Column(type="string", nullable=true, length=180)
  69.      */
  70.     private $company null;
  71.     /**
  72.      * @ORM\Column(type="string", nullable=true, length=180)
  73.      */
  74.     private $city null;
  75.     /**
  76.      * @ORM\Column(type="string", nullable=true, length=180)
  77.      */
  78.     private $district null;
  79.     /**
  80.      * @ORM\Column(type="string", nullable=true, length=180)
  81.      */
  82.     private $country null;
  83.     /**
  84.      * @ORM\Column(type="string", nullable=true, length=180)
  85.      */
  86.     private $salary null;
  87.     /**
  88.      * @ORM\Column(type="text", nullable=true)
  89.      */
  90.     private $description null;
  91.     /**
  92.      * @ORM\Column(type="text", nullable=true)
  93.      */
  94.     private $skills null;
  95.     /**
  96.      * @ORM\Column(type="text", nullable=true)
  97.      */
  98.     private $company_description null;
  99.     /**
  100.      * @ORM\Column(type="datetime", nullable=true)
  101.      */
  102.     private $publication_start null;
  103.     /**
  104.      * @ORM\Column(type="datetime", nullable=true)
  105.      */
  106.     private $publication_end null;
  107.     /**
  108.      * @ORM\Column(type="integer", nullable=false)
  109.      */
  110.     private $publication_status 0;
  111.     /**
  112.      * @ORM\Column(type="string", nullable=true)
  113.      */
  114.     private $external_url;
  115.     /**
  116.      * @ORM\Column(type="string", nullable=true, length=180)
  117.      *
  118.      * @Storage(name="main", mode="public", prefix="offer")
  119.      */
  120.     public $job_description null;
  121.     /**
  122.      * @ORM\Column(type="string", nullable=true, length=180)
  123.      *
  124.      * @Storage(name="main", mode="public", prefix="offer_origin")
  125.      */
  126.     public $job_description_origin null;
  127.     /**
  128.      * @ORM\Column(type="datetime", nullable=true)
  129.      */
  130.     public $applications_stop_at;
  131.     public function getId(): ?int
  132.     {
  133.         return $this->id;
  134.     }
  135.     public function getExternalLink()
  136.     {
  137.         return $this->external_link;
  138.     }
  139.     public function setExternalLink($external_link)
  140.     {
  141.         $this->external_link $external_link;
  142.         return $this;
  143.     }
  144.     public function getExternalLogo()
  145.     {
  146.         return $this->external_logo;
  147.     }
  148.     public function setExternalLogo($external_logo)
  149.     {
  150.         $this->external_logo $external_logo;
  151.         return $this;
  152.     }
  153.     public function getLogo()
  154.     {
  155.         return $this->logo;
  156.     }
  157.     public function setLogo($logo)
  158.     {
  159.         $this->logo $logo;
  160.         return $this;
  161.     }
  162.     /**
  163.      * @return null
  164.      */
  165.     public function getJobDescription()
  166.     {
  167.         return $this->job_description;
  168.     }
  169.     /**
  170.      * @param null $job_description
  171.      *
  172.      * @return Offer
  173.      */
  174.     public function setJobDescription($job_description)
  175.     {
  176.         $this->job_description $job_description;
  177.         return $this;
  178.     }
  179.     public function getName()
  180.     {
  181.         return $this->name;
  182.     }
  183.     public function setName($name)
  184.     {
  185.         $this->name $name;
  186.         return $this;
  187.     }
  188.     public function getCompany()
  189.     {
  190.         return $this->company;
  191.     }
  192.     public function setCompany($company)
  193.     {
  194.         $this->company $company;
  195.         return $this;
  196.     }
  197.     public function getCity()
  198.     {
  199.         return $this->city;
  200.     }
  201.     public function setCity($city)
  202.     {
  203.         $this->city $city;
  204.         return $this;
  205.     }
  206.     public function getDistrict()
  207.     {
  208.         return $this->district;
  209.     }
  210.     public function setDistrict($district)
  211.     {
  212.         $this->district $district;
  213.         return $this;
  214.     }
  215.     public function getCountry()
  216.     {
  217.         return $this->country;
  218.     }
  219.     public function setCountry($country)
  220.     {
  221.         $this->country $country;
  222.         return $this;
  223.     }
  224.     public function getSalary()
  225.     {
  226.         return $this->salary;
  227.     }
  228.     public function setSalary($salary)
  229.     {
  230.         $this->salary $salary;
  231.         return $this;
  232.     }
  233.     public function getDescription()
  234.     {
  235.         return $this->description;
  236.     }
  237.     public function setDescription($description)
  238.     {
  239.         $this->description $description;
  240.         return $this;
  241.     }
  242.     public function getSkills()
  243.     {
  244.         return $this->skills;
  245.     }
  246.     public function setSkills($skills)
  247.     {
  248.         $this->skills $skills;
  249.         return $this;
  250.     }
  251.     public function getCompanyDescription()
  252.     {
  253.         return $this->company_description;
  254.     }
  255.     public function setCompanyDescription($company_description)
  256.     {
  257.         $this->company_description $company_description;
  258.         return $this;
  259.     }
  260.     public function getPublicationStart()
  261.     {
  262.         return $this->publication_start;
  263.     }
  264.     public function setPublicationStart($publication_start)
  265.     {
  266.         $this->publication_start $publication_start;
  267.         return $this;
  268.     }
  269.     public function getPublicationEnd()
  270.     {
  271.         return $this->publication_end;
  272.     }
  273.     public function setPublicationEnd($publication_end)
  274.     {
  275.         $this->publication_end $publication_end;
  276.         return $this;
  277.     }
  278.     public function getPublicationStatus()
  279.     {
  280.         return $this->publication_status;
  281.     }
  282.     public function setPublicationStatus($publication_status)
  283.     {
  284.         $this->publication_status $publication_status;
  285.         return $this;
  286.     }
  287.     /**
  288.      * @return mixed
  289.      */
  290.     public function getExternalUrl()
  291.     {
  292.         return $this->external_url;
  293.     }
  294.     /**
  295.      * @param mixed $external_url
  296.      *
  297.      * @return Offer
  298.      */
  299.     public function setExternalUrl($external_url)
  300.     {
  301.         $this->external_url $external_url;
  302.         return $this;
  303.     }
  304.     /**
  305.      * @ORM\Column(type="datetime", nullable=false)
  306.      */
  307.     private $created_at;
  308.     /**
  309.      * @ORM\Column(type="datetime", nullable=true)
  310.      */
  311.     private $updated_at null;
  312.     public function getCreatedAt(): \DateTimeInterface
  313.     {
  314.         return $this->created_at;
  315.     }
  316.     public function setCreatedAt(\DateTimeInterface $created_at): self
  317.     {
  318.         $this->created_at $created_at;
  319.         return $this;
  320.     }
  321.     public function getUpdatedAt(): ?\DateTimeInterface
  322.     {
  323.         return $this->updated_at;
  324.     }
  325.     public function setUpdatedAt(?\DateTimeInterface $updated_at): self
  326.     {
  327.         $this->updated_at $updated_at;
  328.         return $this;
  329.     }
  330.     /**
  331.      * @ORM\PrePersist
  332.      */
  333.     public function setCreatedAtValue()
  334.     {
  335.         $this->setCreatedAt(new \DateTime());
  336.     }
  337.     /**
  338.      * @ORM\PreUpdate
  339.      */
  340.     public function setUpdatedAtValue()
  341.     {
  342.         $this->setUpdatedAt(new \DateTime());
  343.     }
  344.     /**
  345.      * @ORM\Column(type="datetime", nullable=true)
  346.      */
  347.     private $deleted_at;
  348.     public function getDeletedAt(): ?\DateTimeInterface
  349.     {
  350.         return $this->deleted_at;
  351.     }
  352.     public function setDeletedAt(?\DateTimeInterface $deleted_at): self
  353.     {
  354.         $this->deleted_at $deleted_at;
  355.         return $this;
  356.     }
  357.     // Links
  358.     /**
  359.      * @ORM\ManyToOne(targetEntity="App\Entity\OfferActivityArea")
  360.      *
  361.      * @ORM\JoinColumn(nullable=true)
  362.      */
  363.     private $offer_activity_area;
  364.     public function getOfferActivityArea(): ?OfferActivityArea
  365.     {
  366.         return $this->offer_activity_area;
  367.     }
  368.     public function setOfferActivityArea(?OfferActivityArea $offer_activity_area): self
  369.     {
  370.         $this->offer_activity_area $offer_activity_area;
  371.         return $this;
  372.     }
  373.     /**
  374.      * @ORM\ManyToOne(targetEntity="App\Entity\OfferContract")
  375.      *
  376.      * @ORM\JoinColumn(nullable=true)
  377.      */
  378.     private $offer_contract;
  379.     public function getOfferContract(): ?OfferContract
  380.     {
  381.         return $this->offer_contract;
  382.     }
  383.     public function setOfferContract(?OfferContract $offer_contract): self
  384.     {
  385.         $this->offer_contract $offer_contract;
  386.         return $this;
  387.     }
  388.     /**
  389.      * @ORM\ManyToOne(targetEntity="App\Entity\OfferExperience")
  390.      *
  391.      * @ORM\JoinColumn(nullable=true)
  392.      */
  393.     private $offer_experience;
  394.     public function getOfferExperience(): ?OfferExperience
  395.     {
  396.         return $this->offer_experience;
  397.     }
  398.     public function setOfferExperience(?OfferExperience $offer_experience): self
  399.     {
  400.         $this->offer_experience $offer_experience;
  401.         return $this;
  402.     }
  403.     /**
  404.      * @ORM\ManyToOne(targetEntity="App\Entity\OfferFunction")
  405.      *
  406.      * @ORM\JoinColumn(nullable=true)
  407.      */
  408.     private $offer_function;
  409.     public function getOfferFunction(): ?OfferFunction
  410.     {
  411.         return $this->offer_function;
  412.     }
  413.     public function setOfferFunction(?OfferFunction $offer_function): self
  414.     {
  415.         $this->offer_function $offer_function;
  416.         return $this;
  417.     }
  418.     /**
  419.      * @ORM\ManyToOne(targetEntity="App\Entity\OfferStudyLevel")
  420.      *
  421.      * @ORM\JoinColumn(nullable=true)
  422.      */
  423.     private $offer_study_level;
  424.     /**
  425.      * @ORM\Column(type="string", length=255, nullable=true)
  426.      */
  427.     private $contact_name;
  428.     /**
  429.      * @ORM\Column(type="string", length=255, nullable=true)
  430.      */
  431.     private $contact_email;
  432.     /**
  433.      * @ORM\Column(type="string", length=255, nullable=true)
  434.      */
  435.     private $contact_phone;
  436.     /**
  437.      * @ORM\OneToMany(targetEntity="App\Entity\UserOffer", mappedBy="offer")
  438.      */
  439.     private $userOffers;
  440.     public function getOfferStudyLevel(): ?OfferStudyLevel
  441.     {
  442.         return $this->offer_study_level;
  443.     }
  444.     public function setOfferStudyLevel(?OfferStudyLevel $offer_study_level): self
  445.     {
  446.         $this->offer_study_level $offer_study_level;
  447.         return $this;
  448.     }
  449.     public function getContactName(): ?string
  450.     {
  451.         return $this->contact_name;
  452.     }
  453.     public function setContactName(?string $contact_name): self
  454.     {
  455.         $this->contact_name $contact_name;
  456.         return $this;
  457.     }
  458.     public function getContactEmail(): ?string
  459.     {
  460.         return $this->contact_email;
  461.     }
  462.     public function setContactEmail(?string $contact_email): self
  463.     {
  464.         $this->contact_email $contact_email;
  465.         return $this;
  466.     }
  467.     public function getContactPhone(): ?string
  468.     {
  469.         return $this->contact_phone;
  470.     }
  471.     public function setContactPhone(?string $contact_phone): self
  472.     {
  473.         $this->contact_phone $contact_phone;
  474.         return $this;
  475.     }
  476.     /**
  477.      * @return mixed
  478.      */
  479.     public function getApplicationsStopAt()
  480.     {
  481.         return $this->applications_stop_at;
  482.     }
  483.     /**
  484.      * @param mixed $applications_stop_at
  485.      *
  486.      * @return Offer
  487.      */
  488.     public function setApplicationsStopAt($applications_stop_at)
  489.     {
  490.         $this->applications_stop_at $applications_stop_at;
  491.         return $this;
  492.     }
  493.     /**
  494.      * @return Collection|UserOffer[]
  495.      */
  496.     public function getUserOffers(): Collection
  497.     {
  498.         return $this->userOffers;
  499.     }
  500.     public function addUserOffer(UserOffer $userOffer): self
  501.     {
  502.         if (!$this->userOffers->contains($userOffer)) {
  503.             $this->userOffers[] = $userOffer;
  504.             $userOffer->setOffer($this);
  505.         }
  506.         return $this;
  507.     }
  508.     public function removeUserOffer(UserOffer $userOffer): self
  509.     {
  510.         if ($this->userOffers->contains($userOffer)) {
  511.             $this->userOffers->removeElement($userOffer);
  512.             // set the owning side to null (unless already changed)
  513.             if ($userOffer->getOffer() === $this) {
  514.                 $userOffer->setOffer(null);
  515.             }
  516.         }
  517.         return $this;
  518.     }
  519.     /**
  520.      * @return Collection|Newsletter[]
  521.      */
  522.     public function getNewsletters(): Collection
  523.     {
  524.         return $this->newsletters;
  525.     }
  526.     public function addNewsletter(Newsletter $newsletter): self
  527.     {
  528.         if (!$this->newsletters->contains($newsletter)) {
  529.             $this->newsletters[] = $newsletter;
  530.             $newsletter->setOffer($this);
  531.         }
  532.         return $this;
  533.     }
  534.     public function removeNewsletter(Newsletter $newsletter): self
  535.     {
  536.         if ($this->newsletters->contains($newsletter)) {
  537.             $this->newsletters->removeElement($newsletter);
  538.             // set the owning side to null (unless already changed)
  539.             if ($newsletter->getOffer() === $this) {
  540.                 $newsletter->setOffer(null);
  541.             }
  542.         }
  543.         return $this;
  544.     }
  545.     /**
  546.      * @return null
  547.      */
  548.     public function getLogoOrigin()
  549.     {
  550.         return $this->logo_origin;
  551.     }
  552.     /**
  553.      * @param null $logo_origin
  554.      */
  555.     public function setLogoOrigin($logo_origin): void
  556.     {
  557.         $this->logo_origin $logo_origin;
  558.     }
  559.     /**
  560.      * @return null
  561.      */
  562.     public function getJobDescriptionOrigin()
  563.     {
  564.         return $this->job_description_origin;
  565.     }
  566.     /**
  567.      * @param null $job_description_origin
  568.      */
  569.     public function setJobDescriptionOrigin($job_description_origin): void
  570.     {
  571.         $this->job_description_origin $job_description_origin;
  572.     }
  573.     /**
  574.      * @return null
  575.      */
  576.     public function getLogoMedium()
  577.     {
  578.         return $this->logo_medium;
  579.     }
  580.     /**
  581.      * @param null $logo_medium
  582.      */
  583.     public function setLogoMedium($logo_medium): void
  584.     {
  585.         $this->logo_medium $logo_medium;
  586.     }
  587.     /**
  588.      * @return null
  589.      */
  590.     public function getLogoSmall()
  591.     {
  592.         return $this->logo_small;
  593.     }
  594.     /**
  595.      * @param null $logo_small
  596.      */
  597.     public function setLogoSmall($logo_small): void
  598.     {
  599.         $this->logo_small $logo_small;
  600.     }
  601. }