src/CoreBundle/Entity/KvikCustomizationBuy.php line 13

Open in your IDE?
  1. <?php
  2. namespace CoreBundle\Entity;
  3. use DateTime;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use JsonSerializable;
  6. /**
  7. * @ORM\Table("kvik_customization_buy")
  8. * @ORM\Entity
  9. */
  10. class KvikCustomizationBuy implements JsonSerializable
  11. {
  12. /**
  13. * @var int
  14. *
  15. * @ORM\Column(name="id", type="integer")
  16. * @ORM\Id
  17. * @ORM\GeneratedValue(strategy="AUTO")
  18. */
  19. private int $id;
  20. /**
  21. * @var KvikCustomization
  22. *
  23. * @ORM\ManyToOne(targetEntity="KvikCustomization")
  24. * @ORM\JoinColumn(name="kvik_customization", referencedColumnName="id", onDelete="CASCADE")
  25. */
  26. private KvikCustomization $kvikCustomization;
  27. /**
  28. * @var GamificationProfile
  29. *
  30. * @ORM\ManyToOne(targetEntity="GamificationProfile")
  31. * @ORM\JoinColumn(name="gamification_profile", referencedColumnName="id", onDelete="CASCADE")
  32. */
  33. private GamificationProfile $gamificationProfile;
  34. /**
  35. * @var DateTime
  36. *
  37. * @ORM\Column(name="bought_at", type="datetime")
  38. */
  39. private DateTime $boughtAt;
  40. /**
  41. * @var int
  42. *
  43. * @ORM\Column(name="price_paid", type="integer")
  44. */
  45. private int $pricePaid;
  46. public function getId(): int
  47. {
  48. return $this->id;
  49. }
  50. public function setId(int $id): void
  51. {
  52. $this->id = $id;
  53. }
  54. public function getKvikCustomization(): KvikCustomization
  55. {
  56. return $this->kvikCustomization;
  57. }
  58. public function setKvikCustomization(KvikCustomization $kvikCustomization): void
  59. {
  60. $this->kvikCustomization = $kvikCustomization;
  61. }
  62. public function getGamificationProfile(): GamificationProfile
  63. {
  64. return $this->gamificationProfile;
  65. }
  66. public function setGamificationProfile(GamificationProfile $gamificationProfile): void
  67. {
  68. $this->gamificationProfile = $gamificationProfile;
  69. }
  70. public function getBoughtAt(): DateTime
  71. {
  72. return $this->boughtAt;
  73. }
  74. public function setBoughtAt(DateTime $boughtAt): void
  75. {
  76. $this->boughtAt = $boughtAt;
  77. }
  78. public function getPricePaid(): int
  79. {
  80. return $this->pricePaid;
  81. }
  82. public function setPricePaid(int $pricePaid): void
  83. {
  84. $this->pricePaid = $pricePaid;
  85. }
  86. public function jsonSerialize(): mixed
  87. {
  88. return [
  89. 'id' => $this->id,
  90. 'kvikCustomization' => $this->kvikCustomization,
  91. 'gamificationProfile' => $this->gamificationProfile,
  92. 'boughtAt' => $this->boughtAt,
  93. 'pricePaid' => $this->pricePaid,
  94. ];
  95. }
  96. }