PageRenderTime 43ms CodeModel.GetById 17ms RepoModel.GetById 1ms app.codeStats 0ms

/src/InsaLan/TournamentBundle/Entity/Round.php

https://github.com/nhurman/insalan.fr
PHP | 146 lines | 55 code | 21 blank | 70 comment | 0 complexity | 3f538fd96c6932b45bed45c9888f3894 MD5 | raw file
  1. <?php
  2. namespace InsaLan\TournamentBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Symfony\Component\Validator\Constraints as Assert;
  5. use Gedmo\Mapping\Annotation as Gedmo;
  6. use Gedmo\Timestampable\Traits\TimestampableEntity;
  7. /**
  8. * @ORM\Entity
  9. */
  10. class Round
  11. {
  12. use TimestampableEntity;
  13. /**
  14. * @ORM\Id
  15. * @ORM\Column(type="integer")
  16. * @ORM\GeneratedValue(strategy="AUTO")
  17. */
  18. protected $id;
  19. /**
  20. * @ORM\ManyToOne(targetEntity="Match", inversedBy="rounds")
  21. * @ORM\JoinColumn(onDelete="cascade")
  22. */
  23. protected $match;
  24. /**
  25. * @ORM\Column(type="integer")
  26. */
  27. protected $score1;
  28. /**
  29. * @ORM\Column(type="integer")
  30. */
  31. protected $score2;
  32. /**
  33. * @ORM\Column(type="string", length=255, nullable=true)
  34. */
  35. protected $replay;
  36. /**
  37. * Get id
  38. *
  39. * @return integer
  40. */
  41. public function getId()
  42. {
  43. return $this->id;
  44. }
  45. /**
  46. * Set score1
  47. *
  48. * @param integer $score1
  49. * @return Round
  50. */
  51. public function setScore1($score1)
  52. {
  53. $this->score1 = $score1;
  54. return $this;
  55. }
  56. /**
  57. * Get score1
  58. *
  59. * @return integer
  60. */
  61. public function getScore1()
  62. {
  63. return $this->score1;
  64. }
  65. /**
  66. * Set score2
  67. *
  68. * @param integer $score2
  69. * @return Round
  70. */
  71. public function setScore2($score2)
  72. {
  73. $this->score2 = $score2;
  74. return $this;
  75. }
  76. /**
  77. * Get score2
  78. *
  79. * @return integer
  80. */
  81. public function getScore2()
  82. {
  83. return $this->score2;
  84. }
  85. /**
  86. * Set match
  87. *
  88. * @param \InsaLan\TournamentBundle\Entity\Match $match
  89. * @return Round
  90. */
  91. public function setMatch(\InsaLan\TournamentBundle\Entity\Match $match = null)
  92. {
  93. $this->match = $match;
  94. return $this;
  95. }
  96. /**
  97. * Get match
  98. *
  99. * @return \InsaLan\TournamentBundle\Entity\Match
  100. */
  101. public function getMatch()
  102. {
  103. return $this->match;
  104. }
  105. /**
  106. * Set replay
  107. *
  108. * @param string $replay
  109. * @return Round
  110. */
  111. public function setReplay($replay)
  112. {
  113. $this->replay = $replay;
  114. return $this;
  115. }
  116. /**
  117. * Get replay
  118. *
  119. * @return string
  120. */
  121. public function getReplay()
  122. {
  123. return $this->replay;
  124. }
  125. }