src/Entity/SatisfactionCreator.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\SatisfactionCreatorRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\Component\Validator\Constraints as Assert;
  8. use JMS\Serializer\Annotation\ExclusionPolicy;
  9. #[ORM\Table(name'satisfaction_creator')]
  10. #[ORM\Entity(repositoryClassSatisfactionCreatorRepository::class)]
  11. class SatisfactionCreator {
  12.     #[ORM\Id]
  13.     #[ORM\GeneratedValue]
  14.     #[ORM\Column(type'integer')]
  15.     private ?int $id null;
  16.     #[ORM\ManyToOne(targetEntityPersonDegree::class)]
  17.     #[ORM\JoinColumn(nullablefalse)]
  18.     private PersonDegree $personDegree;
  19.     #[ORM\ManyToOne(targetEntitySectorArea::class)]
  20.     #[ORM\JoinColumn(name'id_sectorArea'referencedColumnName'id')]
  21.     private SectorArea $sectorArea;
  22.     #[ORM\ManyToMany(targetEntityActivity::class)]
  23.     #[ORM\JoinTable(name'satisfaction_creator_activities')]
  24.     #[ORM\JoinColumn(name'satisfaction_creator_id'referencedColumnName'id')]
  25.     #[ORM\InverseJoinColumn(name'activity_id'referencedColumnName'id')]
  26.     private Collection $activities;
  27.     #[ORM\Column(name'other_activity'type'string'length255nullabletrue)]
  28.     private ?string $otherActivity;
  29.     #[ORM\Column(name'legal_company'type'boolean')]
  30.     private bool $legalCompany false;
  31.     #[ORM\Column(name'monthly_salary'type'integer')]
  32.     #[Assert\GreaterThan(0)]
  33.     private int $monthlySalary;
  34.     #[ORM\ManyToOne(targetEntityCurrency::class)]
  35.     #[ORM\JoinColumn(nullabletrue)]
  36.     private ?Currency $currency null;
  37.     #[ORM\ManyToMany(targetEntityJobNotFoundReason::class)]
  38.     #[ORM\JoinTable(name'satisfaction_creator_reasons')]
  39.     #[ORM\JoinColumn(name'satisfaction_creator_id'referencedColumnName'id')]
  40.     #[ORM\InverseJoinColumn(name'job_not_found_reason_id'referencedColumnName'id')]
  41.     private Collection $jobNotFoundReasons;
  42.     #[ORM\Column(name'useful_training'type'boolean')]
  43.     private bool $usefulTraining false;
  44.     #[ORM\Column(name'job_not_found_other'type'string'length255nullabletrue)]
  45.     private ?string $jobNotFoundOther;
  46.     #[ORM\Column(name'degree_date'type'string'length255nullabletrue)]
  47.     private ?string $degreeDate;
  48.     #[ORM\Column(name'created_date'type'datetime'nullabletrue)]
  49.     private ?\DateTime $createdDate null;
  50.     #[ORM\Column(name'updated_date'type'datetime'nullabletrue)]
  51.     private ?\DateTime $updatedDate null;
  52.     public function __construct() {
  53.         $this->jobNotFoundReasons = new ArrayCollection();
  54.         $this->activities = new ArrayCollection();
  55.     }
  56.     public function getId(): ?int {
  57.         return $this->id;
  58.     }
  59.     public function setPersonDegree(PersonDegree $personDegree): self {
  60.         $this->personDegree $personDegree;
  61.         return $this;
  62.     }
  63.     public function getOtherActivity(): ?string {
  64.         return $this->otherActivity;
  65.     }
  66.     public function getSectorArea(): SectorArea {
  67.         return $this->sectorArea;
  68.     }
  69.     public function setSectorArea(SectorArea $sectorArea): self {
  70.         $this->sectorArea $sectorArea;
  71.         return $this;
  72.     }
  73.     public function setOtherActivity(?string $otherActivity): self {
  74.         $this->otherActivity $otherActivity;
  75.         return $this;
  76.     }
  77.     public function setLegalCompany(bool $legalCompany): self {
  78.         $this->legalCompany $legalCompany;
  79.         return $this;
  80.     }
  81.     public function getLegalCompany(): bool {
  82.         return $this->legalCompany;
  83.     }
  84.     public function setMonthlySalary(int $monthlySalary): self {
  85.         $this->monthlySalary $monthlySalary;
  86.         return $this;
  87.     }
  88.     public function getMonthlySalary(): int {
  89.         return $this->monthlySalary;
  90.     }
  91.     public function getCurrency(): ?Currency {
  92.         return $this->currency;
  93.     }
  94.     public function setCurrency(?Currency $currency): self {
  95.         $this->currency $currency;
  96.         return $this;
  97.     }
  98.     public function setUsefulTraining(bool $usefulTraining): self {
  99.         $this->usefulTraining $usefulTraining;
  100.         return $this;
  101.     }
  102.     public function getJobNotFoundOther(): ?string {
  103.         return $this->jobNotFoundOther;
  104.     }
  105.     public function setJobNotFoundOther(?string $jobNotFoundOther): self {
  106.         $this->jobNotFoundOther $jobNotFoundOther;
  107.         return $this;
  108.     }
  109.     public function getUsefulTraining(): bool {
  110.         return $this->usefulTraining;
  111.     }
  112.     public function getDegreeDate(): ?string {
  113.         return $this->degreeDate;
  114.     }
  115.     public function setDegreeDate(?string $degreeDate): self {
  116.         $this->degreeDate $degreeDate;
  117.         return $this;
  118.     }
  119.     public function getCreatedDate(): ?\DateTime {
  120.         return $this->createdDate;
  121.     }
  122.     public function setCreatedDate(?\DateTime $createdDate): void {
  123.         $this->createdDate $createdDate;
  124.     }
  125.     public function getUpdatedDate(): ?\DateTime {
  126.         return $this->updatedDate;
  127.     }
  128.     public function setUpdatedDate(?\DateTime $updatedDate): self {
  129.         $this->updatedDate $updatedDate;
  130.         return $this;
  131.     }
  132.     public function __toString() {
  133.         return sprintf('%s  %s - id=%d ',
  134.             ucfirst($this->personDegree->getFirstname()),
  135.             ucfirst($this->personDegree->getLastname()),
  136.             ucfirst($this->getId())
  137.         );
  138.     }
  139.     public function getPersonDegree(): PersonDegree {
  140.         return $this->personDegree;
  141.     }
  142.     public function addJobNotFoundReason(JobNotFoundReason $jobNotFoundReason): self {
  143.         $this->jobNotFoundReasons->add($jobNotFoundReason);
  144.         return $this;
  145.     }
  146.     public function removeJobNotFoundReason(JobNotFoundReason $jobNotFoundReason): void {
  147.         $this->jobNotFoundReasons->removeElement($jobNotFoundReason);
  148.     }
  149.     public function getJobNotFoundReasons(): Collection {
  150.         return $this->jobNotFoundReasons;
  151.     }
  152.     public function addActivity(Activity $activity): self {
  153.         $this->activities->add($activity);
  154.         return $this;
  155.     }
  156.     public function removeActivity(Activity $activity): void {
  157.         $this->activities->removeElement($activity);
  158.     }
  159.     public function getActivities(): Collection {
  160.         return $this->activities;
  161.     }
  162. }