src/Bundles/Analytics/Entity/Scenario.php line 12

Open in your IDE?
  1. <?php
  2. namespace Bundles\Analytics\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Bundles\Analytics\Repository\ScenarioRepository;
  5. use App\Entity\CurrencyPair;
  6. /**
  7. * @ORM\Entity(repositoryClass=ScenarioRepository::class)
  8. */
  9. class Scenario
  10. {
  11. /**
  12. * @ORM\Id
  13. * @ORM\GeneratedValue
  14. * @ORM\Column(type="integer")
  15. */
  16. private $id;
  17. /**
  18. * @ORM\Column(type="string", length=255)
  19. */
  20. private $name;
  21. /**
  22. * @ORM\Column(type="string", length=50)
  23. */
  24. private $date;
  25. /**
  26. * @ORM\ManyToMany(targetEntity=CurrencyPair::class)
  27. * @ORM\JoinTable(name="scenario_currency_pair")
  28. */
  29. private $CurrencyPair;
  30. /**
  31. * @ORM\Column(type="boolean")
  32. */
  33. private $status = true;
  34. /**
  35. * @ORM\Column(type="text", nullable=true)
  36. */
  37. private $description;
  38. public function getId(): ?int
  39. {
  40. return $this->id;
  41. }
  42. public function getName(): ?string
  43. {
  44. return $this->name;
  45. }
  46. public function setName(string $name): self
  47. {
  48. $this->name = $name;
  49. return $this;
  50. }
  51. public function getDate(): ?string
  52. {
  53. return $this->date;
  54. }
  55. public function setDate(?string $date): self
  56. {
  57. $this->date = $date;
  58. return $this;
  59. }
  60. public function isStatus(): ?bool
  61. {
  62. return $this->status;
  63. }
  64. public function setStatus(bool $status): self
  65. {
  66. $this->status = $status;
  67. return $this;
  68. }
  69. public function __toString() {
  70. return $this->getName();
  71. }
  72. /**
  73. * @return mixed
  74. */
  75. public function getCurrencyPair() {
  76. return $this->CurrencyPair;
  77. }
  78. /**
  79. * @param mixed $CurrencyPair
  80. */
  81. public function setCurrencyPair($CurrencyPair): void {
  82. $this->CurrencyPair = $CurrencyPair;
  83. }
  84. /**
  85. * @return mixed
  86. */
  87. public function getDescription() {
  88. return $this->description;
  89. }
  90. /**
  91. * @param mixed $description
  92. */
  93. public function setDescription($description): void {
  94. $this->description = $description;
  95. }
  96. }