src/Entity/SubscriptionType.php line 8

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /** @ORM\Entity() @ORM\Table(name="subscription_type") */
  5. class SubscriptionType
  6. {
  7.     /** @ORM\Id @ORM\GeneratedValue @ORM\Column(type="integer") */
  8.     private ?int $id = null;
  9.     /** @ORM\Column(type="string", length=100, unique=true) */
  10.     private string $name = '';
  11.     /** @ORM\Column(type="integer") */
  12.     private int $durationMonths = 1;
  13.     /** @ORM\Column(type="integer") */
  14.     private int $installmentCount = 1;
  15.     /** @ORM\Column(type="boolean") */
  16.     private bool $enabled = true;
  17.     public function getId(): ?int { return $this->id; }
  18.     public function getName(): string { return $this->name; }
  19.     public function setName(string $name): self { $this->name = $name; return $this; }
  20.     public function getDurationMonths(): int { return $this->durationMonths; }
  21.     public function setDurationMonths(int $months): self { $this->durationMonths = max(1, $months); return $this; }
  22.     public function getInstallmentCount(): int { return $this->installmentCount; }
  23.     public function setInstallmentCount(int $count): self { $this->installmentCount = max(1, $count); return $this; }
  24.     public function isEnabled(): bool { return $this->enabled; }
  25.     public function setEnabled(bool $enabled): self { $this->enabled = $enabled; return $this; }
  26. }