• Модуль: location
  • Путь к файлу: ~/bitrix/modules/location/lib/model/locationtable.php
  • Класс: BitrixLocationModelLocationTable
  • Вызов: LocationTable::getMap
static function getMap()
{
	return [
		(new FieldsIntegerField('ID'))
			->configurePrimary(true)
			->configureAutocomplete(true),

		(new FieldsStringField('CODE'))
			->addValidator(new MainORMFieldsValidatorsLengthValidator(1, 100))
			->configureUnique(true)
			->configureRequired(true),

		(new FieldsStringField('EXTERNAL_ID'))
			->addValidator(new MainORMFieldsValidatorsLengthValidator(null, 255)),

		(new FieldsStringField('SOURCE_CODE'))
			->addValidator(new MainORMFieldsValidatorsLengthValidator(null, 15)),

		new FieldsFloatField('LATITUDE', ['scale' => 6]),
		new FieldsFloatField('LONGITUDE', ['scale' => 6]),
		new FieldsDateField('TIMESTAMP_X'),

		(new FieldsIntegerField('TYPE'))
			->configureRequired(true),

		// References

		(new RelationsOneToMany('NAME', LocationNameTable::class, 'LOCATION'))
			->configureJoinType('left'),

		(new RelationsOneToMany('ANCESTORS', HierarchyTable::class, 'ANCESTOR'))
			->configureJoinType('left'),

		(new RelationsOneToMany('DESCENDANTS', HierarchyTable::class, 'DESCENDANT'))
			->configureJoinType('left'),

		(new RelationsOneToMany('ADDRESSES', AddressTable::class, 'LOCATION'))
			->configureJoinType('left'),

		(new FieldsRelationsOneToMany('FIELDS', LocationFieldTable::class, 'LOCATION'))
			->configureJoinType('left')
	];
}