| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- <?php
- namespace AppBundle\Entity\Core;
- use Doctrine\ORM\Mapping as ORM;
- use Dunglas\ApiBundle\Annotation\Iri;
- use Symfony\Component\Serializer\Annotation\Groups;
- use Symfony\Component\Validator\Constraints as Assert;
- use AppBundle\Entity\Traits\TimestampableEntity;
- use AppBundle\Entity\Traits\CreatorUpdaterEntity;
- /**
- * Enum des genres d'art, sous-type de Subfamilly
- *
- * @Iri("http://schema.org/Gender")
- */
- #[ORM\Entity]
- class Gender
- {
- use TimestampableEntity;
- use CreatorUpdaterEntity;
- /**
- * @var int
- */
- #[ORM\Column(type: 'integer')]
- #[ORM\Id]
- #[ORM\GeneratedValue(strategy: 'AUTO')]
- #[Groups(['gender', 'categories_reference'])]
- private $id;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string')]
- #[Assert\Type(type: 'string')]
- #[Assert\NotNull]
- #[Groups(['gender', 'categories_reference_gender', 'event_details_categories'])]
- private $name;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string')]
- #[Assert\Type(type: 'string')]
- #[Assert\NotNull]
- #[Groups(['gender'])]
- private $code;
- /**
- * Sets id.
- *
- * @param int $id
- *
- * @return $this
- */
- public function setId($id)
- {
- $this->id = $id;
- return $this;
- }
- /**
- * Gets id.
- *
- * @return int
- */
- public function getId()
- {
- return $this->id;
- }
- /**
- * Sets name.
- *
- * @param string $name
- *
- * @return $this
- */
- public function setName($name)
- {
- $this->name = $name;
- return $this;
- }
- /**
- * Gets name.
- *
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
- /**
- * Sets code.
- *
- * @param string $code
- *
- * @return $this
- */
- public function setCode($code)
- {
- $this->code = $code;
- return $this;
- }
- /**
- * Gets code.
- *
- * @return string
- */
- public function getCode()
- {
- return $this->code;
- }
- /**
- * NEED THIS FOR ELASTICA TRANSLATABLE
- * @return null
- */
- public function getTranslatable(){
- return null;
- }
- }
|