src/Entity/Admission.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AdmissionRepository;
  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. use Symfony\Component\Serializer\Annotation\Groups;
  9. #[ORM\Entity(repositoryClassAdmissionRepository::class)]
  10. class Admission
  11. {
  12.     public const STATE_PENDING 'pending';
  13.     public const STATE_REGISTER 'register';
  14.     public const STATE_CONFIRM 'confirm';
  15.     public const STATE_FINISHED 'finished';
  16.     #[ORM\Id]
  17.     #[ORM\GeneratedValue]
  18.     #[ORM\Column(type'integer')]
  19.     #[Groups(['list'])]
  20.     private ?int $id;
  21.     #[ORM\ManyToOne(targetEntityDegree::class)]
  22.     #[Groups(['list'])]
  23.     private ?Degree $degree;
  24.     #[ORM\Column(type'string'length30uniquetrue)]
  25.     #[Groups(['list'])]
  26.     private ?string $code;
  27.     #[ORM\Column(type'string'length100)]
  28.     #[Groups(['list'])]
  29.     private ?string $name;
  30.     #[ORM\Column(type'date')]
  31.     #[Groups(['list'])]
  32.     private ?\DateTimeInterface $registerStart;
  33.     #[ORM\Column(type'date')]
  34.     #[Groups(['list'])]
  35.     private ?\DateTimeInterface $registerEnd;
  36.     #[ORM\Column(type'integer')]
  37.     #[Groups(['list'])]
  38.     private ?int $registerFeeAmount;
  39.     #[ORM\Column(type'integer')]
  40.     #[Groups(['list'])]
  41.     private ?int $creditFeeAmount;
  42.     #[ORM\Column(type'integer')]
  43.     #[Groups(['list'])]
  44.     private ?int $registerStudentDiscount;
  45.     #[ORM\Column(type'datetime')]
  46.     #[Groups(['list'])]
  47.     private ?\DateTimeInterface $confirmStart;
  48.     #[ORM\Column(type'datetime')]
  49.     #[Groups(['list'])]
  50.     private ?\DateTimeInterface $confirmEnd;
  51.     #[ORM\Column(type'boolean')]
  52.     #[Groups(['list'])]
  53.     private ?bool $satExam;
  54.     #[ORM\Column(type'boolean')]
  55.     #[Groups(['list'])]
  56.     private ?bool $registrationFee;
  57.     #[ORM\Column(type'string'length20)]
  58.     #[Groups(['list'])]
  59.     private ?string $state;
  60.     #[ORM\OneToMany(mappedBy'admission'targetEntityAdmissionConfig::class)]
  61.     #[Groups(['list','detail'])]
  62.     private $configs;
  63.     #[ORM\Column(type'string'length100)]
  64.     #[Groups(['list'])]
  65.     private ?string $studyYear;
  66.     #[ORM\Column(type'string'length255nullabletrue)]
  67.     #[Groups(['list'])]
  68.     private ?string $studySession;
  69.     #[ORM\Column(type'string'length255nullabletrue)]
  70.     #[Groups(['list'])]
  71.     private ?string $studyLanguage;
  72.     #[ORM\Column(type'boolean')]
  73.     private ?bool $isDeleted;
  74.     #[ORM\ManyToOne(targetEntityFile::class)]
  75.     private $file;
  76.     #[ORM\Column(type'string'length255nullabletrue)]
  77.     #[Groups(['list'])]
  78.     private $filePath;
  79.     #[ORM\ManyToOne(targetEntityFile::class)]
  80.     private $image;
  81.     #[ORM\Column(type'string'length255nullabletrue)]
  82.     #[Groups(['list'])]
  83.     private $imagePath;
  84.     #[ORM\Column(type'string'length100nullabletrue)]
  85.     #[Groups(['list'])]
  86.     private ?string $location;
  87.     public function __toString(): string {
  88.         return $this->name;
  89.     }
  90.     public function __construct()
  91.     {
  92.         $this->configs = new ArrayCollection();
  93.     }
  94.     public function getId(): ?int
  95.     {
  96.         return $this->id;
  97.     }
  98.     public function getDegree(): ?Degree
  99.     {
  100.         return $this->degree;
  101.     }
  102.     public function setDegree(?Degree $degree): self
  103.     {
  104.         $this->degree $degree;
  105.         return $this;
  106.     }
  107.     public function getName(): ?string
  108.     {
  109.         return $this->name;
  110.     }
  111.     public function getLocation(): ?string
  112.     {
  113.         return $this->location;
  114.     }
  115.     public function getFile(): ?File
  116.     {
  117.         return $this->file;
  118.     }
  119.     public function setFile(?File $file): self
  120.     {
  121.         $this->file $file;
  122.         return $this;
  123.     }
  124.     public function getFilePath(): ?string
  125.     {
  126.         return $this->filePath;
  127.     }
  128.     public function setFilePath(string $filePath): self
  129.     {
  130.         $this->filePath $filePath;
  131.         return $this;
  132.     }
  133.     public function setName(string $name): self
  134.     {
  135.         $this->name $name;
  136.         return $this;
  137.     }
  138.     public function setLocation(string $location): self
  139.     {
  140.         $this->location $location;
  141.         return $this;
  142.     }
  143.     public function getRegisterStart(): ?\DateTimeInterface
  144.     {
  145.         return $this->registerStart;
  146.     }
  147.     public function setRegisterStart(\DateTimeInterface $registerStart): self
  148.     {
  149.         $this->registerStart $registerStart;
  150.         return $this;
  151.     }
  152.     public function getRegisterEnd(): ?\DateTimeInterface
  153.     {
  154.         return $this->registerEnd;
  155.     }
  156.     public function setRegisterEnd(\DateTimeInterface $registerEnd): self
  157.     {
  158.         $this->registerEnd $registerEnd;
  159.         return $this;
  160.     }
  161.     public function getConfirmStart(): ?\DateTimeInterface
  162.     {
  163.         return $this->confirmStart;
  164.     }
  165.     public function setConfirmStart(\DateTimeInterface $confirmStart): self
  166.     {
  167.         $this->confirmStart $confirmStart;
  168.         return $this;
  169.     }
  170.     public function getConfirmEnd(): ?\DateTimeInterface
  171.     {
  172.         return $this->confirmEnd;
  173.     }
  174.     public function setConfirmEnd(\DateTimeInterface $confirmEnd): self
  175.     {
  176.         $this->confirmEnd $confirmEnd;
  177.         return $this;
  178.     }
  179.     public function getSatExam(): ?bool
  180.     {
  181.         return $this->satExam;
  182.     }
  183.     public function setSatExam(bool $satExam): self
  184.     {
  185.         $this->satExam $satExam;
  186.         return $this;
  187.     }
  188.     public function getRegistrationFee(): ?bool
  189.     {
  190.         return $this->registrationFee;
  191.     }
  192.     public function setRegistrationFee(bool $registrationFee): self
  193.     {
  194.         $this->registrationFee $registrationFee;
  195.         return $this;
  196.     }
  197.     public function getState(): ?string
  198.     {
  199.         return $this->state;
  200.     }
  201.     public function setState(string $state): self
  202.     {
  203.         $this->state $state;
  204.         return $this;
  205.     }
  206.     public function getRegisterFeeAmount(): ?int
  207.     {
  208.         return $this->registerFeeAmount;
  209.     }
  210.     public function setRegisterFeeAmount(int $registerFeeAmount): self
  211.     {
  212.         $this->registerFeeAmount $registerFeeAmount;
  213.         return $this;
  214.     }
  215.     public function getRegisterStudentDiscount(): ?int
  216.     {
  217.         return $this->registerStudentDiscount;
  218.     }
  219.     public function setRegisterStudentDiscount(int $registerStudentDiscount): self
  220.     {
  221.         $this->registerStudentDiscount $registerStudentDiscount;
  222.         return $this;
  223.     }
  224.     public function getCreditFeeAmount(): ?int
  225.     {
  226.         return $this->creditFeeAmount;
  227.     }
  228.     public function setCreditFeeAmount(int $creditFeeAmount): self
  229.     {
  230.         $this->creditFeeAmount $creditFeeAmount;
  231.         return $this;
  232.     }
  233.     public function getCode(): ?string
  234.     {
  235.         return $this->code;
  236.     }
  237.     public function setCode(string $code): self
  238.     {
  239.         $this->code $code;
  240.         return $this;
  241.     }
  242.     /**
  243.      * @return Collection<int, AdmissionConfig>
  244.      */
  245.     public function getConfigs(): Collection
  246.     {
  247.         return $this->configs;
  248.     }
  249.     public function addConfig(AdmissionConfig $config): self
  250.     {
  251.         if (!$this->configs->contains($config)) {
  252.             $this->configs[] = $config;
  253.             $config->setAdmission($this);
  254.         }
  255.         return $this;
  256.     }
  257.     public function removeConfig(AdmissionConfig $config): self
  258.     {
  259.         if ($this->configs->removeElement($config)) {
  260.             // set the owning side to null (unless already changed)
  261.             if ($config->getAdmission() === $this) {
  262.                 $config->setAdmission(null);
  263.             }
  264.         }
  265.         return $this;
  266.     }
  267.     public function isSatExam(): ?bool
  268.     {
  269.         return $this->satExam;
  270.     }
  271.     public function getStudyYear(): ?string
  272.     {
  273.         return $this->studyYear;
  274.     }
  275.     public function setStudyYear(string $studyYear): self
  276.     {
  277.         $this->studyYear $studyYear;
  278.         return $this;
  279.     }
  280.     public function getStudySession(): ?string
  281.     {
  282.         return $this->studySession;
  283.     }
  284.     public function setStudySession(string $studySession): self
  285.     {
  286.         $this->studySession $studySession;
  287.         return $this;
  288.     }
  289.     public function getStudyLanguage(): ?string
  290.     {
  291.         return $this->studyLanguage;
  292.     }
  293.     public function setStudyLanguage(string $studyLanguage): self
  294.     {
  295.         $this->studyLanguage $studyLanguage;
  296.         return $this;
  297.     }
  298.     public function isIsDeleted(): ?bool
  299.     {
  300.         return $this->isDeleted;
  301.     }
  302.     public function setIsDeleted(bool $isDeleted): self
  303.     {
  304.         $this->isDeleted $isDeleted;
  305.         return $this;
  306.     }
  307.     public function getImagePath(): ?string
  308.     {
  309.         return $this->imagePath;
  310.     }
  311.     public function setImagePath(?string $imagePath): self
  312.     {
  313.         $this->imagePath $imagePath;
  314.         return $this;
  315.     }
  316.     public function getImage(): ?File
  317.     {
  318.         return $this->image;
  319.     }
  320.     public function setImage(?File $image): self
  321.     {
  322.         $this->image $image;
  323.         return $this;
  324.     }
  325.     public function isRegistrationFee(): ?bool
  326.     {
  327.         return $this->registrationFee;
  328.     }
  329. }