FunctionType.php 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <?php
  2. namespace AppBundle\Entity\AccessAndFunction;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Symfony\Component\Serializer\Annotation\Groups;
  5. use Symfony\Component\Validator\Constraints as Assert;
  6. use AppBundle\Entity\Traits\TimestampableEntity;
  7. use AppBundle\Entity\Traits\CreatorUpdaterEntity;
  8. /**
  9. * Enum des fonctions que peuvent occuper un Access au sein d'une Organization
  10. */
  11. #[ORM\Entity]
  12. class FunctionType
  13. {
  14. use TimestampableEntity;
  15. use CreatorUpdaterEntity;
  16. /**
  17. * @var int
  18. */
  19. #[ORM\Column(type: 'integer')]
  20. #[ORM\Id]
  21. #[ORM\GeneratedValue(strategy: 'AUTO')]
  22. #[Groups(['functiontype'])]
  23. private $id;
  24. /**
  25. * @var string
  26. */
  27. #[ORM\Column(type: 'string', nullable: false)]
  28. #[Assert\Type(type: 'string')]
  29. #[Assert\NotNull]
  30. #[Assert\Choice(callback: ['\AppBundle\Enum\AccessAndFunction\TypeFunctionEnum', 'toArray'])]
  31. #[Groups(['functiontype', 'access_details_organizationfunction', 'licence_cmf_organizationfunction', 'access_informations_edit_organizationfunction'])]
  32. private $functionType;
  33. /**
  34. * @var string
  35. *
  36. *
  37. */
  38. #[ORM\Column(type: 'string', nullable: false)]
  39. #[Assert\Type(type: 'string')]
  40. #[Assert\NotNull]
  41. #[Assert\Choice(callback: ['\AppBundle\Enum\AccessAndFunction\FunctionEnum', 'toArray'])]
  42. #[Groups(['functiontype', 'access_details_organizationfunction', 'adherent_list_organizationfunction', 'personnels_list_organizationfunction', 'othercontact_list_organizationfunction', 'ca_list_organizationfunction', 'accesses_list_organizationfunction', 'board_list_organizationfunction', 'licence_cmf_organizationfunction', 'access_informations_edit_organizationfunction', 'adherent_contact_organizationfunction', 'cotisation_responsibles_accesses_organizationfunction', 'networkmanagers_list_organizationfunction', 'online_registration_access_details_organizationfunction', 'accesscmfnetwork_organizationfunction'])]
  43. private $mission;
  44. /**
  45. * @var string
  46. */
  47. #[ORM\Column(type: 'string', nullable: false)]
  48. #[Assert\Type(type: 'string')]
  49. #[Assert\NotNull]
  50. #[Assert\Choice(callback: ['\AppBundle\Enum\AccessAndFunction\RoleEnum', 'toArray'])]
  51. private $roleByDefault;
  52. public function __construct()
  53. {
  54. }
  55. /**
  56. * @return int
  57. */
  58. public function getId()
  59. {
  60. return $this->id;
  61. }
  62. /**
  63. * @param int $id
  64. * @return FunctionType
  65. */
  66. public function setId($id)
  67. {
  68. $this->id = $id;
  69. return $this;
  70. }
  71. /**
  72. * @return string
  73. */
  74. public function getFunctionType()
  75. {
  76. return $this->functionType;
  77. }
  78. /**
  79. * @param string $functionType
  80. * @return $this
  81. */
  82. public function setFunctionType($functionType)
  83. {
  84. $this->functionType = $functionType;
  85. return $this;
  86. }
  87. /**
  88. * @return string
  89. */
  90. public function getMission()
  91. {
  92. return $this->mission;
  93. }
  94. /**
  95. * @param string $mission
  96. * @return $this
  97. */
  98. public function setMission($mission)
  99. {
  100. $this->mission = $mission;
  101. return $this;
  102. }
  103. /**
  104. * @return string
  105. */
  106. public function getRoleByDefault()
  107. {
  108. return $this->roleByDefault;
  109. }
  110. /**
  111. * @param string $roleByDefault
  112. * @return $this
  113. */
  114. public function setRoleByDefault($roleByDefault)
  115. {
  116. $this->roleByDefault = $roleByDefault;
  117. return $this;
  118. }
  119. }