<?phpnamespace App\Finance\Domain\Entity;use App\Finance\Domain\Repository\TuitionInstallmentRepository;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;use Symfony\Component\Validator\Constraints as Assert;#[ORM\Entity(repositoryClass: TuitionInstallmentRepository::class)]#[ORM\Table(name: 'tuition_installments')]#[ORM\Index(columns: ['school_year_id'], name: 'idx_school_year')]#[ORM\Index(columns: ['installment_number'], name: 'idx_installment_number')]class TuitionInstallment{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column(type: Types::INTEGER)] private ?int $id = null; #[ORM\Column(type: Types::INTEGER)] #[Assert\NotNull] private int $schoolYearId; #[ORM\Column(type: Types::INTEGER)] #[Assert\NotNull] #[Assert\Positive] private int $installmentNumber; #[ORM\Column(type: Types::STRING, length: 255)] #[Assert\NotBlank] private string $name; #[ORM\Column(type: Types::DECIMAL, precision: 10, scale: 2)] #[Assert\NotNull] #[Assert\PositiveOrZero] private string $amount; #[ORM\Column(type: Types::DATE_IMMUTABLE)] #[Assert\NotNull] private \DateTimeImmutable $dueDate; #[ORM\Column(type: Types::BOOLEAN, options: ['default' => true])] private bool $isActive = true; #[ORM\Column(type: Types::DATETIME_IMMUTABLE)] private \DateTimeImmutable $createdAt; #[ORM\Column(type: Types::DATETIME_IMMUTABLE)] private \DateTimeImmutable $updatedAt; public function __construct() { $this->createdAt = new \DateTimeImmutable(); $this->updatedAt = new \DateTimeImmutable(); } public function getId(): ?int { return $this->id; } public function getSchoolYearId(): int { return $this->schoolYearId; } public function setSchoolYearId(int $schoolYearId): self { $this->schoolYearId = $schoolYearId; $this->updatedAt = new \DateTimeImmutable(); return $this; } public function getInstallmentNumber(): int { return $this->installmentNumber; } public function setInstallmentNumber(int $installmentNumber): self { $this->installmentNumber = $installmentNumber; $this->updatedAt = new \DateTimeImmutable(); return $this; } public function getName(): string { return $this->name; } public function setName(string $name): self { $this->name = $name; $this->updatedAt = new \DateTimeImmutable(); return $this; } public function getAmount(): string { return $this->amount; } public function setAmount(string $amount): self { $this->amount = $amount; $this->updatedAt = new \DateTimeImmutable(); return $this; } public function getDueDate(): \DateTimeImmutable { return $this->dueDate; } public function setDueDate(\DateTimeImmutable $dueDate): self { $this->dueDate = $dueDate; $this->updatedAt = new \DateTimeImmutable(); return $this; } public function isActive(): bool { return $this->isActive; } public function setIsActive(bool $isActive): self { $this->isActive = $isActive; $this->updatedAt = new \DateTimeImmutable(); return $this; } public function getCreatedAt(): \DateTimeImmutable { return $this->createdAt; } public function getUpdatedAt(): \DateTimeImmutable { return $this->updatedAt; }}