src/Containers/CrmSection/EquipmentContainer/Entities/ApplicationEntity.php line 141

Open in your IDE?
  1. <?php
  2. namespace App\Containers\CrmSection\EquipmentContainer\Entities;
  3. use ApiPlatform\Metadata\ApiResource;
  4. use ApiPlatform\Metadata\Delete;
  5. use ApiPlatform\Metadata\Get;
  6. use ApiPlatform\Metadata\GetCollection;
  7. use ApiPlatform\Metadata\Patch;
  8. use ApiPlatform\Metadata\Put;
  9. use ApiPlatform\Metadata\Post;
  10. use ApiPlatform\Metadata\ApiFilter;
  11. use ApiPlatform\Doctrine\Orm\Filter\SearchFilter;
  12. use ApiPlatform\Doctrine\Orm\Filter\NumericFilter;
  13. use ApiPlatform\Doctrine\Orm\Filter\RangeFilter;
  14. use ApiPlatform\Doctrine\Orm\Filter\DateFilter;
  15. use ApiPlatform\Doctrine\Orm\Filter\BooleanFilter;
  16. use ApiPlatform\Doctrine\Orm\Filter\OrderFilter;
  17. use App\Containers\CrmSection\EquipmentContainer\UI\ApiPlatform\Controllers\ApplicationReactivateMileageController;
  18. use App\Containers\ServiceSection\TrackingContainer\Entities\MileageEntity;
  19. use Doctrine\Common\Collections\ArrayCollection;
  20. use Doctrine\Common\Collections\Collection;
  21. use Doctrine\ORM\Mapping as ORM;
  22. use Doctrine\DBAL\Types\Types;
  23. use Gedmo\Mapping\Annotation as Gedmo;
  24. use Symfony\Component\Serializer\Annotation\Groups;
  25. use Symfony\Component\Serializer\Annotation\MaxDepth;
  26. use Symfony\Component\Serializer\Annotation\Context;
  27. use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer;
  28. use App\Containers\CrmSection\EquipmentContainer\Data\Repositories\ApplicationRepository;
  29. use App\Containers\CrmSection\ClientContainer\Entities\ClientEntity;
  30. use App\Containers\CrmSection\ContractContainer\Entities\ContractEntity;
  31. use App\Containers\CrmSection\CarContainer\Entities\CarEntity;
  32. use App\Containers\SettingSection\ListContainer\Entities\TrackingSystemEntity;
  33. use App\Containers\SettingSection\ListContainer\Entities\CarBrandEntity;
  34. use App\Containers\SettingSection\ListContainer\Entities\CarModelEntity;
  35. use App\Containers\SettingSection\ListContainer\Entities\CarTypeEntity;
  36. use App\Containers\SettingSection\ListContainer\Entities\FuelTypeEntity;
  37. use App\Containers\SettingSection\ListContainer\Entities\StatusEntity;
  38. use App\Containers\CrmSection\IndexContainer\Entities\TranslationEntity;
  39. use App\Ship\ApiPlatform\Filter\SimpleSearchFilter;
  40. /** 
  41.  * Заявка
  42. */
  43. #[ApiResource(
  44.     routePrefix'/crm',
  45.     normalizationContext: [
  46.         'groups' => 'read',
  47.         'enable_max_depth' => true
  48.     ],
  49.     operations: [
  50.         new Get(
  51.             uriTemplate'/applications/{id}'requirements: ['id' => '\d+'],
  52.             security"is_granted('ROLE_ADMIN') or is_granted('ROLE_USER_CLIENT') or is_granted('ROLE_INSTALLER') or is_granted('ROLE_READONLY')"
  53.         ),
  54.         new Patch(
  55.             uriTemplate'/applications/{id}'requirements: ['id' => '\d+'],
  56.             security"is_granted('ROLE_ADMIN') or is_granted('ROLE_INSTALLER')"
  57.         ),
  58.         // new Put(
  59.         //     uriTemplate: '/applications/{id}', requirements: ['id' => '\d+'],
  60.         //     security: "is_granted('ROLE_ADMIN') or is_granted('ROLE_USER_CLIENT')"
  61.         // ),
  62.         new Delete(
  63.             uriTemplate'/applications/{id}'requirements: ['id' => '\d+'],
  64.             security"is_granted('ROLE_ADMIN')"
  65.         ),
  66.         new Post(
  67.             uriTemplate'/applications',
  68.             security"is_granted('ROLE_ADMIN') or is_granted('ROLE_USER_CLIENT')"
  69.         ),
  70.         new Patch(
  71.             uriTemplate'/applications/{id}/reactivate_mileage'requirements: ['id' => '\d+'],
  72.             controllerApplicationReactivateMileageController::class,
  73.             inputfalse,
  74.             security"is_granted('ROLE_ADMIN') or is_granted('ROLE_INSTALLER')"
  75.         ),
  76.         new GetCollection(
  77.             uriTemplate'/applications',
  78.             security"is_granted('ROLE_ADMIN') or is_granted('ROLE_USER_CLIENT') or is_granted('ROLE_INSTALLER') or is_granted('ROLE_READONLY')"
  79.         ),
  80.     ],
  81.     shortName'CRM_Equipments'
  82. )]
  83. #[ApiFilter(SearchFilter::class, properties: [
  84.     'id' => 'exact',
  85.     'number' => 'partial'
  86.     'carNumber' => 'partial'
  87.     'externalCode' => 'partial'
  88.     'carColor' => 'exact'
  89.     'contract' => 'exact',
  90.     'trackingSystem' => 'exact',
  91.     'client' => 'exact',
  92.     'client.name' => 'partial'
  93.     'client.lastName' => 'partial'
  94.     'client.patronymic' => 'partial'
  95.     'client.externalCode' => 'partial'
  96.     'client.phone' => 'exact'
  97.     'client.email' => 'exact'
  98.     'client.inn' => 'exact'
  99.     'insuranceProduct' => 'exact',
  100.     'insuranceProduct.name' => 'partial'
  101.     'insuranceProduct.code' => 'partial'
  102.     'carBrand' => 'exact',
  103.     'carBrand.name' => 'partial'
  104.     'carBrand.codeAutoria' => 'exact'
  105.     'carModel' => 'exact',
  106.     'carModel.name' => 'partial'
  107.     'carModel.codeAutoria' => 'exact'
  108.     'status' => 'exact',
  109.     'status.name' => 'exact'
  110.     'status.externalCode' => 'exact'
  111.     'source' => 'exact',
  112.     'source.name' => 'exact'
  113.     'source.externalCode' => 'exact',
  114.     'sensorId' => 'exact'
  115. ])]
  116. #[ApiFilter(NumericFilter::class, properties: [
  117.     'id''dateProduction'
  118. ])]
  119. #[ApiFilter(RangeFilter::class, properties: [
  120.     'id''priceUAH''carPriceUSD',
  121.     'carPriceUAH''dateProduction',
  122.     'carEngineVolume''prolongationBalanceKilometers',
  123.     'currentBalanceKilometers'
  124. ])]
  125. #[ApiFilter(BooleanFilter::class, properties: [
  126.     'isContactMe''isSigned',
  127.     'isActiveTracker''isBlockedTracker'
  128. ])]
  129. #[ApiFilter(DateFilter::class, properties: ['dateStart''dateEnd''dateConclusionContract''dateSigningContract''dateSigningAct'])]
  130. #[ApiFilter(OrderFilter::class)]
  131. #[ApiFilter(filterClassSimpleSearchFilter::class, properties: [
  132.     'externalCode''address''comment''sensorId'
  133. ])]
  134. #[ORM\Entity(repositoryClassApplicationRepository::class)]
  135. #[ORM\Table(name'`crm_equipments_applications`')]
  136. #[ORM\Index(columns: ['car_number'], name'crm_equipments_applications_custom_idx')]
  137. #[Gedmo\TranslationEntity(class: TranslationEntity::class)]
  138. class ApplicationEntity
  139. {
  140.     public function __construct() {
  141.         $this->mileages = new ArrayCollection();
  142.     }
  143.     #[ORM\Id]
  144.     #[ORM\GeneratedValue]
  145.     #[ORM\Column(typeTypes::INTEGER)]
  146.     #[Groups(['read'])]
  147.     private ?int $id null;
  148.     #[ORM\Column(typeTypes::STRINGlength255nullabletrueuniquetrue)]
  149.     #[Groups(['read'])]
  150.     private ?string $externalCode null;
  151.     // Статус
  152.     #[ORM\ManyToOne(targetEntityStatusEntity::class)]
  153.     #[ORM\JoinColumn(name'status_id'referencedColumnName'id'nullabletrue)]
  154.     #[Groups(['read'])]
  155.     #[MaxDepth(1)]
  156.     private ?StatusEntity $status null;
  157.     // Клиент
  158.     #[ORM\ManyToOne(targetEntityClientEntity::class)]
  159.     #[ORM\JoinColumn(name'client_id'referencedColumnName'id'nullablefalse)]
  160.     #[Groups(['read'])]
  161.     #[MaxDepth(2)]
  162.     private ClientEntity $client;
  163.     // Договор
  164.     #[ORM\ManyToOne(targetEntityContractEntity::class)]
  165.     #[ORM\JoinColumn(name'contract_id'referencedColumnName'id'nullablefalse)]
  166.     #[Groups(['read'])]
  167.     #[MaxDepth(2)]
  168.     private ContractEntity $contract;
  169.     // Номер авто
  170.     #[ORM\Column(typeTypes::STRINGlength50nullablefalse)]
  171.     #[Groups(['read'])]
  172.     private string $carNumber;
  173.     // Год выпуска
  174.     #[ORM\Column(typeTypes::INTEGERlength4nullabletrue)]
  175.     #[Groups(['read'])]
  176.     private ?int $dateProduction null;
  177.     // Объем двигателя
  178.     #[ORM\Column(typeTypes::FLOATscale3nullabletrue)]
  179.     #[Groups(['read'])]
  180.     private ?float $carEngineVolume null;
  181.     // Марка
  182.     #[ORM\ManyToOne(targetEntityCarBrandEntity::class)]
  183.     #[ORM\JoinColumn(name'car_brand_id'referencedColumnName'id'nullabletrue)]
  184.     #[Groups(['read'])]
  185.     #[MaxDepth(1)]
  186.     private ?CarBrandEntity $carBrand null;
  187.     // Модель
  188.     #[ORM\ManyToOne(targetEntityCarModelEntity::class)]
  189.     #[ORM\JoinColumn(name'car_model_id'referencedColumnName'id'nullabletrue)]
  190.     #[Groups(['read'])]
  191.     #[MaxDepth(1)]
  192.     private ?CarModelEntity $carModel null;
  193.     // Тип топлива
  194.     #[ORM\ManyToOne(targetEntityFuelTypeEntity::class)]
  195.     #[ORM\JoinColumn(name'car_fuel_type_id'referencedColumnName'id'nullabletrue)]
  196.     #[Groups(['read'])]
  197.     #[MaxDepth(1)]
  198.     private ?FuelTypeEntity $carFuelType null;
  199.     // Тип транспорта
  200.     #[ORM\ManyToOne(targetEntityCarTypeEntity::class)]
  201.     #[ORM\JoinColumn(name'car_type_id'referencedColumnName'id'nullabletrue)]
  202.     #[Groups(['read'])]
  203.     #[MaxDepth(1)]
  204.     private ?CarTypeEntity $carType null;
  205.     // Цвет
  206.     #[ORM\Column(typeTypes::STRINGlength150nullabletrue)]
  207.     #[Gedmo\Translatable]
  208.     #[Groups(['read'])]
  209.     private ?string $carColor null;
  210.     // Автомобиль
  211.     #[ORM\ManyToOne(targetEntityCarEntity::class)]
  212.     #[ORM\JoinColumn(name'car_id'referencedColumnName'id'nullabletrue)]
  213.     #[MaxDepth(2)]
  214.     #[Groups(['read'])]
  215.     private ?CarEntity $car null;
  216.     // Адрес
  217.     #[ORM\Column(typeTypes::STRINGlength500nullabletrue)]
  218.     #[Groups(['read'])]
  219.     private ?string $address null;
  220.     // Дата
  221.     #[ORM\Column(typeTypes::DATETIME_IMMUTABLEnullabletrue)]
  222.     #[Context(
  223.         normalizationContext: [DateTimeNormalizer::FORMAT_KEY => 'Y-m-d H:i:s'],
  224.         denormalizationContext: [DateTimeNormalizer::FORMAT_KEY => 'Y-m-d H:i:s']
  225.     )]
  226.     #[Groups(['read'])]
  227.     private ?\DateTimeInterface $date null;
  228.     // ID датчика
  229.     #[ORM\Column(typeTypes::STRINGlength255nullabletrue)]
  230.     #[Groups(['read'])]
  231.     private ?string $sensorId null;
  232.     // Дата установки датчика
  233.     #[ORM\Column(typeTypes::DATETIME_IMMUTABLEnullabletrue)]
  234.     #[Context(
  235.         normalizationContext: [DateTimeNormalizer::FORMAT_KEY => 'Y-m-d H:i:s'],
  236.         denormalizationContext: [DateTimeNormalizer::FORMAT_KEY => 'Y-m-d H:i:s']
  237.     )]
  238.     #[Groups(['read'])]
  239.     private ?\DateTimeInterface $sensorInstallationDate null;
  240.     // Дата осмотра
  241.     #[ORM\Column(typeTypes::DATETIME_IMMUTABLEnullabletrue)]
  242.     #[Context(
  243.         normalizationContext: [DateTimeNormalizer::FORMAT_KEY => 'Y-m-d H:i:s'],
  244.         denormalizationContext: [DateTimeNormalizer::FORMAT_KEY => 'Y-m-d H:i:s']
  245.     )]
  246.     #[Groups(['read'])]
  247.     private ?\DateTimeInterface $reviewDate null;
  248.     // Исполнитель
  249.     #[ORM\Column(typeTypes::STRINGlength150nullabletrue)]
  250.     #[Groups(['read'])]
  251.     private ?string $executor null;
  252.     // Показатели спидометра
  253.     #[ORM\Column(typeTypes::INTEGERnullabletrue)]
  254.     #[Groups(['read'])]
  255.     private ?int $speedometer null;
  256.     // Свидетельства о регистрации
  257.     #[ORM\Column(typeTypes::STRINGlength255nullabletrue)]
  258.     #[Groups(['read'])]
  259.     private ?string $registrationCertificates null;
  260.     // Номер шасси/кузова
  261.     #[ORM\Column(typeTypes::STRINGlength255nullabletrue)]
  262.     #[Groups(['read'])]
  263.     private ?string $bodyNumber null;
  264.     // Связаться со мной
  265.     #[ORM\Column(typeTypes::BOOLEAN)]
  266.     #[Groups(['read'])]
  267.     private ?bool $isContactMe false;
  268.     // Подписан
  269.     #[ORM\Column(typeTypes::BOOLEAN)]
  270.     #[Groups(['read'])]
  271.     private ?bool $isSigned false;
  272.     // Количество ключей
  273.     #[ORM\Column(typeTypes::INTEGERnullabletrue)]
  274.     #[Groups(['read'])]
  275.     private ?int $numberKeys null;
  276.     // Количество дубликатов ключей
  277.     #[ORM\Column(typeTypes::INTEGERnullabletrue)]
  278.     #[Groups(['read'])]
  279.     private ?int $numberDuplicateKeys null;
  280.     // Трекер активен
  281.     #[ORM\Column(typeTypes::BOOLEAN)]
  282.     #[Groups(['read'])]
  283.     private ?bool $isActiveTracker false;
  284.     // Трекер заблокирован
  285.     #[ORM\Column(typeTypes::BOOLEAN)]
  286.     #[Groups(['read'])]
  287.     private ?bool $isBlockedTracker false;
  288.     // Трекинг система
  289.     #[ORM\ManyToOne(targetEntityTrackingSystemEntity::class)]
  290.     #[ORM\JoinColumn(name'tracking_system_id'referencedColumnName'id'nullabletrue)]
  291.     #[Groups(['read'])]
  292.     #[MaxDepth(1)]
  293.     private ?TrackingSystemEntity $trackingSystem null;
  294.     // Дата деактивации счетчика
  295.     #[ORM\Column(typeTypes::DATETIME_IMMUTABLEnullabletrue)]
  296.     #[Context(
  297.         normalizationContext: [DateTimeNormalizer::FORMAT_KEY => 'Y-m-d H:i:s'],
  298.         denormalizationContext: [DateTimeNormalizer::FORMAT_KEY => 'Y-m-d H:i:s']
  299.     )]
  300.     #[Groups(['read'])]
  301.     private ?\DateTimeInterface $counterDeactivationDate null;
  302.     // Комментарий
  303.     #[ORM\Column(typeTypes::STRINGlength255nullabletrue)]
  304.     #[Groups(['read'])]
  305.     private ?string $comment null;
  306.     // Повреждения
  307.     #[Groups(['read'])]
  308.     public ?array $damages null;
  309.     // Фото
  310.     #[Groups(['read'])]
  311.     public ?array $photos null;
  312.     // Трекінг система для імпорту пробігу
  313.     #[ORM\Column(typeTypes::STRINGlength255nullabletrue)]
  314.     #[Groups(['read'])]
  315.     private ?string $mileageTrackingSystem null;
  316.     // Ідентифікатор пристрою Antenor
  317.     #[ORM\Column(typeTypes::STRINGlength255nullabletrue)]
  318.     #[Groups(['read'])]
  319.     private ?string $antenorDeviceId null;
  320.     #[ORM\JoinColumn(nullabletrue)]
  321.     #[ORM\OneToMany(mappedBy'application'targetEntityMileageEntity::class)]
  322.     #[Groups(['read'])]
  323.     private Collection $mileages;
  324.     #[Gedmo\Timestampable(on'create')]
  325.     #[ORM\Column(typeTypes::DATETIME_IMMUTABLE)]
  326.     #[Groups(['read'])]
  327.     protected $createdAt;
  328.     #[Gedmo\Timestampable(on'update')]
  329.     #[ORM\Column(typeTypes::DATETIME_IMMUTABLE)]
  330.     #[Groups(['read'])]
  331.     protected $updatedAt;
  332.     /**
  333.      * Used locale to override Translation listener`s locale
  334.      * this is not a mapped field of entity metadata, just a simple property
  335.      */
  336.     #[Gedmo\Locale]
  337.     private $locale;
  338.     public function getId(): ?int
  339.     {
  340.         return $this->id;
  341.     }
  342.     public function setId($value)
  343.     {
  344.         $this->id $value;
  345.         return $this;
  346.     }
  347.     public function getExternalCode()
  348.     {
  349.         return $this->externalCode;
  350.     }
  351.     public function setExternalCode($code)
  352.     {
  353.         $this->externalCode $code;
  354.         return $this;
  355.     }
  356.     public function getStatus()
  357.     {
  358.         return $this->status;
  359.     }
  360.     public function setStatus($status)
  361.     {
  362.         $this->status $status;
  363.         return $this;
  364.     }
  365.     public function getClient()
  366.     {
  367.         return $this->client;
  368.     }
  369.     public function setClient($client)
  370.     {
  371.         $this->client $client;
  372.         return $this;
  373.     }
  374.     public function getContract()
  375.     {
  376.         return $this->contract;
  377.     }
  378.     public function setContract($contract)
  379.     {
  380.         $this->contract $contract;
  381.         return $this;
  382.     }
  383.     public function getCarNumber()
  384.     {
  385.         return $this->carNumber;
  386.     }
  387.     public function setCarNumber($number)
  388.     {
  389.         $this->carNumber = ($number !== null str_replace(' ',''trim($number)) : null);
  390.         return $this;
  391.     }
  392.     public function setDateProduction($year)
  393.     {
  394.         $this->dateProduction $year;
  395.         return $this;
  396.     }
  397.     public function getDateProduction()
  398.     {
  399.         return $this->dateProduction;
  400.     }
  401.     public function getCarEngineVolume()
  402.     {
  403.         return $this->carEngineVolume;
  404.     }
  405.     public function setCarEngineVolume($value)
  406.     {
  407.         $this->carEngineVolume = ($value !== null round($value3) : null);
  408.         return $this;
  409.     }
  410.     public function getCarBrand()
  411.     {
  412.         return $this->carBrand;
  413.     }
  414.     public function setCarBrand($brand)
  415.     {
  416.         $this->carBrand $brand;
  417.         return $this;
  418.     }
  419.     public function getCarModel()
  420.     {
  421.         return $this->carModel;
  422.     }
  423.     public function setCarModel($model)
  424.     {
  425.         $this->carModel $model;
  426.         return $this;
  427.     }
  428.     public function getCarFuelType()
  429.     {
  430.         return $this->carFuelType;
  431.     }
  432.     public function setCarFuelType($type)
  433.     {
  434.         $this->carFuelType $type;
  435.         return $this;
  436.     }
  437.     public function getCarType()
  438.     {
  439.         return $this->carType;
  440.     }
  441.     public function setCarType($type)
  442.     {
  443.         $this->carType $type;
  444.         return $this;
  445.     }
  446.     public function getCarColor()
  447.     {
  448.         return $this->carColor;
  449.     }
  450.     public function setCarColor($color)
  451.     {
  452.         $this->carColor $color;
  453.         return $this;
  454.     }
  455.     public function getCar()
  456.     {
  457.         return $this->car;
  458.     }
  459.     public function setCar($car)
  460.     {
  461.         $this->car $car;
  462.         return $this;
  463.     }
  464.     public function getAddress()
  465.     {
  466.         return $this->address;
  467.     }
  468.     public function setAddress($address)
  469.     {
  470.         $this->address $address;
  471.         return $this;
  472.     }
  473.     public function setDate(\DateTimeImmutable|null $date)
  474.     {
  475.         $this->date $date;
  476.         return $this;
  477.     }
  478.     public function getDate()
  479.     {
  480.         return $this->date;
  481.     }
  482.     public function getSensorId()
  483.     {
  484.         return $this->sensorId;
  485.     }
  486.     public function setSensorId($sensorId)
  487.     {
  488.         $this->sensorId $sensorId;
  489.         return $this;
  490.     }
  491.     public function setSensorInstallationDate(\DateTimeImmutable|null $date)
  492.     {
  493.         $this->sensorInstallationDate $date;
  494.         return $this;
  495.     }
  496.     public function getSensorInstallationDate()
  497.     {
  498.         return $this->sensorInstallationDate;
  499.     }
  500.     public function setReviewDate(\DateTimeImmutable|null $date)
  501.     {
  502.         $this->reviewDate $date;
  503.         return $this;
  504.     }
  505.     public function getReviewDate()
  506.     {
  507.         return $this->reviewDate;
  508.     }
  509.     public function getExecutor()
  510.     {
  511.         return $this->executor;
  512.     }
  513.     public function setExecutor($executor)
  514.     {
  515.         $this->executor $executor;
  516.         return $this;
  517.     }
  518.     public function getSpeedometer()
  519.     {
  520.         return $this->speedometer;
  521.     }
  522.     public function setSpeedometer($value)
  523.     {
  524.         $this->speedometer $value;
  525.         return $this;
  526.     }
  527.     public function getRegistrationCertificates()
  528.     {
  529.         return $this->registrationCertificates;
  530.     }
  531.     public function setRegistrationCertificates($value)
  532.     {
  533.         $this->registrationCertificates $value;
  534.         return $this;
  535.     }
  536.     public function getBodyNumber()
  537.     {
  538.         return $this->bodyNumber;
  539.     }
  540.     public function setBodyNumber($number)
  541.     {
  542.         $this->bodyNumber $number;
  543.         return $this;
  544.     }
  545.     public function getIsContactMe()
  546.     {
  547.         return $this->isContactMe;
  548.     }
  549.     public function setIsContactMe($value)
  550.     {
  551.         $this->isContactMe $value;
  552.         return $this;
  553.     }
  554.     public function getNumberKeys()
  555.     {
  556.         return $this->numberKeys;
  557.     }
  558.     public function setNumberKeys($value)
  559.     {
  560.         $this->numberKeys $value;
  561.         return $this;
  562.     }
  563.     public function getNumberDuplicateKeys()
  564.     {
  565.         return $this->numberDuplicateKeys;
  566.     }
  567.     public function setNumberDuplicateKeys($value)
  568.     {
  569.         $this->numberDuplicateKeys $value;
  570.         return $this;
  571.     }
  572.     public function getIsActiveTracker()
  573.     {
  574.         return $this->isActiveTracker;
  575.     }
  576.     public function setIsActiveTracker($value)
  577.     {
  578.         $this->isActiveTracker $value;
  579.         return $this;
  580.     }
  581.     public function getIsBlockedTracker()
  582.     {
  583.         return $this->isBlockedTracker;
  584.     }
  585.     public function setIsBlockedTracker($value)
  586.     {
  587.         $this->isBlockedTracker $value;
  588.         return $this;
  589.     }
  590.     public function getTrackingSystem()
  591.     {
  592.         return $this->trackingSystem;
  593.     }
  594.     public function setTrackingSystem($value)
  595.     {
  596.         $this->trackingSystem $value;
  597.         return $this;
  598.     }
  599.     public function setCounterDeactivationDate(\DateTimeImmutable|null $date)
  600.     {
  601.         $this->counterDeactivationDate $date;
  602.         return $this;
  603.     }
  604.     public function getCounterDeactivationDate()
  605.     {
  606.         return $this->counterDeactivationDate;
  607.     }
  608.     public function getComment()
  609.     {
  610.         return $this->comment;
  611.     }
  612.     public function setComment($comment)
  613.     {
  614.         $this->comment $comment;
  615.         return $this;
  616.     }
  617.     public function setCreatedAt(\DateTimeImmutable|null $date)
  618.     {
  619.         $this->createdAt $date;
  620.         return $this;
  621.     }
  622.     public function setUpdatedAt(\DateTimeImmutable|null $date)
  623.     {
  624.         $this->updatedAt $date;
  625.         return $this;
  626.     }
  627.     public function getIsSigned()
  628.     {
  629.         return $this->isSigned;
  630.     }
  631.     public function setIsSigned($isSigned)
  632.     {
  633.         $this->isSigned $isSigned;
  634.         return $this;
  635.     }
  636.     public function getCreatedAt()
  637.     {
  638.         return $this->createdAt;
  639.     }
  640.     public function getUpdatedAt()
  641.     {
  642.         return $this->updatedAt;
  643.     }
  644.     public function setTranslatableLocale($locale)
  645.     {
  646.         $this->locale $locale;
  647.     }
  648.     public function getMileageTrackingSystem(): ?string
  649.     {
  650.         return $this->mileageTrackingSystem;
  651.     }
  652.     public function setMileageTrackingSystem(?string $mileageTrackingSystem): self
  653.     {
  654.         $this->mileageTrackingSystem $mileageTrackingSystem;
  655.         return $this;
  656.     }
  657.     public function getAntenorDeviceId(): ?string
  658.     {
  659.         return $this->antenorDeviceId;
  660.     }
  661.     public function setAntenorDeviceId(?string $antenorDeviceId): self
  662.     {
  663.         $this->antenorDeviceId $antenorDeviceId;
  664.         return $this;
  665.     }
  666.     public function getMileages()
  667.     {
  668.         return $this->mileages->getValues();
  669.     }
  670.     public function addMileage(MileageEntity $mileage)
  671.     {
  672.         $this->mileages[] = $mileage;
  673.     }
  674.     public function removeMileage(MileageEntity $mileage)
  675.     {
  676.         $this->mileages->removeElement($mileage);
  677.     }
  678. }