src/Entity/Document.php line 15

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\DocumentRepository;
  4. use App\Trait\CurrentStateTrait;
  5. use App\Trait\DateTrait;
  6. use DateTime;
  7. use DateTimeInterface;
  8. use Doctrine\DBAL\Types\Types;
  9. use Doctrine\ORM\Mapping as ORM;
  10. use Symfony\Component\Serializer\Annotation\Groups;
  11. #[ORM\Entity(repositoryClassDocumentRepository::class)]
  12. class Document
  13. {
  14.     use DateTraitDateTrait::__construct as dateConstruct;}
  15.     use CurrentStateTrait;
  16.     #[ORM\Id]
  17.     #[ORM\GeneratedValue]
  18.     #[ORM\Column]
  19.     private ?int $id null;
  20.     #[ORM\Column(length255)]
  21.     #[Groups(['establishment:register'])]
  22.     private ?string $name null;
  23.     #[ORM\ManyToOne]
  24.     #[ORM\JoinColumn(nullablefalse)]
  25.     private ?Attachment $file null;
  26.     #[ORM\Column(length255)]
  27.     #[Groups(['establishment:register'])]
  28.     private ?string $type null;
  29.     #[ORM\Column]
  30.     private ?bool $isVerified false;
  31.     #[ORM\ManyToOne(inversedBy'documents')]
  32.     #[ORM\JoinColumn(nullablefalse)]
  33.     private ?Establishment $establishment null;
  34.     #[ORM\ManyToOne(inversedBy'documents')]
  35.     private ?Client $client null;
  36.     #[ORM\ManyToOne(inversedBy'documents')]
  37.     private ?Employee $employee null;
  38.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  39.     private ?string $content null;
  40.     #[ORM\ManyToOne(inversedBy'documents')]
  41.     private ?Mutuality $mutuality null;
  42.     public function __construct()
  43.     {
  44.         $this->currentState 'create';
  45.         $this->dateConstruct();
  46.     }
  47.     public function getId(): ?int
  48.     {
  49.         return $this->id;
  50.     }
  51.     public function getName(): ?string
  52.     {
  53.         return $this->name;
  54.     }
  55.     public function setName(string $name): self
  56.     {
  57.         $this->name $name;
  58.         return $this;
  59.     }
  60.     public function getFile(): ?Attachment
  61.     {
  62.         return $this->file;
  63.     }
  64.     public function setFile(?Attachment $file): self
  65.     {
  66.         $this->file $file;
  67.         return $this;
  68.     }
  69.     public function getType(): ?string
  70.     {
  71.         return $this->type;
  72.     }
  73.     public function setType(string $type): self
  74.     {
  75.         $this->type $type;
  76.         return $this;
  77.     }
  78.     public function isIsVerified(): ?bool
  79.     {
  80.         return $this->isVerified;
  81.     }
  82.     public function setIsVerified(bool $isVerified): self
  83.     {
  84.         $this->isVerified $isVerified;
  85.         return $this;
  86.     }
  87.     public function getEstablishment(): ?Establishment
  88.     {
  89.         return $this->establishment;
  90.     }
  91.     public function setEstablishment(?Establishment $establishment): self
  92.     {
  93.         $this->establishment $establishment;
  94.         return $this;
  95.     }
  96.     public function getClient(): ?Client
  97.     {
  98.         return $this->client;
  99.     }
  100.     public function setClient(?Client $client): static
  101.     {
  102.         $this->client $client;
  103.         return $this;
  104.     }
  105.     public function getEmployee(): ?Employee
  106.     {
  107.         return $this->employee;
  108.     }
  109.     public function setEmployee(?Employee $employee): static
  110.     {
  111.         $this->employee $employee;
  112.         return $this;
  113.     }
  114.     public function getContent(): ?string
  115.     {
  116.         return $this->content;
  117.     }
  118.     public function setContent(?string $content): static
  119.     {
  120.         $this->content $content;
  121.         return $this;
  122.     }
  123.     public function getMutuality(): ?Mutuality
  124.     {
  125.         return $this->mutuality;
  126.     }
  127.     public function setMutuality(?Mutuality $mutuality): static
  128.     {
  129.         $this->mutuality $mutuality;
  130.         return $this;
  131.     }
  132. }