init
This commit is contained in:
288
modules/EcmCalls/vardefs.php
Executable file
288
modules/EcmCalls/vardefs.php
Executable file
@@ -0,0 +1,288 @@
|
||||
<?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['EcmCall'] = array(
|
||||
|
||||
'table' => 'cdr',
|
||||
'comment' => 'EcmCalls',
|
||||
'duplicate_merge' => true,
|
||||
'unified_search' => true,
|
||||
|
||||
'fields' => array (
|
||||
|
||||
//STANDARD FIELDS SECTION
|
||||
|
||||
'id' => array (
|
||||
'name' => 'id',
|
||||
'vname' => 'LBL_ID',
|
||||
'type' => 'id',
|
||||
'required' => true,
|
||||
'reportable' => false,
|
||||
'comment' => 'Unique identifier'
|
||||
),
|
||||
|
||||
'deleted' => array (
|
||||
'name' => 'deleted',
|
||||
'vname' => 'LBL_DELETED',
|
||||
'type' => 'bool',
|
||||
'required' => true,
|
||||
'reportable' => false,
|
||||
'comment' => 'Record deletion indicator'
|
||||
),
|
||||
|
||||
'note' => array (
|
||||
'name' => 'note',
|
||||
'vname' => 'LBL_NOTE',
|
||||
'type' => 'varchar',
|
||||
'len' => 1000,
|
||||
),
|
||||
|
||||
//NEW FIELDS SECTION
|
||||
|
||||
'calldate' => array(
|
||||
'name' => 'calldate',
|
||||
'type' => 'datetime',
|
||||
'required' => true,
|
||||
'default' => '0000-00-00 00:00:00',
|
||||
'vname' => 'LBL_CALLDATE',
|
||||
'massupdate' => false,
|
||||
),
|
||||
|
||||
'clid' => array(
|
||||
'name' => 'clid',
|
||||
'type' => 'varchar',
|
||||
'len' => 80,
|
||||
'required' => true,
|
||||
'vname' => 'LBL_CLID',
|
||||
),
|
||||
|
||||
'src' => array(
|
||||
'name' => 'src',
|
||||
'type' => 'varchar',
|
||||
'len' => 80,
|
||||
'required' => true,
|
||||
'vname' => 'LBL_SRC',
|
||||
),
|
||||
|
||||
'dst' => array(
|
||||
'name' => 'dst',
|
||||
'type' => 'varchar',
|
||||
'len' => 80,
|
||||
'required' => true,
|
||||
'vname' => 'LBL_DST',
|
||||
),
|
||||
|
||||
'dcontext' => array(
|
||||
'name' => 'dcontext',
|
||||
'type' => 'varchar',
|
||||
'len' => 80,
|
||||
'required' => true,
|
||||
'vname' => 'LBL_DCONTEXT',
|
||||
),
|
||||
|
||||
'channel' => array(
|
||||
'name' => 'channel',
|
||||
'type' => 'varchar',
|
||||
'len' => 80,
|
||||
'required' => true,
|
||||
'vname' => 'LBL_CHANNEL',
|
||||
),
|
||||
|
||||
'dstchannel' => array(
|
||||
'name' => 'dstchannel',
|
||||
'type' => 'varchar',
|
||||
'len' => 80,
|
||||
'required' => true,
|
||||
'vname' => 'LBL_DSTCHANNEL',
|
||||
),
|
||||
|
||||
'lastapp' => array(
|
||||
'name' => 'lastapp',
|
||||
'type' => 'varchar',
|
||||
'len' => 80,
|
||||
'required' => true,
|
||||
'vname' => 'LBL_LASTAPP',
|
||||
),
|
||||
|
||||
'lastdata' => array(
|
||||
'name' => 'lastdata',
|
||||
'type' => 'varchar',
|
||||
'len' => 80,
|
||||
'required' => true,
|
||||
'vname' => 'LBL_LASTDATA',
|
||||
),
|
||||
|
||||
'duration' => array(
|
||||
'name' => 'duration',
|
||||
'type' => 'int',
|
||||
'len' => 11,
|
||||
'default' => 0,
|
||||
'required' => true,
|
||||
'vname' => 'LBL_DURATION',
|
||||
),
|
||||
|
||||
'billsec' => array(
|
||||
'name' => 'billsec',
|
||||
'type' => 'int',
|
||||
'len' => 11,
|
||||
'default' => 0,
|
||||
'required' => true,
|
||||
'vname' => 'LBL_BILLSEC',
|
||||
),
|
||||
|
||||
'disposition' => array(
|
||||
'name' => 'disposition',
|
||||
'type' => 'varchar',
|
||||
'len' => 45,
|
||||
'required' => true,
|
||||
'vname' => 'LBL_DISPOSITION',
|
||||
),
|
||||
|
||||
'amaflags' => array(
|
||||
'name' => 'amaflags',
|
||||
'type' => 'int',
|
||||
'len' => 11,
|
||||
'default' => 0,
|
||||
'required' => true,
|
||||
'vname' => 'LBL_AMAFLAGS',
|
||||
),
|
||||
|
||||
'accountcode' => array(
|
||||
'name' => 'accountcode',
|
||||
'type' => 'varchar',
|
||||
'len' => 20,
|
||||
'required' => true,
|
||||
'vname' => 'LBL_ACCOUNTCODE',
|
||||
),
|
||||
|
||||
'userfield' => array(
|
||||
'name' => 'userfield',
|
||||
'type' => 'varchar',
|
||||
'len' => 255,
|
||||
'required' => true,
|
||||
'vname' => 'LBL_USERFIELD',
|
||||
),
|
||||
|
||||
'parent_from' => array(
|
||||
'name' => 'parent_from',
|
||||
'type' => 'multienum',
|
||||
'vname' => 'LBL_PARENT_FROM',
|
||||
'source' => 'non-db'
|
||||
),
|
||||
|
||||
'call_type' => array(
|
||||
'name' => 'call_type',
|
||||
'vname' => 'LBL_CALL_TYPE',
|
||||
'type' => 'varchar',
|
||||
//'options' => 'ecmcalls_chart_call_type_dom',
|
||||
'source' => 'non-db',
|
||||
),
|
||||
|
||||
'contacts' => array (
|
||||
'name' => 'contacts',
|
||||
'type' => 'link',
|
||||
'relationship' => 'ecmcalls_contacts',
|
||||
'source' =>'non-db',
|
||||
),
|
||||
|
||||
'accounts' => array (
|
||||
'name' => 'accounts',
|
||||
'type' => 'link',
|
||||
'relationship' => 'ecmcalls_accounts',
|
||||
'source' =>'non-db',
|
||||
),
|
||||
|
||||
'users' => array (
|
||||
'name' => 'users',
|
||||
'type' => 'link',
|
||||
'relationship' => 'ecmcalls_users',
|
||||
'source' =>'non-db',
|
||||
),
|
||||
|
||||
'src_old' => array(
|
||||
'name' => 'src_old',
|
||||
'type' => 'varchar',
|
||||
'len' => 80,
|
||||
'required' => true,
|
||||
'vname' => 'LBL_SRC_OLD',
|
||||
),
|
||||
|
||||
//FOR SUBPANELS
|
||||
|
||||
),
|
||||
|
||||
//INDICES SECTION
|
||||
'indices' => array (
|
||||
array('name' => 'calldate', 'type' => 'index', 'fields' => array('calldate')),
|
||||
array('name' => 'dst', 'type' => 'index', 'fields' => array('dst')),
|
||||
array('name' => 'accountcode', 'type' => 'index', 'fields' => array('accountcode')),
|
||||
)
|
||||
|
||||
//RELATIONSHIPS SECTION
|
||||
, 'relationships' => array (
|
||||
'ecmcalls_assigned_user' => array(
|
||||
'lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
|
||||
'rhs_module'=> 'EcmCalls', 'rhs_table'=> 'ecmcalls', 'rhs_key' => 'assigned_user',
|
||||
'relationship_type'=>'one-to-many')
|
||||
|
||||
,'ecmcalls_modified_user' => array(
|
||||
'lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
|
||||
'rhs_module'=> 'EcmCalls', 'rhs_table'=> 'ecmcalls', 'rhs_key' => 'modified_user_id',
|
||||
'relationship_type'=>'one-to-many')
|
||||
|
||||
,'ecmcalls_created_by' => array(
|
||||
'lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
|
||||
'rhs_module'=> 'EcmCalls', 'rhs_table'=> 'ecmcalls', 'rhs_key' => 'created_by',
|
||||
'relationship_type'=>'one-to-many')
|
||||
|
||||
),
|
||||
//THIS FLAG ENABLES OPTIMISTIC LOCKING FOR SAVES FROM EDITVIEW
|
||||
'optimistic_locking'=>true,
|
||||
);
|
||||
?>
|
||||
Reference in New Issue
Block a user