]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/Project/vardefs.php
Release 6.5.0
[Github/sugarcrm.git] / modules / Project / 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
39
40
41 $dictionary['Project'] = array(
42         'table' => 'project',
43         'unified_search' => true,
44         'full_text_search' => true,
45         'unified_search_default_enabled' => false,
46         'comment' => 'Project',
47         'fields' => array(
48                 'id' => array(
49                         'name' => 'id',
50                         'vname' => 'LBL_ID',
51                         'required' => true,
52                         'type' => 'id',
53                         'reportable'=>true,
54                         'comment' => 'Unique identifier'
55                 ),
56                 'date_entered' => array(
57                         'name' => 'date_entered',
58                         'vname' => 'LBL_DATE_ENTERED',
59                         'type' => 'datetime',
60                         'comment' => 'Date record created',
61                     'enable_range_search' => true,
62                     'options' => 'date_range_search_dom',
63                 ),
64                 'date_modified' => array(
65                         'name' => 'date_modified',
66                         'vname' => 'LBL_DATE_MODIFIED',
67                         'type' => 'datetime',
68                         'comment' => 'Date record last modified',
69                     'enable_range_search' => true,
70                     'options' => 'date_range_search_dom',
71                 ),
72                 'assigned_user_id' => array(
73                         'name' => 'assigned_user_id',
74                         'rname' => 'user_name',
75                         'id_name' => 'assigned_user_id',
76                         'type' => 'assigned_user_name',
77                         'vname' => 'LBL_ASSIGNED_USER_ID',
78                         'required' => false,
79                         'len' => 36,
80                         'dbType' => 'id',
81                         'table' => 'users',
82                         'isnull' => false,
83                         'reportable'=>true,
84                         'comment' => 'User assigned to this record'
85                 ),
86                 'modified_user_id' => array(
87                         'name' => 'modified_user_id',
88                         'rname' => 'user_name',
89                         'id_name' => 'modified_user_id',
90                         'vname' => 'LBL_MODIFIED_USER_ID',
91                         'type' => 'assigned_user_name',
92                         'table' => 'users',
93                         'isnull' => 'false',
94                         'dbType' => 'id',
95                         'reportable'=>true,
96                         'comment' => 'User who last modified record'
97                 ),
98                 'modified_by_name' => 
99           array (
100             'name' => 'modified_by_name',
101             'vname' => 'LBL_MODIFIED_NAME',
102             'type' => 'relate',
103             'reportable'=>false,
104             'source'=>'non-db',
105             'rname'=>'user_name',
106             'table' => 'users',
107             'id_name' => 'modified_user_id',
108             'module'=>'Users',
109             'link'=>'modified_user_link',
110             'duplicate_merge'=>'disabled' 
111           ),  
112                 'created_by' => array(
113                         'name' => 'created_by',
114                         'rname' => 'user_name',
115                         'id_name' => 'modified_user_id',
116                         'vname' => 'LBL_CREATED_BY',
117                         'type' => 'assigned_user_name',
118                         'table' => 'users',
119                         'isnull' => 'false',
120                         'dbType' => 'id',
121                         'comment' => 'User who created record',
122                 ),
123                 'created_by_name' => 
124           array (
125             'name' => 'created_by_name',
126                 'vname' => 'LBL_CREATED',
127                 'type' => 'relate',
128                 'reportable'=>false,
129             'link' => 'created_by_link',
130             'rname' => 'user_name',
131                 'source'=>'non-db',
132                 'table' => 'users',
133                 'id_name' => 'created_by',
134                 'module'=>'Users',
135                 'duplicate_merge'=>'disabled',
136         'importable' => 'false',
137         ),
138                 'name' => array(
139                         'name' => 'name',
140                         'vname' => 'LBL_NAME',
141                         'required' => true,
142                         'dbType' => 'varchar',
143                         'type' => 'name',
144                         'len' => 50,
145                         'unified_search' => true,
146                         'full_text_search' => array('boost' => 3),
147                         'comment' => 'Project name',
148                         'importable' => 'required',
149             'required' => true,
150                 ),
151                 'description' => array(
152                         'name' => 'description',
153                         'vname' => 'LBL_DESCRIPTION',
154                         'required' => false,
155                         'type' => 'text',
156                         'comment' => 'Project description'
157                 ),
158                 'deleted' => array(
159                         'name' => 'deleted',
160                         'vname' => 'LBL_DELETED',
161                         'type' => 'bool',
162                         'required' => false,
163             'reportable'=>false,
164                         'default' => '0',
165                         'comment' => 'Record deletion indicator'
166                 ),
167         'estimated_start_date' =>
168         array(
169             'name' => 'estimated_start_date',
170             'vname' => 'LBL_DATE_START',
171             'required' => true,
172             'validation' => array('type' => 'isbefore', 'compareto' => 'estimated_end_date', 'blank' => true),
173             'type' => 'date',
174             'importable' => 'required',
175             'required' => true,
176             'enable_range_search' => true,
177         ),
178         'estimated_end_date' =>
179         array(
180             'name' => 'estimated_end_date',
181             'vname' => 'LBL_DATE_END',
182             'required' => true,
183             'type' => 'date',
184             'importable' => 'required',
185             'required' => true,
186             'enable_range_search' => true,
187         ),
188         'status' =>
189         array(
190             'name' => 'status',
191             'vname' => 'LBL_STATUS',
192             'type' => 'enum',
193             'options' => 'project_status_dom',
194         ),
195
196         'priority' =>
197         array(
198             'name' => 'priority',
199             'vname' => 'LBL_PRIORITY',
200             'type' => 'enum',
201             'options' => 'projects_priority_options',
202         ),
203                 'total_estimated_effort' =>
204                 array (
205                         'name' => 'total_estimated_effort',
206                         'type' => 'int',
207                 'source'=>'non-db',
208                         'vname'=>'LBL_LIST_TOTAL_ESTIMATED_EFFORT',
209                 ),
210                 'total_actual_effort' =>
211                 array (
212                         'name' => 'total_actual_effort',
213                         'type' => 'int',
214                 'source'=>'non-db',
215                         'vname'=>'LBL_LIST_TOTAL_ACTUAL_EFFORT',
216                 ),
217
218                 'accounts' =>
219                 array (
220                         'name' => 'accounts',
221                 'type' => 'link',
222                 'relationship' => 'projects_accounts',
223                 'source'=>'non-db',
224                 'ignore_role'=>true,
225                                 'vname'=>'LBL_ACCOUNTS',
226                 ),
227                 'quotes' =>
228                 array (
229                         'name' => 'quotes',
230                 'type' => 'link',
231                 'relationship' => 'projects_quotes',
232                 'source'=>'non-db',
233                 'ignore_role'=>true,
234                                 'vname'=>'LBL_QUOTES',
235                 ),
236                 'contacts' =>
237                 array (
238                         'name' => 'contacts',
239                 'type' => 'link',
240                 'relationship' => 'projects_contacts',
241                 'source'=>'non-db',
242                 'ignore_role'=>true,
243                                 'vname'=>'LBL_CONTACTS',
244                 ),
245                 'opportunities' =>
246                 array (
247                         'name' => 'opportunities',
248                 'type' => 'link',
249                 'relationship' => 'projects_opportunities',
250                 'source'=>'non-db',
251                 'ignore_role'=>true,
252                                 'vname'=>'LBL_OPPORTUNITIES',
253                 ),
254                 'notes' =>
255                 array (
256                         'name' => 'notes',
257                 'type' => 'link',
258                 'relationship' => 'projects_notes',
259                 'source'=>'non-db',
260                                 'vname'=>'LBL_NOTES',
261                 ),
262                 'tasks' =>
263                         array (
264                         'name' => 'tasks',
265                 'type' => 'link',
266                 'relationship' => 'projects_tasks',
267                 'source'=>'non-db',
268                                 'vname'=>'LBL_TASKS',
269                 ),
270                 'meetings' =>
271                         array (
272                         'name' => 'meetings',
273                 'type' => 'link',
274                 'relationship' => 'projects_meetings',
275                 'source'=>'non-db',
276                                 'vname'=>'LBL_MEETINGS',
277                 ),
278                 'calls' =>
279                         array (
280                         'name' => 'calls',
281                 'type' => 'link',
282                 'relationship' => 'projects_calls',
283                 'source'=>'non-db',
284                                 'vname'=>'LBL_CALLS',
285                 ),
286                 'emails' =>
287                         array (
288                         'name' => 'emails',
289                 'type' => 'link',
290                 'relationship' => 'emails_projects_rel',
291                 'source'=>'non-db',
292                                 'vname'=>'LBL_EMAILS',
293                 ),
294                 'projecttask' =>
295                         array (
296                         'name' => 'projecttask',
297                 'type' => 'link',
298                 'relationship' => 'projects_project_tasks',
299                 'source'=>'non-db',
300                                 'vname'=>'LBL_PROJECT_TASKS',
301                 ),
302           'created_by_link' =>
303           array (
304                 'name' => 'created_by_link',
305             'type' => 'link',
306             'relationship' => 'projects_created_by',
307             'vname' => 'LBL_CREATED_BY_USER',
308             'link_type' => 'one',
309             'module'=>'Users',
310             'bean_name'=>'User',
311             'source'=>'non-db',
312           ),
313           'modified_user_link' =>
314           array (
315                 'name' => 'modified_user_link',
316             'type' => 'link',
317             'relationship' => 'projects_modified_user',
318             'vname' => 'LBL_MODIFIED_BY_USER',
319             'link_type' => 'one',
320             'module'=>'Users',
321             'bean_name'=>'User',
322             'source'=>'non-db',
323           ),
324           'assigned_user_link' =>
325           array (
326                 'name' => 'assigned_user_link',
327             'type' => 'link',
328             'relationship' => 'projects_assigned_user',
329             'vname' => 'LBL_ASSIGNED_TO_USER',
330             'link_type' => 'one',
331             'module'=>'Users',
332             'bean_name'=>'User',
333             'source'=>'non-db',
334           ),
335         'assigned_user_name' =>
336         array (
337                 'name' => 'assigned_user_name',
338                 'rname' => 'user_name',
339                 'id_name' => 'assigned_user_id',
340                 'vname' => 'LBL_ASSIGNED_USER_NAME',
341                 'type' => 'relate',
342                 'table' => 'users',
343                 'module' => 'Users',
344                 'dbType' => 'varchar',
345                 'link'=>'users',
346                 'len' => '255',
347                 'source'=>'non-db',
348                 ),
349         'cases' =>
350             array (
351             'name' => 'cases',
352             'type' => 'link',
353             'relationship' => 'projects_cases',
354             'side' => 'right',
355             'source'=>'non-db',
356             'vname'=>'LBL_CASES',
357         ),
358         'bugs' =>
359             array (
360             'name' => 'bugs',
361             'type' => 'link',
362             'relationship' => 'projects_bugs',
363             'side' => 'right',
364             'source'=>'non-db',
365             'vname'=>'LBL_BUGS',
366         ),
367         'products' =>
368             array (
369             'name' => 'products',
370             'type' => 'link',
371             'relationship' => 'projects_products',
372             'side' => 'right',
373             'source'=>'non-db',
374             'vname'=>'LBL_PRODUCTS',
375         ),
376         ),
377         'indices' => array(
378                 array('name' =>'projects_primary_key_index',
379                         'type' =>'primary',
380                         'fields'=>array('id')
381                 ),
382         ),
383         'relationships' => array(
384                 'projects_notes' => array(
385                         'lhs_module'=> 'Project', 'lhs_table'=> 'project', 'lhs_key' => 'id',
386                         'rhs_module'=> 'Notes', 'rhs_table'=> 'notes', 'rhs_key' => 'parent_id',
387                         'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
388                         'relationship_role_column_value'=>'Project'),
389                 'projects_tasks' => array(
390                         'lhs_module'=> 'Project', 'lhs_table'=> 'project', 'lhs_key' => 'id',
391                         'rhs_module'=> 'Tasks', 'rhs_table'=> 'tasks', 'rhs_key' => 'parent_id',
392                         'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
393                         'relationship_role_column_value'=>'Project'),
394                 'projects_meetings' => array(
395                         'lhs_module'=> 'Project', 'lhs_table'=> 'project', 'lhs_key' => 'id',
396                         'rhs_module'=> 'Meetings', 'rhs_table'=> 'meetings', 'rhs_key' => 'parent_id',
397                         'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
398                         'relationship_role_column_value'=>'Project'),
399                 'projects_calls' => array(
400                         'lhs_module'=> 'Project', 'lhs_table'=> 'project', 'lhs_key' => 'id',
401                         'rhs_module'=> 'Calls', 'rhs_table'=> 'calls', 'rhs_key' => 'parent_id',
402                         'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
403                         'relationship_role_column_value'=>'Project'),
404                 'projects_emails' => array(
405                         'lhs_module'=> 'Project', 'lhs_table'=> 'project', 'lhs_key' => 'id',
406                         'rhs_module'=> 'Emails', 'rhs_table'=> 'emails', 'rhs_key' => 'parent_id',
407                         'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
408                         'relationship_role_column_value'=>'Project'),
409                 'projects_project_tasks' => array(
410                         'lhs_module'=> 'Project', 'lhs_table'=> 'project', 'lhs_key' => 'id',
411                         'rhs_module'=> 'ProjectTask', 'rhs_table'=> 'project_task', 'rhs_key' => 'project_id',
412                         'relationship_type'=>'one-to-many'),
413         'projects_assigned_user' =>
414            array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
415            'rhs_module'=> 'Project', 'rhs_table'=> 'project', 'rhs_key' => 'assigned_user_id',
416            'relationship_type'=>'one-to-many')
417
418            ,'projects_modified_user' =>
419            array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
420            'rhs_module'=> 'Project', 'rhs_table'=> 'project', 'rhs_key' => 'modified_user_id',
421            'relationship_type'=>'one-to-many')
422
423            ,'projects_created_by' =>
424            array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
425            'rhs_module'=> 'Project', 'rhs_table'=> 'project', 'rhs_key' => 'created_by',
426            'relationship_type'=>'one-to-many')
427
428         ),
429 );
430
431 VardefManager::createVardef('Project','Project', array(
432 ));
433 ?>