/
3vweb
/
testTask
Обзор
Документация
Войти
/
3vweb
/
testTask
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
local/classes/Entity/Hl/CarHistoryTable.php
46 строк
1 KB
ubuntu
Решение к задаче
15 янв 2026, 12:28
15 янв 2026, 12:28
30b8481
Код
Авторство
О чём код?
<?php namespace Local\Classes\Entity\Hl; use Bitrix\Main\ORM\Data\DataManager; use Bitrix\Main\ORM\Fields\DatetimeField; use Bitrix\Main\ORM\Fields\IntegerField; use Bitrix\Main\ORM\Fields\Relations\Reference; use Bitrix\Main\ORM\Query\Join; /** * История запланированных поездок на автомобиле (возможно все поля можно в индекс, детально не стал разбирать) **/ class CarHistoryTable extends DataManager { /** * Returns DB table name for entity. * * @return string */ public static function getTableName() { return 'hl_car_history'; } /** * Returns entity map definition. * * @return array */ public static function getMap() { return [ (new IntegerField('ID'))->configurePrimary(), new IntegerField('UF_CARS_ID'), new DatetimeField('UF_DATE_START'), new DatetimeField('UF_DATE_FINISH'), new Reference( 'CARS', CarsTable::class, Join::on('this.UF_CARS_ID', 'ref.ID') ), ]; } }