<?php
namespace App\Entity;
use App\Entity\TimestampableTrait;
use App\Repository\FonctionRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=FonctionRepository::class)
*/
class Fonction
{
use TimestampableTrait;
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=Transporteur::class)
* @ORM\JoinColumn(nullable=true, onDelete="CASCADE")
*/
private $transporteur;
/**
* @ORM\Column(type="string", length=255)
*/
private $name;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $description;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $icon;
/**
* @ORM\Column(type="json", nullable=true)
*/
private $roleVehicle = [];
/**
* @ORM\Column(type="json", nullable=true)
*/
private $roleVehicleGroup = [];
/**
* @ORM\Column(type="json", nullable=true)
*/
private $roleVehicleType = [];
/**
* @ORM\Column(type="json", nullable=true)
*/
private $roleAtelierAquisition = [];
/**
* @ORM\Column(type="json", nullable=true)
*/
private $roleAtelierAttachment = [];
/**
* @ORM\Column(type="json", nullable=true)
*/
private $roleAtelierCarburant = [];
/**
* @ORM\Column(type="boolean")
*/
private $status = false;
/**
* @ORM\Column(type="json", nullable=true)
*/
private $roleAtelierAssurance = [];
/**
* @ORM\Column(type="json", nullable=true)
*/
private $roleAtelierVignette = [];
/**
* @ORM\Column(type="json", nullable=true)
*/
private $roleAtelierTaxe = [];
/**
* @ORM\Column(type="json", nullable=true)
*/
private $roleAtelierAutorisation = [];
/**
* @ORM\Column(type="json", nullable=true)
*/
private $roleAtelierCarnet = [];
/**
* @ORM\Column(type="json", nullable=true)
*/
private $roleAtelierAccident = [];
/**
* @ORM\Column(type="json")
*/
private $roleAtelierService = [];
/**
* @ORM\Column(type="json", nullable=true)
*/
private $roleAtelierPneumatique = [];
/**
* @ORM\Column(type="json", nullable=true)
*/
private $roleAtelierExtincteur = [];
/**
* @ORM\Column(type="json", nullable=true)
*/
private $roleAtelierMarque = [];
/**
* @ORM\Column(type="json", nullable=true)
*/
private $roleAchat = [];
/**
* @ORM\Column(type="json", nullable=true)
*/
private $roleCollaborateur = [];
/**
* @ORM\Column(type="json", nullable=true)
*/
private $roleGestionCollaborateurs = [];
/**
* @ORM\OneToMany(targetEntity=Collaborateur::class, mappedBy="fonction")
*/
private $collaborateurs;
/**
* @ORM\Column(type="json", nullable=true)
*/
private $roleClient = [];
/**
* @ORM\Column(type="json", nullable=true)
*/
private $roleVoyage = [];
/**
* @ORM\Column(type="json", nullable=true)
*/
private $roleGeofence = [];
/**
* @ORM\Column(type="json", nullable=true)
*/
private $roleSuivi = [];
/**
* @ORM\Column(type="json", nullable=true)
*/
private $roleModule = [];
/**
* @ORM\Column(type="json", nullable=true)
*/
private $roleAgenda = [];
/**
* @ORM\Column(type="json", nullable=true)
*/
private $rolePage = [];
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $iconColor;
public function __construct()
{
$this->collaborateurs = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getTransporteur(): ?Transporteur
{
return $this->transporteur;
}
public function setTransporteur(?Transporteur $transporteur): self
{
$this->transporteur = $transporteur;
return $this;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): self
{
$this->description = $description;
return $this;
}
public function getIcon(): ?string
{
return $this->icon;
}
public function setIcon(?string $icon): self
{
$this->icon = $icon;
return $this;
}
public function getRoleVehicle(): ?array
{
return $this->roleVehicle;
}
public function setRoleVehicle(?array $roleVehicle): self
{
$this->roleVehicle = $roleVehicle;
return $this;
}
public function getRoleVehicleGroup(): ?array
{
return $this->roleVehicleGroup;
}
public function setRoleVehicleGroup(?array $roleVehicleGroup): self
{
$this->roleVehicleGroup = $roleVehicleGroup;
return $this;
}
public function getRoleVehicleType(): ?array
{
return $this->roleVehicleType;
}
public function setRoleVehicleType(?array $roleVehicleType): self
{
$this->roleVehicleType = $roleVehicleType;
return $this;
}
public function getRoleAtelierAquisition(): ?array
{
return $this->roleAtelierAquisition;
}
public function setRoleAtelierAquisition(?array $roleAtelierAquisition): self
{
$this->roleAtelierAquisition = $roleAtelierAquisition;
return $this;
}
public function getRoleAtelierAttachment(): ?array
{
return $this->roleAtelierAttachment;
}
public function setRoleAtelierAttachment(?array $roleAtelierAttachment): self
{
$this->roleAtelierAttachment = $roleAtelierAttachment;
return $this;
}
public function getRoleAtelierCarburant(): ?array
{
return $this->roleAtelierCarburant;
}
public function setRoleAtelierCarburant(?array $roleAtelierCarburant): self
{
$this->roleAtelierCarburant = $roleAtelierCarburant;
return $this;
}
public function isStatus(): ?bool
{
return $this->status;
}
public function setStatus(bool $status): self
{
$this->status = $status;
return $this;
}
public function getRoleAtelierAssurance(): ?array
{
return $this->roleAtelierAssurance;
}
public function setRoleAtelierAssurance(?array $roleAtelierAssurance): self
{
$this->roleAtelierAssurance = $roleAtelierAssurance;
return $this;
}
public function getRoleAtelierVignette(): ?array
{
return $this->roleAtelierVignette;
}
public function setRoleAtelierVignette(?array $roleAtelierVignette): self
{
$this->roleAtelierVignette = $roleAtelierVignette;
return $this;
}
public function getRoleAtelierTaxe(): ?array
{
return $this->roleAtelierTaxe;
}
public function setRoleAtelierTaxe(?array $roleAtelierTaxe): self
{
$this->roleAtelierTaxe = $roleAtelierTaxe;
return $this;
}
public function getRoleAtelierAutorisation(): ?array
{
return $this->roleAtelierAutorisation;
}
public function setRoleAtelierAutorisation(?array $roleAtelierAutorisation): self
{
$this->roleAtelierAutorisation = $roleAtelierAutorisation;
return $this;
}
public function getRoleAtelierCarnet(): ?array
{
return $this->roleAtelierCarnet;
}
public function setRoleAtelierCarnet(?array $roleAtelierCarnet): self
{
$this->roleAtelierCarnet = $roleAtelierCarnet;
return $this;
}
public function getRoleAtelierAccident(): ?array
{
return $this->roleAtelierAccident;
}
public function setRoleAtelierAccident(?array $roleAtelierAccident): self
{
$this->roleAtelierAccident = $roleAtelierAccident;
return $this;
}
public function getRoleAtelierService(): ?array
{
return $this->roleAtelierService;
}
public function setRoleAtelierService(array $roleAtelierService): self
{
$this->roleAtelierService = $roleAtelierService;
return $this;
}
public function getRoleAtelierPneumatique(): ?array
{
return $this->roleAtelierPneumatique;
}
public function setRoleAtelierPneumatique(?array $roleAtelierPneumatique): self
{
$this->roleAtelierPneumatique = $roleAtelierPneumatique;
return $this;
}
public function getRoleAtelierExtincteur(): ?array
{
return $this->roleAtelierExtincteur;
}
public function setRoleAtelierExtincteur(?array $roleAtelierExtincteur): self
{
$this->roleAtelierExtincteur = $roleAtelierExtincteur;
return $this;
}
public function getRoleAtelierMarque(): ?array
{
return $this->roleAtelierMarque;
}
public function setRoleAtelierMarque(?array $roleAtelierMarque): self
{
$this->roleAtelierMarque = $roleAtelierMarque;
return $this;
}
public function getRoleAchat(): ?array
{
return $this->roleAchat;
}
public function setRoleAchat(?array $roleAchat): self
{
$this->roleAchat = $roleAchat;
return $this;
}
public function getRoleCollaborateur(): ?array
{
return $this->roleCollaborateur;
}
public function setRoleCollaborateur(?array $roleCollaborateur): self
{
$this->roleCollaborateur = $roleCollaborateur;
return $this;
}
public function getRoleGestionCollaborateurs(): ?array
{
return $this->roleGestionCollaborateurs;
}
public function setRoleGestionCollaborateurs(?array $roleGestionCollaborateurs): self
{
$this->roleGestionCollaborateurs = $roleGestionCollaborateurs;
return $this;
}
/**
* @return Collection<int, Collaborateur>
*/
public function getCollaborateurs(): Collection
{
return $this->collaborateurs;
}
public function addCollaborateur(Collaborateur $collaborateur): self
{
if (!$this->collaborateurs->contains($collaborateur)) {
$this->collaborateurs[] = $collaborateur;
$collaborateur->setFonction($this);
}
return $this;
}
public function removeCollaborateur(Collaborateur $collaborateur): self
{
if ($this->collaborateurs->removeElement($collaborateur)) {
// set the owning side to null (unless already changed)
if ($collaborateur->getFonction() === $this) {
$collaborateur->setFonction(null);
}
}
return $this;
}
public function getRoleClient(): ?array
{
return $this->roleClient;
}
public function setRoleClient(?array $roleClient): self
{
$this->roleClient = $roleClient;
return $this;
}
public function getRoleVoyage(): ?array
{
return $this->roleVoyage;
}
public function setRoleVoyage(?array $roleVoyage): self
{
$this->roleVoyage = $roleVoyage;
return $this;
}
public function getRoleGeofence(): ?array
{
return $this->roleGeofence;
}
public function setRoleGeofence(?array $roleGeofence): self
{
$this->roleGeofence = $roleGeofence;
return $this;
}
public function getRoleSuivi(): ?array
{
return $this->roleSuivi;
}
public function setRoleSuivi(?array $roleSuivi): self
{
$this->roleSuivi = $roleSuivi;
return $this;
}
public function getRoleModule(): ?array
{
return $this->roleModule;
}
public function setRoleModule(?array $roleModule): self
{
$this->roleModule = $roleModule;
return $this;
}
public function getRoleAgenda(): ?array
{
return $this->roleAgenda;
}
public function setRoleAgenda(?array $roleAgenda): self
{
$this->roleAgenda = $roleAgenda;
return $this;
}
public function getRolePage(): ?array
{
return $this->rolePage;
}
public function setRolePage(?array $rolePage): self
{
$this->rolePage = $rolePage;
return $this;
}
public function getIconColor(): ?string
{
return $this->iconColor;
}
public function setIconColor(?string $iconColor): self
{
$this->iconColor = $iconColor;
return $this;
}
}