'NOBODY'])] private string $visibility = 'NOBODY'; /** * Configuration particulière associée au fichier (exemple: image recadrée) * @var string|null */ #[ORM\Column(type: 'text', nullable: true)] private ?string $config; /** * Dossier contenant le fichier * @var string */ #[ORM\Column(length: 24)] private string $folder; /** * Type de document (uploaded, mail, bill...etc) * @var string */ #[ORM\Column(length: 50, options: ['default' => 'NONE'])] private string $type = "NONE"; /** * Taille du document en octets * @var int|null */ #[ORM\Column] private ?int $size; /** * Un fichier est temporaire par exemple s'il a été généré et est stocké pour être téléchargé dans la foulée * Les fichiers temporaires peuvent être supprimés sans risque, à l'inverse des fichiers uploadés par les * utilisateurs par exemple. * * @var boolean */ #[ORM\Column(options: ['default' => false])] private bool $isTemporaryFile = false; /** * Date de création du fichier * @var DateTime */ #[ORM\Column] private DateTime $createDate; /** * Id de l'access ayant créé ce fichier * @var int|null */ #[ORM\Column] private ?int $createdBy; /** * Date de dernière mise à jour du fichier * @var DateTime */ #[ORM\Column] private DateTime $updateDate; /** * Id de l'access ayant mis à jour ce fichier le dernier * @var int|null */ #[ORM\Column] private ?int $updatedBy; // #[ORM\Column] // private ?int $eventReport_id; // // #[ORM\Column] // private ?\DateTime $availabilityDate; // // #[ORM\Column] // private ?int $documentWish_id; // // #[ORM\Column] // private ?int $onlineRegistrationSetting_id; // // #[ORM\Column] // private ?int $templateSystem_id; // // #[ORM\Column] // private ?int $work_id; #[ORM\OneToMany(mappedBy: 'image', targetEntity: Person::class, orphanRemoval: true)] private Collection $personImages; #[Pure] public function __construct() { $this->personImages = new ArrayCollection(); } public function getId(): ?int { return $this->id; } /** * @return Person */ public function getPerson(): Person { return $this->person; } /** * @param Person $person */ public function setPerson(Person $person): void { $this->person = $person; } /** * @return Organization */ public function getOrganization(): Organization { return $this->organization; } /** * @param Organization $organization */ public function setOrganization(Organization $organization): void { $this->organization = $organization; } public function getSlug(): string { return $this->slug; } public function setSlug(string $slug): self { $this->slug = $slug; return $this; } public function getPath(): string { return $this->path; } public function setPath(string $path): self { $this->path = $path; return $this; } public function getName(): string { return $this->name; } public function setName(string $name): self { $this->name = $name; return $this; } public function getMimeType(): ?string { return $this->mimeType; } public function setMimeType(?string $mimeType): self { $this->mimeType = $mimeType; return $this; } public function getPersonImages(): Collection { return $this->personImages; } public function addPersonImage (Person $person): self { if (!$this->personImages->contains($person)) { $this->personImages[] = $person; $person->setImage($this); } return $this; } public function removePersonImage(Person $person): self { if ($this->personImages->removeElement($person)) { // set the owning side to null (unless already changed) if ($person->getImage() === $this) { $person->setImage(null); } } return $this; } /** * @return string */ public function getVisibility(): string { return $this->visibility; } /** * @param string $visibility */ public function setVisibility(string $visibility): void { $this->visibility = $visibility; } /** * @return string|null */ public function getConfig(): ?string { return $this->config; } /** * @param string|null $config */ public function setConfig(?string $config): void { $this->config = $config; } /** * @return string */ public function getFolder(): string { return $this->folder; } /** * @param string $folder */ public function setFolder(string $folder): void { $this->folder = $folder; } /** * @return string */ public function getType(): string { return $this->type; } /** * @param string $type */ public function setType(string $type): void { $this->type = $type; } /** * @return int|null */ public function getSize(): ?int { return $this->size; } /** * @param int|null $size */ public function setSize(?int $size): void { $this->size = $size; } /** * @return bool */ public function getIsTemporaryFile(): bool { return $this->isTemporaryFile; } /** * @param bool $isTemporaryFile */ public function setIsTemporaryFile(bool $isTemporaryFile): void { $this->isTemporaryFile = $isTemporaryFile; } /** * @return DateTime */ public function getCreateDate(): DateTime { return $this->createDate; } /** * @param DateTime $createDate */ public function setCreateDate(DateTime $createDate): void { $this->createDate = $createDate; } /** * @return int|null */ public function getCreatedBy(): ?int { return $this->createdBy; } /** * @param int|null $createdBy */ public function setCreatedBy(?int $createdBy): void { $this->createdBy = $createdBy; } /** * @return DateTime */ public function getUpdateDate(): DateTime { return $this->updateDate; } /** * @param DateTime $updateDate */ public function setUpdateDate(DateTime $updateDate): void { $this->updateDate = $updateDate; } /** * @return int|null */ public function getUpdatedBy(): ?int { return $this->updatedBy; } /** * @param int|null $updatedBy */ public function setUpdatedBy(?int $updatedBy): void { $this->updatedBy = $updatedBy; } }