| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154 |
- <?php
- namespace AppBundle\Entity\Traits;
- use Doctrine\ORM\Mapping as ORM;
- use Dunglas\ApiBundle\Annotation\Iri;
- use Symfony\Component\Serializer\Annotation\Groups;
- use Symfony\Component\Validator\Constraints as Assert;
- /**
- * @Iri("http://schema.org/Generic")
- */
- trait CreatorUpdaterEntity
- {
- /**
- * @var int
- */
- #[ORM\Column(type: 'integer', nullable: true)]
- #[Assert\Type(type: 'integer', message: 'invalid-integer')]
- #[Groups(['organizationresponsability', 'person', 'networkorganization', 'organizationfunction', 'educationnotation'])]
- private $legacyId;
- /**
- * @var int
- */
- #[ORM\Column(type: 'integer', nullable: true)]
- #[Assert\Type(type: 'integer', message: 'invalid-integer')]
- private $createdBy;
- /**
- * @var int
- */
- #[ORM\Column(type: 'integer', nullable: true)]
- #[Assert\Type(type: 'integer', message: 'invalid-integer')]
- private $updatedBy;
- /**
- * @var bool
- */
- #[ORM\Column(type: 'boolean', options: ['default' => false])]
- #[Assert\Type(type: 'boolean')]
- #[Assert\NotNull]
- private $draft = false;
- /**
- * Sets legacyId.
- *
- * @param int $legacyId
- *
- * @return $this
- */
- public function setLegacyId($legacyId)
- {
- $this->legacyId = $legacyId;
- return $this;
- }
- /**
- * Gets legacyId.
- *
- * @return int
- */
- public function getLegacyId()
- {
- return $this->legacyId;
- }
- /**
- * Sets createdBy.
- *
- * @param int $createdBy
- *
- * @return $this
- */
- public function setCreatedBy($createdBy)
- {
- $this->createdBy = $createdBy;
- return $this;
- }
- /**
- * Gets createdBy.
- *
- * @return int
- */
- public function getCreatedBy()
- {
- return $this->createdBy;
- }
- /**
- * Sets updatedBy.
- *
- * @param int $updatedBy
- *
- * @return $this
- */
- public function setUpdatedBy($updatedBy)
- {
- $this->updatedBy = $updatedBy;
- return $this;
- }
- /**
- * Gets updatedBy.
- *
- * @return int
- */
- public function getUpdatedBy()
- {
- return $this->updatedBy;
- }
- /**
- * Sets draft.
- *
- * @param bool $draft
- *
- * @return $this
- */
- public function setDraft($draft)
- {
- $this->draft = $draft;
- return $this;
- }
- /**
- * Gets draft.
- *
- * @return bool
- */
- public function getDraft()
- {
- return $this->draft;
- }
- /**
- * NEED THIS FOR ELASTICA TRANSLATABLE
- * @return null
- */
- public function getTranslatable(){
- return null;
- }
- /**
- * NEED THIS FOR ELASTICA TRANSLATABLE
- * @return null
- */
- public function getPhoneNumberType(){
- return null;
- }
- }
|