]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/Trackers/vardefs.php
Release 6.5.0
[Github/sugarcrm.git] / modules / Trackers / 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['Tracker'] = array(
39     'table' => 'tracker',
40     'fields' => array(
41         'id'=>array(
42             'name' => 'id',
43             'vname' => 'LBL_ID',
44             'type' => 'int',
45             'len' => '11',
46             'isnull' => 'false',
47             'auto_increment' => true,
48             'reportable'=>true,
49         ),
50             'monitor_id'=>array (
51                     'name' => 'monitor_id',
52                     'vname' => 'LBL_MONITOR_ID',
53                     'type' => 'id',
54                     'required'=>true,
55                     'reportable'=>false,
56             ),
57         'user_id'=>array(
58             'name' => 'user_id',
59             'vname' => 'LBL_USER_ID',
60                         'type' => 'varchar',
61             'len' => '36',
62             'isnull' => 'false',
63         ),
64         'module_name'=>array(
65             'name' => 'module_name',
66             'vname' => 'LBL_MODULE_NAME',
67             'type' => 'varchar',
68             'len' => '255',
69             'isnull' => 'false',
70         ),
71         'item_id'=>array(
72             'name' => 'item_id',
73             'vname' => 'LBL_ITEM_ID',
74             'type' => 'varchar',
75             'len' => '36',
76             'isnull' => 'false',
77         ),
78         'item_summary'=>array(
79             'name' => 'item_summary',
80             'vname' => 'LBL_ITEM_SUMMARY',
81             'type' => 'varchar',
82             'len' => '255',
83             'isnull' => 'false',
84         ),
85         'date_modified'=>array(
86             'name' => 'date_modified',
87             'vname' => 'LBL_DATE_LAST_ACTION',
88             'type' => 'datetime',
89             'isnull' => 'false',
90         ),
91         'action'=>array(
92             'name' => 'action',
93             'vname' => 'LBL_ACTION',
94             'type' => 'varchar',
95             'len' => '255',
96             'isnull' => 'false',
97         ),
98         'session_id'=>array(
99             'name' => 'session_id',
100             'vname' => 'LBL_SESSION_ID',
101             'type' => 'varchar',
102             'len' => '36',
103             'isnull' => 'true',
104         ),
105         'visible'=>array(
106             'name' => 'visible',
107             'vname' => 'LBL_VISIBLE',
108             'type' => 'bool',
109             'len' => '1',
110             'default' => '0',
111         ),
112             'deleted' =>array (
113                     'name' => 'deleted',
114                     'vname' => 'LBL_DELETED',
115                     'type' => 'bool',
116                     'default' => '0',
117                     'reportable'=>false,
118                     'comment' => 'Record deletion indicator'
119                 ),
120                 'assigned_user_link'=>array (
121                     'name' => 'assigned_user_link',
122                     'type' => 'link',
123                     'relationship' => 'tracker_user_id',
124                     'vname' => 'LBL_ASSIGNED_TO_USER',
125                     'link_type' => 'one',
126                     'module'=>'Users',
127                     'bean_name'=>'User',
128                     'source'=>'non-db',
129                 ),
130                 'monitor_id_link'=>array (
131                     'name' => 'monitor_id_link',
132                     'type' => 'link',
133                     'relationship' => 'tracker_monitor_id',
134                     'vname' => 'LBL_MONITOR_ID',
135                     'link_type' => 'one',
136                     'module'=>'TrackerPerfs',
137                     'bean_name'=>'TrackerPerf',
138                     'source'=>'non-db',
139                 ),
140     ) ,
141
142     //indices
143     'indices' => array(
144         array(
145             'name' => 'tracker_pk',
146             'type' => 'primary',
147             'fields' => array(
148                 'id'
149             )
150         ) ,
151         array(
152             'name' => 'idx_tracker_iid',
153             'type' => 'index',
154             'fields' => array(
155                 'item_id',
156             ),
157         ),
158         array(
159             // shortened name to comply with Oracle length restriction
160             'name' => 'idx_tracker_userid_vis_id',
161             'type' => 'index',
162             'fields' => array(
163                 'user_id',
164                 'visible',
165                 'id',
166             ),
167         ),
168         array(
169                 // shortened name to comply with Oracle length restriction
170             'name' => 'idx_tracker_userid_itemid_vis',
171             'type' => 'index',
172             'fields' => array(
173                 'user_id',
174                 'item_id',
175                 'visible'
176             ),
177         ),
178         array(
179             'name' => 'idx_tracker_monitor_id',
180             'type' => 'index',
181             'fields' => array(
182                 'monitor_id',
183             ),
184         ),
185         array(
186             'name' => 'idx_tracker_date_modified',
187             'type' => 'index',
188             'fields' => array(
189                 'date_modified',
190             ),
191         ),
192     ),
193
194     //relationships
195         'relationships' => array (
196           'tracker_monitor_id' =>
197                    array(
198                                 'lhs_module'=> 'TrackerPerfs', 'lhs_table'=> 'tracker_perf', 'lhs_key' => 'monitor_id',
199                                 'rhs_module'=> 'Trackers', 'rhs_table'=> 'tracker', 'rhs_key' => 'monitor_id',
200                                 'relationship_type'=>'one-to-one'
201                    )
202         ),
203 );