src/Entity/Announcement.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AnnouncementRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Gedmo\Mapping\Annotation as Gedmo;
  8. #[ORM\Entity(repositoryClassAnnouncementRepository::class)]
  9. class Announcement
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column(type'integer')]
  14.     private $id;
  15.     #[ORM\Column(type'string'length255)]
  16.     private $title;
  17.     #[ORM\Column(type'text')]
  18.     private $description;
  19.     #[ORM\Column(type'boolean')]
  20.     private $website true;
  21.     #[ORM\Column(type'string'length255nullabletrue)]
  22.     private $reference;
  23.     #[ORM\ManyToOne(targetEntityAccountingFirm::class, inversedBy'announcements')]
  24.     #[ORM\JoinColumn(nullablefalse)]
  25.     private $accountingFirm;
  26.     /**
  27.      * @Gedmo\Slug(fields={"title"})
  28.      */
  29.     #[ORM\Column(nullabletrue)]
  30.     private $slug;
  31.     #[ORM\OneToMany(targetEntityApplyRequest::class, mappedBy'annonce'orphanRemovaltrue)]
  32.     private $applyRequests;
  33.     #[ORM\Column(type'boolean')]
  34.     private $is_primary;
  35.     #[ORM\Column(type'boolean')]
  36.     private $is_spontanee false;
  37.     #[ORM\Column(type'string'length255nullabletrue)]
  38.     private $img;
  39.     // #[ORM\Column(type: 'text', nullable: true)]
  40.     // private $info1;
  41.     #[ORM\Column(type'text'nullabletrue)]
  42.     private $info2;
  43.     #[ORM\Column(type'text'nullabletrue)]
  44.     private $info3;
  45.     #[ORM\Column(type'text'nullabletrue)]
  46.     private $info4;
  47.     #[ORM\Column(type'text'nullabletrue)]
  48.     private $info5;
  49.     #[ORM\Column(type'text'nullabletrue)]
  50.     private $contrat;
  51.     #[ORM\Column(type'text'nullabletrue)]
  52.     private $rythme;
  53.     #[ORM\Column(type'date'nullabletrue)]
  54.     private $dateDebut;
  55.     #[ORM\Column(type'text'nullabletrue)]
  56.     private $diplome;
  57.     #[ORM\Column(type'text'nullabletrue)]
  58.     private $anneeExperience;
  59.     #[ORM\Column(type'json'nullabletrue)]
  60.     private $outilsLogiciels;
  61.     #[ORM\Column(type'json'nullabletrue)]
  62.     private $softs;
  63.     #[ORM\Column(type'text'nullabletrue)]
  64.     private $salaire;
  65.     #[ORM\Column(type'text'nullabletrue)]
  66.     private $aProposCabinet;
  67.     #[ORM\Column(type'boolean'nullabletrue)]
  68.     private $teletravail;
  69.     public function __construct()
  70.     {
  71.         $this->applyRequests = new ArrayCollection();
  72.     }
  73.     public function getId(): ?int
  74.     {
  75.         return $this->id;
  76.     }
  77.     public function getTitle(): ?string
  78.     {
  79.         return $this->title;
  80.     }
  81.     public function setTitle(string $title): self
  82.     {
  83.         $this->title $title;
  84.         return $this;
  85.     }
  86.     public function getDescription(): ?string
  87.     {
  88.         return $this->description;
  89.     }
  90.     public function setDescription(string $description): self
  91.     {
  92.         $this->description $description;
  93.         return $this;
  94.     }
  95.     public function getWebsite(): ?bool
  96.     {
  97.         return $this->website;
  98.     }
  99.     public function setWebsite(bool $website): self
  100.     {
  101.         $this->website $website;
  102.         return $this;
  103.     }
  104.     public function getReference(): ?string
  105.     {
  106.         return $this->reference;
  107.     }
  108.     public function setReference(?string $reference): self
  109.     {
  110.         $this->reference $reference;
  111.         return $this;
  112.     }
  113.     public function getAccountingFirm(): ?AccountingFirm
  114.     {
  115.         return $this->accountingFirm;
  116.     }
  117.     public function setAccountingFirm(?AccountingFirm $accountingFirm): self
  118.     {
  119.         $this->accountingFirm $accountingFirm;
  120.         return $this;
  121.     }
  122.     public function getSlug()
  123.     {
  124.         return $this->slug;
  125.     }
  126.     /**
  127.      * @return Collection|ApplyRequest[]
  128.      */
  129.     public function getApplyRequests(): Collection
  130.     {
  131.         return $this->applyRequests;
  132.     }
  133.     public function addApplyRequest(ApplyRequest $applyRequest): self
  134.     {
  135.         if (!$this->applyRequests->contains($applyRequest)) {
  136.             $this->applyRequests[] = $applyRequest;
  137.             $applyRequest->setAnnonce($this);
  138.         }
  139.         return $this;
  140.     }
  141.     public function removeApplyRequest(ApplyRequest $applyRequest): self
  142.     {
  143.         if ($this->applyRequests->removeElement($applyRequest)) {
  144.             // set the owning side to null (unless already changed)
  145.             if ($applyRequest->getAnnonce() === $this) {
  146.                 $applyRequest->setAnnonce(null);
  147.             }
  148.         }
  149.         return $this;
  150.     }
  151.     public function isWebsite(): ?bool
  152.     {
  153.         return $this->website;
  154.     }
  155.     public function setSlug(?string $slug): self
  156.     {
  157.         $this->slug $slug;
  158.         return $this;
  159.     }
  160.     public function getIsPrimary(): ?bool
  161.     {
  162.         return $this->is_primary;
  163.     }
  164.     public function setIsPrimary(bool $is_primary): self
  165.     {
  166.         $this->is_primary $is_primary;
  167.         return $this;
  168.     }
  169.     public function getIsSpontanee(): ?bool
  170.     {
  171.         return $this->is_spontanee;
  172.     }
  173.     public function setIsSpontanee(bool $is_spontanee): self
  174.     {
  175.         $this->is_spontanee $is_spontanee;
  176.         return $this;
  177.     }
  178.     public function getImg(): ?string
  179.     {
  180.         return $this->img;
  181.     }
  182.     public function setImg(?string $img): self
  183.     {
  184.         $this->img $img;
  185.         return $this;
  186.     }
  187.     // public function getInfo1(): ?string
  188.     // {
  189.     //     return $this->info1;
  190.     // }
  191.     // public function setInfo1(?string $info1): self
  192.     // {
  193.     //     $this->info1 = $info1;
  194.     //     return $this;
  195.     // }
  196.     public function getInfo2(): ?string
  197.     {
  198.         return $this->info2;
  199.     }
  200.     public function setInfo2(?string $info2): self
  201.     {
  202.         $this->info2 $info2;
  203.         return $this;
  204.     }
  205.     public function getInfo3(): ?string
  206.     {
  207.         return $this->info3;
  208.     }
  209.     public function setInfo3(?string $info3): self
  210.     {
  211.         $this->info3 $info3;
  212.         return $this;
  213.     }
  214.     public function getInfo4(): ?string
  215.     {
  216.         return $this->info4;
  217.     }
  218.     public function setInfo4(?string $info4): self
  219.     {
  220.         $this->info4 $info4;
  221.         return $this;
  222.     }
  223.     public function getInfo5(): ?string
  224.     {
  225.         return $this->info5;
  226.     }
  227.     public function setInfo5(?string $info5): self
  228.     {
  229.         $this->info5 $info5;
  230.         return $this;
  231.     }
  232.     public function getUploadPath(): ?string
  233.     {
  234.         return 'clients/' $this->accountingFirm->getHost() . '/assets/images/';
  235.     }
  236.     public function getUploadPathFiles(): ?string
  237.     {
  238.         return 'clients/' $this->accountingFirm->getHost() . '/assets/';
  239.     }
  240.     public function getContrat(): ?string
  241.     {
  242.         return $this->contrat;
  243.     }
  244.     public function setContrat(?string $contrat): self
  245.     {
  246.         $this->contrat $contrat;
  247.         return $this;
  248.     }
  249.     public function getRythme(): ?string
  250.     {
  251.         return $this->rythme;
  252.     }
  253.     public function setRythme(?string $rythme): self
  254.     {
  255.         $this->rythme $rythme;
  256.         return $this;
  257.     }
  258.     public function getDateDebut(): ?\DateTimeInterface
  259.     {
  260.         return $this->dateDebut;
  261.     }
  262.     public function setDateDebut(?\DateTimeInterface $date_debut): self
  263.     {
  264.         $this->dateDebut $date_debut;
  265.         return $this;
  266.     }
  267.     public function getDiplome(): ?string
  268.     {
  269.         return $this->diplome;
  270.     }
  271.     public function setDiplome(?string $diplome): self
  272.     {
  273.         $this->diplome $diplome;
  274.         return $this;
  275.     }
  276.     public function getAnneeExperience(): ?string
  277.     {
  278.         return $this->anneeExperience;
  279.     }
  280.     public function setAnneeExperience(?string $anneeExperience): self
  281.     {
  282.         $this->anneeExperience $anneeExperience;
  283.         return $this;
  284.     }
  285.     public function getOutilsLogiciels(): ?array
  286.     {
  287.         return $this->outilsLogiciels;
  288.     }
  289.     public function setOutilsLogiciels(?array $outilsLogiciels): self
  290.     {
  291.         $this->outilsLogiciels $outilsLogiciels;
  292.         return $this;
  293.     }
  294.     public function addOutilLogiciel(string $outilLogiciel): void
  295.     {
  296.         $this->outilsLogiciels[] = $outilLogiciel;
  297.     }
  298.     public function getsofts(): ?array
  299.     {
  300.         return $this->softs;
  301.     }
  302.     public function setSofts(?array $softs): self
  303.     {
  304.         $this->softs $softs;
  305.         return $this;
  306.     }
  307.     public function addSofts(string $softs): void
  308.     {
  309.         $this->softs[] = $softs;
  310.     }
  311.     public function getSalaire(): ?string
  312.     {
  313.         return $this->salaire;
  314.     }
  315.     public function setSalaire(?string $salaire): self
  316.     {
  317.         $this->salaire $salaire;
  318.         return $this;
  319.     }
  320.     public function getAProposCabinet(): ?string
  321.     {
  322.         return $this->aProposCabinet;
  323.     }
  324.     public function setAProposCabinet(?string $aProposCabinet): self
  325.     {
  326.         $this->aProposCabinet $aProposCabinet;
  327.         return $this;
  328.     }
  329.     public function getTeletravail(): ?bool
  330.     {
  331.         return $this->teletravail;
  332.     }
  333.     public function setTeletravail(bool $teletravail): self
  334.     {
  335.         $this->teletravail $teletravail;
  336.         return $this;
  337.     }
  338. }