src/Entity/Subscription.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\SuperClass\BaseEntity;
  4. use App\Repository\SubscriptionRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7. * @ORM\Entity(repositoryClass=SubscriptionRepository::class)
  8. */
  9. class Subscription extends BaseEntity
  10. {
  11. /**
  12. * @ORM\Column(type="plan_duration_type")
  13. */
  14. private $duration;
  15. /**
  16. * @ORM\Column(type="integer")
  17. */
  18. private $amount;
  19. /**
  20. * @ORM\OneToOne(targetEntity=Product::class, cascade={"persist"})
  21. */
  22. private $item;
  23. /**
  24. * @ORM\Column(type="boolean")
  25. */
  26. private $active;
  27. public function getDuration(): ?string
  28. {
  29. return $this->duration;
  30. }
  31. public function setDuration(string $duration): self
  32. {
  33. $this->duration = $duration;
  34. return $this;
  35. }
  36. public function getAmount(): ?int
  37. {
  38. return $this->amount;
  39. }
  40. public function setAmount(int $amount): self
  41. {
  42. $this->amount = $amount;
  43. return $this;
  44. }
  45. public function getItem(): ?Product
  46. {
  47. return $this->item;
  48. }
  49. public function setItem(?Product $item): self
  50. {
  51. $this->item = $item;
  52. return $this;
  53. }
  54. public function getActive(): ?bool
  55. {
  56. return $this->active;
  57. }
  58. public function setActive(bool $active): self
  59. {
  60. $this->active = $active;
  61. return $this;
  62. }
  63. }