]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/CampaignLog/vardefs.php
Release 6.5.10
[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-2013 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             'reportable' => false,
57                         ),
58                 'target_tracker_key' => array (
59                         'name' => 'target_tracker_key',
60                         'vname' => 'LBL_TARGET_TRACKER_KEY',
61                         'type' => 'varchar',
62                         'len' => '36',
63                         'comment' => 'Identifier of Tracker URL',
64             'reportable' => false,
65                         ),
66                 'target_id' => array (
67                         'name' => 'target_id',
68                         'vname' => 'LBL_TARGET_ID',
69                         'type' => 'varchar',
70                         'len' => '36',
71                         'comment' => 'Identifier of target record',
72             'reportable' => false,
73                         ),
74                 'target_type' => array (
75                         'name' => 'target_type',
76                         'vname' => 'LBL_TARGET_TYPE',
77                         'type' => 'varchar',
78                         'len' => 100,
79                         'comment' => 'Descriptor of the target record type (e.g., Contact, Lead)'
80                         ),
81                 'activity_type' => array (
82                         'name' => 'activity_type',
83                         'vname' => 'LBL_ACTIVITY_TYPE',
84                         'type' => 'enum',
85                         'options'=>'campainglog_activity_type_dom',
86                         'len' => 100,
87                         'comment' => 'The activity that occurred (e.g., Viewed Message, Bounced, Opted out)'
88                         ),
89                 'activity_date' => array (
90                         'name' => 'activity_date',
91                         'vname' => 'LBL_ACTIVITY_DATE',
92                         'type' => 'datetime',
93                         'comment' => 'The date the activity occurred'
94                         ),
95                 'related_id' => array (
96                         'name' => 'related_id',
97                         'vname' => 'LBL_RELATED_ID',
98                         'type' => 'varchar',
99                         'len' => '36',
100             'reportable' => false,
101                         ),
102                 'related_type' => array (
103                         'name' => 'related_type',
104                         'vname' => 'LBL_RELATED_TYPE',
105                         'type' => 'varchar',
106                         'len' => 100,
107                         ),
108                 'archived' => array (
109                         'name' => 'archived',
110                         'vname' => 'LBL_ARCHIVED',
111                         'type' => 'bool',
112                         'reportable'=>false,
113                         'default'=>'0',
114                         'comment' => 'Indicates if item has been archived'
115                 ),
116                 'hits' => array (
117                         'name' => 'hits',
118                         'vname' => 'LBL_HITS',
119                         'type' => 'int',
120                         'default'=>'0',
121                         'reportable'=>true,
122                         'comment' => 'Number of times the item has been invoked (e.g., multiple click-thrus)'
123                 ),
124                 'list_id' => array(
125                         'name' => 'list_id',
126                         'vname' => 'LBL_LIST_ID',
127                         'type' => 'id',
128                         'reportable' =>false,
129                         'len' => '36',
130                         'comment' => 'The target list from which item originated'
131                 ),
132                 'deleted' => array (
133                         'name' => 'deleted',
134                         'vname' => 'LBL_DELETED',
135                         'type' => 'bool',
136                         'reportable'=>false,
137                         'comment' => 'Record deletion indicator'
138                 ),
139                 'recipient_name' => array(
140                         'name' => 'recipient_name',
141                         'type' => 'varchar',
142                         'len' => '255',
143                         'source'=>'non-db',
144                 ),
145                 'recipient_email' => array(
146                         'name' => 'recipient_email',
147                         'type' => 'varchar',
148                         'len' => '255',
149                         'source'=>'non-db',
150                 ),
151                 'marketing_name' => array(
152                         'name' => 'marketing_name',
153                         'type' => 'varchar',
154                         'len' => '255',
155                         'source'=>'non-db',             
156                 ),
157         'campaign_name1' => array (
158                 'name' => 'campaign_name1',
159                 'rname' => 'name',
160                 'id_name' => 'campaign_id',
161                 'vname' => 'LBL_CAMPAIGN_NAME',
162                 'type' => 'relate',
163                 'table' => 'campaigns',
164                 'isnull' => 'true',
165                 'module' => 'Campaigns',
166                 'dbType' => 'varchar',
167                 'link'=>'campaign',
168                 'len' => '255',
169                         'source'=>'non-db',
170                 ),
171                 'campaign_name' => array(
172                         'name' => 'campaign_name',
173                         'type' => 'varchar',
174                         'len' => '255',
175                         'source'=>'non-db',
176                 ),
177                 'campaign_objective' => array(
178                         'name' => 'campaign_objective',
179                         'type' => 'varchar',
180                         'len' => '255',
181                         'source'=>'non-db',
182                 ),
183                 'campaign_content' => array(
184                         'name' => 'campaign_content',
185                         'type' => 'varchar',
186                         'len' => '255',
187                         'source'=>'non-db',
188                 ),
189                 'campaign'=> array (
190                         'name' => 'campaign',
191                 'type' => 'link',
192                 'relationship' => 'campaign_campaignlog',
193                 'source'=>'non-db',
194                     'vname'=> 'LBL_CAMPAIGNS',
195                 ),
196                 'related_name'=>array (
197                         'source'=>'function',
198                         'function_name'=>'get_related_name',
199                         'function_class'=>'CampaignLog',
200                         'function_params'=> array('related_id', 'related_type'),
201                         'function_params_source'=>'this',  //valid values are 'parent' or 'this' default is parent.
202                         'type'=>'function',
203                         'name'=>'related_name',
204                     'reportable'=>false,
205                 ),
206                 'date_modified' => array (
207                 'name' => 'date_modified',
208                 'vname' => 'LBL_DATE_MODIFIED',
209                 'type' => 'datetime',
210         ),
211         'more_information'=> array(
212                         'name'=>'more_information',
213                         'vname'=>'LBL_MORE_INFO',
214                         'type'=>'varchar',
215                         'len'=>'100',
216                 ),
217         'marketing_id' => array(
218                 'name' => 'marketing_id',
219                 'vname' => 'LBL_MARKETING_ID',
220                 'type' => 'id',
221                 'reportable' =>false,
222                 'comment' => 'ID of marketing email this entry is associated with',
223         ),
224         'created_contact'=> array (
225             'name' => 'created_contact',
226             'vname' => 'LBL_CREATED_CONTACT',
227             'type' => 'link',
228             'relationship' => 'campaignlog_contact',
229             'source'=>'non-db',
230         ),
231         'created_lead'=> array (
232             'name' => 'created_lead',
233             'vname' => 'LBL_CREATED_LEAD',
234             'type' => 'link',
235             'relationship' => 'campaignlog_lead',
236             'source'=>'non-db',
237         ),
238         'created_opportunities'=> array (
239             'name'         => 'created_opportunities',
240             'vname'        => 'LBL_CREATED_OPPORTUNITY',
241             'type'         => 'link',
242             'relationship' => 'campaignlog_created_opportunities',
243             'source'       => 'non-db',
244         ),
245         'targeted_user' => array(
246             'name'         => 'targeted_user',
247             'vname'        => 'LBL_TARGETED_USER',
248             'type'         => 'link',
249             'relationship' => 'campaignlog_targeted_users',
250             'source'       => 'non-db',
251         ),
252         'sent_email'    => array(
253             'name'         => 'sent_email',
254             'vname'        => 'LBL_SENT_EMAIL',
255             'type'         => 'link',
256             'relationship' => 'campaignlog_sent_emails',
257             'source'       => 'non-db',
258         ),
259         ),
260         'indices' => array (
261                 array (
262                         'name' =>'campaign_log_pk',
263
264                         'type' =>'primary',
265                         'fields'=>array('id')
266                 ),
267                 array (
268                         'name' =>'idx_camp_tracker',
269
270                         'type' =>'index',
271                         'fields'=>array('target_tracker_key')
272                 ),
273
274                 array (
275                         'name' =>'idx_camp_campaign_id',
276
277                         'type' =>'index',
278                         'fields'=>array('campaign_id')
279                 ),
280
281                 array (
282                         'name' =>'idx_camp_more_info',
283
284                         'type' =>'index',
285                         'fields'=>array('more_information')
286                 ),
287                 array (
288                         'name' =>'idx_target_id',
289
290                         'type' =>'index',
291                         'fields'=>array('target_id')
292                 ),
293         array (
294                         'name' =>'idx_target_id_deleted',
295
296                         'type' =>'index',
297                         'fields'=>array('target_id','deleted')
298                 ),
299
300
301         ),
302         'relationships' => array (
303         'campaignlog_contact' => array( 'lhs_module'=> 'CampaignLog',
304                                                                         'lhs_table'=> 'campaign_log',
305                                                                         'lhs_key' => 'related_id',
306                                                                         'rhs_module'=> 'Contacts',
307                                                                         'rhs_table'=> 'contacts',
308                                                                         'rhs_key' => 'id',
309                                                                         'relationship_type'=>'one-to-many'),
310         'campaignlog_lead' => array('lhs_module'=> 'CampaignLog',
311                                                                 'lhs_table'=> 'campaign_log',
312                                                                 'lhs_key' => 'related_id',
313                                                                 'rhs_module'=> 'Leads',
314                                                                 'rhs_table'=> 'leads',
315                                                                 'rhs_key' => 'id',
316                                                                 'relationship_type'=>'one-to-many'),
317         'campaignlog_created_opportunities' => array(
318             'lhs_module'=> 'CampaignLog',
319             'lhs_table'=> 'campaign_log',
320             'lhs_key' => 'related_id',
321             'rhs_module'=> 'Opportunities',
322             'rhs_table'=> 'opportunities',
323             'rhs_key' => 'id',
324             'relationship_type'=>'one-to-many'
325         ),
326         'campaignlog_targeted_users' => array(
327             'lhs_module'=> 'CampaignLog',
328             'lhs_table'=> 'campaign_log',
329             'lhs_key' => 'target_id',
330             'rhs_module'=> 'Users',
331             'rhs_table'=> 'users',
332             'rhs_key' => 'id',
333             'relationship_type'=>'one-to-many'
334         ),
335         'campaignlog_sent_emails' => array(
336             'lhs_module'=> 'CampaignLog',
337             'lhs_table'=> 'campaign_log',
338             'lhs_key' => 'related_id',
339             'rhs_module'=> 'Emails',
340             'rhs_table'=> 'emails',
341             'rhs_key' => 'id',
342             'relationship_type'=>'one-to-many'
343         ),
344     )
345 );
346 ?>