]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/EmailMarketing/vardefs.php
Release 6.2.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-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['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         ),
99         'from_name' =>  //starting from 4.0 from_name is obsolete..replaced with inbound_email_id
100         array (
101             'name' => 'from_name',
102             'vname' => 'LBL_FROM_NAME',
103             'type' => 'varchar',
104             'len' => '100',
105             'importable' => 'required',
106         ),
107         'from_addr' =>
108         array (
109             'name' => 'from_addr',
110         'vname' => 'LBL_FROM_ADDR',
111         'type' => 'varchar',
112         'len' => '100',
113         'importable' => 'required',
114         ),
115         'reply_to_name' =>
116         array (
117             'name' => 'reply_to_name',
118             'vname' => 'LBL_REPLY_NAME',
119             'type' => 'varchar',
120             'len' => '100',
121         ),
122         'reply_to_addr' =>
123         array (
124             'name' => 'reply_to_addr',
125         'vname' => 'LBL_REPLY_ADDR',
126         'type' => 'varchar',
127         'len' => '100',
128         ),
129         'inbound_email_id' =>
130         array (
131             'name' => 'inbound_email_id',
132             'vname' => 'LBL_FROM_MAILBOX',
133             'type' => 'varchar',
134             'len' => '36',
135         ),
136         'date_start' =>
137         array (
138             'name' => 'date_start',
139         'vname' => 'LBL_DATE_START',
140         'type' => 'datetime',
141         'importable' => 'required',
142         ),
143
144         'template_id' =>
145         array (
146             'name' => 'template_id',
147             'vname' => 'LBL_TEMPLATE',
148             'type' => 'id',
149             'required'=>true,
150             'importable' => 'required',
151         ),
152         'status' =>
153         array (
154             'name' => 'status',
155             'vname' => 'LBL_STATUS',
156             'type' => 'enum',
157             'len' => 100,
158                 'required'=>true,
159                 'options' => 'email_marketing_status_dom',
160                 'importable' => 'required',
161         ),
162         'campaign_id' =>
163         array (
164             'name' => 'campaign_id',
165             'vname' => 'LBL_CAMPAIGN_ID',
166             'type' => 'id',
167             'isnull' => true,
168             'required'=>false,
169         ),
170         'all_prospect_lists' => array (
171                 'name' => 'all_prospect_lists',
172                 'vname' => 'LBL_ALL_PROSPECT_LISTS',
173                 'type' => 'bool',
174                 'default'=> 0,
175         ),
176 //no-db-fields.
177         'template_name' =>
178         array (
179             'name' => 'template_name',
180             'rname' => 'name',
181             'id_name' => 'template_id',
182             'vname' => 'LBL_TEMPLATE_NAME',
183             'type' => 'relate',
184             'table' => 'email_templates',
185             'isnull' => 'true',
186             'module' => 'EmailTemplates',
187             'dbType' => 'varchar',
188             'link'=>'emailtemplate',
189             'len' => '255',
190                 'source'=>'non-db',
191         ),
192         'prospect_list_name' =>
193         array (
194             'name' => 'prospect_list_name',
195             'vname' => 'LBL_PROSPECT_LIST_NAME',
196             'type' => 'varchar',
197             'len'=>100,
198             'source'=>'non-db',
199         ),
200
201 //related fields.
202         'prospectlists'=> array (
203                 'name' => 'prospectlists',
204         'type' => 'link',
205         'relationship' => 'email_marketing_prospect_lists',
206         'source'=>'non-db',
207         ),
208         'emailtemplate'=> array (
209                 'name' => 'emailtemplate',
210         'type' => 'link',
211         'relationship' => 'email_template_email_marketings',
212         'source'=>'non-db',
213         ),
214   ),
215   'indices' => array (
216        array('name' =>'emmkpk', 'type' =>'primary', 'fields'=>array('id')),
217        array('name' =>'idx_emmkt_name', 'type'=>'index', 'fields'=>array('name')),
218        array('name' =>'idx_emmkit_del', 'type'=>'index', 'fields'=>array('deleted')),
219   ),
220   'relationships' => array (
221         'email_template_email_marketings' => array('lhs_module'=> 'EmailTemplates', 'lhs_table'=> 'email_templates', 'lhs_key' => 'id',
222                                                           'rhs_module'=> 'EmailMarketing', 'rhs_table'=> 'email_marketing', 'rhs_key' => 'template_id',
223                                                           'relationship_type'=>'one-to-many'),
224   ),
225 );
226 ?>