Profile.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <?php
  2. namespace FTTHBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Symfony\Component\Validator\Constraints as Assert;
  5. /**
  6. * @ORM\Table
  7. * @ORM\Entity
  8. */
  9. class Profile
  10. {
  11. use ONUTrait;
  12. /**
  13. * @var int
  14. *
  15. * @ORM\Column(name="id", type="integer")
  16. * @ORM\Id
  17. * @ORM\GeneratedValue(strategy="AUTO")
  18. */
  19. private $id;
  20. /**
  21. * @var string
  22. *
  23. * @ORM\Column(type="string", length=255)
  24. * @Assert\NotNull
  25. */
  26. private $name;
  27. /**
  28. * @var int
  29. *
  30. * @ORM\Column(type="bigint", nullable=true)
  31. */
  32. private $upload;
  33. /**
  34. * @var int
  35. *
  36. * @ORM\Column(type="bigint", nullable=true)
  37. */
  38. private $download;
  39. /**
  40. * @ORM\OneToMany(targetEntity="ONU", mappedBy="profile")
  41. */
  42. protected $onus;
  43. /**
  44. * @return string
  45. */
  46. public function __toString()
  47. {
  48. return $this->name;
  49. }
  50. /**
  51. * @return int
  52. */
  53. public function getId()
  54. {
  55. return $this->id;
  56. }
  57. /**
  58. * @param string $name
  59. *
  60. * @return Profile
  61. */
  62. public function setName($name)
  63. {
  64. $this->name = $name;
  65. return $this;
  66. }
  67. /**
  68. * @return string
  69. */
  70. public function getName()
  71. {
  72. return $this->name;
  73. }
  74. /**
  75. * @param integer $upload
  76. *
  77. * @return Profile
  78. */
  79. public function setUpload($upload)
  80. {
  81. $this->upload = $upload;
  82. return $this;
  83. }
  84. /**
  85. * @return int
  86. */
  87. public function getUpload()
  88. {
  89. return $this->upload;
  90. }
  91. /**
  92. * @param integer $download
  93. *
  94. * @return Profile
  95. */
  96. public function setDownload($download)
  97. {
  98. $this->download = $download;
  99. return $this;
  100. }
  101. /**
  102. * @return int
  103. */
  104. public function getDownload()
  105. {
  106. return $this->download;
  107. }
  108. }