Advertisement
Guest User

Untitled

a guest
Apr 19th, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.61 KB | None | 0 0
  1. <?php
  2.  
  3. namespace App\Entity;
  4.  
  5. use Doctrine\ORM\Mapping as ORM;
  6.  
  7. /**
  8. * @ORM\Entity(repositoryClass="App\Repository\ExchangeRateRepository")
  9. */
  10. class ExchangeRate
  11. {
  12. /**
  13. * @ORM\Id()
  14. * @ORM\GeneratedValue()
  15. * @ORM\Column(type="integer")
  16. */
  17. private $id;
  18.  
  19. /**
  20. * @ORM\Column(type="datetime")
  21. */
  22. private $date;
  23.  
  24. /**
  25. * @ORM\Column(type="string")
  26. */
  27. private $currency;
  28.  
  29. /**
  30. * @ORM\Column(type="string")
  31. */
  32. private $year;
  33.  
  34. /**
  35. * @ORM\Column(type="string")
  36. */
  37. private $month;
  38.  
  39. /**
  40. * @ORM\Column(type="string")
  41. */
  42. private $buyingRate;
  43.  
  44. /**
  45. * @ORM\Column(type="string")
  46. */
  47. private $centralRate;
  48.  
  49. /**
  50. * @ORM\Column(type="string")
  51. */
  52. private $sellingRate;
  53.  
  54. public function getId(): ?int
  55. {
  56. return $this->id;
  57. }
  58.  
  59. public function getDate(): ?\DateTimeInterface
  60. {
  61. return $this->date;
  62. }
  63.  
  64. public function setDate(\DateTimeInterface $date): self
  65. {
  66. $this->date = $date;
  67.  
  68. return $this;
  69. }
  70.  
  71. public function getCurrency(): ?string
  72. {
  73. return $this->currency;
  74. }
  75.  
  76. public function setCurrency(string $currency): self
  77. {
  78. $this->currency = $currency;
  79.  
  80. return $this;
  81. }
  82.  
  83. public function getYear(): ?string
  84. {
  85. return $this->year;
  86. }
  87.  
  88. public function setYear(string $year): self
  89. {
  90. $this->year = $year;
  91.  
  92. return $this;
  93. }
  94.  
  95. public function getMonth(): ?string
  96. {
  97. return $this->month;
  98. }
  99.  
  100. public function setMonth(string $month): self
  101. {
  102. $this->month = $month;
  103.  
  104. return $this;
  105. }
  106.  
  107. public function getBuyingRate(): ?string
  108. {
  109. return $this->buyingRate;
  110. }
  111.  
  112. public function setBuyingRate(string $buyingRate): self
  113. {
  114. $this->buyingRate = $buyingRate;
  115.  
  116. return $this;
  117. }
  118.  
  119. public function getCentralRate(): ?string
  120. {
  121. return $this->centralRate;
  122. }
  123.  
  124. public function setCentralRate(string $centralRate): self
  125. {
  126. $this->centralRate = $centralRate;
  127.  
  128. return $this;
  129. }
  130.  
  131. public function getSellingRate(): ?string
  132. {
  133. return $this->sellingRate;
  134. }
  135.  
  136. public function setSellingRate(string $sellingRate): self
  137. {
  138. $this->sellingRate = $sellingRate;
  139.  
  140. return $this;
  141. }
  142.  
  143. public function toArray(): array
  144. {
  145. return [
  146. 'date' => $this->date->format('n/j/Y'),
  147. 'buyingRate' => $this->buyingRate,
  148. 'sellingRate' => $this->sellingRate,
  149. 'centralRate' => $this->centralRate
  150. ];
  151. }
  152. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement