• Модуль: sender
  • Путь к файлу: ~/bitrix/modules/sender/lib/internals/model/letter.php
  • Класс: Bitrix\Sender\Internals\Model\LetterTable
  • Вызов: LetterTable::getMap
static function getMap()
{
	return array(
		'ID' => array(
			'data_type' => 'integer',
			'autocomplete' => true,
			'primary' => true,
		),
		'CAMPAIGN_ID' => array(
			'data_type' => 'integer',
			'column_name' => 'MAILING_ID',
			'required' => true,
		),

		'MESSAGE_CODE' => array(
			'data_type' => 'string',
			'required' => true,
			'default_value' => function ()
			{
				return iBase::CODE_MAIL;
			},
		),
		'MESSAGE_ID' => array(
			'data_type' => 'string',
		),

		'TEMPLATE_TYPE' => array(
			'data_type' => 'string',
		),
		'TEMPLATE_ID' => array(
			'data_type' => 'string',
		),

		'POSTING_ID' => array(
			'data_type' => 'integer',
		),
		'PARENT_ID' => array(
			'data_type' => 'integer',
		),
		'CREATED_BY' => array(
			'data_type' => 'integer',
		),
		'UPDATED_BY' => array(
			'data_type' => 'integer',
		),
		'DATE_INSERT' => array(
			'data_type' => 'datetime',
			'default_value' => new Type\DateTime(),
		),
		'DATE_UPDATE' => array(
			'data_type' => 'datetime',
			'default_value' => new Type\DateTime(),
		),
		'STATUS' => array(
			'data_type' => 'string',
			'required' => true,
			'default_value' => static::STATUS_NEW,
		),
		'REITERATE' => array(
			'data_type' => 'boolean',
			'default_value' => 'N',
			'values' => array('N', 'Y')
		),
		'IS_TRIGGER' => array(
			'data_type' => 'boolean',
			'default_value' => 'N',
			'values' => array('N', 'Y')
		),
		'IS_ADS' => array(
			'data_type' => 'boolean',
			'default_value' => 'N',
			'values' => array('N', 'Y')
		),
		'LAST_EXECUTED' => array(
			'data_type' => 'datetime',
		),
		'TITLE' => array(
			'data_type' => 'string',
			'title' => Loc::getMessage('SENDER_ENTITY_MAILING_CHAIN_FIELD_TITLE_TITLE1'),
			'save_data_modification' => array('\Bitrix\Main\Text\Emoji', 'getSaveModificator'),
			'fetch_data_modification' => array('\Bitrix\Main\Text\Emoji', 'getFetchModificator'),
		),

		'AUTO_SEND_TIME' => array(
			'data_type' => 'datetime',
		),
		'DAYS_OF_WEEK' => array(
			'data_type' => 'string',
		),
		'DAYS_OF_MONTH' => array(
			'data_type' => 'string',
		),
		'MONTHS_OF_YEAR' => array(
			'data_type' => 'string',
		),
		'TIMES_OF_DAY' => array(
			'data_type' => 'string',
		),
		'TIME_SHIFT' => array(
			'data_type' => 'integer',
		),

		'ERROR_MESSAGE' => array(
			'data_type' => 'string',
		),

		'SEARCH_CONTENT' => array(
			'data_type' => 'text',
			'save_data_modification' => array('\Bitrix\Main\Text\Emoji', 'getSaveModificator'),
			'fetch_data_modification' => array('\Bitrix\Main\Text\Emoji', 'getFetchModificator'),
		),

		'MESSAGE' => array(
			'data_type' => MessageTable::class,
			'reference' => array('=this.MESSAGE_ID' => 'ref.ID'),
		),
		'CAMPAIGN' => array(
			'data_type' => 'Bitrix\Sender\MailingTable',
			'reference' => array('=this.CAMPAIGN_ID' => 'ref.ID'),
		),
		'CURRENT_POSTING' => array(
			'data_type' => 'Bitrix\Sender\PostingTable',
			'reference' => array('=this.POSTING_ID' => 'ref.ID'),
		),
		'POSTING' => array(
			'data_type' => 'Bitrix\Sender\PostingTable',
			'reference' => array('=this.ID' => 'ref.MAILING_CHAIN_ID'),
		),
		'CREATED_BY_USER' => array(
			'data_type' => 'Bitrix\Main\UserTable',
			'reference' => array('=this.CREATED_BY' => 'ref.ID'),
		),
		'WAITING_RECIPIENT' => array(
			'data_type' => 'boolean',
			'default_value' => 'N',
			'values' => array('N', 'Y')
		),
	);
}