static function getMap()
{
return array(
'ID' => array(
'data_type' => 'integer',
'primary' => true,
'autocomplete' => true,
),
'DATE_INSERT' => array(
'data_type' => 'datetime',
'default_value' => new MainTypeDateTime(),
'required' => true,
),
'DATE_UPDATE' => array(
'data_type' => 'datetime',
'default_value' => new MainTypeDateTime(),
),
'TYPE_ID' => array(
'data_type' => 'integer',
'default_value' => RecipientType::EMAIL,
'required' => true,
),
'CODE' => array(
'data_type' => 'string',
'required' => true,
),
'NAME' => array(
'data_type' => 'string',
'save_data_modification' => array('BitrixMainTextEmoji', 'getSaveModificator'),
'fetch_data_modification' => array('BitrixMainTextEmoji', 'getFetchModificator'),
),
'USER_ID' => array(
'data_type' => 'integer',
),
'BLACKLISTED' => array(
'data_type' => 'boolean',
'values' => array('N', 'Y'),
'default_value' => 'N',
'required' => true,
),
'IS_READ' => array(
'data_type' => 'boolean',
'values' => array('N', 'Y'),
'default_value' => 'N',
'required' => true,
),
'IS_CLICK' => array(
'data_type' => 'boolean',
'values' => array('N', 'Y'),
'default_value' => 'N',
'required' => true,
),
'IS_UNSUB' => array(
'data_type' => 'boolean',
'values' => array('N', 'Y'),
'default_value' => 'N',
'required' => true,
),
'IS_SEND_SUCCESS' => array(
'data_type' => 'boolean',
'values' => array('N', 'Y'),
'default_value' => 'N',
'required' => true,
),
'CONSENT_STATUS' => array(
'data_type' => 'string',
'default_value' => static::CONSENT_STATUS_NEW,
'required' => true,
),
'CONSENT_REQUEST' => array(
'data_type' => 'integer',
'required' => true,
'default_value' => 0
),
'IP' => array(
'data_type' => 'string',
),
'AGENT' => array(
'data_type' => 'integer',
),
'CONTACT_LIST' => array(
'data_type' => 'BitrixSenderContactListTable',
'reference' => array('=this.ID' => 'ref.CONTACT_ID'),
),
'MAILING_SUBSCRIPTION' => array(
'data_type' => 'BitrixSenderMailingSubscriptionTable',
'reference' => array('=this.ID' => 'ref.CONTACT_ID', 'ref.IS_UNSUB' => new SqlExpression('?', 'N')),
),
'MAILING_UNSUBSCRIPTION' => array(
'data_type' => 'BitrixSenderMailingSubscriptionTable',
'reference' => array('=this.ID' => 'ref.CONTACT_ID', 'ref.IS_UNSUB' => new SqlExpression('?', 'Y')),
),
);
}