2 /*********************************************************************************
3 * SugarCRM Community Edition is a customer relationship management program developed by
4 * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
6 * This program is free software; you can redistribute it and/or modify it under
7 * the terms of the GNU Affero General Public License version 3 as published by the
8 * Free Software Foundation with the addition of the following permission added
9 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
10 * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
11 * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
13 * This program is distributed in the hope that it will be useful, but WITHOUT
14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15 * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
18 * You should have received a copy of the GNU Affero General Public License along with
19 * this program; if not, see http://www.gnu.org/licenses or write to the Free
20 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23 * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
24 * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
26 * The interactive user interfaces in modified source and object code versions
27 * of this program must display Appropriate Legal Notices, as required under
28 * Section 5 of the GNU Affero General Public License version 3.
30 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
31 * these Appropriate Legal Notices must retain the display of the "Powered by
32 * SugarCRM" logo. If the display of the logo is not reasonably feasible for
33 * technical reasons, the Appropriate Legal Notices must display the words
34 * "Powered by SugarCRM".
35 ********************************************************************************/
46 'comment' => 'Unique identifier'
53 'dbType' => 'varchar',
55 'unified_search' => true,
57 'importable' => 'required',
61 'name' => 'date_entered',
62 'vname' => 'LBL_DATE_ENTERED',
64 'group'=>'created_by_name',
65 'comment' => 'Date record created',
66 'enable_range_search' => true,
67 'options' => 'date_range_search_dom',
71 'name' => 'date_modified',
72 'vname' => 'LBL_DATE_MODIFIED',
74 'group'=>'modified_by_name',
75 'comment' => 'Date record last modified',
76 'enable_range_search' => true,
77 'options' => 'date_range_search_dom',
81 'name' => 'modified_user_id',
82 'rname' => 'user_name',
83 'id_name' => 'modified_user_id',
84 'vname' => 'LBL_MODIFIED',
85 'type' => 'assigned_user_name',
88 'group'=>'modified_by_name',
91 'comment' => 'User who last modified record',
95 'name' => 'modified_by_name',
96 'vname' => 'LBL_MODIFIED_NAME',
100 'rname'=>'user_name',
102 'id_name' => 'modified_user_id',
104 'link'=>'modified_user_link',
105 'duplicate_merge'=>'disabled'
109 'name' => 'created_by',
110 'rname' => 'user_name',
111 'id_name' => 'modified_user_id',
112 'vname' => 'LBL_CREATED',
113 'type' => 'assigned_user_name',
117 'group'=>'created_by_name',
118 'comment' => 'User who created record',
122 'name' => 'created_by_name',
123 'vname' => 'LBL_CREATED',
126 'link' => 'created_by_link',
127 'rname' => 'user_name',
130 'id_name' => 'created_by',
132 'duplicate_merge'=>'disabled',
133 'importable' => 'false',
137 'name' => 'description',
138 'vname' => 'LBL_DESCRIPTION',
140 'comment' => 'Full text of the note',
147 'vname' => 'LBL_DELETED',
151 'comment' => 'Record deletion indicator'
154 /////////////////RELATIONSHIP LINKS////////////////////////////
157 'name' => 'created_by_link',
159 'relationship' => strtolower($module) . '_created_by',
160 'vname' => 'LBL_CREATED_USER',
161 'link_type' => 'one',
166 'modified_user_link' =>
168 'name' => 'modified_user_link',
170 'relationship' => strtolower($module). '_modified_user',
171 'vname' => 'LBL_MODIFIED_USER',
172 'link_type' => 'one',
180 'id'=>array('name' =>strtolower($module).'pk', 'type' =>'primary', 'fields'=>array('id')),
182 'relationships'=>array(
183 strtolower($module).'_modified_user' =>
184 array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
185 'rhs_module'=> $module, 'rhs_table'=> strtolower($module), 'rhs_key' => 'modified_user_id',
186 'relationship_type'=>'one-to-many')
187 ,strtolower($module).'_created_by' =>
188 array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
189 'rhs_module'=> $module, 'rhs_table'=> strtolower($module), 'rhs_key' => 'created_by',
190 'relationship_type'=>'one-to-many')