<?php
namespace App\Entity;
use App\Entity\User\User;
use App\Repository\TechnicRepository;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Timestampable\Traits\TimestampableEntity;
#[ORM\Entity(repositoryClass: TechnicRepository::class)]
class Technic
{
public const ROUTE_NAME_CREATE = 'TECHNIC_CREATE';
public const ROUTE_NAME_EDIT = 'TECHNIC_EDIT';
public const ROUTE_NAME_DETAIL = 'TECHNIC_DETAIL';
public const ROUTE_NAME_DELETE = 'TECHNIC_DELETE';
public const TYPE_SYSTEM_UNIT = 0;
public const TYPE_NOTEBOOK = 1;
public const TYPE_MONITOR = 2;
public const TYPE_PHONE = 3;
public const TYPE_TABLET = 4;
public const TYPES = [
self::TYPE_SYSTEM_UNIT => 'technic.type.systemUnit',
self::TYPE_NOTEBOOK => 'technic.type.notebook',
self::TYPE_MONITOR => 'technic.type.monitor',
self::TYPE_PHONE => 'technic.type.phone',
self::TYPE_TABLET => 'technic.type.tablet'
];
public const STATUS_IN_OPERATION = 0;
public const STATUS_NOT_USED = 1;
public const STATUS_UNDER_REPAIR = 2;
public const STATUS_BROKEN = 3;
public const STATUS_SOLD = 4;
public const STATUSES = [
self::STATUS_IN_OPERATION => 'technic.status.inOperation',
self::STATUS_NOT_USED => 'technic.status.notUsed',
self::STATUS_UNDER_REPAIR => 'technic.status.underRepair',
self::STATUS_BROKEN => 'technic.status.broken',
self::STATUS_SOLD => 'technic.status.sold'
];
public const DEPARTMENT_BED = 0;
public const DEPARTMENT_FED = 1;
public const DEPARTMENT_QA = 2;
public const DEPARTMENT_CM = 3;
public const DEPARTMENT_AM = 4;
public const DEPARTMENT_DES = 5;
public const DEPARTMENT_BACK_OFFICE = 6;
public const DEPARTMENT_HR = 7;
public const DEPARTMENT_CEO = 8;
public const DEPARTMENTS = [
self::DEPARTMENT_BED => 'technic.department.bed',
self::DEPARTMENT_FED => 'technic.department.fed',
self::DEPARTMENT_QA => 'technic.department.qa',
self::DEPARTMENT_CM => 'technic.department.cm',
self::DEPARTMENT_AM => 'technic.department.am',
self::DEPARTMENT_DES => 'technic.department.des',
self::DEPARTMENT_BACK_OFFICE => 'technic.department.backOffice',
self::DEPARTMENT_HR => 'technic.department.hr',
self::DEPARTMENT_CEO => 'technic.department.ceo'
];
use PrimaryIdTrait;
use TimestampableEntity;
#[ORM\Column(type: 'string', length: 25, nullable: true)]
private ?string $personalNumber;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $brand;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $model;
#[ORM\Column(type: 'string', length: 2048, nullable: true)]
private ?string $params;
#[ORM\Column(type: 'integer', nullable: true)]
private ?int $type;
#[ORM\Column(type: 'integer', nullable: true)]
private ?int $position;
#[ORM\ManyToOne(targetEntity: User::class, inversedBy: 'technic')]
private ?User $user;
#[ORM\Column(type: 'string', length: 50, nullable: true)]
private ?string $networkName;
#[ORM\Column(type: 'integer', nullable: true)]
private ?int $status;
#[ORM\Column(type: 'string', length: 2048, nullable: true)]
private ?string $comment;
public function getPersonalNumber(): ?string
{
return $this->personalNumber;
}
public function setPersonalNumber(?string $personalNumber): void
{
$this->personalNumber = $personalNumber;
}
public function getBrand(): ?string
{
return $this->brand;
}
public function setBrand(?string $brand): void
{
$this->brand = $brand;
}
public function getModel(): ?string
{
return $this->model;
}
public function setModel(?string $model): void
{
$this->model = $model;
}
public function getParams(): ?string
{
return $this->params;
}
public function setParams(?string $params): void
{
$this->params = $params;
}
public function getType(): ?int
{
return $this->type;
}
public function setType(?int $type): void
{
$this->type = $type;
}
public function getPosition(): ?int
{
return $this->position;
}
public function setPosition(?int $position): void
{
$this->position = $position;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): void
{
$this->user = $user;
}
public function getNetworkName(): ?string
{
return $this->networkName;
}
public function setNetworkName(?string $networkName): void
{
$this->networkName = $networkName;
}
public function getStatus(): ?int
{
return $this->status;
}
public function setStatus(?int $status): void
{
$this->status = $status;
}
public function getComment(): ?string
{
return $this->comment;
}
public function setComment(?string $comment): void
{
$this->comment = $comment;
}
}