Merge pull request #21943 from mattwire/gccacheignore
[civicrm-core.git] / xml / schema / Core / Email.xml
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>
10 <icon>fa-envelope-o</icon>
11 <labelField>email</labelField>
12 <field>
13 <name>id</name>
14 <title>Email ID</title>
15 <type>int unsigned</type>
16 <required>true</required>
17 <comment>Unique Email ID</comment>
18 <html>
19 <type>Number</type>
20 </html>
21 <add>1.1</add>
22 </field>
23 <primaryKey>
24 <name>id</name>
25 <autoincrement>true</autoincrement>
26 </primaryKey>
27 <field>
28 <name>contact_id</name>
29 <title>Contact ID</title>
30 <type>int unsigned</type>
31 <comment>FK to Contact ID</comment>
32 <html>
33 <label>Contact</label>
34 </html>
35 <add>2.0</add>
36 </field>
37 <foreignKey>
38 <name>contact_id</name>
39 <table>civicrm_contact</table>
40 <key>id</key>
41 <add>2.0</add>
42 <onDelete>CASCADE</onDelete>
43 </foreignKey>
44 <field>
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>
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>
65 <name>email</name>
66 <title>Email</title>
67 <type>varchar</type>
68 <length>254</length>
69 <html>
70 <type>Text</type>
71 <size>30</size>
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>
79 </field>
80 <index>
81 <name>UI_email</name>
82 <fieldName>email</fieldName>
83 <add>1.5</add>
84 </index>
85 <field>
86 <name>is_primary</name>
87 <title>Primary email</title>
88 <type>boolean</type>
89 <default>0</default>
90 <required>true</required>
91 <comment>Is this the primary email address</comment>
92 <add>1.1</add>
93 <html>
94 <type>Radio</type>
95 </html>
96 </field>
97 <index>
98 <name>index_is_primary</name>
99 <fieldName>is_primary</fieldName>
100 <add>2.0</add>
101 </index>
102 <field>
103 <name>is_billing</name>
104 <title>Is Billing Email?</title>
105 <type>boolean</type>
106 <default>0</default>
107 <required>true</required>
108 <comment>Is this the billing?</comment>
109 <add>2.0</add>
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>
118 <title>On Hold</title>
119 <export>true</export>
120 <type>int unsigned</type>
121 <default>0</default>
122 <required>true</required>
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>
127 <add>1.1</add>
128 <html>
129 <type>Select</type>
130 </html>
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>
146 <html>
147 <label>Hold Date</label>
148 <type>Select Date</type>
149 <formatType>activityDateTime</formatType>
150 </html>
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>
157 <html>
158 <label>Reset Date</label>
159 <type>Select Date</type>
160 <formatType>activityDateTime</formatType>
161 </html>
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>
170 <html>
171 <label>Signature Text</label>
172 </html>
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>
181 <html>
182 <label>Signature HTML</label>
183 </html>
184 <add>3.2</add>
185 </field>
186 </table>