WIP: Implement model
This commit is contained in:
1 parent
35ca61d21b
commit
f8c9ff82a5
35 files changed
+2935
No files matched your search
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use App\Entity\Traits\BlameableEntity;
|
||||
use App\Entity\Traits\TimestampableEntity;
|
||||
use App\Repository\JobProfileRepository;
|
||||
use Doctrine\DBAL\Types\Types;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Uid\Uuid;
|
||||
|
||||
#[ORM\Entity(repositoryClass: JobProfileRepository::class)]
|
||||
class JobProfile implements BlameableEntityInterface, TimestampableEntityInterface
|
||||
{
|
||||
use BlameableEntity;
|
||||
use TimestampableEntity;
|
||||
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column]
|
||||
private ?int $id = null;
|
||||
|
||||
#[ORM\Column(type: 'string', length: 36, unique: true)]
|
||||
private string $uuid;
|
||||
|
||||
#[ORM\Column(length: 255)]
|
||||
private ?string $name = null;
|
||||
|
||||
#[ORM\ManyToOne]
|
||||
private ?Training $requiredTraining = null;
|
||||
|
||||
#[ORM\Column(type: Types::JSON)]
|
||||
private array $requiredLicenses = [];
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->uuid = Uuid::v4();
|
||||
}
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getUuid(): string
|
||||
{
|
||||
return $this->uuid;
|
||||
}
|
||||
|
||||
public function getName(): ?string
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
public function setName(string $name): static
|
||||
{
|
||||
$this->name = $name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getRequiredTraining(): ?Training
|
||||
{
|
||||
return $this->requiredTraining;
|
||||
}
|
||||
|
||||
public function setRequiredTraining(?Training $requiredTraining): static
|
||||
{
|
||||
$this->requiredTraining = $requiredTraining;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getRequiredLicenses(): array
|
||||
{
|
||||
return $this->requiredLicenses;
|
||||
}
|
||||
|
||||
public function setRequiredLicenses(array $requiredLicenses): static
|
||||
{
|
||||
$this->requiredLicenses = $requiredLicenses;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user