src/Entity/Report/SubscriptionRenew.php line 15

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Entity\Report;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7. * @ORM\Table()
  8. *
  9. * @ORM\Entity(repositoryClass="App\Repository\Report\SubscriptionRenewRepository")
  10. */
  11. class SubscriptionRenew
  12. {
  13. /**
  14. * @ORM\Column(type="integer")
  15. *
  16. * @ORM\Id
  17. *
  18. * @ORM\GeneratedValue
  19. */
  20. private int $id;
  21. /**
  22. * @ORM\Column(type="integer", options={"default" : 0})
  23. */
  24. private int $numToRenew;
  25. /**
  26. * @ORM\Column(type="integer", options={"default" : 0})
  27. */
  28. private int $numRenewed;
  29. /**
  30. * @ORM\Column(type="float", options={"default" : 0.00})
  31. */
  32. private float $amountToCollect;
  33. /**
  34. * @ORM\Column(type="float", options={"default" : 0.00})
  35. */
  36. private float $amountCollected;
  37. /**
  38. * @ORM\Column(type="datetime")
  39. */
  40. private \DateTime $dateAdd;
  41. /**
  42. * @ORM\Column(type="datetime")
  43. */
  44. private \DateTime $dateUpd;
  45. /**
  46. * @var SubscriptionRenewSubscriptionLine[]|ArrayCollection
  47. *
  48. * @ORM\OneToMany(targetEntity="App\Entity\Report\SubscriptionRenewSubscriptionLine", mappedBy="subscriptionRenew")
  49. */
  50. private $renewSubscriptionLines;
  51. public function __construct(int $numToRenew, float $amountToCollect)
  52. {
  53. $this->numToRenew = $numToRenew;
  54. $this->amountToCollect = $amountToCollect;
  55. $this->numRenewed = 0;
  56. $this->amountCollected = 0;
  57. $this->dateAdd = new \DateTime();
  58. $this->dateUpd = new \DateTime();
  59. }
  60. public function getId(): int
  61. {
  62. return $this->id;
  63. }
  64. public function getNumToRenew(): int
  65. {
  66. return $this->numToRenew;
  67. }
  68. public function getNumRenewed(): int
  69. {
  70. return $this->numRenewed;
  71. }
  72. public function getAmountToCollect(): float
  73. {
  74. return $this->amountToCollect;
  75. }
  76. public function getAmountCollected(): float
  77. {
  78. return $this->amountCollected;
  79. }
  80. public function getDateAdd(): \DateTime
  81. {
  82. return $this->dateAdd;
  83. }
  84. public function getDateUpd(): \DateTime
  85. {
  86. return $this->dateUpd;
  87. }
  88. public function getRenewSubscriptionLines()
  89. {
  90. return $this->renewSubscriptionLines;
  91. }
  92. public function setNumRenewed(int $numRenewed): SubscriptionRenew
  93. {
  94. $this->numRenewed = $numRenewed;
  95. return $this;
  96. }
  97. public function setAmountCollected(float $amountCollected): SubscriptionRenew
  98. {
  99. $this->amountCollected = $amountCollected;
  100. return $this;
  101. }
  102. public function setAmountToCollect(float $amountToCollect): SubscriptionRenew
  103. {
  104. $this->amountToCollect = $amountToCollect;
  105. return $this;
  106. }
  107. public function setDateUpd(\DateTime $dateUpd): SubscriptionRenew
  108. {
  109. $this->dateUpd = $dateUpd;
  110. return $this;
  111. }
  112. }