Usergroup.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <?php
  2. namespace Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. /**
  6. * Usergroup
  7. *
  8. * @ORM\Table(name="usergroup")
  9. * @ORM\Entity
  10. */
  11. class Usergroup
  12. {
  13. /**
  14. * @var integer
  15. *
  16. * @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false)
  17. * @ORM\Id
  18. * @ORM\GeneratedValue(strategy="IDENTITY")
  19. */
  20. private $id;
  21. /**
  22. * @var string
  23. *
  24. * @ORM\Column(name="name", type="string", length=255, precision=0, scale=0, nullable=false, unique=false)
  25. */
  26. private $name;
  27. /**
  28. * @var string
  29. *
  30. * @ORM\Column(name="description", type="text", precision=0, scale=0, nullable=false, unique=false)
  31. */
  32. private $description;
  33. /**
  34. * @ORM\OneToMany(targetEntity="UsergroupRelUser", mappedBy="class")
  35. **/
  36. private $users;
  37. /**
  38. *
  39. */
  40. public function __construct()
  41. {
  42. $this->users = new ArrayCollection();
  43. }
  44. /**
  45. * Get users
  46. * @return ArrayCollection
  47. */
  48. public function getUsers()
  49. {
  50. return $this->users;
  51. }
  52. /**
  53. * Get id
  54. *
  55. * @return integer
  56. */
  57. public function getId()
  58. {
  59. return $this->id;
  60. }
  61. /**
  62. * Set name
  63. *
  64. * @param string $name
  65. * @return Usergroup
  66. */
  67. public function setName($name)
  68. {
  69. $this->name = $name;
  70. return $this;
  71. }
  72. /**
  73. * Get name
  74. *
  75. * @return string
  76. */
  77. public function getName()
  78. {
  79. return $this->name;
  80. }
  81. /**
  82. * Set description
  83. *
  84. * @param string $description
  85. * @return Usergroup
  86. */
  87. public function setDescription($description)
  88. {
  89. $this->description = $description;
  90. return $this;
  91. }
  92. /**
  93. * Get description
  94. *
  95. * @return string
  96. */
  97. public function getDescription()
  98. {
  99. return $this->description;
  100. }
  101. }