| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- <?php
- namespace AppBundle\Entity\Organization;
- use AppBundle\Entity\Traits\ActivityYearTrait;
- 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;
- /**
- *
- * @Iri("http://schema.org/CotisationByYear")
- */
- #[ORM\Entity]
- class CotisationByYear
- {
- use TimestampableEntity;
- use CreatorUpdaterEntity;
- use ActivityYearTrait;
- /**
- * @var int
- */
- #[ORM\Column(type: 'integer')]
- #[ORM\Id]
- #[ORM\GeneratedValue(strategy: 'AUTO')]
- #[Groups(['cotisationbyyear', 'organization_cotisation_steps'])]
- private $id;
- /**
- * @var Organization
- */
- #[ORM\ManyToOne(targetEntity: 'Organization', inversedBy: 'cotisationByYears')]
- #[ORM\JoinColumn(name: 'organization_id', referencedColumnName: 'id', nullable: false)]
- #[Assert\NotNull]
- #[Groups(['cotisationbyyear'])]
- private $organization;
- /**
- * @var Organization
- */
- #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\Organization\CotisationStaffInfos', mappedBy: 'cotisationByYear', orphanRemoval: true, cascade: ['persist'], fetch: 'EAGER')]
- #[Groups(['cotisationbyyear', 'organization_cotisation_steps_cotisationbyyears'])]
- private $cotisationStaffInfos;
- /**
- * 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 organization
- *
- * @param \AppBundle\Entity\Organization\Organization $organization
- *
- * @return CotisationByYear
- */
- public function setOrganization(\AppBundle\Entity\Organization\Organization $organization)
- {
- $this->organization = $organization;
- return $this;
- }
- /**
- * Get organization
- *
- * @return \AppBundle\Entity\Organization\Organization
- */
- public function getOrganization()
- {
- return $this->organization;
- }
- /**
- * Set cotisationStaffInfos
- *
- * @param \AppBundle\Entity\Organization\CotisationStaffInfos $cotisationStaffInfos
- *
- * @return CotisationByYear
- */
- public function setCotisationStaffInfos(\AppBundle\Entity\Organization\CotisationStaffInfos $cotisationStaffInfos = null)
- {
- $cotisationStaffInfos->setCotisationByYear($this);
- $this->cotisationStaffInfos = $cotisationStaffInfos;
- return $this;
- }
- /**
- * Get cotisationStaffInfos
- *
- * @return \AppBundle\Entity\Organization\CotisationStaffInfos
- */
- public function getCotisationStaffInfos()
- {
- return $this->cotisationStaffInfos;
- }
- }
|