• Модуль: ui
  • Путь к файлу: ~/bitrix/modules/ui/lib/Avatar/Mask/ItemToFile.php
  • Класс: BitrixUIAvatarMaskItemToFileTable
  • Вызов: ItemToFileTable::getMap
static function getMap(): array
{
	return array(
		(new IntegerField('ID'))
			->configurePrimary()
			->configureAutocomplete()
		,

		(new IntegerField('ORIGINAL_FILE_ID'))->configureRequired(),
		(new IntegerField('FILE_ID'))->configureRequired(),
		(new IntegerField('ITEM_ID'))->configureRequired(),

		(new IntegerField('USER_ID')),

		(new DatetimeField('TIMESTAMP_X'))
			->configureRequired()
			->configureDefaultValue(function() {
				return new DateTime();
			}
		),

		(new Reference(
			'FILE',
			FileTable::class,
			Join::on('this.FILE_ID', 'ref.ID')
		))->configureJoinType(Join::TYPE_INNER),

		(new Reference(
			'ITEM',
			ItemTable::class,
			Join::on('this.ITEM_ID', 'ref.ID')
		))->configureJoinType(Join::TYPE_INNER),

		(new Reference(
			'USER',
			MainUserTable::class,
			Join::on('this.USER_ID', 'ref.ID')
		))->configureJoinType(Join::TYPE_LEFT),
	);
}