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