src/Entity/Technic.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\User\User;
  4. use App\Repository\TechnicRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Gedmo\Timestampable\Traits\TimestampableEntity;
  7. #[ORM\Entity(repositoryClassTechnicRepository::class)]
  8. class Technic
  9. {
  10.     public const ROUTE_NAME_CREATE 'TECHNIC_CREATE';
  11.     public const ROUTE_NAME_EDIT 'TECHNIC_EDIT';
  12.     public const ROUTE_NAME_DETAIL 'TECHNIC_DETAIL';
  13.     public const ROUTE_NAME_DELETE 'TECHNIC_DELETE';
  14.     public const TYPE_SYSTEM_UNIT 0;
  15.     public const TYPE_NOTEBOOK 1;
  16.     public const TYPE_MONITOR 2;
  17.     public const TYPE_PHONE 3;
  18.     public const TYPE_TABLET 4;
  19.     public const TYPES = [
  20.         self::TYPE_SYSTEM_UNIT => 'technic.type.systemUnit',
  21.         self::TYPE_NOTEBOOK => 'technic.type.notebook',
  22.         self::TYPE_MONITOR => 'technic.type.monitor',
  23.         self::TYPE_PHONE => 'technic.type.phone',
  24.         self::TYPE_TABLET => 'technic.type.tablet'
  25.     ];
  26.     public const STATUS_IN_OPERATION 0;
  27.     public const STATUS_NOT_USED 1;
  28.     public const STATUS_UNDER_REPAIR 2;
  29.     public const STATUS_BROKEN 3;
  30.     public const STATUS_SOLD 4;
  31.     public const STATUSES = [
  32.         self::STATUS_IN_OPERATION => 'technic.status.inOperation',
  33.         self::STATUS_NOT_USED => 'technic.status.notUsed',
  34.         self::STATUS_UNDER_REPAIR => 'technic.status.underRepair',
  35.         self::STATUS_BROKEN => 'technic.status.broken',
  36.         self::STATUS_SOLD => 'technic.status.sold'
  37.     ];
  38.     public const DEPARTMENT_BED 0;
  39.     public const DEPARTMENT_FED 1;
  40.     public const DEPARTMENT_QA 2;
  41.     public const DEPARTMENT_CM 3;
  42.     public const DEPARTMENT_AM 4;
  43.     public const DEPARTMENT_DES 5;
  44.     public const DEPARTMENT_BACK_OFFICE 6;
  45.     public const DEPARTMENT_HR 7;
  46.     public const DEPARTMENT_CEO 8;
  47.     public const DEPARTMENTS = [
  48.         self::DEPARTMENT_BED => 'technic.department.bed',
  49.         self::DEPARTMENT_FED => 'technic.department.fed',
  50.         self::DEPARTMENT_QA => 'technic.department.qa',
  51.         self::DEPARTMENT_CM => 'technic.department.cm',
  52.         self::DEPARTMENT_AM => 'technic.department.am',
  53.         self::DEPARTMENT_DES => 'technic.department.des',
  54.         self::DEPARTMENT_BACK_OFFICE => 'technic.department.backOffice',
  55.         self::DEPARTMENT_HR => 'technic.department.hr',
  56.         self::DEPARTMENT_CEO => 'technic.department.ceo'
  57.     ];
  58.     use PrimaryIdTrait;
  59.     use TimestampableEntity;
  60.     #[ORM\Column(type'string'length25nullabletrue)]
  61.     private ?string $personalNumber;
  62.     #[ORM\Column(type'string'length255nullabletrue)]
  63.     private ?string $brand;
  64.     #[ORM\Column(type'string'length255nullabletrue)]
  65.     private ?string $model;
  66.     #[ORM\Column(type'string'length2048nullabletrue)]
  67.     private ?string $params;
  68.     #[ORM\Column(type'integer'nullabletrue)]
  69.     private ?int $type;
  70.     #[ORM\Column(type'integer'nullabletrue)]
  71.     private ?int $position;
  72.     #[ORM\ManyToOne(targetEntityUser::class, inversedBy'technic')]
  73.     private ?User $user;
  74.     #[ORM\Column(type'string'length50nullabletrue)]
  75.     private ?string $networkName;
  76.     #[ORM\Column(type'integer'nullabletrue)]
  77.     private ?int $status;
  78.     #[ORM\Column(type'string'length2048nullabletrue)]
  79.     private ?string $comment;
  80.     public function getPersonalNumber(): ?string
  81.     {
  82.         return $this->personalNumber;
  83.     }
  84.     public function setPersonalNumber(?string $personalNumber): void
  85.     {
  86.         $this->personalNumber $personalNumber;
  87.     }
  88.     public function getBrand(): ?string
  89.     {
  90.         return $this->brand;
  91.     }
  92.     public function setBrand(?string $brand): void
  93.     {
  94.         $this->brand $brand;
  95.     }
  96.     public function getModel(): ?string
  97.     {
  98.         return $this->model;
  99.     }
  100.     public function setModel(?string $model): void
  101.     {
  102.         $this->model $model;
  103.     }
  104.     public function getParams(): ?string
  105.     {
  106.         return $this->params;
  107.     }
  108.     public function setParams(?string $params): void
  109.     {
  110.         $this->params $params;
  111.     }
  112.     public function getType(): ?int
  113.     {
  114.         return $this->type;
  115.     }
  116.     public function setType(?int $type): void
  117.     {
  118.         $this->type $type;
  119.     }
  120.     public function getPosition(): ?int
  121.     {
  122.         return $this->position;
  123.     }
  124.     public function setPosition(?int $position): void
  125.     {
  126.         $this->position $position;
  127.     }
  128.     public function getUser(): ?User
  129.     {
  130.         return $this->user;
  131.     }
  132.     public function setUser(?User $user): void
  133.     {
  134.         $this->user $user;
  135.     }
  136.     public function getNetworkName(): ?string
  137.     {
  138.         return $this->networkName;
  139.     }
  140.     public function setNetworkName(?string $networkName): void
  141.     {
  142.         $this->networkName $networkName;
  143.     }
  144.     public function getStatus(): ?int
  145.     {
  146.         return $this->status;
  147.     }
  148.     public function setStatus(?int $status): void
  149.     {
  150.         $this->status $status;
  151.     }
  152.     public function getComment(): ?string
  153.     {
  154.         return $this->comment;
  155.     }
  156.     public function setComment(?string $comment): void
  157.     {
  158.         $this->comment $comment;
  159.     }
  160. }