]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/Prospects/vardefs.php
Release 6.5.0
[Github/sugarcrm.git] / modules / Prospects / 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['Prospect'] = array(
39
40         'table' => 'prospects',
41         'unified_search' => true,
42         'fields' => array (
43          'tracker_key' => array (
44                 'name' => 'tracker_key',
45                 'vname' => 'LBL_TRACKER_KEY',
46                 'type' => 'int',
47                 'len' => '11',
48                 'required'=>true,
49                 'auto_increment' => true,
50                 'importable' => 'false',
51                 'studio' => array('editview' => false),
52                 ),
53           'birthdate' =>
54           array (
55             'name' => 'birthdate',
56             'vname' => 'LBL_BIRTHDATE',
57             'massupdate' => false,
58             'type' => 'date',
59           ),
60           'do_not_call' =>
61           array (
62             'name' => 'do_not_call',
63             'vname' => 'LBL_DO_NOT_CALL',
64             'type'=>'bool',
65             'default' =>'0',
66           ),
67           'lead_id' =>
68           array (
69                 'name' => 'lead_id',
70                 'type' => 'id',
71                 'reportable'=>false,
72                 'vname'=>'LBL_LEAD_ID',
73           ),
74           'account_name' =>
75           array (
76         'name' => 'account_name',
77         'vname' => 'LBL_ACCOUNT_NAME',
78         'type' => 'varchar',
79         'len' => '150',
80         ),
81      'campaign_id' =>
82       array (
83             'name' => 'campaign_id',
84         'comment' => 'Campaign that generated lead',
85         'vname'=>'LBL_CAMPAIGN_ID',
86         'rname' => 'id',
87         'id_name' => 'campaign_id',
88         'type' => 'id',
89         'table' => 'campaigns',
90         'isnull' => 'true',
91         'module' => 'Campaigns',
92         //'dbType' => 'char',
93         'reportable'=>false,
94         'massupdate' => false,
95             'duplicate_merge'=> 'disabled',
96       ),
97         'email_addresses' =>
98         array (
99                 'name' => 'email_addresses',
100         'type' => 'link',
101                 'relationship' => 'prospects_email_addresses',
102         'source' => 'non-db',
103                 'vname' => 'LBL_EMAIL_ADDRESSES',
104                 'reportable'=>false,
105         'rel_fields' => array('primary_address' => array('type'=>'bool')),
106         ),
107         'email_addresses_primary' =>
108         array (
109                 'name' => 'email_addresses_primary',
110         'type' => 'link',
111                 'relationship' => 'prospects_email_addresses_primary',
112         'source' => 'non-db',
113                 'vname' => 'LBL_EMAIL_ADDRESS_PRIMARY',
114                 'duplicate_merge'=> 'disabled',
115         ),
116           'campaigns' =>
117           array (
118                 'name' => 'campaigns',
119         'type' => 'link',
120         'relationship' => 'prospect_campaign_log',
121         'module'=>'CampaignLog',
122         'bean_name'=>'CampaignLog',
123         'source'=>'non-db',
124                 'vname'=>'LBL_CAMPAIGNLOG',
125           ),
126       'prospect_lists' =>
127       array (
128         'name' => 'prospect_lists',
129         'type' => 'link',
130         'relationship' => 'prospect_list_prospects',
131         'module'=>'ProspectLists',
132         'source'=>'non-db',
133         'vname'=>'LBL_PROSPECT_LIST',
134       ),
135       'calls' =>
136                 array (
137                         'name' => 'calls',
138                         'type' => 'link',
139                         'relationship' => 'prospect_calls',
140                         'source' => 'non-db',
141                         'vname' => 'LBL_CALLS',
142                 ),
143       'meetings'=>
144                 array (
145                         'name' => 'meetings',
146                         'type' => 'link',
147                         'relationship' => 'prospect_meetings',
148                         'source' => 'non-db',
149                         'vname' => 'LBL_MEETINGS',
150                 ),
151       'notes'=>
152                 array (
153                         'name' => 'notes',
154                         'type' => 'link',
155                         'relationship' => 'prospect_notes',
156                         'source' => 'non-db',
157                         'vname' => 'LBL_NOTES',
158                 ),
159       'tasks'=>
160                 array (
161                         'name' => 'tasks',
162                         'type' => 'link',
163                         'relationship' => 'prospect_tasks',
164                         'source' => 'non-db',
165                         'vname' => 'LBL_TASKS',
166                 ),
167       'emails'=>
168                 array (
169                         'name' => 'emails',
170                         'type' => 'link',
171                         'relationship' => 'emails_prospects_rel',
172                         'source' => 'non-db',
173                         'vname' => 'LBL_EMAILS',
174                 ),
175         ),
176
177         'indices' =>
178                         array (
179                                 array(
180                                                 'name' => 'prospect_auto_tracker_key' ,
181                                                 'type'=>'index' ,
182                                                 'fields'=>array('tracker_key')
183                                 ),
184                         array(  'name'  =>      'idx_prospects_last_first',
185                                                 'type'  =>      'index',
186                                                 'fields'=>      array(
187                                                                                 'last_name',
188                                                                                 'first_name',
189                                                                                 'deleted'
190                                                                         )
191                                 ),
192                         array(
193                                                 'name' =>       'idx_prospecs_del_last',
194                                                 'type' =>       'index',
195                                                 'fields'=>      array(
196                                                                                 'last_name',
197                                                                                 'deleted'
198                                                                                 )
199                                 ),
200                array('name' =>'idx_prospects_id_del', 'type'=>'index', 'fields'=>array('id','deleted')),
201                array('name' =>'idx_prospects_assigned', 'type'=>'index', 'fields'=>array('assigned_user_id')),
202
203                 ),
204
205         'relationships' => array (
206     'prospect_tasks' => array('lhs_module'=> 'Prospects', 'lhs_table'=> 'prospects', 'lhs_key' => 'id',
207                               'rhs_module'=> 'Tasks', 'rhs_table'=> 'tasks', 'rhs_key' => 'parent_id',
208                               'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
209                               'relationship_role_column_value'=>'Prospects'),
210     'prospect_notes' => array('lhs_module'=> 'Prospects', 'lhs_table'=> 'prospects', 'lhs_key' => 'id',
211                               'rhs_module'=> 'Notes', 'rhs_table'=> 'notes', 'rhs_key' => 'parent_id',
212                               'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
213                               'relationship_role_column_value'=>'Prospects'),
214     'prospect_meetings' => array('lhs_module'=> 'Prospects', 'lhs_table'=> 'prospects', 'lhs_key' => 'id',
215                               'rhs_module'=> 'Meetings', 'rhs_table'=> 'meetings', 'rhs_key' => 'parent_id',
216                               'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
217                               'relationship_role_column_value'=>'Prospects'),
218     'prospect_calls' => array('lhs_module'=> 'Prospects', 'lhs_table'=> 'prospects', 'lhs_key' => 'id',
219                               'rhs_module'=> 'Calls', 'rhs_table'=> 'calls', 'rhs_key' => 'parent_id',
220                               'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
221                               'relationship_role_column_value'=>'Prospects'),
222     'prospect_emails' => array('lhs_module'=> 'Prospects', 'lhs_table'=> 'prospects', 'lhs_key' => 'id',
223                               'rhs_module'=> 'Emails', 'rhs_table'=> 'emails', 'rhs_key' => 'parent_id',
224                               'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
225                               'relationship_role_column_value'=>'Prospects'),
226     'prospect_campaign_log' => array(
227                                                                         'lhs_module'            =>      'Prospects',
228                                                                         'lhs_table'                     =>      'prospects',
229                                                                         'lhs_key'                       =>      'id',
230                                                                         'rhs_module'            =>      'CampaignLog',
231                                                                         'rhs_table'                     =>      'campaign_log',
232                                                                         'rhs_key'                       =>      'target_id',
233                                                                         'relationship_type'     =>'one-to-many'
234                                                                 ),
235
236         )
237 );
238 VardefManager::createVardef('Prospects','Prospect', array('default', 'assignable',
239 'person'));
240
241
242 ?>