| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200 |
- <?php
- namespace AppBundle\Entity\Organization;
- use AppBundle\Entity\AccessAndFunction\Access;
- 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;
- /**
- * Licence possédée par une Organization
- *
- * @Iri("http://schema.org/OrganizationLicence")
- */
- #[ORM\Entity]
- class OrganizationLicence
- {
- use TimestampableEntity;
- use CreatorUpdaterEntity;
- /**
- * @var int
- */
- #[ORM\Column(type: 'integer')]
- #[ORM\Id]
- #[ORM\GeneratedValue(strategy: 'AUTO')]
- #[Groups(['organizationlicence', 'organization_details'])]
- private $id;
- /**
- * @var Organization
- */
- #[ORM\ManyToOne(targetEntity: 'Organization', inversedBy: 'organizationLicences')]
- #[ORM\JoinColumn(name: 'organization_id', referencedColumnName: 'id', nullable: false)]
- #[Assert\NotNull]
- #[Groups(['organizationlicence'])]
- private $organization;
- /**
- * @var Access
- */
- #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', inversedBy: 'organizationLicences')]
- #[ORM\JoinColumn(nullable: false)]
- #[Assert\NotNull]
- #[Groups(['organizationlicence', 'organization_details_organizationlicences'])]
- private $licensee;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Groups(['organizationlicence', 'organization_details_organizationlicences'])]
- private $licenceNumber;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Groups(['organizationlicence', 'organization_details_organizationlicences'])]
- private $categorie;
- /**
- * @var \DateTime
- */
- #[ORM\Column(type: 'date', nullable: true)]
- #[Assert\Date]
- #[Groups(['organizationlicence', 'organization_details_organizationlicences'])]
- private $validityDate;
- /**
- * 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 Organization.
- *
- * @param Organization $organization
- *
- * @return $this
- */
- public function setOrganization(Organization $organization = null)
- {
- $this->organization = $organization;
- return $this;
- }
- /**
- * Gets organization.
- *
- * @return Organization
- */
- public function getOrganization()
- {
- return $this->organization;
- }
- /**
- * Sets Access.
- *
- * @param Access $licensee
- *
- * @return $this
- */
- public function setLicensee(Access $licensee = null)
- {
- $this->licensee = $licensee;
- return $this;
- }
- /**
- * Gets licensee.
- *
- * @return Access
- */
- public function getLicensee()
- {
- return $this->licensee;
- }
- /**
- * Sets licenceNumber.
- *
- * @param string $licenceNumber
- *
- * @return $this
- */
- public function setLicenceNumber($licenceNumber)
- {
- $this->licenceNumber = $licenceNumber;
- return $this;
- }
- /**
- * Gets licenceNumber.
- *
- * @return string
- */
- public function getLicenceNumber()
- {
- return $this->licenceNumber;
- }
- /**
- * Sets categorie.
- *
- * @param string $categorie
- *
- * @return $this
- */
- public function setCategorie($categorie)
- {
- $this->categorie = $categorie;
- return $this;
- }
- /**
- * Gets categorie.
- *
- * @return string
- */
- public function getCategorie()
- {
- return $this->categorie;
- }
- /**
- * Sets validityDate.
- *
- * @param \DateTime $validityDate
- *
- * @return $this
- */
- public function setValidityDate(\DateTime $validityDate = null)
- {
- $this->validityDate = $validityDate;
- return $this;
- }
- /**
- * Gets validityDate.
- *
- * @return \DateTime
- */
- public function getValidityDate()
- {
- return $this->validityDate;
- }
- }
|