src/Entity/Scholar/Profile.php line 19

  1. <?php
  2. namespace App\Entity\Scholar;
  3. use App\Entity\Geo\Region;
  4. use App\Entity\Olympiad\Discipline;
  5. use App\Entity\Olympiad\Olympiad;
  6. use App\Entity\Traits\ActiveTrait;
  7. use App\Entity\Traits\TrackerFields;
  8. use App\Entity\Traits\UserCreatedInterface;
  9. use App\Entity\Traits\UserUpdatedInterface;
  10. use Doctrine\Common\Collections\ArrayCollection;
  11. use Doctrine\Common\Collections\Collection;
  12. use Doctrine\ORM\Mapping as ORM;
  13. #[ORM\Table(name'scholar_profile')]
  14. #[ORM\Entity(repositoryClass'App\Repository\Scholar\ProfileRepository')]
  15. #[ORM\HasLifecycleCallbacks]
  16. class Profile implements UserCreatedInterfaceUserUpdatedInterface
  17. {
  18.     use TrackerFields;
  19.     use ActiveTrait;
  20.     #[ORM\Id]
  21.     #[ORM\GeneratedValue(strategy'AUTO')]
  22.     #[ORM\Column(type'integer')]
  23.     private $id;
  24.     #[ORM\OneToOne(targetEntity'App\Entity\User\User')]
  25.     #[ORM\JoinColumn(nullablefalse)]
  26.     private $user;
  27.     /**
  28.      * @var ?string
  29.      */
  30.     #[ORM\Column(type'text'nullabletrue)]
  31.     private $additional_info;
  32.     #[ORM\Column(type'string'nullabletrue)]
  33.     private $school;
  34.     #[ORM\ManyToOne(targetEntity'App\Entity\Olympiad\Grade')]
  35.     private $grade;
  36.     #[ORM\JoinTable(name'scholar_competencies_relation')]
  37.     #[ORM\ManyToMany(targetEntity'App\Entity\Scholar\Competence')]
  38.     private $competencies;
  39.     #[ORM\Column(type'text'nullabletrue)]
  40.     private $address;
  41.     /**
  42.      * @var  ?Region
  43.      */
  44.     #[ORM\ManyToOne(targetEntity'App\Entity\Geo\Region')]
  45.     #[ORM\JoinColumn(nullabletrue)]
  46.     private $region;
  47.     /**
  48.      * @var ?string
  49.      */
  50.     #[ORM\Column(type'string'nullabletrue)]
  51.     private $city;
  52.     /**
  53.      * @var Collection|Olympiad[]
  54.      */
  55.     #[ORM\JoinTable(name'scholar_olympiad_relation')]
  56.     #[ORM\ManyToMany(targetEntity'App\Entity\Olympiad\Olympiad'inversedBy'scholar_profiles')]
  57.     private $olympiads;
  58.     /**
  59.      * @var Collection|Discipline[]
  60.      */
  61.     #[ORM\JoinTable(name'scholar_discipline_relation')]
  62.     #[ORM\ManyToMany(targetEntity'App\Entity\Olympiad\Discipline'inversedBy'scholar_profile')]
  63.     private $disciplines;
  64.     /** @var Collection|Achievement[]
  65.      *
  66.      */
  67.     #[ORM\JoinTable(name'scholar_achievements_relation')]
  68.     #[ORM\ManyToMany(targetEntity'App\Entity\Scholar\Achievement'inversedBy'scholar_profiles')]
  69.     private $achievements;
  70.     /**
  71.      * научные интересы
  72.      * @var ?string
  73.      */
  74.     #[ORM\Column(type'text'nullabletrue)]
  75.     private $scientific_interests;
  76.     public function __construct()
  77.     {
  78.         $this->competencies = new ArrayCollection();
  79.         $this->olympiads = new ArrayCollection();
  80.         $this->disciplines = new ArrayCollection();
  81.         $this->achievements = new ArrayCollection();
  82.     }
  83.     /**
  84.      * @return mixed
  85.      */
  86.     public function getId()
  87.     {
  88.         return $this->id;
  89.     }
  90.     /**
  91.      * @param mixed $id
  92.      */
  93.     public function setId($id): void
  94.     {
  95.         $this->id $id;
  96.     }
  97.     /**
  98.      * @return mixed
  99.      */
  100.     public function getUser()
  101.     {
  102.         return $this->user;
  103.     }
  104.     /**
  105.      * @param mixed $user
  106.      */
  107.     public function setUser($user): void
  108.     {
  109.         $this->user $user;
  110.     }
  111.     /**
  112.      * @return mixed
  113.      */
  114.     public function getSchool()
  115.     {
  116.         return $this->school;
  117.     }
  118.     /**
  119.      * @param mixed $school
  120.      */
  121.     public function setSchool($school): void
  122.     {
  123.         $this->school $school;
  124.     }
  125.     /**
  126.      * @return mixed
  127.      */
  128.     public function getGrade()
  129.     {
  130.         return $this->grade;
  131.     }
  132.     /**
  133.      * @param mixed $grade
  134.      */
  135.     public function setGrade($grade): void
  136.     {
  137.         $this->grade $grade;
  138.     }
  139.     /**
  140.      * @return mixed
  141.      */
  142.     public function getCompetencies()
  143.     {
  144.         return $this->competencies;
  145.     }
  146.     /**
  147.      * @param mixed $competencies
  148.      */
  149.     public function setCompetencies($competencies): void
  150.     {
  151.         $this->competencies $competencies;
  152.     }
  153.     /**
  154.      * @return string
  155.      */
  156.     public function getAddress()
  157.     {
  158.         return $this->address;
  159.     }
  160.     /**
  161.      * @param mixed $address
  162.      */
  163.     public function setAddress($address): void
  164.     {
  165.         $this->address $address;
  166.     }
  167.     /**
  168.      * @return Discipline[]|Collection
  169.      */
  170.     public function getDisciplines()
  171.     {
  172.         return $this->disciplines;
  173.     }
  174.     /**
  175.      * @param Discipline[]|Collection $disciplines
  176.      */
  177.     public function setDisciplines($disciplines): void
  178.     {
  179.         $this->disciplines $disciplines;
  180.     }
  181.     /**
  182.      * @return Olympiad[]|Collection
  183.      */
  184.     public function getOlympiads()
  185.     {
  186.         return $this->olympiads;
  187.     }
  188.     /**
  189.      * @param Olympiad[]|Collection $olympiads
  190.      */
  191.     public function setOlympiads($olympiads): void
  192.     {
  193.         $this->olympiads $olympiads;
  194.     }
  195.     /**
  196.      * @return string|null
  197.      */
  198.     public function getAdditionalinfo(): ?string
  199.     {
  200.         return $this->additional_info;
  201.     }
  202.     /**
  203.      * @param string|null $additional_info
  204.      */
  205.     public function setAdditionalinfo(?string $additional_info): void
  206.     {
  207.         $this->additional_info $additional_info;
  208.     }
  209.     /**
  210.      * @return Region|null
  211.      */
  212.     public function getRegion(): ?Region
  213.     {
  214.         return $this->region;
  215.     }
  216.     /**
  217.      * @param Region|null $region
  218.      */
  219.     public function setRegion(?Region $region): void
  220.     {
  221.         $this->region $region;
  222.     }
  223.     /**
  224.      * @return string|null
  225.      */
  226.     public function getCity(): ?string
  227.     {
  228.         return $this->city;
  229.     }
  230.     /**
  231.      * @param string|null $city
  232.      */
  233.     public function setCity(?string $city): void
  234.     {
  235.         $this->city $city;
  236.     }
  237.     /**
  238.      * @return string|null
  239.      */
  240.     public function getScientificInterests(): ?string
  241.     {
  242.         return $this->scientific_interests;
  243.     }
  244.     /**
  245.      * @param string|null $achievements_other
  246.      */
  247.     public function setScientificInterests(?string $achievements_other): void
  248.     {
  249.         $this->scientific_interests $achievements_other;
  250.     }
  251.     /**
  252.      * @return Achievement[]|Collection
  253.      */
  254.     public function getAchievements()
  255.     {
  256.         return $this->achievements;
  257.     }
  258.     /**
  259.      * @param Achievement[]|Collection $achievements
  260.      */
  261.     public function setAchievements($achievements): void
  262.     {
  263.         $this->achievements $achievements;
  264.     }
  265. }