static function getMap()
{
return array(
'ID' => array(
'data_type' => 'integer',
'autocomplete' => true,
'primary' => true,
),
'MAILING_ID' => array(
'data_type' => 'integer',
'primary' => true,
'required' => true,
),
'MESSAGE_CODE' => array(
'data_type' => 'string',
'required' => true,
'default_value' => function ()
{
return MessageiBase::CODE_MAIL;
},
),
'MESSAGE_ID' => array(
'data_type' => 'integer',
),
'POSTING_ID' => array(
'data_type' => 'integer',
),
'PARENT_ID' => array(
'data_type' => 'integer',
),
'CREATED_BY' => array(
'data_type' => 'integer',
),
'DATE_INSERT' => array(
'data_type' => 'datetime',
'default_value' => new TypeDateTime(),
),
'STATUS' => array(
'data_type' => 'string',
'required' => true,
'default_value' => static::STATUS_NEW,
),
'REITERATE' => array(
'data_type' => 'string',
'default_value' => 'N',
),
'LAST_EXECUTED' => array(
'data_type' => 'datetime',
),
'TITLE' => array(
'data_type' => 'string',
'title' => Loc::getMessage('SENDER_ENTITY_MAILING_CHAIN_FIELD_TITLE_TITLE1'),
),
'EMAIL_FROM' => array(
'data_type' => 'string',
'required' => true,
'title' => Loc::getMessage('SENDER_ENTITY_MAILING_CHAIN_FIELD_TITLE_EMAIL_FROM1'),
'validation' => array(__CLASS__, 'validateEmailForm'),
),
'SUBJECT' => array(
'data_type' => 'string',
'required' => true,
'title' => Loc::getMessage('SENDER_ENTITY_MAILING_CHAIN_FIELD_TITLE_SUBJECT')
),
'MESSAGE' => array(
'data_type' => 'string',
'required' => true,
'title' => Loc::getMessage('SENDER_ENTITY_MAILING_CHAIN_FIELD_TITLE_MESSAGE')
),
'TEMPLATE_TYPE' => array(
'data_type' => 'string',
),
'TEMPLATE_ID' => array(
'data_type' => 'string',
),
'IS_TRIGGER' => array(
'data_type' => 'string',
'required' => true,
'default_value' => 'N',
),
'TIME_SHIFT' => array(
'data_type' => 'integer',
'required' => true,
'default_value' => 0,
),
'AUTO_SEND_TIME' => array(
'data_type' => 'datetime',
),
'MONTHS_OF_YEAR' => array(
'data_type' => 'string',
),
'DAYS_OF_MONTH' => array(
'data_type' => 'string',
),
'DAYS_OF_WEEK' => array(
'data_type' => 'string',
),
'TIMES_OF_DAY' => array(
'data_type' => 'string',
),
'PRIORITY' => array(
'data_type' => 'string',
),
'LINK_PARAMS' => array(
'data_type' => 'string',
),
'MAILING' => array(
'data_type' => 'BitrixSenderMailingTable',
'reference' => array('=this.MAILING_ID' => 'ref.ID'),
),
'CURRENT_POSTING' => array(
'data_type' => 'BitrixSenderPostingTable',
'reference' => array('=this.POSTING_ID' => 'ref.ID'),
),
'POSTING' => array(
'data_type' => 'BitrixSenderPostingTable',
'reference' => array('=this.ID' => 'ref.MAILING_CHAIN_ID'),
),
'ATTACHMENT' => array(
'data_type' => 'BitrixSenderMailingAttachmentTable',
'reference' => array('=this.ID' => 'ref.CHAIN_ID'),
),
'CREATED_BY_USER' => array(
'data_type' => 'BitrixMainUserTable',
'reference' => array('=this.CREATED_BY' => 'ref.ID'),
),
'WAITING_RECIPIENT' => array(
'data_type' => 'boolean',
'default_value' => 'N',
'values' => array('N', 'Y')
),
);
}