| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210 |
- <?php
- namespace AppBundle\Entity\Person;
- use AppBundle\Entity\AccessAndFunction\Access;
- 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;
- /**
- * Membre d'une commission, fais le lien entre un Access et une Commission
- *
- * @Iri("http://schema.org/CommissionMember")
- */
- #[ORM\Entity]
- class CommissionMember
- {
- use TimestampableEntity;
- use CreatorUpdaterEntity;
- use ActivityPeriodTrait;
- /**
- * @var int
- */
- #[ORM\Column(type: 'integer')]
- #[ORM\Id]
- #[ORM\GeneratedValue(strategy: 'AUTO')]
- #[Groups(['commissionmember', 'commission_list'])]
- private $id;
- /**
- * @var Commission
- */
- #[ORM\ManyToOne(targetEntity: 'Commission', inversedBy: 'commissionMembers')]
- #[ORM\JoinColumn(nullable: false)]
- #[Assert\NotNull]
- #[Groups(['commissionmember'])]
- private $commission;
- /**
- * @var Access
- */
- #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', inversedBy: 'commissionMembers')]
- #[ORM\JoinColumn(nullable: false)]
- #[Assert\NotNull]
- #[Groups(['commissionmember', 'commission_list_commissionmembers'])]
- private $member;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Assert\Choice(callback: ['AppBundle\Enum\Person\CommissionMemberFunctionEnum', 'toArray'])]
- #[Groups(['commissionmember', 'commission_list_commissionmembers'])]
- private $commissionMemberFunction;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', length: 30, nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Groups(['commissionmember', 'commission_list_commissionmembers'])]
- private $functionComplement;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Assert\Choice(callback: ['AppBundle\Enum\Person\CauseOutputEnum', 'toArray'])]
- #[Groups(['commissionmember', 'commission_list_commissionmembers'])]
- private $causeOutput;
- /**
- * Constructor
- */
- public function __construct()
- {
- }
- /**
- * 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 commission.
- *
- * @param Commission $commission
- *
- * @return $this
- */
- public function setCommission(Commission $commission)
- {
- $this->commission = $commission;
- return $this;
- }
- /**
- * Gets commission.
- *
- * @return Commission
- */
- public function getCommission()
- {
- return $this->commission;
- }
- /**
- * Sets member.
- *
- * @param Access $member
- *
- * @return $this
- */
- public function setMember(Access $member)
- {
- $this->member = $member;
- return $this;
- }
- /**
- * Gets member.
- *
- * @return Access
- */
- public function getMember()
- {
- return $this->member;
- }
- /**
- * Sets commissionMemberFunction.
- *
- * @param string $commissionMemberFunction
- *
- * @return $this
- */
- public function setCommissionMemberFunction($commissionMemberFunction)
- {
- $this->commissionMemberFunction = $commissionMemberFunction;
- return $this;
- }
- /**
- * Gets commissionMemberFunction.
- *
- * @return string
- */
- public function getCommissionMemberFunction()
- {
- return $this->commissionMemberFunction;
- }
- /**
- * Sets functionComplement.
- *
- * @param string $functionComplement
- *
- * @return $this
- */
- public function setFunctionComplement($functionComplement)
- {
- $this->functionComplement = $functionComplement;
- return $this;
- }
- /**
- * Gets functionComplement.
- *
- * @return string
- */
- public function getFunctionComplement()
- {
- return $this->functionComplement;
- }
- /**
- * Sets causeOutput.
- *
- * @param string $causeOutput
- *
- * @return $this
- */
- public function setCauseOutput($causeOutput)
- {
- $this->causeOutput = $causeOutput;
- return $this;
- }
- /**
- * Gets causeOutput.
- *
- * @return string
- */
- public function getCauseOutput()
- {
- return $this->causeOutput;
- }
- }
|