• Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/group.php
  • Класс: BitrixCatalogGroupTable
  • Вызов: GroupTable::getMap
static function getMap()
{
	return [
		'ID' => new ORMFieldsIntegerField(
			'ID',
			[
				'primary' => true,
				'autocomplete' => true,
				'title' => Loc::getMessage('GROUP_ENTITY_ID_FIELD'),
			]
		),
		'NAME' => new ORMFieldsStringField(
			'NAME',
			[
				'required' => true,
				'validation' => function()
				{
					return [
						new ORMFieldsValidatorsLengthValidator(null, 100),
					];
				},
				'title' => Loc::getMessage('GROUP_ENTITY_NAME_FIELD'),
			]
		),
		'BASE' => new ORMFieldsBooleanField(
			'BASE',
			[
				'values' => [
					'N',
					'Y',
				],
				'title' => Loc::getMessage('GROUP_ENTITY_BASE_FIELD'),
			]
		),
		'SORT' => new ORMFieldsIntegerField(
			'SORT',
			[
				'title' => Loc::getMessage('GROUP_ENTITY_SORT_FIELD'),
			]
		),
		'XML_ID' => new ORMFieldsStringField(
			'XML_ID',
			[
				'validation' => function()
				{
					return [
						new ORMFieldsValidatorsLengthValidator(null, 255),
					];
				},
				'title' => Loc::getMessage('GROUP_ENTITY_XML_ID_FIELD'),
			]
		),
		'TIMESTAMP_X' => new ORMFieldsDatetimeField(
			'TIMESTAMP_X',
			[
				'title' => Loc::getMessage('GROUP_ENTITY_TIMESTAMP_X_FIELD'),
				'default_value' => function()
				{
					return new MainTypeDateTime();
				},
			]
		),
		'MODIFIED_BY' => new ORMFieldsIntegerField(
			'MODIFIED_BY',
			[
				'title' => Loc::getMessage('GROUP_ENTITY_MODIFIED_BY_FIELD'),
			]
		),
		'DATE_CREATE' => new ORMFieldsDatetimeField(
			'DATE_CREATE',
			[
				'title' => Loc::getMessage('GROUP_ENTITY_DATE_CREATE_FIELD'),
				'default_value' => function()
				{
					return new MainTypeDateTime();
				},
			]
		),
		'CREATED_BY' => new ORMFieldsIntegerField(
			'CREATED_BY',
			[
				'title' => Loc::getMessage('GROUP_ENTITY_CREATED_BY_FIELD'),
			]
		),
		'CREATED_BY_USER' => new ORMFieldsRelationsReference(
			'CREATED_BY_USER',
			'BitrixMainUser',
			['=this.CREATED_BY' => 'ref.ID']
		),
		'MODIFIED_BY_USER' => new ORMFieldsRelationsReference(
			'MODIFIED_BY_USER',
			'BitrixMainUser',
			['=this.MODIFIED_BY' => 'ref.ID']
		),
		'LANG' => new ORMFieldsRelationsReference(
			'LANG',
			'BitrixCatalogGroupLang',
			['=this.ID' => 'ref.CATALOG_GROUP_ID']
		),
		'CURRENT_LANG' => new ORMFieldsRelationsReference(
			'CURRENT_LANG',
			'BitrixCatalogGroupLang',
			[
				'=this.ID' => 'ref.CATALOG_GROUP_ID',
				'=ref.LANG' => new MainDBSqlExpression('?', LANGUAGE_ID)
			],
			['join_type' => 'LEFT']
		)
	];
}