436 lines
16 KiB
PHP
Executable File
436 lines
16 KiB
PHP
Executable File
<?php
|
|
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
|
/*****************************************************************************
|
|
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
|
* Version 1.1 ("License"); You may not use this file except in compliance
|
|
* with the License. You may obtain a copy of the License at
|
|
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
|
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
|
* either express or implied.
|
|
*
|
|
* You may:
|
|
* a) Use and distribute this code exactly as you received without payment or
|
|
* a royalty or other fee.
|
|
* b) Create extensions for this code, provided that you make the extensions
|
|
* publicly available and document your modifications clearly.
|
|
* c) Charge for a fee for warranty or support or for accepting liability
|
|
* obligations for your customers.
|
|
*
|
|
* You may NOT:
|
|
* a) Charge for the use of the original code or extensions, including in
|
|
* electronic distribution models, such as ASP (Application Service
|
|
* Provider).
|
|
* b) Charge for the original source code or your extensions other than a
|
|
* nominal fee to cover distribution costs where such distribution
|
|
* involves PHYSICAL media.
|
|
* c) Modify or delete any pre-existing copyright notices, change notices,
|
|
* or License text in the Licensed Software
|
|
* d) Assert any patent claims against the Licensor or Contributors, or
|
|
* which would in any way restrict the ability of any third party to use the
|
|
* Licensed Software.
|
|
*
|
|
* You must:
|
|
* a) Document any modifications you make to this code including the nature of
|
|
* the change, the authors of the change, and the date of the change.
|
|
* b) Make the source code for any extensions you deploy available via an
|
|
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
|
* c) Notify the licensor of the availability of source code to your extensions
|
|
* and include instructions on how to acquire the source code and updates.
|
|
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
|
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
|
*
|
|
* The Original Code is: CommuniCore
|
|
* Olavo Farias
|
|
* 2006-04-7 olavo.farias@gmail.com
|
|
*
|
|
* The Initial Developer of the Original Code is CommuniCore.
|
|
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
|
* All Rights Reserved.
|
|
********************************************************************************/
|
|
$dictionary['EcmDocument'] = array(
|
|
'table' => 'ecmdocuments',
|
|
'audited' => true,
|
|
'comment' => 'EcmDocuments are information about products and services',
|
|
'duplicate_merge' => true,
|
|
'unified_search' => true,
|
|
'fields' => array (
|
|
'id' => array (
|
|
'name' => 'id',
|
|
'vname' => 'LBL_ID',
|
|
'type' => 'varchar',
|
|
'len' => 36,
|
|
'required' => true,
|
|
'reportable' => false,
|
|
'comment' => 'Unique identifier'
|
|
),
|
|
|
|
'date_entered' => array (
|
|
'name' => 'date_entered',
|
|
'vname' => 'LBL_DATE_ENTERED',
|
|
'type' => 'datetime',
|
|
'required' => true,
|
|
'comment' => 'Date record created'
|
|
),
|
|
'date_modified' => array (
|
|
'name' => 'date_modified',
|
|
'vname' => 'LBL_DATE_MODIFIED',
|
|
'type' => 'datetime',
|
|
'required' => true,
|
|
'comment' => 'Date record last modified'
|
|
),
|
|
'modified_user_id' => array (
|
|
'name' => 'modified_user_id',
|
|
'rname' => 'user_name',
|
|
'id_name' => 'modified_user_id',
|
|
'vname' => 'LBL_MODIFIED',
|
|
'type' => 'assigned_user_name',
|
|
'table' => 'modified_user_id_users',
|
|
'isnull' => 'false',
|
|
'dbType' => 'varchar',
|
|
'len' => 36,
|
|
'required' => true,
|
|
'reportable' => true,
|
|
'comment' => 'User who last modified record'
|
|
),
|
|
'assigned_user_id' => array (
|
|
'name' => 'assigned_user_id',
|
|
'rname' => 'user_name',
|
|
'id_name' => 'assigned_user_id',
|
|
'vname' => 'LBL_ASSIGNED_TO',
|
|
'type' => 'relate',
|
|
'table' => 'users',
|
|
'isnull' => 'false',
|
|
'dbType' => 'varchar',
|
|
'reportable' => true,
|
|
'len' => 36,
|
|
'audited' => true,
|
|
'comment' => 'User assigned to record',
|
|
'module' => 'Users',
|
|
'duplicate_merge' => 'disabled'
|
|
|
|
),
|
|
'assigned_user_name' => array (
|
|
'name' => 'assigned_user_name',
|
|
'vname' => 'LBL_ASSIGNED_TO',
|
|
'type' => 'varchar',
|
|
'reportable' => false,
|
|
'source' => 'nondb',
|
|
'table' => 'users',
|
|
'massupdate' => true,
|
|
'duplicate_merge' => 'disabled'
|
|
),
|
|
|
|
/*
|
|
//BUILDER:START Pro only
|
|
'team_id' => array (
|
|
'name' => 'team_id',
|
|
'vname' => 'LBL_TEAM_ID',
|
|
'reportable' => false,
|
|
'dbtype' => 'id',
|
|
'type' => 'team_list',
|
|
'audited' => true,
|
|
'comment' => 'The team ID for the EcmDocument'
|
|
),
|
|
'team_name' => array (
|
|
'name' => 'team_name',
|
|
'rname' => 'name',
|
|
'id_name' => 'team_id',
|
|
'vname' => 'LBL_TEAM',
|
|
'type' => 'relate',
|
|
'link' => 'team_link',
|
|
'table' => 'teams',
|
|
'isnull' => 'true',
|
|
'module' => 'Teams',
|
|
'massupdate' => false,
|
|
'dbType' => 'varchar',
|
|
'len' => 36,
|
|
'source' => 'non-db',
|
|
),
|
|
//BUILDER:START Pro only
|
|
*/
|
|
'deleted' => array (
|
|
'name' => 'deleted',
|
|
'vname' => 'LBL_CREATED_BY',
|
|
'type' => 'bool',
|
|
'required' => true,
|
|
'reportable' => false,
|
|
'comment' => 'Record deletion indicator'
|
|
),
|
|
'shortcut' => array (
|
|
'name' => 'shortcut',
|
|
'vname' => 'LBL_SHORTCUT',
|
|
'type' => 'bool',
|
|
'required' => true,
|
|
'reportable' => false,
|
|
'comment' => 'Shortcut'
|
|
),
|
|
'name' => array (
|
|
'name' => 'name',
|
|
'vname' => 'LBL_NAME',
|
|
'type' => 'name',
|
|
'required' => true,
|
|
'dbType' => 'varchar',
|
|
'len' => 255,
|
|
'audited' => true,
|
|
'unified_search' => true,
|
|
'comment' => 'The short description of the ecmdocument',
|
|
'massupdate' => true,
|
|
'merge_filter' => 'selected',
|
|
),
|
|
'description' => array (
|
|
'name' => 'description',
|
|
'vname' => 'LBL_DESCRIPTION',
|
|
'required' => true,
|
|
'type' => 'text',
|
|
'comment' => 'A full description of the ecmdocument'
|
|
),
|
|
'no' => array (
|
|
'name' => 'no',
|
|
'vname' => 'LBL_NO',
|
|
'required' => true,
|
|
'type' => 'int',
|
|
),
|
|
'path' => array (
|
|
'name' => 'path',
|
|
'vname' => 'LBL_PATH',
|
|
'required' => true,
|
|
'type' => 'text',
|
|
'comment' => 'A full description of the ecmdocument'
|
|
),
|
|
'projects_in_progress_dir' => array (
|
|
'name' => 'projects_in_progress_dir',
|
|
'vname' => 'LBL_PROJECTS_IN_PROGRESS_DIR',
|
|
'required' => true,
|
|
'type' => 'int',
|
|
'len' => 1,
|
|
'comment' => 'projects_in_progress_dir'
|
|
),
|
|
'projects_dir' => array (
|
|
'name' => 'projects_dir',
|
|
'vname' => 'LBL_PROJECTS_DIR',
|
|
'required' => true,
|
|
'type' => 'int',
|
|
'len' => 1,
|
|
'comment' => 'projects_dir'
|
|
),
|
|
'created_by' => array (
|
|
'name' => 'created_by',
|
|
'rname' => 'user_name',
|
|
'id_name' => 'created_by',
|
|
'vname' => 'LBL_CREATED',
|
|
'type' => 'assigned_user_name',
|
|
'table' => 'created_by_users',
|
|
'isnull' => 'false',
|
|
'dbType' => 'varchar',
|
|
'len' => 36,
|
|
'comment' => 'User that created the record'
|
|
),
|
|
'created_by_link' => array (
|
|
'name' => 'created_by_link',
|
|
'type' => 'link',
|
|
'relationship' => 'ecmdocuments_created_by',
|
|
'vname' => 'LBL_CREATED_BY_USER',
|
|
'link_type' => 'one',
|
|
'module' => 'Users',
|
|
'bean_name' => 'User',
|
|
'source' => 'non-db',
|
|
),
|
|
'modified_user_link' => array (
|
|
'name' => 'modified_user_link',
|
|
'type' => 'link',
|
|
'relationship' => 'ecmdocuments_modified_user',
|
|
'vname' => 'LBL_MODIFIED_BY_USER',
|
|
'link_type' => 'one',
|
|
'module' => 'Users',
|
|
'bean_name' => 'User',
|
|
'source' => 'non-db',
|
|
),
|
|
'assigned_user_link' => array (
|
|
'name' => 'assigned_user_link',
|
|
'type' => 'link',
|
|
'relationship' => 'ecmdocuments_assigned_user',
|
|
'vname' => 'LBL_ASSIGNED_TO_USER',
|
|
'link_type' => 'one',
|
|
'module' => 'Users',
|
|
'bean_name' => 'User',
|
|
'source' => 'non-db',
|
|
'duplicate_merge' => 'enabled',
|
|
'rname' => 'user_name',
|
|
'id_name' => 'assigned_user_id',
|
|
'table' => 'users',
|
|
),
|
|
//BUILDER:START of fields
|
|
//BUILDER:START activities
|
|
/*
|
|
'tasks' => array (
|
|
'name' => 'tasks',
|
|
'type' => 'link',
|
|
'relationship' => 'ecmdocuments_tasks',
|
|
'source' => 'non-db',
|
|
'vname' => 'LBL_TASKS'
|
|
),
|
|
|
|
'notes' => array (
|
|
'name' => 'notes',
|
|
'type' => 'link',
|
|
'relationship' => 'ecmdocuments_notes',
|
|
'source' => 'non-db',
|
|
'vname' => 'LBL_NOTES'
|
|
),
|
|
'meetings' => array (
|
|
'name' => 'meetings',
|
|
'type' => 'link',
|
|
'relationship' => 'ecmdocuments_meetings',
|
|
'source' => 'non-db',
|
|
'vname' => 'LBL_MEETINGS'
|
|
),
|
|
'calls' => array (
|
|
'name' => 'calls',
|
|
'type' => 'link',
|
|
'relationship' => 'ecmdocuments_calls',
|
|
'source' => 'non-db',
|
|
'vname' => 'LBL_CALLS'
|
|
),
|
|
*/
|
|
'accounts' => array (
|
|
'name' => 'accounts',
|
|
'type' => 'link',
|
|
'relationship' => 'ecmdocuments_accounts',
|
|
'module'=>'Accounts',
|
|
'source'=>'non-db',
|
|
'ignore_role'=>true,
|
|
'vname'=>'LBL_ACCOUNTS',
|
|
),
|
|
|
|
'contacts' => array (
|
|
'name' => 'contacts',
|
|
'type' => 'link',
|
|
'relationship' => 'ecmdocuments_contacts',
|
|
'source' => 'non-db',
|
|
'vname' => 'LBL_CONTACTS',
|
|
),
|
|
/*
|
|
'ecmdocuments' => array (
|
|
'name' => 'ecmdocuments',
|
|
'type' => 'link',
|
|
'relationship' => 'ecmdocument_ecmdocuments',
|
|
'source'=>'non-db',
|
|
'vname'=>'LBL_ECMDOCUMENTS',
|
|
),
|
|
'ecmdocs' => array (
|
|
'name' => 'ecmdocs',
|
|
'type' => 'link',
|
|
'relationship' => 'ecmdocuments_ecmdocs',
|
|
'source'=>'non-db',
|
|
'vname'=>'LBL_ECMDOCS',
|
|
),
|
|
'emails' => array (
|
|
'name' => 'emails',
|
|
'type' => 'link',
|
|
'relationship' => 'ecmdocuments_emails',
|
|
'source'=>'non-db',
|
|
'vname'=>'LBL_EMAILS',
|
|
),
|
|
*/
|
|
/*
|
|
'ecminvoiceins' => array (
|
|
'name' => 'ecminvoiceins',
|
|
'type' => 'link',
|
|
'relationship' => 'ecmdocuments_ecminvoiceins',
|
|
'source'=>'non-db',
|
|
'vname'=>'LBL_EMAILS',
|
|
),
|
|
'ecminvoiceouts' => array (
|
|
'name' => 'ecminvoiceouts',
|
|
'type' => 'link',
|
|
'relationship' => 'ecmdocuments_ecminvoiceouts',
|
|
'source'=>'non-db',
|
|
'vname'=>'LBL_EMAILS',
|
|
),
|
|
*/
|
|
|
|
//BUILDER:END activities
|
|
//BUILDER:END of fields
|
|
),
|
|
|
|
'indices' => array (
|
|
array('name' =>'ecmdocumentspk', 'type' =>'primary', 'fields'=>array('id')),
|
|
array('name' =>'idx_ecmdocument_name', 'type' =>'index', 'fields'=>array('name'))
|
|
//BUILDER:START of indices
|
|
//BUILDER:END of indices
|
|
)
|
|
|
|
, 'relationships' => array (
|
|
'ecmdocuments_assigned_user' => array(
|
|
'lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
|
|
'rhs_module'=> 'EcmDocuments', 'rhs_table'=> 'ecmdocuments', 'rhs_key' => 'assigned_user_id',
|
|
'relationship_type'=>'one-to-many')
|
|
|
|
,'ecmdocuments_modified_user' => array(
|
|
'lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
|
|
'rhs_module'=> 'EcmDocuments', 'rhs_table'=> 'ecmdocuments', 'rhs_key' => 'modified_user_id',
|
|
'relationship_type'=>'one-to-many')
|
|
|
|
,'ecmdocuments_created_by' => array(
|
|
'lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
|
|
'rhs_module'=> 'EcmDocuments', 'rhs_table'=> 'ecmdocuments', 'rhs_key' => 'created_by',
|
|
'relationship_type'=>'one-to-many')
|
|
|
|
//BUILDER:START of relationships
|
|
/*
|
|
,'ecmdocument_tasks' => array(
|
|
'lhs_module'=> 'EcmDocuments', 'lhs_table'=> 'ecmdocuments', 'lhs_key' => 'id',
|
|
'rhs_module'=> 'Tasks', 'rhs_table'=> 'tasks', 'rhs_key' => 'parent_id',
|
|
'relationship_type' => 'one-to-many',
|
|
'relationship_role_column' => 'parent_type',
|
|
'relationship_role_column_value' => 'EcmDocuments')
|
|
|
|
,'ecmdocument_meetings' => array(
|
|
'lhs_module'=> 'EcmDocuments', 'lhs_table'=> 'ecmdocuments', 'lhs_key' => 'id',
|
|
'rhs_module'=> 'Meetings', 'rhs_table'=> 'meetings', 'rhs_key' => 'parent_id',
|
|
'relationship_type' => 'one-to-many',
|
|
'relationship_role_column' => 'parent_type',
|
|
'relationship_role_column_value' => 'EcmDocuments')
|
|
*/
|
|
/*
|
|
,'ecmdocument_ecmdocuments' => array(
|
|
'lhs_module'=> 'EcmDocuments', 'lhs_table'=> 'ecmdocuments', 'lhs_key' => 'id',
|
|
'rhs_module'=> 'EcmDocuments', 'rhs_table'=> 'ecmdocuments', 'rhs_key' => 'iddir',
|
|
'relationship_type' => 'one-to-many')
|
|
*/
|
|
/*
|
|
,'ecmdocument_ecmfiles' => array(
|
|
'lhs_module'=> 'EcmDocuments', 'lhs_table'=> 'ecmdocuments', 'lhs_key' => 'id',
|
|
'rhs_module'=> 'EcmFiles', 'rhs_table'=> 'ecmfiles', 'rhs_key' => 'docs',
|
|
'relationship_type' => 'one-to-many')*/
|
|
/*
|
|
,'ecmdocument_calls' => array(
|
|
'lhs_module'=> 'EcmDocuments', 'lhs_table'=> 'ecmdocuments', 'lhs_key' => 'id',
|
|
'rhs_module'=> 'Calls', 'rhs_table'=> 'calls', 'rhs_key' => 'parent_id',
|
|
'relationship_type' => 'one-to-many',
|
|
'relationship_role_column' => 'parent_type',
|
|
'relationship_role_column_value' => 'EcmDocuments')
|
|
|
|
,'ecmdocument_notes' => array(
|
|
'lhs_module'=> 'EcmDocuments', 'lhs_table'=> 'ecmdocuments', 'lhs_key' => 'id',
|
|
'rhs_module'=> 'Notes', 'rhs_table'=> 'notes', 'rhs_key' => 'parent_id',
|
|
'relationship_type' => 'one-to-many',
|
|
'relationship_role_column' => 'parent_type',
|
|
'relationship_role_column_value' => 'EcmDocuments')
|
|
*/
|
|
/*
|
|
//BUILDER:START for Pro
|
|
,'ecmdocuments_team' => array(
|
|
'lhs_module'=> 'Teams', 'lhs_table'=> 'teams', 'lhs_key' => 'id',
|
|
'rhs_module'=> 'EcmDocuments', 'rhs_table'=> 'ecmdocuments', 'rhs_key' => 'team_id',
|
|
'relationship_type'=>'one-to-many')
|
|
//BUILDER:END for Pro
|
|
*/
|
|
|
|
//BUILDER:END of relationships
|
|
),
|
|
//This enables optimistic locking for Saves From EditView
|
|
'optimistic_locking'=>true,
|
|
);
|
|
?>
|