Country.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <?php
  2. namespace AppBundle\Entity\Core;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Dunglas\ApiBundle\Annotation\Iri;
  5. use Symfony\Component\Serializer\Annotation\Groups;
  6. use Symfony\Component\Validator\Constraints as Assert;
  7. /**
  8. * Enum des pays
  9. *
  10. * @Iri("http://schema.org/Country")
  11. */
  12. #[ORM\Entity]
  13. class Country
  14. {
  15. /**
  16. * @var int
  17. */
  18. #[ORM\Column(type: 'integer')]
  19. #[ORM\Id]
  20. #[ORM\GeneratedValue(strategy: 'AUTO')]
  21. #[Groups(['country', 'accesses_list_person'])]
  22. private $id;
  23. /**
  24. * @var string The name of the item.
  25. *
  26. * @Iri("https://schema.org/name")
  27. */
  28. #[ORM\Column(type: 'string')]
  29. #[Assert\Type(type: 'string')]
  30. #[Assert\NotNull]
  31. #[Groups(['country', 'country_reference', 'accesses_list_person', 'student_list_person', 'guardians_list_person', 'teachers_list_person', 'adherent_list_person', 'personnels_list_person', 'ca_list_person', 'othercontact_list_person', 'board_list_person', 'access_details_person', 'fusion_accesses_person'])]
  32. private $name;
  33. /**
  34. * Sets id.
  35. *
  36. * @param int $id
  37. *
  38. * @return $this
  39. */
  40. public function setId($id)
  41. {
  42. $this->id = $id;
  43. return $this;
  44. }
  45. /**
  46. * Gets id.
  47. *
  48. * @return int
  49. */
  50. public function getId()
  51. {
  52. return $this->id;
  53. }
  54. /**
  55. * Sets name.
  56. *
  57. * @param string $name
  58. *
  59. * @return $this
  60. */
  61. public function setName($name)
  62. {
  63. $this->name = $name;
  64. return $this;
  65. }
  66. /**
  67. * Gets name.
  68. *
  69. * @return string
  70. */
  71. public function getName()
  72. {
  73. return $this->name;
  74. }
  75. }