src/Entity/Document.php line 15
<?phpnamespace App\Entity;use App\Repository\DocumentRepository;use App\Trait\CurrentStateTrait;use App\Trait\DateTrait;use DateTime;use DateTimeInterface;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;use Symfony\Component\Serializer\Annotation\Groups;#[ORM\Entity(repositoryClass: DocumentRepository::class)]class Document{use DateTrait{ DateTrait::__construct as dateConstruct;}use CurrentStateTrait;#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(length: 255)]#[Groups(['establishment:register'])]private ?string $name = null;#[ORM\ManyToOne]#[ORM\JoinColumn(nullable: false)]private ?Attachment $file = null;#[ORM\Column(length: 255)]#[Groups(['establishment:register'])]private ?string $type = null;#[ORM\Column]private ?bool $isVerified = false;#[ORM\ManyToOne(inversedBy: 'documents')]#[ORM\JoinColumn(nullable: false)]private ?Establishment $establishment = null;#[ORM\ManyToOne(inversedBy: 'documents')]private ?Client $client = null;#[ORM\ManyToOne(inversedBy: 'documents')]private ?Employee $employee = null;#[ORM\Column(type: Types::TEXT, nullable: true)]private ?string $content = null;#[ORM\ManyToOne(inversedBy: 'documents')]private ?Mutuality $mutuality = null;public function __construct(){$this->currentState = 'create';$this->dateConstruct();}public function getId(): ?int{return $this->id;}public function getName(): ?string{return $this->name;}public function setName(string $name): self{$this->name = $name;return $this;}public function getFile(): ?Attachment{return $this->file;}public function setFile(?Attachment $file): self{$this->file = $file;return $this;}public function getType(): ?string{return $this->type;}public function setType(string $type): self{$this->type = $type;return $this;}public function isIsVerified(): ?bool{return $this->isVerified;}public function setIsVerified(bool $isVerified): self{$this->isVerified = $isVerified;return $this;}public function getEstablishment(): ?Establishment{return $this->establishment;}public function setEstablishment(?Establishment $establishment): self{$this->establishment = $establishment;return $this;}public function getClient(): ?Client{return $this->client;}public function setClient(?Client $client): static{$this->client = $client;return $this;}public function getEmployee(): ?Employee{return $this->employee;}public function setEmployee(?Employee $employee): static{$this->employee = $employee;return $this;}public function getContent(): ?string{return $this->content;}public function setContent(?string $content): static{$this->content = $content;return $this;}public function getMutuality(): ?Mutuality{return $this->mutuality;}public function setMutuality(?Mutuality $mutuality): static{$this->mutuality = $mutuality;return $this;}}