| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143 |
- <?php
- namespace AppBundle\Entity\AccessAndFunction;
- use AppBundle\Annotation\DefaultField;
- use AppBundle\Entity\Traits\ActivityPeriodTrait;
- 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;
- /**
- * Responsibilité d'un Access au sein d'une Organization
- *
- * @Iri("http://schema.org/OrganizationResponsability")
- */
- #[ORM\Entity]
- class OrganizationResponsability
- {
- use TimestampableEntity;
- use CreatorUpdaterEntity;
- use ActivityPeriodTrait;
- /**
- * @var int
- */
- #[ORM\Column(type: 'integer')]
- #[ORM\Id]
- #[ORM\GeneratedValue(strategy: 'AUTO')]
- #[Groups(['organizationresponsability', 'access_details'])]
- private $id;
- /**
- * @var Access
- */
- #[ORM\ManyToOne(targetEntity: 'Access', inversedBy: 'organizationResponsabilities')]
- #[ORM\JoinColumn(nullable: false)]
- #[Assert\NotNull]
- #[Groups(['organizationresponsability'])]
- private $access;
- /**
- * @var string
- */
- #[ORM\Column(type: 'text', nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Groups(['organizationresponsability', 'access_details_organizationresponsabilities'])]
- private $responsability;
- /**
- * @var bool
- */
- #[ORM\Column(type: 'boolean', options: ['default' => true])]
- #[Assert\Type(type: 'boolean')]
- #[Assert\NotNull]
- #[Groups(['organizationresponsability'])]
- private $isPhysical = true;
- /**
- * 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;
- }
- /**
- * Set responsability
- *
- * @param string $responsability
- *
- * @return OrganizationResponsability
- */
- public function setResponsability($responsability)
- {
- $this->responsability = $responsability;
- return $this;
- }
- /**
- * Get responsability
- *
- * @return string
- */
- public function getResponsability()
- {
- return $this->responsability;
- }
- /**
- * Set access
- *
- * @param \AppBundle\Entity\AccessAndFunction\Access $access
- *
- * @return OrganizationResponsability
- */
- public function setAccess(\AppBundle\Entity\AccessAndFunction\Access $access)
- {
- $this->access = $access;
- return $this;
- }
- /**
- * Get access
- *
- * @return \AppBundle\Entity\AccessAndFunction\Access
- */
- public function getAccess()
- {
- return $this->access;
- }
- /**
- * Sets isPhysical.
- *
- * @param bool $isPhysical
- *
- * @return $this
- */
- public function setIsPhysical($isPhysical)
- {
- $this->isPhysical = $isPhysical;
- return $this;
- }
- /**
- * Gets isPhysical.
- *
- * @return bool
- */
- public function getIsPhysical()
- {
- return $this->isPhysical;
- }
- }
|