]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/EmailMarketing/vardefs.php
Release 6.5.0
[Github/sugarcrm.git] / modules / EmailMarketing / vardefs.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 $dictionary['EmailMarketing'] = array('table' => 'email_marketing'
40                                ,'fields' => array (
41         'id' =>
42         array (
43             'name' => 'id',
44             'vname' => 'LBL_NAME',
45             'type' => 'id',
46             'required'=>true,
47         ),
48         'deleted' => array (
49                 'name' => 'deleted',
50                 'vname' => 'LBL_CREATED_BY',
51                 'type' => 'bool',
52                 'required' => false,
53                 'reportable'=>false,
54         ),
55         'date_entered' =>
56         array (
57                 'name' => 'date_entered',
58         'vname' => 'LBL_DATE_ENTERED',
59         'type' => 'datetime',
60         'required'=>true,
61         ),
62         'date_modified' =>
63         array (
64             'name' => 'date_modified',
65             'vname' => 'LBL_DATE_MODIFIED',
66             'type' => 'datetime',
67         'required'=>true,
68         ),
69         'modified_user_id' =>
70         array (
71             'name' => 'modified_user_id',
72             'rname' => 'user_name',
73             'id_name' => 'modified_user_id',
74             'vname' => 'LBL_MODIFIED_BY',
75             'type' => 'assigned_user_name',
76             'table' => 'users',
77             'isnull' => 'false',
78             'dbType' => 'id'
79         ),
80         'created_by' =>
81         array (
82         'name' => 'created_by',
83         'rname' => 'user_name',
84         'id_name' => 'modified_user_id',
85         'vname' => 'LBL_CREATED_BY',
86         'type' => 'assigned_user_name',
87         'table' => 'users',
88         'isnull' => 'false',
89         'dbType' => 'id'
90         ),
91         'name' =>
92         array (
93             'name' => 'name',
94             'vname' => 'LBL_NAME',
95             'type' => 'varchar',
96             'len' => '255',
97             'importable' => 'required',
98                 'required' => true
99         ),
100         'from_name' =>  //starting from 4.0 from_name is obsolete..replaced with inbound_email_id
101         array (
102             'name' => 'from_name',
103             'vname' => 'LBL_FROM_NAME',
104             'type' => 'varchar',
105             'len' => '100',
106             'importable' => 'required',
107                 'required' => true
108         ),
109         'from_addr' =>
110         array (
111             'name' => 'from_addr',
112         'vname' => 'LBL_FROM_ADDR',
113         'type' => 'varchar',
114         'len' => '100',
115         'importable' => 'required',
116                 'required' => true
117         ),
118         'reply_to_name' =>
119         array (
120             'name' => 'reply_to_name',
121             'vname' => 'LBL_REPLY_NAME',
122             'type' => 'varchar',
123             'len' => '100',
124         ),
125         'reply_to_addr' =>
126         array (
127             'name' => 'reply_to_addr',
128         'vname' => 'LBL_REPLY_ADDR',
129         'type' => 'varchar',
130         'len' => '100',
131         ),
132         'inbound_email_id' =>
133         array (
134             'name' => 'inbound_email_id',
135             'vname' => 'LBL_FROM_MAILBOX',
136             'type' => 'varchar',
137             'len' => '36',
138         ),
139         'date_start' =>
140         array (
141             'name' => 'date_start',
142         'vname' => 'LBL_DATE_START',
143         'type' => 'datetime',
144         'importable' => 'required',
145                 'required' => true
146         ),
147
148         'template_id' =>
149         array (
150             'name' => 'template_id',
151             'vname' => 'LBL_TEMPLATE',
152             'type' => 'id',
153             'required'=>true,
154             'importable' => 'required',
155         ),
156         'status' =>
157         array (
158             'name' => 'status',
159             'vname' => 'LBL_STATUS',
160             'type' => 'enum',
161             'len' => 100,
162                 'required'=>true,
163                 'options' => 'email_marketing_status_dom',
164                 'importable' => 'required',
165         ),
166         'campaign_id' =>
167         array (
168             'name' => 'campaign_id',
169             'vname' => 'LBL_CAMPAIGN_ID',
170             'type' => 'id',
171             'isnull' => true,
172             'required'=>false,
173         ),
174         'all_prospect_lists' => array (
175                 'name' => 'all_prospect_lists',
176                 'vname' => 'LBL_ALL_PROSPECT_LISTS',
177                 'type' => 'bool',
178                 'default'=> 0,
179         ),
180 //no-db-fields.
181         'template_name' =>
182         array (
183             'name' => 'template_name',
184             'rname' => 'name',
185             'id_name' => 'template_id',
186             'vname' => 'LBL_TEMPLATE_NAME',
187             'type' => 'relate',
188             'table' => 'email_templates',
189             'isnull' => 'true',
190             'module' => 'EmailTemplates',
191             'dbType' => 'varchar',
192             'link'=>'emailtemplate',
193             'len' => '255',
194                 'source'=>'non-db',
195         ),
196         'prospect_list_name' =>
197         array (
198             'name' => 'prospect_list_name',
199             'vname' => 'LBL_PROSPECT_LIST_NAME',
200             'type' => 'varchar',
201             'len'=>100,
202             'source'=>'non-db',
203         ),
204
205 //related fields.
206         'prospectlists'=> array (
207                 'name' => 'prospectlists',
208         'type' => 'link',
209         'relationship' => 'email_marketing_prospect_lists',
210         'source'=>'non-db',
211         ),
212         'emailtemplate'=> array (
213                 'name' => 'emailtemplate',
214         'type' => 'link',
215         'relationship' => 'email_template_email_marketings',
216         'source'=>'non-db',
217         ),
218   ),
219   'indices' => array (
220        array('name' =>'emmkpk', 'type' =>'primary', 'fields'=>array('id')),
221        array('name' =>'idx_emmkt_name', 'type'=>'index', 'fields'=>array('name')),
222        array('name' =>'idx_emmkit_del', 'type'=>'index', 'fields'=>array('deleted')),
223   ),
224   'relationships' => array (
225         'email_template_email_marketings' => array('lhs_module'=> 'EmailTemplates', 'lhs_table'=> 'email_templates', 'lhs_key' => 'id',
226                                                           'rhs_module'=> 'EmailMarketing', 'rhs_table'=> 'email_marketing', 'rhs_key' => 'template_id',
227                                                           'relationship_type'=>'one-to-many'),
228   ),
229 );
230 ?>