]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - metadata/foldersMetaData.php
Release 6.5.0
[Github/sugarcrm.git] / metadata / foldersMetaData.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 /*********************************************************************************
39
40  * Description:
41  * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. All Rights
42  * Reserved. Contributor(s): ______________________________________..
43  *********************************************************************************/
44
45 $dictionary['folders'] = array(
46         'table' => 'folders',
47         'fields' => array(
48                 array(
49                         'name'                  => 'id',
50                         'type'                  => 'id',
51                         'required'              => true,
52                 ),
53                 array(
54                         'name'                  => 'name',
55                         'type'                  => 'varchar',
56                         'len'                   => 25,
57                         'required'              => true,
58                 ),
59                 array(
60                         'name'                  => 'folder_type',
61                         'type'                  => 'varchar',
62                         'len'                   => 25,
63                         'default'               => NULL,
64                 ),
65                 array(
66                         'name'                  => 'parent_folder',
67                         'type'                  => 'id',
68                         'required'              => false,
69                 ),
70                 array(
71                         'name'                  => 'has_child',
72                         'type'                  => 'bool',
73                         'default'               => '0',
74                 ),
75                 array(
76                         'name'                  => 'is_group',
77                         'type'                  => 'bool',
78                         'default'               => '0',
79                 ),
80                 array(
81                         'name'                  => 'is_dynamic',
82                         'type'                  => 'bool',
83                         'default'               => '0',
84                 ),
85                 array(
86                         'name'                  => 'dynamic_query',
87                         'type'                  => 'text',
88                 ),
89                 array(
90                         'name'                  => 'assign_to_id',
91                         'type'                  => 'id',
92                         'required'              => false,
93                 ),
94
95                 array(
96                         'name'                  => 'created_by',
97                         'type'                  => 'id',
98                         'required'              => true,
99                 ),
100                 array(
101                         'name'                  => 'modified_by',
102                         'type'                  => 'id',
103                         'required'              => true,
104                 ),
105                 array(
106                         'name'                  => 'deleted',
107                         'type'                  => 'bool',
108                         'default'               => '0',
109                 ),
110         ),
111         'indices' => array(
112                 array(
113                         'name'                  => 'folderspk',
114                         'type'                  => 'primary',
115                         'fields'                => array('id')
116                 ),
117                 array(
118                         'name'                  => 'idx_parent_folder',
119                         'type'                  => 'index',
120                         'fields'                => array('parent_folder')
121                 ),
122         ),
123 );
124
125 $dictionary['folders_subscriptions'] = array(
126         'table' => 'folders_subscriptions',
127         'fields' => array(
128                 array(
129                         'name'                  => 'id',
130                         'type'                  => 'id',
131                         'required'              => true,
132                 ),
133                 array(
134                         'name'                  => 'folder_id',
135                         'type'                  => 'id',
136                         'required'              => true,
137                 ),
138                 array(
139                         'name'                  => 'assigned_user_id',
140                         'type'                  => 'id',
141                         'required'              => true,
142                 ),
143         ),
144         'indices' => array(
145                 array(
146                         'name'                  => 'folders_subscriptionspk',
147                         'type'                  => 'primary',
148                         'fields'                => array('id')
149                 ),
150                 array(
151                         'name'                  => 'idx_folder_id_assigned_user_id',
152                         'type'                  => 'index',
153                         'fields'                => array('folder_id', 'assigned_user_id')
154                 ),
155         ),
156 );
157
158 $dictionary['folders_rel'] = array(
159         'table' => 'folders_rel',
160         'fields' => array(
161                 array(
162                         'name'                  => 'id',
163                         'type'                  => 'id',
164                         'required'              => true,
165                 ),
166                 array(
167                         'name'                  => 'folder_id',
168                         'type'                  => 'id',
169                         'required'              => true,
170                 ),
171                 array(
172                         'name'                  => 'polymorphic_module',
173                         'type'                  => 'varchar',
174                         'len'                   => 25,
175                         'required'              => true,
176                 ),
177                 array(
178                         'name'                  => 'polymorphic_id',
179                         'type'                  => 'id',
180                         'required'              => true,
181                 ),
182                 array(
183                         'name'                  => 'deleted',
184                         'type'                  => 'bool',
185                         'default'               => '0',
186                 ),
187         ),
188         'indices' => array(
189                 array(
190                         'name'                  => 'folders_relpk',
191                         'type'                  => 'primary',
192                         'fields'                => array('id'),
193                 ),
194                 array(
195                         'name'                  => 'idx_poly_module_poly_id',
196                         'type'                  => 'index',
197                         'fields'                => array('polymorphic_module', 'polymorphic_id'),
198                 ),
199                 array(
200                     'name'                      => 'idx_fr_id_deleted_poly',
201                     'type'                      => 'index',
202                     'fields'            => array('folder_id','deleted','polymorphic_id'),
203                 ),
204         ),
205 );