]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/Schedulers/vardefs.php
Release 6.5.0RC2
[Github/sugarcrm.git] / modules / Schedulers / 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['Scheduler'] = array('table' => 'schedulers',
39         'fields' => array (
40                 'id' => array (
41                         'name' => 'id',
42                         'vname' => 'LBL_NAME',
43                         'type' => 'id',
44                         'dbType' => 'varchar',
45                         'len' => 36,
46                         'required' => true,
47                         'reportable' => false,
48                 ),
49                 'deleted' => array (
50                         'name' => 'deleted',
51                         'vname' => 'LBL_DELETED',
52                         'type' => 'bool',
53                         'len' => 1,
54                         'required' => false,
55                         'default' => '0',
56                         'reportable' => false,
57                 ),
58                 'date_entered' => array (
59                         'name' => 'date_entered',
60                         'vname' => 'LBL_DATE_ENTERED',
61                         'type' => 'datetime',
62                         'required' => true,
63                 ),
64                 'date_modified' => array (
65                         'name' => 'date_modified',
66                         'vname' => 'LBL_DATE_MODIFIED',
67                         'type' => 'datetime',
68                         'required' => true,
69                 ),
70                 'created_by' => array (
71                         'name' => 'created_by',
72                         'rname' => 'user_name',
73                         'id_name' => 'created_by',
74                         'vname' => 'LBL_CREATED',
75                         'type' => 'assigned_user_name',
76                         'table' => 'created_by_users',
77                         'isnull' => false,
78                         'dbType' => 'id',
79                         'len' => 36,
80                 ),
81                 'created_by_link' => array (
82                         'name' => 'created_by_link',
83                         'type' => 'link',
84                         'relationship' => 'schedulers_created_by_rel',
85                         'vname' => 'LBL_CREATED_BY_USER',
86                         'link_type' => 'one',
87                         'module' => 'Users',
88                         'bean_name' => 'User',
89                         'source' => 'non-db',
90                 ),
91                 'created_by_name' =>
92           array (
93             'name' => 'created_by_name',
94                 'vname' => 'LBL_CREATED',
95                 'type' => 'relate',
96                 'reportable'=>false,
97             'link' => 'created_by_link',
98             'rname' => 'user_name',
99                 'source'=>'non-db',
100                 'table' => 'users',
101                 'id_name' => 'created_by',
102                 'module'=>'Users',
103                 'duplicate_merge'=>'disabled',
104             'importable' => 'false',
105             'massupdate' => false,
106         ),
107                 'modified_user_id' => array (
108                         'name' => 'modified_user_id',
109                         'rname' => 'user_name',
110                         'id_name' => 'modified_user_id',
111                         'vname' => 'LBL_MODIFIED',
112                         'type' => 'assigned_user_name',
113                         'table' => 'modified_user_id_users',
114                         'isnull' => false,
115                         'dbType' => 'id',
116                         'len' => '36',
117                         'reportable' => true,
118                 ),
119                 'modified_user_link' => array (
120                         'name' => 'modified_user_link',
121                         'type' => 'link',
122                         'relationship' => 'schedulers_modified_user_id_rel',
123                         'vname' => 'LBL_MODIFIED_BY_USER',
124                         'link_type' => 'one',
125                         'module' => 'Users',
126                         'bean_name' => 'User',
127                         'source' => 'non-db',
128                 ),
129                 'modified_by_name' =>
130           array (
131             'name' => 'modified_by_name',
132             'vname' => 'LBL_MODIFIED_NAME',
133             'type' => 'relate',
134             'reportable'=>false,
135             'source'=>'non-db',
136             'rname'=>'user_name',
137             'table' => 'users',
138             'id_name' => 'modified_user_id',
139             'module'=>'Users',
140             'link'=>'modified_user_link',
141             'duplicate_merge'=>'disabled',
142             'massupdate' => false,
143         ),
144                 'name' => array (
145                         'name' => 'name',
146                         'vname' => 'LBL_NAME',
147                         'type' => 'varchar',
148                         'len' => '255',
149                         'required' => true,
150                         'reportable' => false,
151                         'importable' => 'required',
152                 ),
153                 'job' => array (
154                         'name' => 'job',
155                         'vname' => 'LBL_JOB',
156                         'type' => 'varchar',
157                         'len' => '255',
158                         'required' => true,
159                         'reportable' => false,
160                 ),
161                 'job_url' => array (
162                         'name' => 'job_url',
163                         'vname' => 'LBL_JOB_URL',
164                         'type' => 'varchar',
165                         'len' => '255',
166                         'required' => false,
167                         'reportable' => false,
168                         'source' => 'non-db',
169                         'dependency' => 'equal($job_function, "url::")'
170                 ),
171                 'job_function' => array (
172                         'name' => 'job_function',
173                         'vname' => 'LBL_JOB',
174                         'type' => 'enum',
175                         'function' => array('name' => array('Scheduler', 'getJobsList'), 'params' => array()),
176                         'len' => '255',
177                         'required' => false,
178                         'reportable' => false,
179                         'source' => 'non-db',
180                 ),
181                 'date_time_start' => array (
182                         'name' => 'date_time_start',
183                         'vname' => 'LBL_DATE_TIME_START',
184                         'type' => 'datetimecombo',
185                         'required' => true,
186                         'reportable' => false,
187                 ),
188                 'date_time_end' => array (
189                         'name' => 'date_time_end',
190                         'vname' => 'LBL_DATE_TIME_END',
191                         'type' => 'datetimecombo',
192                         'reportable' => false,
193                 ),
194                 'job_interval' => array (
195                         'name' => 'job_interval',
196                         'vname' => 'LBL_INTERVAL',
197                         'type' => 'varchar',
198                         'len' => '100',
199                         'required' => true,
200                         'reportable' => false,
201                 ),
202                 'adv_interval' => array (
203                         'name' => 'adv_interval',
204                         'vname' => 'LBL_ADV_OPTIONS',
205                         'type' => 'bool',
206                         'required' => false,
207                         'reportable' => false,
208                         'source' => 'non-db',
209                 ),
210
211                 'time_from' => array (
212                         'name' => 'time_from',
213                         'vname' => 'LBL_TIME_FROM',
214                         'type' => 'time',
215                         'required' => false,
216                         'reportable' => false,
217                 ),
218                 'time_to' => array (
219                         'name' => 'time_to',
220                         'vname' => 'LBL_TIME_TO',
221                         'type' => 'time',
222                         'required' => false,
223                         'reportable' => false,
224                 ),
225                 'last_run' => array (
226                         'name' => 'last_run',
227                         'vname' => 'LBL_LAST_RUN',
228                         'type' => 'datetime',
229                         'required' => false,
230                         'reportable' => false,
231                 ),
232                 'status' => array (
233                         'name' => 'status',
234                         'vname' => 'LBL_STATUS',
235                         'type' => 'enum',
236                         'options' => 'scheduler_status_dom',
237                         'len' => 100,
238                         'required' => false,
239                         'reportable' => false,
240                         'importable' => 'required',
241                 ),
242                 'catch_up' => array (
243                         'name' => 'catch_up',
244                         'vname' => 'LBL_CATCH_UP',
245                         'type' => 'bool',
246                         'len' => 1,
247                         'required' => false,
248                         'default' => '1',
249                         'reportable' => false,
250                 ),
251                 'schedulers_times' => array (
252                         'name'                  => 'schedulers_times',
253                         'vname'                 => 'LBL_SCHEDULER_TIMES',
254                         'type'                  => 'link',
255                         'relationship'  => 'schedulers_jobs_rel',
256                         'module'                => 'SchedulersJobs',
257                         'bean_name'             => 'Scheduler',
258                         'source'                => 'non-db',
259                 ),
260         ),
261         'indices' => array (
262                 array(
263                         'name' =>'schedulerspk',
264                         'type' =>'primary',
265                         'fields' => array(
266                                 'id'
267                         )
268                 ),
269                 array(
270                 'name' =>'idx_schedule',
271                 'type'=>'index',
272                 'fields' => array(
273                         'date_time_start',
274                         'deleted'
275                         )
276                 ),
277         ),
278         'relationships' => array (
279                 'schedulers_created_by_rel' => array (
280                         'lhs_module'            => 'Users',
281                         'lhs_table'                     => 'users',
282                         'lhs_key'                       => 'id',
283                         'rhs_module'            => 'Schedulers',
284                         'rhs_table'                     => 'schedulers',
285                         'rhs_key'                       => 'created_by',
286                         'relationship_type'     => 'one-to-one'
287                 ),
288                 'schedulers_modified_user_id_rel' => array (
289                         'lhs_module'            => 'Users',
290                         'lhs_table'                     => 'users',
291                         'lhs_key'                       => 'id',
292                         'rhs_module'            => 'Schedulers',
293                         'rhs_table'                     => 'schedulers',
294                         'rhs_key'                       => 'modified_user_id',
295                         'relationship_type'     => 'one-to-many'
296                 ),
297                 'schedulers_jobs_rel' => array(
298                         'lhs_module'                                    => 'Schedulers',
299                         'lhs_table'                                             => 'schedulers',
300                         'lhs_key'                                               => 'id',
301                         'rhs_module'                                    => 'SchedulersJobs',
302                         'rhs_table'                                             => 'job_queue',
303                         'rhs_key'                                               => 'scheduler_id',
304                         'relationship_type'                     => 'one-to-many',
305                 ),
306         )
307 );
308
309 //VardefManager::createVardef('Schedulers','Scheduler', array('default'));