• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/userconsent/internals/agreement.php
  • Класс: BitrixMainUserConsentInternalsAgreementTable
  • Вызов: AgreementTable::getMap
static function getMap()
{
	return array(
		'ID' => array(
			'data_type' => 'integer',
			'primary' => true,
			'autocomplete' => true,
		),
		'CODE' => array(
			'data_type' => 'string',
		),
		'DATE_INSERT' => array(
			'data_type' => 'datetime',
			'required' => true,
			'default_value' => new DateTime(),
		),
		'ACTIVE' => array(
			'data_type' => 'boolean',
			'required' => true,
			'default_value' => Agreement::ACTIVE,
			'values' => array(Agreement::NOT_ACTIVE, Agreement::ACTIVE)
		),
		'NAME' => array(
			'data_type' => 'string',
			'required' => true,
			'title' => Loc::getMessage('MAIN_USER_CONSENT_TBL_AGREEMENT_FIELD_TITLE_NAME'),
		),
		'TYPE' => array(
			'data_type' => 'string',
			'required' => true,
			'default_value' => Agreement::TYPE_STANDARD,
			'values' => array(Agreement::TYPE_CUSTOM, Agreement::TYPE_STANDARD)
		),
		'LANGUAGE_ID' => array(
			'data_type' => 'string',
		),
		'DATA_PROVIDER' => array(
			'data_type' => 'string',
		),
		'AGREEMENT_TEXT' => array(
			'data_type' => 'text',
		),
		'LABEL_TEXT' => array(
			'data_type' => 'string',
		),
		'SECURITY_CODE' => array(
			'data_type' => 'string',
			'default_value' => function()
			{
				return Random::getString(6);
			}
		),
		'USE_URL' => [
			'data_type' => 'boolean',
			'default_value' => 'N',
			'values' => ['Y', 'N']
		],
		'URL' => [
			'data_type' => 'string',
		],
		'IS_AGREEMENT_TEXT_HTML' => [
			'data_type' => 'boolean',
			'default_value' => 'N',
			'values' => ['Y', 'N']
		],
	);
}