<?phpnamespace App\Entity;use App\Repository\TeacherPriceChangeRepository;use Doctrine\ORM\Mapping as ORM;use Symfony\Component\Serializer\Annotation\Groups;/** * @ORM\Entity(repositoryClass=TeacherPriceChangeRepository::class) */class TeacherPriceChange{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") * @Groups({"TeacherPriceChangesEdit"}) */ private $id; /** * @ORM\Column(type="datetime", nullable=true) * @Groups({"TeacherPriceChangesEdit"}) */ private $dateFrom; /** * @ORM\Column(type="float", nullable=true) * @Groups({"TeacherPriceChangesEdit"}) */ private $value; /** * @ORM\Column(type="datetime", nullable=true) */ private $createdAt; /** * @ORM\ManyToOne(targetEntity=Teacher::class, inversedBy="teacherPriceChanges") */ private $teacher; /** * @ORM\Column(type="boolean", nullable=true) */ private $manual = true; /** * @ORM\Column(type="boolean", nullable=true) * @Groups({"TeacherPriceChangesEdit"}) */ private $reset; public function __construct() { $this->createdAt = new \DateTime(); } public function getId(): ?int { return $this->id; } public function getDateFrom(): ?\DateTimeInterface { return $this->dateFrom; } public function setDateFrom(?\DateTimeInterface $dateFrom): self { $this->dateFrom = $dateFrom; return $this; } public function getValue(): ?float { return $this->value; } public function setValue(?float $value): self { $this->value = $value; return $this; } public function getCreatedAt(): ?\DateTimeInterface { return $this->createdAt; } public function setCreatedAt(?\DateTimeInterface $createdAt): self { $this->createdAt = $createdAt; return $this; } public function getTeacher(): ?Teacher { return $this->teacher; } public function setTeacher(?Teacher $teacher): self { $this->teacher = $teacher; return $this; } public function getManual(): ?bool { return $this->manual; } public function setManual(?bool $manual): self { $this->manual = $manual; return $this; } public function getReset(): ?bool { return $this->reset; } public function setReset($reset): self { if (is_string($reset)) { if ($reset == "yes") $this->reset = 1; else { $this->reset = 0; } } else{ $this->reset = $reset; } return $this; }}