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