| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363 |
- <?php
- declare(strict_types=1);
- namespace App\Service\Export\Model;
- use App\Entity\Core\File;
- /**
- * Modèle de données d'une licence CMF (d'organisation ou personnelle)
- */
- class LicenceCmf implements ExportModelInterface
- {
- /**
- * An id for the licence
- * @var int
- */
- private int $id;
- /**
- * Year of the licence
- * @var int
- */
- private int $year;
- /**
- * Is this the licence of an organization and not of a person?
- * @var bool
- */
- private bool $isOrganizationLicence;
- /**
- * Name of the organization
- * @var string
- */
- private string $organizationName;
- /**
- * Identifier of the organization
- * @var string
- */
- private string $organizationIdentifier;
- /**
- * Name of the federation
- * @var string|null
- */
- private string $federationName;
- /**
- * Color of the licence card for the given year
- * @var string
- */
- private string $color;
- /**
- * Organization's logo or Person's avatar
- * @var File|null
- */
- private ?File $logo = null;
- /**
- * CMF QrCode
- * @var File|null
- */
- private ?File $qrCode = null;
- /**
- * Gender of the licence owner
- * @var int|null
- */
- private ?int $personId = null;
- /**
- * Gender of the licence owner
- * @var string
- */
- private string $personGender = '';
- /**
- * First name of the licence owner
- * @var string
- */
- private string $personFirstName = '';
- /**
- * Name of the licence owner
- * @var string
- */
- private string $personLastName = '';
- /**
- * Avatar of the user (personal licence only)
- *
- * @var File|null
- */
- private ?File $personAvatar = null;
- /**
- * @return int
- */
- public function getId(): int
- {
- return $this->id;
- }
- /**
- * @param int $id
- * @return LicenceCmf
- */
- public function setId(int $id): self
- {
- $this->id = $id;
- return $this;
- }
- /**
- * @return int
- */
- public function getYear(): int
- {
- return $this->year;
- }
- /**
- * @param int $year
- * @return LicenceCmf
- */
- public function setYear(int $year): self
- {
- $this->year = $year;
- return $this;
- }
- /**
- * @return bool
- */
- public function isOrganizationLicence(): bool
- {
- return $this->isOrganizationLicence;
- }
- /**
- * @param bool $isOrganizationLicence
- * @return LicenceCmf
- */
- public function setIsOrganizationLicence(bool $isOrganizationLicence): self
- {
- $this->isOrganizationLicence = $isOrganizationLicence;
- return $this;
- }
- /**
- * @return string
- */
- public function getOrganizationName(): string
- {
- return $this->organizationName;
- }
- /**
- * @param string $organizationName
- * @return LicenceCmf
- */
- public function setOrganizationName(string $organizationName): self
- {
- $this->organizationName = $organizationName;
- return $this;
- }
- /**
- * @return string
- */
- public function getOrganizationIdentifier(): string
- {
- return $this->organizationIdentifier;
- }
- /**
- * @param string|null $organizationIdentifier
- * @return LicenceCmf
- */
- public function setOrganizationIdentifier(?string $organizationIdentifier): self
- {
- $this->organizationIdentifier = $organizationIdentifier;
- return $this;
- }
- /**
- * @return string|null
- */
- public function getFederationName(): ?string
- {
- return $this->federationName;
- }
- /**
- * @param string $federationName
- * @return LicenceCmf
- */
- public function setFederationName(string $federationName): self
- {
- $this->federationName = $federationName;
- return $this;
- }
- /**
- * @return string
- */
- public function getColor(): string
- {
- return $this->color;
- }
- /**
- * @param string $color
- * @return LicenceCmf
- */
- public function setColor(string $color): self
- {
- $this->color = $color;
- return $this;
- }
- /**
- * @return File|null
- */
- public function getLogo(): ?File
- {
- return $this->logo;
- }
- /**
- * @param File|null $logo
- * @return LicenceCmf
- */
- public function setLogo(?File $logo): LicenceCmf
- {
- $this->logo = $logo;
- return $this;
- }
- /**
- * @return File|null
- */
- public function getQrCode(): ?File
- {
- return $this->qrCode;
- }
- /**
- * @param File|null $qrCode
- * @return LicenceCmf
- */
- public function setQrCode(?File $qrCode): LicenceCmf
- {
- $this->qrCode = $qrCode;
- return $this;
- }
- /**
- * @return int
- */
- public function getPersonId(): int
- {
- return $this->personId;
- }
- /**
- * @param int|null $personId
- * @return LicenceCmf
- */
- public function setPersonId(?int $personId): self
- {
- $this->personId = $personId;
- return $this;
- }
- /**
- * @return string
- */
- public function getPersonGender(): string
- {
- return $this->personGender;
- }
- /**
- * @param string $personGender
- * @return LicenceCmf
- */
- public function setPersonGender(string $personGender): self
- {
- $this->personGender = $personGender;
- return $this;
- }
- /**
- * @return string
- */
- public function getPersonFirstName(): string
- {
- return $this->personFirstName;
- }
- /**
- * @param string $personFirstName
- * @return LicenceCmf
- */
- public function setPersonFirstName(string $personFirstName): self
- {
- $this->personFirstName = $personFirstName;
- return $this;
- }
- /**
- * @return string
- */
- public function getPersonLastName(): string
- {
- return $this->personLastName;
- }
- /**
- * @param string $personLastName
- * @return LicenceCmf
- */
- public function setPersonLastName(string $personLastName): self
- {
- $this->personLastName = $personLastName;
- return $this;
- }
- /**
- * @return File|null
- */
- public function getPersonAvatar(): ?File
- {
- return $this->personAvatar;
- }
- /**
- * @param File|null $personAvatar
- * @return LicenceCmf
- */
- public function setPersonAvatar(?File $personAvatar): LicenceCmf
- {
- $this->personAvatar = $personAvatar;
- return $this;
- }
- }
|