]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/DocumentRevisions/vardefs.php
Release 6.1.4
[Github/sugarcrm.git] / modules / DocumentRevisions / 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 $dictionary['DocumentRevision'] = array('table' => 'document_revisions'
40                                ,'fields' => array (
41   'id' =>
42   array (
43     'name' => 'id',
44     'vname' => 'LBL_REVISION_NAME',
45     'type' => 'varchar',
46     'len' => '36',
47     'required'=>true,
48     'reportable'=>false,
49   ),
50
51  'change_log' =>
52   array (
53     'name' => 'change_log',
54     'vname' => 'LBL_CHANGE_LOG',
55     'type' => 'varchar',
56     'len' => '255',
57   ),
58
59   'document_id' =>
60   array (
61     'name' => 'document_id',
62     'vname' => 'LBL_DOCUMENT',
63     'type' => 'varchar',
64     'len' => '36',
65     'required'=>false,
66     'reportable'=>false,
67   ),
68
69    'date_entered' =>
70   array (
71     'name' => 'date_entered',
72     'vname' => 'LBL_DATE_ENTERED',
73     'type' => 'datetime',
74   ),
75   'created_by' =>
76   array (
77     'name' => 'created_by',
78     'rname' => 'user_name',
79     'id_name' => 'modified_user_id',
80     'vname' => 'LBL_CREATED',
81     'type' => 'assigned_user_name',
82     'table' => 'users',
83     'isnull' => 'false',
84     'dbType' => 'id',
85     'source'=>'db',
86   ),
87   'filename' =>
88   array (
89     'name' => 'filename',
90     'vname' => 'LBL_FILENAME',
91     'type' => 'varchar',
92     'required'=>true,
93     'len' => '255',
94   ),
95   'file_ext' =>
96   array (
97     'name' => 'file_ext',
98     'vname' => 'LBL_FILE_EXTENSION',
99     'type' => 'varchar',
100     'len' => 100,
101   ),
102   'file_mime_type' =>
103   array (
104     'name' => 'file_mime_type',
105     'vname' => 'LBL_MIME',
106     'type' => 'varchar',
107     'len' => '100',
108   ),
109
110   'revision'=>
111   array (
112     'name' => 'revision',
113     'vname' => 'LBL_REVISION',
114     'type' => 'varchar',
115     'len' => 100,
116     'importable' => 'required',
117   ),
118
119   'deleted' =>
120   array (
121     'name' => 'deleted',
122     'vname' => 'LBL_DELETED',
123     'type' => 'bool',
124     'default' => 0,
125     'reportable'=>false,
126   ),
127   'date_modified' =>
128   array (
129     'name' => 'date_modified',
130     'vname' => 'LBL_DATE_MODIFIED',
131     'type' => 'datetime',
132   ),
133   'documents' =>
134   array (
135         'name' => 'documents',
136     'type' => 'link',
137     'relationship' => 'document_revisions',
138     'source'=>'non-db',
139                 'vname'=>'LBL_REVISIONS',
140   ),
141
142 'created_by_link' =>
143   array (
144     'name' => 'created_by_link',
145     'type' => 'link',
146     'relationship' => 'revisions_created_by',
147     'vname' => 'LBL_CREATED_BY_USER',
148     'link_type' => 'one',
149     'module'=>'Users',
150     'bean_name'=>'User',
151     'source'=>'non-db',
152   ),
153
154 'created_by_name' =>
155   array (
156     'name' => 'created_by_name',
157     'rname' => 'user_name',
158     'db_concat_fields'=> array(0=>'first_name', 1=>'last_name'),
159     'id_name' => 'created_by',
160     'vname' => 'LBL_CREATED_BY_NAME',
161     'type' => 'relate',
162     'table' => 'users',
163     'isnull' => 'true',
164     'module' => 'Users',
165     'dbType' => 'varchar',
166     'link'=>'created_by_link',
167     'len' => '255',
168          'source'=>'non-db',
169   ),
170   'latest_revision_id'=>
171   array (
172     'name' => 'latest_revision_id',
173     'vname' => 'LBL_REVISION',
174     'type' => 'varchar',
175     'len' => '36',
176     'source'=>'non-db',
177   ),
178 ),
179 'relationships'=>array(
180    'revisions_created_by' => array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
181                         'rhs_module'=> 'DocumentRevisions', 'rhs_table'=> 'document_revisions', 'rhs_key' => 'created_by',
182                         'relationship_type'=>'one-to-many'),
183 ),
184
185 'indices' => array (
186        array('name' =>'documentrevisionspk', 'type' =>'primary', 'fields'=>array('id'))
187 )
188 );
189 ?>