| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- <?php
- declare(strict_types=1);
- namespace App\Entity\Message;
- use App\Entity\Access\Access;
- use App\Entity\Organization\Organization;
- use App\Enum\Message\ReportMessageStatusEnum;
- use Doctrine\DBAL\Types\Types;
- use Symfony\Component\Validator\Constraints as Assert;
- use Doctrine\ORM\Mapping as ORM;
- /**
- * Classe ... qui ...
- */
- #[ORM\MappedSuperclass]
- class AbstractReport
- {
- #[ORM\Column(type: 'datetime', nullable: true)]
- protected ?\DatetimeInterface $dateSend;
- #[ORM\Column(length: 255)]
- #[Assert\Choice(callback: [ReportMessageStatusEnum::class, 'toArray'], message: 'invalid-report-type')]
- protected string $status;
- #[ORM\ManyToOne(inversedBy: 'report')]
- protected ?Access $access;
- #[ORM\ManyToOne(inversedBy: 'report')]
- protected ?Organization $organization;
- /**
- * @deprecated Ne sert qu'à la rétrocompatibilité avec la V1, pourra être supprimé une fois la migration terminée
- * @var string
- */
- #[ORM\Column(length: 255)]
- private string $recipientType = '(ap2i)';
- /**
- * @deprecated Ne sert qu'à la rétrocompatibilité avec la V1, pourra être supprimé une fois la migration terminée
- */
- #[ORM\Column(type: Types::INTEGER)]
- private int $recipientId = 0;
- public function getDateSend(): ?\DatetimeInterface
- {
- return $this->dateSend;
- }
- public function setDateSend(?\DatetimeInterface $dateSend): self
- {
- $this->dateSend = $dateSend;
- return $this;
- }
- public function getStatus(): string
- {
- return $this->status;
- }
- public function setStatus(string $status): self
- {
- $this->status = $status;
- return $this;
- }
- public function getAccess(): ?Access
- {
- return $this->access;
- }
- public function setAccess(?Access $access): self
- {
- $this->access = $access;
- return $this;
- }
- public function getOrganization(): ?Organization
- {
- return $this->organization;
- }
- public function setOrganization(?Organization $organization): self
- {
- $this->organization = $organization;
- return $this;
- }
- /**
- * @deprecated Ne sert qu'à la rétrocompatibilité avec la V1, pourra être supprimé une fois la migration terminée
- * @return string
- */
- public function getRecipientType(): string
- {
- return $this->recipientType;
- }
- /**
- * @deprecated Ne sert qu'à la rétrocompatibilité avec la V1, pourra être supprimé une fois la migration terminée
- * @param string $recipientType
- */
- public function setRecipientType(string $recipientType): void
- {
- $this->recipientType = $recipientType;
- }
- /**
- * @deprecated Ne sert qu'à la rétrocompatibilité avec la V1, pourra être supprimé une fois la migration terminée
- * @return int
- */
- public function getRecipientId(): int
- {
- return $this->recipientId;
- }
- /**
- * @deprecated Ne sert qu'à la rétrocompatibilité avec la V1, pourra être supprimé une fois la migration terminée
- * @param int $recipientId
- */
- public function setRecipientId(int $recipientId): void
- {
- $this->recipientId = $recipientId;
- }
- }
|