<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/** @ORM\Entity() @ORM\Table(name="subscription_type") */
class SubscriptionType
{
/** @ORM\Id @ORM\GeneratedValue @ORM\Column(type="integer") */
private ?int $id = null;
/** @ORM\Column(type="string", length=100, unique=true) */
private string $name = '';
/** @ORM\Column(type="integer") */
private int $durationMonths = 1;
/** @ORM\Column(type="integer") */
private int $installmentCount = 1;
/** @ORM\Column(type="boolean") */
private bool $enabled = true;
public function getId(): ?int { return $this->id; }
public function getName(): string { return $this->name; }
public function setName(string $name): self { $this->name = $name; return $this; }
public function getDurationMonths(): int { return $this->durationMonths; }
public function setDurationMonths(int $months): self { $this->durationMonths = max(1, $months); return $this; }
public function getInstallmentCount(): int { return $this->installmentCount; }
public function setInstallmentCount(int $count): self { $this->installmentCount = max(1, $count); return $this; }
public function isEnabled(): bool { return $this->enabled; }
public function setEnabled(bool $enabled): self { $this->enabled = $enabled; return $this; }
}