]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/CampaignLog/vardefs.php
Release 6.5.0
[Github/sugarcrm.git] / modules / CampaignLog / vardefs.php
1 <?php
2 if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 /*********************************************************************************
4  * SugarCRM Community Edition is a customer relationship management program developed by
5  * SugarCRM, Inc. Copyright (C) 2004-2012 SugarCRM Inc.
6  * 
7  * This program is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU Affero General Public License version 3 as published by the
9  * Free Software Foundation with the addition of the following permission added
10  * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
11  * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
12  * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
13  * 
14  * This program is distributed in the hope that it will be useful, but WITHOUT
15  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16  * FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
17  * details.
18  * 
19  * You should have received a copy of the GNU Affero General Public License along with
20  * this program; if not, see http://www.gnu.org/licenses or write to the Free
21  * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22  * 02110-1301 USA.
23  * 
24  * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
25  * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
26  * 
27  * The interactive user interfaces in modified source and object code versions
28  * of this program must display Appropriate Legal Notices, as required under
29  * Section 5 of the GNU Affero General Public License version 3.
30  * 
31  * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
32  * these Appropriate Legal Notices must retain the display of the "Powered by
33  * SugarCRM" logo. If the display of the logo is not reasonably feasible for
34  * technical reasons, the Appropriate Legal Notices must display the words
35  * "Powered by SugarCRM".
36  ********************************************************************************/
37
38 $dictionary['CampaignLog'] = array ('audited'=>false,
39         'comment' => 'Tracks items of interest that occurred after you send an email campaign',
40         'table' => 'campaign_log',
41
42         'fields' => array (
43                 'id' => array (
44                         'name' => 'id',
45                         'vname' => 'LBL_ID',
46                         'type' => 'id',
47                         'required' => true,
48                         'reportable'=>true,
49                         'comment' => 'Unique identifier'
50                         ),
51                 'campaign_id' => array (
52                         'name' => 'campaign_id',
53                         'vname' => 'LBL_CAMPAIGN_ID',
54                         'type' => 'id',
55                         'comment' => 'Campaign identifier'
56                         ),
57                 'target_tracker_key' => array (
58                         'name' => 'target_tracker_key',
59                         'vname' => 'LBL_TARGET_TRACKER_KEY',
60                         'type' => 'varchar',
61                         'len' => '36',
62                         'comment' => 'Identifier of Tracker URL'
63                         ),
64                 'target_id' => array (
65                         'name' => 'target_id',
66                         'vname' => 'LBL_TARGET_ID',
67                         'type' => 'varchar',
68                         'len' => '36',
69                         'comment' => 'Identifier of target record'
70                         ),
71                 'target_type' => array (
72                         'name' => 'target_type',
73                         'vname' => 'LBL_TARGET_TYPE',
74                         'type' => 'varchar',
75                         'len' => 100,
76                         'comment' => 'Descriptor of the target record type (e.g., Contact, Lead)'
77                         ),
78                 'activity_type' => array (
79                         'name' => 'activity_type',
80                         'vname' => 'LBL_ACTIVITY_TYPE',
81                         'type' => 'enum',
82                         'options'=>'campainglog_activity_type_dom',
83                         'len' => 100,
84                         'comment' => 'The activity that occurred (e.g., Viewed Message, Bounced, Opted out)'
85                         ),
86                 'activity_date' => array (
87                         'name' => 'activity_date',
88                         'vname' => 'LBL_ACTIVITY_DATE',
89                         'type' => 'datetime',
90                         'comment' => 'The date the activity occurred'
91                         ),
92                 'related_id' => array (
93                         'name' => 'related_id',
94                         'vname' => 'LBL_RELATED_ID',
95                         'type' => 'varchar',
96                         'len' => '36',
97                         ),
98                 'related_type' => array (
99                         'name' => 'related_type',
100                         'vname' => 'LBL_RELATED_TYPE',
101                         'type' => 'varchar',
102                         'len' => 100,
103                         ),
104                 'archived' => array (
105                         'name' => 'archived',
106                         'vname' => 'LBL_ARCHIVED',
107                         'type' => 'bool',
108                         'reportable'=>false,
109                         'default'=>'0',
110                         'comment' => 'Indicates if item has been archived'
111                 ),
112                 'hits' => array (
113                         'name' => 'hits',
114                         'vname' => 'LBL_HITS',
115                         'type' => 'int',
116                         'default'=>'0',
117                         'reportable'=>true,
118                         'comment' => 'Number of times the item has been invoked (e.g., multiple click-thrus)'
119                 ),
120                 'list_id' => array(
121                         'name' => 'list_id',
122                         'vname' => 'LBL_LIST_ID',
123                         'type' => 'id',
124                         'reportable' =>false,
125                         'len' => '36',
126                         'comment' => 'The target list from which item originated'
127                 ),
128                 'deleted' => array (
129                         'name' => 'deleted',
130                         'vname' => 'LBL_DELETED',
131                         'type' => 'bool',
132                         'reportable'=>false,
133                         'comment' => 'Record deletion indicator'
134                 ),
135                 'recipient_name' => array(
136                         'name' => 'recipient_name',
137                         'type' => 'varchar',
138                         'len' => '255',
139                         'source'=>'non-db',
140                 ),
141                 'recipient_email' => array(
142                         'name' => 'recipient_email',
143                         'type' => 'varchar',
144                         'len' => '255',
145                         'source'=>'non-db',
146                 ),
147                 'marketing_name' => array(
148                         'name' => 'marketing_name',
149                         'type' => 'varchar',
150                         'len' => '255',
151                         'source'=>'non-db',             
152                 ),
153         'campaign_name1' => array (
154                 'name' => 'campaign_name1',
155                 'rname' => 'name',
156                 'id_name' => 'campaign_id',
157                 'vname' => 'LBL_CAMPAIGN_NAME',
158                 'type' => 'relate',
159                 'table' => 'campaigns',
160                 'isnull' => 'true',
161                 'module' => 'Campaigns',
162                 'dbType' => 'varchar',
163                 'link'=>'campaign',
164                 'len' => '255',
165                         'source'=>'non-db',
166                 ),
167                 'campaign_name' => array(
168                         'name' => 'campaign_name',
169                         'type' => 'varchar',
170                         'len' => '255',
171                         'source'=>'non-db',
172                 ),
173                 'campaign_objective' => array(
174                         'name' => 'campaign_objective',
175                         'type' => 'varchar',
176                         'len' => '255',
177                         'source'=>'non-db',
178                 ),
179                 'campaign_content' => array(
180                         'name' => 'campaign_content',
181                         'type' => 'varchar',
182                         'len' => '255',
183                         'source'=>'non-db',
184                 ),
185                 'campaign'=> array (
186                         'name' => 'campaign',
187                 'type' => 'link',
188                 'relationship' => 'campaign_campaignlog',
189                 'source'=>'non-db',
190                     'vname'=> 'LBL_CAMPAIGNS',
191                 ),
192                 'related_name'=>array (
193                         'source'=>'function',
194                         'function_name'=>'get_related_name',
195                         'function_class'=>'CampaignLog',
196                         'function_params'=> array('related_id', 'related_type'),
197                         'function_params_source'=>'this',  //valid values are 'parent' or 'this' default is parent.
198                         'type'=>'function',
199                         'name'=>'related_name',
200                     'reportable'=>false,
201                 ),
202                 'date_modified' => array (
203                 'name' => 'date_modified',
204                 'vname' => 'LBL_DATE_MODIFIED',
205                 'type' => 'datetime',
206         ),
207         'more_information'=> array(
208                         'name'=>'more_information',
209                         'vname'=>'LBL_MORE_INFO',
210                         'type'=>'varchar',
211                         'len'=>'100',
212                 ),
213         'marketing_id' => array(
214                 'name' => 'marketing_id',
215                 'vname' => 'LBL_MARKETING_ID',
216                 'type' => 'id',
217                 'reportable' =>false,
218                 'comment' => 'ID of marketing email this entry is associated with',
219         ),
220         'created_contact'=> array (
221             'name' => 'created_contact',
222             'vname' => 'LBL_CREATED_CONTACT',
223             'type' => 'link',
224             'relationship' => 'campaignlog_contact',
225             'source'=>'non-db',
226         ),
227         'created_lead'=> array (
228             'name' => 'created_lead',
229             'vname' => 'LBL_CREATED_LEAD',
230             'type' => 'link',
231             'relationship' => 'campaignlog_lead',
232             'source'=>'non-db',
233         ),
234         ),
235         'indices' => array (
236                 array (
237                         'name' =>'campaign_log_pk',
238
239                         'type' =>'primary',
240                         'fields'=>array('id')
241                 ),
242                 array (
243                         'name' =>'idx_camp_tracker',
244
245                         'type' =>'index',
246                         'fields'=>array('target_tracker_key')
247                 ),
248
249                 array (
250                         'name' =>'idx_camp_campaign_id',
251
252                         'type' =>'index',
253                         'fields'=>array('campaign_id')
254                 ),
255
256                 array (
257                         'name' =>'idx_camp_more_info',
258
259                         'type' =>'index',
260                         'fields'=>array('more_information')
261                 ),
262                 array (
263                         'name' =>'idx_target_id',
264
265                         'type' =>'index',
266                         'fields'=>array('target_id')
267                 ),
268         array (
269                         'name' =>'idx_target_id_deleted',
270
271                         'type' =>'index',
272                         'fields'=>array('target_id','deleted')
273                 ),
274
275
276         ),
277         'relationships' => array (
278         'campaignlog_contact' => array( 'lhs_module'=> 'CampaignLog',
279                                                                         'lhs_table'=> 'campaign_log',
280                                                                         'lhs_key' => 'related_id',
281                                                                         'rhs_module'=> 'Contacts',
282                                                                         'rhs_table'=> 'contacts',
283                                                                         'rhs_key' => 'id',
284                                                                         'relationship_type'=>'one-to-many'),
285         'campaignlog_lead' => array('lhs_module'=> 'CampaignLog',
286                                                                 'lhs_table'=> 'campaign_log',
287                                                                 'lhs_key' => 'related_id',
288                                                                 'rhs_module'=> 'Leads',
289                                                                 'rhs_table'=> 'leads',
290                                                                 'rhs_key' => 'id',
291                                                                 'relationship_type'=>'one-to-many'),
292
293         )
294
295
296 );
297 ?>