src/Entity/Journal.php line 11
<?phpnamespace App\Entity;use App\Repository\JournalRepository;use App\Trait\DateTrait;use DateTimeImmutable;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: JournalRepository::class)]class Journal{use DateTrait;#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(nullable: true)]private array $orders = [];#[ORM\Column(nullable: true)]private array $articles = [];#[ORM\Column(nullable: true)]private array $articleDepartments = [];#[ORM\Column(nullable: true)]private array $clients = [];#[ORM\Column(nullable: true)]private array $supplies = [];#[ORM\Column(nullable: true)]private array $articleSupplies = [];#[ORM\Column(nullable: true)]private array $operations = [];#[ORM\Column(nullable: true)]private array $plannings = [];#[ORM\Column(nullable: true)]private array $departments = [];#[ORM\Column(nullable: true)]private array $employees = [];#[ORM\Column(nullable: true)]private array $invitations = [];#[ORM\ManyToOne]#[ORM\JoinColumn(nullable: false)]private ?User $author = null;#[ORM\Column(nullable: true)]private array $attendances = [];#[ORM\ManyToOne(inversedBy: 'journals')]#[ORM\JoinColumn(nullable: false)]private ?Establishment $establishment = null;public function __construct(){if (is_null($this->createdAt)) $this->createdAt = new DateTimeImmutable();$this->updatedAt = new DateTimeImmutable();}public function getId(): ?int{return $this->id;}public function getOrders(): array{return $this->orders;}public function setOrders(?array $orders): self{$this->orders = $orders;return $this;}public function getArticles(): array{return $this->articles;}public function setArticles(?array $articles): self{$this->articles = $articles;return $this;}public function getArticleDepartments(): array{return $this->articleDepartments;}public function setArticleDepartments(?array $articleDepartments): self{$this->articleDepartments = $articleDepartments;return $this;}public function getClients(): array{return $this->clients;}public function setClients(?array $clients): self{$this->clients = $clients;return $this;}public function getSupplies(): array{return $this->supplies;}public function setSupplies(?array $supplies): self{$this->supplies = $supplies;return $this;}public function getArticleSupplies(): array{return $this->articleSupplies;}public function setArticleSupplies(?array $articleSupplies): self{$this->articleSupplies = $articleSupplies;return $this;}public function getOperations(): array{return $this->operations;}public function setOperations(?array $operations): self{$this->operations = $operations;return $this;}public function getPlannings(): array{return $this->plannings;}public function setPlannings(?array $plannings): self{$this->plannings = $plannings;return $this;}public function getDepartments(): array{return $this->departments;}public function setDepartments(?array $departments): self{$this->departments = $departments;return $this;}public function getEmployees(): array{return $this->employees;}public function setEmployees(?array $employees): self{$this->employees = $employees;return $this;}public function getInvitations(): array{return $this->invitations;}public function setInvitations(?array $invitations): self{$this->invitations = $invitations;return $this;}public function getAuthor(): ?User{return $this->author;}public function setAuthor(?User $author): self{$this->author = $author;return $this;}public function getAttendances(): array{return $this->attendances;}public function setAttendances(?array $attendances): self{$this->attendances = $attendances;return $this;}public function getEstablishment(): ?Establishment{return $this->establishment;}public function setEstablishment(?Establishment $establishment): self{$this->establishment = $establishment;return $this;}public function __toString(): string{return "Journal du {$this->getCreatedAt()->format('d/M/Y')}";}}