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