Missing IncidentType & Incident + Mission & Category relations
This commit is contained in:
parent
168ff58d15
commit
1531c122b8
25
src/Entity/Assignment.php
Normal file
25
src/Entity/Assignment.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
#[ORM\Table(name: 'Assignment')]
|
||||
class Assignment
|
||||
{
|
||||
#[ORM\Id]
|
||||
#[ORM\OneToMany(targetEntity: Employee::class, mappedBy: 'assignments')]
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
private ?Employee $employee = null;
|
||||
|
||||
#[ORM\Id]
|
||||
#[ORM\OneToMany(targetEntity: Ride::class, mappedBy: 'assignments')]
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
private ?Ride $ride = null;
|
||||
|
||||
#[ORM\Column]
|
||||
private ?\DateTime $startHour = null;
|
||||
|
||||
#[ORM\Column]
|
||||
private ?\DateTime $endHour = null;
|
||||
}
|
19
src/Entity/EmployeeIncident.php
Normal file
19
src/Entity/EmployeeIncident.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
#[ORM\Table(name: 'EmployeeIncident')]
|
||||
class EmployeeIncident
|
||||
{
|
||||
#[ORM\Id]
|
||||
#[ORM\OneToMany(targetEntity: Employee::class, mappedBy: 'EmployeeIncidents')]
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
private ?Employee $employee = null;
|
||||
|
||||
#[ORM\Id]
|
||||
#[ORM\OneToMany(targetEntity: Incident::class, mappedBy: 'EmployeeIncidents')]
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
private ?Incident $incident = null;
|
||||
}
|
20
src/Entity/EmployeeMission.php
Normal file
20
src/Entity/EmployeeMission.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use App\Repository\EmployeeMissionRepository;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
#[ORM\Entity(repositoryClass: EmployeeMissionRepository::class)]
|
||||
class EmployeeMission
|
||||
{
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column]
|
||||
private ?int $id = null;
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
}
|
19
src/Entity/EmployeeSkill.php
Normal file
19
src/Entity/EmployeeSkill.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
#[ORM\Table(name: 'Requirements')]
|
||||
class Requirements
|
||||
{
|
||||
#[ORM\Id]
|
||||
#[ORM\OneToMany(targetEntity: Mission::class, mappedBy: 'requirements')]
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
private ?Mission $mission = null;
|
||||
|
||||
#[ORM\Id]
|
||||
#[ORM\OneToMany(targetEntity: Skill::class, mappedBy: 'requirements')]
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
private ?Skill $skill = null;
|
||||
}
|
45
src/Entity/Representation.php
Normal file
45
src/Entity/Representation.php
Normal file
@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
#[ORM\Table(name: 'Representation')]
|
||||
class Representation
|
||||
{
|
||||
#[ORM\Id]
|
||||
#[ORM\OneToMany(targetEntity: Employee::class, mappedBy: 'representations')]
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
private ?Employee $employee = null;
|
||||
|
||||
#[ORM\Id]
|
||||
#[ORM\OneToMany(targetEntity: Ride::class, mappedBy: 'representations')]
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
private ?Ride $ride = null;
|
||||
|
||||
#[ORM\Column]
|
||||
private ?int $count = null;
|
||||
|
||||
public function getCount(): ?int
|
||||
{
|
||||
return $this->count;
|
||||
}
|
||||
|
||||
public function setCount(?int $count): void
|
||||
{
|
||||
$this->count = $count;
|
||||
}
|
||||
|
||||
#[ORM\Column]
|
||||
private ?\DateTime $date = null;
|
||||
|
||||
public function getDate(): ?\DateTime
|
||||
{
|
||||
return $this->date;
|
||||
}
|
||||
|
||||
public function setDate(?\DateTime $date): void
|
||||
{
|
||||
$this->date = $date;
|
||||
}
|
||||
}
|
@ -2,10 +2,10 @@
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use App\Repository\RequirementsRepository;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
|
||||
#[ORM\Table(name: 'Requirements')]
|
||||
class Requirements
|
||||
{
|
||||
#[ORM\Id]
|
Loading…
Reference in New Issue
Block a user