]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/Import/vardefs.php
Release 6.5.0
[Github/sugarcrm.git] / modules / Import / 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['ImportMap'] = array (
39     'table' => 'import_maps', 
40     'comment' => 'Import mapping control table',
41     'fields' => array (
42         'id' => array (
43             'name' => 'id',
44             'vname' => 'LBL_ID',
45             'type' => 'id',
46             'required'=>true,
47             'reportable'=>false,
48             'comment' => 'Unique identifier',
49             ),
50         'name' => array (
51             'name' => 'name',
52             'vname' => 'LBL_NAME',
53             'type' => 'varchar',
54             'len' => '254',
55             'required'=>true,
56             'comment' => 'Name of import map',
57             ),
58         'source' => array (
59             'name' => 'source',
60             'vname' => 'LBL_SOURCE',
61             'type' => 'varchar',
62             'len' => '36',
63             'required'=>true,
64             'comment' => '',
65             ),
66         'enclosure' => array (
67             'name' => 'enclosure',
68             'vname' => 'LBL_CUSTOM_ENCLOSURE',
69             'type' => 'varchar',
70             'len' => '1',
71             'required'=>true,
72             'comment' => '',
73             'default' => ' ',
74             ),
75         'delimiter' => array (
76             'name' => 'delimiter',
77             'vname' => 'LBL_CUSTOM_DELIMITER',
78             'type' => 'varchar',
79             'len' => '1',
80             'required'=>true,
81             'comment' => '',
82             'default' => ',',
83             ),
84         'module' => array (
85             'name' => 'module',
86             'vname' => 'LBL_MODULE',
87             'type' => 'varchar',
88             'len' => '36',
89             'required'=>true,
90             'comment' => 'Module used for import',
91             ),
92         'content' => array (
93             'name' => 'content',
94             'vname' => 'LBL_CONTENT',
95             'type' => 'text',
96             'comment' => 'Mappings for all columns',
97             ),
98         'default_values' => array (
99             'name' => 'default_values',
100             'vname' => 'LBL_CONTENT',
101             'type' => 'text',
102             'comment' => 'Default Values for all columns',
103             ),
104         'has_header' => array (
105             'name' => 'has_header',
106             'vname' => 'LBL_HAS_HEADER',
107             'type' => 'bool',
108             'default' => '1',
109             'required'=>true,
110             'comment' => 'Indicator if source file contains a header row',
111             ),
112         'deleted' => array (
113             'name' => 'deleted',
114             'vname' => 'LBL_DELETED',
115             'type' => 'bool',
116             'required'=>false,
117             'reportable'=>false,
118             'comment' => 'Record deletion indicator',
119             ),
120         'date_entered' => array (
121             'name' => 'date_entered',
122             'vname' => 'LBL_DATE_ENTERED',
123             'type' => 'datetime',
124             'required'=>true,
125             'comment' => 'Date record created',
126             ),
127         'date_modified' => array (
128             'name' => 'date_modified',
129             'vname' => 'LBL_DATE_MODIFIED',
130             'type' => 'datetime',
131             'required'=>true,
132             'comment' => 'Date record last modified',
133             ),
134         'assigned_user_id' => array (
135             'name' => 'assigned_user_id',
136             'rname' => 'user_name',
137             'id_name' => 'assigned_user_id',
138             'vname' => 'LBL_ASSIGNED_TO',
139             'type' => 'assigned_user_name',
140             'table' => 'users',
141             'isnull' => 'false',
142             'dbType' => 'id',
143             'reportable'=>false,
144             'comment' => 'Assigned-to user',
145             ),
146         'is_published' => array (
147             'name' => 'is_published',
148             'vname' => 'LBL_IS_PUBLISHED',
149             'type' => 'varchar',
150             'len' => '3',
151             'required'=>true,
152             'default'=>'no',
153             'comment' => 'Indicator if mapping is published',
154             ),
155         ),                                
156     'indices' => array (
157         array(
158             'name' =>'import_mapspk', 
159             'type' =>'primary', 
160             'fields'=>array('id')
161             ),
162         array(
163             'name' =>'idx_owner_module_name', 
164             'type' =>'index', 
165             'fields'=>array('assigned_user_id','module','name','deleted')
166             ),
167         )
168     );
169                                   
170 $dictionary['UsersLastImport'] = array ( 
171     'table' => 'users_last_import', 
172     'comment' => 'Maintains rows last imported by user', 
173     'fields' => array (
174         'id' => array (
175             'name' => 'id',
176             'vname' => 'LBL_ID',
177             'type' => 'id',
178             'required'=>true,
179             'reportable'=>false,
180             'comment' => 'Unique identifier'
181             ),
182         'assigned_user_id' => array (
183             'name' => 'assigned_user_id',
184             'rname' => 'user_name',
185             'id_name' => 'assigned_user_id',
186             'vname' => 'LBL_ASSIGNED_TO',
187             'type' => 'assigned_user_name',
188             'table' => 'users',
189             'isnull' => 'false',
190             'dbType' => 'id',
191             'reportable'=>false,
192             'comment' => 'User assigned to this record'
193             ),
194         'import_module' => array (
195             'name' => 'import_module',
196             'vname' => 'LBL_BEAN_TYPE',
197             'type' => 'varchar',
198             'len' => '36',
199             'comment' => 'Module for which import occurs'
200             ),
201         'bean_type' => array (
202             'name' => 'bean_type',
203             'vname' => 'LBL_BEAN_TYPE',
204             'type' => 'varchar',
205             'len' => '36',
206             'comment' => 'Bean type for which import occurs'
207             ),
208         'bean_id' => array (
209             'name' => 'bean_id',
210             'vname' => 'LBL_BEAN_ID',
211             'type' => 'id',
212             'reportable'=>false,
213             'comment' => 'ID of item identified by bean_type'
214             ),
215         'deleted' => array (
216             'name' => 'deleted',
217             'vname' => 'LBL_DELETED',
218             'type' => 'bool',
219             'reportable'=>false,
220             'required'=>false,
221             'comment' => 'Record deletion indicator'
222             ),
223         ),
224     'indices' => array (
225         array(
226             'name' =>'users_last_importpk', 
227             'type' =>'primary', 
228             'fields'=>array('id')
229             ),
230         array(
231             'name' =>'idx_user_id', 
232             'type' =>'index', 
233             'fields'=>array('assigned_user_id')
234             )
235         )
236     );
237 ?>