QuestionTable::getMap

  1. Bitrix24 API (v. 23.675.0)
  2. vote
  3. QuestionTable
  4. getMap
  • Модуль: vote
  • Путь к файлу: ~/bitrix/modules/vote/lib/question.php
  • Класс: BitrixVoteQuestionTable
  • Вызов: QuestionTable::getMap
static function getMap()
{
	return array(
		'ID' => array(
			'data_type' => 'integer',
			'primary' => true,
			'autocomplete' => true,
			'title' => Loc::getMessage('V_TABLE_FIELD_ID'),
		),
		'ACTIVE' => array(
			'data_type' => 'boolean',
			'values' => array('N', 'Y'),
			'default_value' => 'Y',
			'title' => Loc::getMessage('V_TABLE_FIELD_ACTIVE')
		),
		'TIMESTAMP_X' => array(
			'data_type' => 'datetime',
			'title' => Loc::getMessage('V_TABLE_FIELD_TIMESTAMP_X'),
		),
		'VOTE_ID' => array(
			'data_type' => 'integer',
			'title' => Loc::getMessage('V_TABLE_FIELD_VOTE_ID'),
		),
		'C_SORT' => array(
			'data_type' => 'integer',
			'title' => Loc::getMessage('V_TABLE_FIELD_C_SORT'),
		),
		'COUNTER' => array(
			'data_type' => 'integer',
			'title' => Loc::getMessage('V_TABLE_FIELD_COUNTER'),
		),
		'QUESTION' => array(
			'data_type' => 'text',
			'title' => Loc::getMessage('V_TABLE_FIELD_QUESTION')
		),
		'QUESTION_TYPE' => array(
			'data_type' => 'enum',
			'values' => array("text", "html"),
			'default_value' => "text",
			'title' => Loc::getMessage('V_TABLE_FIELD_QUESTION_TYPE'),
		),
		'IMAGE_ID' =>  array(
			'data_type' => 'integer',
			'title' => Loc::getMessage('V_TABLE_FIELD_IMAGE_ID'),
		),
		'IMAGE' =>  array(
			'data_type' => 'BitrixMainFileTable',
			'reference' => array(
				'=this.IMAGE_ID' => 'ref.ID',
			),
			'join_type' => 'LEFT',
			'title' => Loc::getMessage('V_TABLE_FIELD_IMAGE'),
		),
		'DIAGRAM' => array(
			'data_type' => 'boolean',
			'values' => array('N', 'Y'),
			'default_value' => 'Y',
			'title' => Loc::getMessage('V_TABLE_FIELD_DIAGRAM')
		),
		'DIAGRAM_TYPE' => array(
			'data_type' => 'enum',
			'values' => array("histogram", "circle"),
			'default_value' => "histogram",
			'title' => Loc::getMessage('V_TABLE_FIELD_DIAGRAM_TYPE'),
		),
		'REQUIRED' => array(
			'data_type' => 'boolean',
			'values' => array('N', 'Y'),
			'default_value' => 'N',
			'title' => Loc::getMessage('V_TABLE_FIELD_REQUIRED')
		),
		'FIELD_TYPE' => array(
			'data_type' => 'enum',
			'values' => BitrixVoteQuestionTypes::getValues(),
			'default_value' => '0',
			'title' => Loc::getMessage('V_TABLE_FIELD_FIELD_TYPE')
		),
		'VOTE' => array(
			'data_type' => 'BitrixVoteVoteTable',
			'reference' => array(
				'=this.VOTE_ID' => 'ref.ID',
			),
			'join_type' => 'RIGHT',
		),
		'ANSWER' => array(
			'data_type' => 'BitrixVoteAnswerTable',
			'reference' => array(
				'=this.ID' => 'ref.QUESTION_ID',
			),
			'join_type' => 'LEFT',
		)
	);
}

Добавить комментарий