Merge pull request #22571 from eileenmcnaughton/trxn
[civicrm-core.git] / xml / schema / Core / Email.xml
CommitLineData
6a488035
TO
1<?xml version="1.0" encoding="iso-8859-1" ?>
2
3<table>
4 <base>CRM/Core</base>
5 <class>Email</class>
6 <name>civicrm_email</name>
7 <comment>Email information for a specific location.</comment>
8 <add>1.1</add>
9 <log>true</log>
449c4e6b 10 <icon>fa-envelope-o</icon>
8ab43c93 11 <labelField>email</labelField>
6a488035 12 <field>
ebc23aab 13 <name>id</name>
53780a9b 14 <title>Email ID</title>
ebc23aab
EM
15 <type>int unsigned</type>
16 <required>true</required>
17 <comment>Unique Email ID</comment>
0481e12c
A
18 <html>
19 <type>Number</type>
20 </html>
ebc23aab 21 <add>1.1</add>
6a488035
TO
22 </field>
23 <primaryKey>
ebc23aab
EM
24 <name>id</name>
25 <autoincrement>true</autoincrement>
6a488035
TO
26 </primaryKey>
27 <field>
ebc23aab 28 <name>contact_id</name>
57e94608 29 <title>Contact ID</title>
ebc23aab
EM
30 <type>int unsigned</type>
31 <comment>FK to Contact ID</comment>
57e94608
A
32 <html>
33 <label>Contact</label>
34 </html>
ebc23aab 35 <add>2.0</add>
6a488035
TO
36 </field>
37 <foreignKey>
ebc23aab
EM
38 <name>contact_id</name>
39 <table>civicrm_contact</table>
40 <key>id</key>
41 <add>2.0</add>
42 <onDelete>CASCADE</onDelete>
6a488035
TO
43 </foreignKey>
44 <field>
ebc23aab
EM
45 <name>location_type_id</name>
46 <title>Email Location Type</title>
47 <type>int unsigned</type>
48 <comment>Which Location does this email belong to.</comment>
49 <add>2.0</add>
50 <pseudoconstant>
51 <table>civicrm_location_type</table>
52 <keyColumn>id</keyColumn>
53 <labelColumn>display_name</labelColumn>
54 </pseudoconstant>
55 <html>
56 <type>Select</type>
57 </html>
6a488035
TO
58 </field>
59 <index>
60 <name>index_location_type</name>
61 <fieldName>location_type_id</fieldName>
62 <add>2.0</add>
63 </index>
64 <field>
ebc23aab 65 <name>email</name>
53780a9b 66 <title>Email</title>
ebc23aab
EM
67 <type>varchar</type>
68 <length>254</length>
69 <html>
70 <type>Text</type>
54f5e87f 71 <size>30</size>
ebc23aab
EM
72 </html>
73 <import>true</import>
74 <headerPattern>/e.?mail/i</headerPattern>
75 <dataPattern>/^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$/</dataPattern>
76 <rule>email</rule>
77 <comment>Email address</comment>
78 <add>1.1</add>
6a488035
TO
79 </field>
80 <index>
ebc23aab
EM
81 <name>UI_email</name>
82 <fieldName>email</fieldName>
83 <add>1.5</add>
6a488035
TO
84 </index>
85 <field>
ebc23aab 86 <name>is_primary</name>
b6673dcd 87 <title>Primary email</title>
ebc23aab
EM
88 <type>boolean</type>
89 <default>0</default>
c1e814c7 90 <required>true</required>
b6673dcd 91 <comment>Is this the primary email address</comment>
ebc23aab 92 <add>1.1</add>
b6673dcd
CW
93 <html>
94 <type>Radio</type>
95 </html>
6a488035
TO
96 </field>
97 <index>
98 <name>index_is_primary</name>
99 <fieldName>is_primary</fieldName>
100 <add>2.0</add>
101 </index>
102 <field>
ebc23aab 103 <name>is_billing</name>
53780a9b 104 <title>Is Billing Email?</title>
ebc23aab
EM
105 <type>boolean</type>
106 <default>0</default>
c1e814c7 107 <required>true</required>
ebc23aab
EM
108 <comment>Is this the billing?</comment>
109 <add>2.0</add>
6a488035
TO
110 </field>
111 <index>
112 <name>index_is_billing</name>
113 <fieldName>is_billing</fieldName>
114 <add>2.0</add>
115 </index>
116 <field>
117 <name>on_hold</name>
f61d1b83 118 <title>On Hold</title>
6a488035 119 <export>true</export>
f61d1b83 120 <type>int unsigned</type>
6a488035
TO
121 <default>0</default>
122 <required>true</required>
f61d1b83
AS
123 <comment>Implicit FK to civicrm_option_value where option_group = email_on_hold.</comment>
124 <pseudoconstant>
125 <callback>CRM_Core_PseudoConstant::emailOnHoldOptions</callback>
126 </pseudoconstant>
6a488035 127 <add>1.1</add>
031f9ac8 128 <html>
f61d1b83 129 <type>Select</type>
031f9ac8 130 </html>
6a488035
TO
131 </field>
132 <field>
133 <name>is_bulkmail</name>
134 <title>Use for Bulk Mail</title>
135 <export>true</export>
136 <type>boolean</type>
137 <default>0</default>
138 <required>true</required>
139 <comment>Is this address for bulk mail ?</comment>
140 <add>1.9</add>
141 </field>
142 <field>
143 <name>hold_date</name>
144 <type>datetime</type>
145 <comment>When the address went on bounce hold</comment>
1662d426
A
146 <html>
147 <label>Hold Date</label>
f01d655f
EM
148 <type>Select Date</type>
149 <formatType>activityDateTime</formatType>
1662d426 150 </html>
6a488035
TO
151 <add>1.1</add>
152 </field>
153 <field>
154 <name>reset_date</name>
155 <type>datetime</type>
156 <comment>When the address bounce status was last reset</comment>
1662d426
A
157 <html>
158 <label>Reset Date</label>
f01d655f
EM
159 <type>Select Date</type>
160 <formatType>activityDateTime</formatType>
1662d426 161 </html>
6a488035
TO
162 <add>1.1</add>
163 </field>
164 <field>
165 <name>signature_text</name>
166 <type>text</type>
167 <import>true</import>
168 <default>NULL</default>
169 <comment>Text formatted signature for the email.</comment>
1662d426
A
170 <html>
171 <label>Signature Text</label>
172 </html>
6a488035
TO
173 <add>3.2</add>
174 </field>
175 <field>
176 <name>signature_html</name>
177 <type>text</type>
178 <import>true</import>
179 <default>NULL</default>
180 <comment>HTML formatted signature for the email.</comment>
1662d426
A
181 <html>
182 <label>Signature HTML</label>
183 </html>
6a488035
TO
184 <add>3.2</add>
185 </field>
186</table>