src/Entity/Company.php line 12

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CompanyRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClassCompanyRepository::class)]
  9. class Company
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(length255)]
  16.     private ?string $name null;
  17.     #[ORM\Column(length255nullabletrue)]
  18.     private ?string $type null;
  19.     #[ORM\Column(length255nullabletrue)]
  20.     private ?string $siretNumber null;
  21.     #[ORM\Column(length255nullabletrue)]
  22.     private ?string $phone null;
  23.     #[ORM\Column(length255nullabletrue)]
  24.     private ?string $address null;
  25.     #[ORM\Column(length255nullabletrue)]
  26.     private ?string $instagram null;
  27.     #[ORM\Column(length255nullabletrue)]
  28.     private ?string $facebook null;
  29.     #[ORM\Column(length255nullabletrue)]
  30.     private ?string $twitter null;
  31.     #[ORM\Column(length255nullabletrue)]
  32.     private ?string $youtube null;
  33.     #[ORM\Column(length255nullabletrue)]
  34.     private ?string $snapchat null;
  35.     #[ORM\Column(length255nullabletrue)]
  36.     private ?string $tiktok null;
  37.     #[ORM\Column(length255nullabletrue)]
  38.     private ?string $contactName null;
  39.     #[ORM\Column(length255nullabletrue)]
  40.     private ?string $contactFirstname null;
  41.     #[ORM\Column(length255nullabletrue)]
  42.     private ?string $contactEmail null;
  43.     #[ORM\Column(length255nullabletrue)]
  44.     private ?string $contactRole null;
  45.     #[ORM\Column(length255nullabletrue)]
  46.     private ?string $contactPhone null;
  47.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  48.     private ?string $informations null;
  49.     #[ORM\ManyToOne(inversedBy'companies')]
  50.     private ?User $adminUser null;
  51.     #[ORM\Column]
  52.     private ?\DateTimeImmutable $createdAt null;
  53.     #[ORM\OneToMany(mappedBy'company'targetEntityProgram::class)]
  54.     private Collection $programCompany;
  55.     #[ORM\OneToMany(mappedBy'company'targetEntityProgramCandidate::class, cascade: ['remove'])]
  56.     private Collection $programCandidates;
  57.     #[ORM\OneToMany(mappedBy'company'targetEntityCandidateFile::class, cascade: ['persist''remove'])]
  58.     private Collection $files;
  59.     #[ORM\Column(length255)]
  60.     private ?string $createdBy null;
  61.     public function __construct()
  62.     {
  63.         $this->programCompany = new ArrayCollection();
  64.         $this->createdAt =  new \DateTimeImmutable();
  65.         $this->programCandidates = new ArrayCollection();
  66.         $this->files = new ArrayCollection();
  67.     }
  68.     public function getId(): ?int
  69.     {
  70.         return $this->id;
  71.     }
  72.     public function getName(): ?string
  73.     {
  74.         return $this->name;
  75.     }
  76.     public function setName(string $name): self
  77.     {
  78.         $this->name $name;
  79.         return $this;
  80.     }
  81.     public function getType(): ?string
  82.     {
  83.         return $this->type;
  84.     }
  85.     public function setType(string $type): self
  86.     {
  87.         $this->type $type;
  88.         return $this;
  89.     }
  90.     public function getSiretNumber(): ?string
  91.     {
  92.         return $this->siretNumber;
  93.     }
  94.     public function setSiretNumber(string $siretNumber): self
  95.     {
  96.         $this->siretNumber $siretNumber;
  97.         return $this;
  98.     }
  99.     public function getPhone(): ?string
  100.     {
  101.         return $this->phone;
  102.     }
  103.     public function setPhone(string $phone): self
  104.     {
  105.         $this->phone $phone;
  106.         return $this;
  107.     }
  108.     public function getAddress(): ?string
  109.     {
  110.         return $this->address;
  111.     }
  112.     public function setAddress(string $address): self
  113.     {
  114.         $this->address $address;
  115.         return $this;
  116.     }
  117.     public function getInstagram(): ?string
  118.     {
  119.         return $this->instagram;
  120.     }
  121.     public function setInstagram(string $instagram): self
  122.     {
  123.         $this->instagram $instagram;
  124.         return $this;
  125.     }
  126.     public function getFacebook(): ?string
  127.     {
  128.         return $this->facebook;
  129.     }
  130.     public function setFacebook(?string $facebook): self
  131.     {
  132.         $this->facebook $facebook;
  133.         return $this;
  134.     }
  135.     public function getTwitter(): ?string
  136.     {
  137.         return $this->twitter;
  138.     }
  139.     public function setTwitter(?string $twitter): self
  140.     {
  141.         $this->twitter $twitter;
  142.         return $this;
  143.     }
  144.     public function getYoutube(): ?string
  145.     {
  146.         return $this->youtube;
  147.     }
  148.     public function setYoutube(?string $youtube): self
  149.     {
  150.         $this->youtube $youtube;
  151.         return $this;
  152.     }
  153.     public function getSnapchat(): ?string
  154.     {
  155.         return $this->snapchat;
  156.     }
  157.     public function setSnapchat(?string $snapchat): self
  158.     {
  159.         $this->snapchat $snapchat;
  160.         return $this;
  161.     }
  162.     public function getTiktok(): ?string
  163.     {
  164.         return $this->tiktok;
  165.     }
  166.     public function setTiktok(?string $tiktok): self
  167.     {
  168.         $this->tiktok $tiktok;
  169.         return $this;
  170.     }
  171.     public function getContactName(): ?string
  172.     {
  173.         return $this->contactName;
  174.     }
  175.     public function setContactName(string $contactName): self
  176.     {
  177.         $this->contactName $contactName;
  178.         return $this;
  179.     }
  180.     public function getContactFirstname(): ?string
  181.     {
  182.         return $this->contactFirstname;
  183.     }
  184.     public function setContactFirstname(string $contactFirstname): self
  185.     {
  186.         $this->contactFirstname $contactFirstname;
  187.         return $this;
  188.     }
  189.     public function getContactEmail(): ?string
  190.     {
  191.         return $this->contactEmail;
  192.     }
  193.     public function setContactEmail(string $contactEmail): self
  194.     {
  195.         $this->contactEmail $contactEmail;
  196.         return $this;
  197.     }
  198.     public function getContactRole(): ?string
  199.     {
  200.         return $this->contactRole;
  201.     }
  202.     public function setContactRole(?string $contactRole): self
  203.     {
  204.         $this->contactRole $contactRole;
  205.         return $this;
  206.     }
  207.     public function getContactPhone(): ?string
  208.     {
  209.         return $this->contactPhone;
  210.     }
  211.     public function setContactPhone(string $contactPhone): self
  212.     {
  213.         $this->contactPhone $contactPhone;
  214.         return $this;
  215.     }
  216.     public function getInformations(): ?string
  217.     {
  218.         return $this->informations;
  219.     }
  220.     public function setInformations(?string $informations): self
  221.     {
  222.         $this->informations $informations;
  223.         return $this;
  224.     }
  225.     public function getAdminUser(): ?User
  226.     {
  227.         return $this->adminUser;
  228.     }
  229.     public function setAdminUser(?User $adminUser): self
  230.     {
  231.         $this->adminUser $adminUser;
  232.         return $this;
  233.     }
  234.     public function getCreatedAt(): ?\DateTimeImmutable
  235.     {
  236.         return $this->createdAt;
  237.     }
  238.     public function setCreatedAt(\DateTimeImmutable $createdAt): self
  239.     {
  240.         $this->createdAt $createdAt;
  241.         return $this;
  242.     }
  243.     /**
  244.      * @return Collection<int, Program>
  245.      */
  246.     public function getProgramCompany(): Collection
  247.     {
  248.         return $this->programCompany;
  249.     }
  250.     public function addProgramCompany(Program $programCompany): self
  251.     {
  252.         if (!$this->programCompany->contains($programCompany)) {
  253.             $this->programCompany->add($programCompany);
  254.             $programCompany->setCompany($this);
  255.         }
  256.         return $this;
  257.     }
  258.     public function removeProgramCompany(Program $programCompany): self
  259.     {
  260.         if ($this->programCompany->removeElement($programCompany)) {
  261.             // set the owning side to null (unless already changed)
  262.             if ($programCompany->getCompany() === $this) {
  263.                 $programCompany->setCompany(null);
  264.             }
  265.         }
  266.         return $this;
  267.     }
  268.     /**
  269.      * @return Collection<int, ProgramCandidate>
  270.      */
  271.     public function getProgramCandidates(): Collection
  272.     {
  273.         return $this->programCandidates;
  274.     }
  275.     public function addProgramCandidate(ProgramCandidate $programCandidate): self
  276.     {
  277.         if (!$this->programCandidates->contains($programCandidate)) {
  278.             $this->programCandidates->add($programCandidate);
  279.             $programCandidate->setCompany($this);
  280.         }
  281.         return $this;
  282.     }
  283.     public function removeProgramCandidate(ProgramCandidate $programCandidate): self
  284.     {
  285.         if ($this->programCandidates->removeElement($programCandidate)) {
  286.             // set the owning side to null (unless already changed)
  287.             if ($programCandidate->getCompany() === $this) {
  288.                 $programCandidate->setCompany(null);
  289.             }
  290.         }
  291.         return $this;
  292.     }
  293.     public function __toString()
  294.     {
  295.         return $this->name;
  296.     }
  297.     /**
  298.      * @return Collection<int, CandidateFile>
  299.      */
  300.     public function getFiles(): Collection
  301.     {
  302.         return $this->files;
  303.     }
  304.     public function addFile(CandidateFile $file): self
  305.     {
  306.         if (!$this->files->contains($file)) {
  307.             $this->files->add($file);
  308.             $file->setCompany($this);
  309.         }
  310.         return $this;
  311.     }
  312.     public function removeFile(CandidateFile $file): self
  313.     {
  314.         if ($this->files->removeElement($file)) {
  315.             // set the owning side to null (unless already changed)
  316.             if ($file->getCompany() === $this) {
  317.                 $file->setCompany(null);
  318.             }
  319.         }
  320.         return $this;
  321.     }
  322.     public function getCreatedBy(): ?string
  323.     {
  324.         return $this->createdBy;
  325.     }
  326.     public function setCreatedBy(string $createdBy): self
  327.     {
  328.         $this->createdBy $createdBy;
  329.         return $this;
  330.     }
  331. }