Merge pull request #18912 from yashodha/dev_2153
[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 <field>
12 <name>id</name>
13 <title>Email ID</title>
14 <type>int unsigned</type>
15 <required>true</required>
16 <comment>Unique Email ID</comment>
17 <add>1.1</add>
18 </field>
19 <primaryKey>
20 <name>id</name>
21 <autoincrement>true</autoincrement>
22 </primaryKey>
23 <field>
24 <name>contact_id</name>
25 <title>Email Contact</title>
26 <type>int unsigned</type>
27 <comment>FK to Contact ID</comment>
28 <add>2.0</add>
29 </field>
30 <foreignKey>
31 <name>contact_id</name>
32 <table>civicrm_contact</table>
33 <key>id</key>
34 <add>2.0</add>
35 <onDelete>CASCADE</onDelete>
36 </foreignKey>
37 <field>
38 <name>location_type_id</name>
39 <title>Email Location Type</title>
40 <type>int unsigned</type>
41 <comment>Which Location does this email belong to.</comment>
42 <add>2.0</add>
43 <pseudoconstant>
44 <table>civicrm_location_type</table>
45 <keyColumn>id</keyColumn>
46 <labelColumn>display_name</labelColumn>
47 </pseudoconstant>
48 <html>
49 <type>Select</type>
50 </html>
51 </field>
52 <index>
53 <name>index_location_type</name>
54 <fieldName>location_type_id</fieldName>
55 <add>2.0</add>
56 </index>
57 <field>
58 <name>email</name>
59 <title>Email</title>
60 <type>varchar</type>
61 <length>254</length>
62 <html>
63 <type>Text</type>
64 <size>30</size>
65 </html>
66 <import>true</import>
67 <headerPattern>/e.?mail/i</headerPattern>
68 <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>
69 <rule>email</rule>
70 <comment>Email address</comment>
71 <add>1.1</add>
72 </field>
73 <index>
74 <name>UI_email</name>
75 <fieldName>email</fieldName>
76 <add>1.5</add>
77 </index>
78 <field>
79 <name>is_primary</name>
80 <title>Primary email</title>
81 <type>boolean</type>
82 <default>0</default>
83 <comment>Is this the primary email address</comment>
84 <add>1.1</add>
85 <html>
86 <type>Radio</type>
87 </html>
88 </field>
89 <index>
90 <name>index_is_primary</name>
91 <fieldName>is_primary</fieldName>
92 <add>2.0</add>
93 </index>
94 <field>
95 <name>is_billing</name>
96 <title>Is Billing Email?</title>
97 <type>boolean</type>
98 <default>0</default>
99 <comment>Is this the billing?</comment>
100 <add>2.0</add>
101 </field>
102 <index>
103 <name>index_is_billing</name>
104 <fieldName>is_billing</fieldName>
105 <add>2.0</add>
106 </index>
107 <field>
108 <name>on_hold</name>
109 <title>On Hold</title>
110 <export>true</export>
111 <type>int unsigned</type>
112 <default>0</default>
113 <required>true</required>
114 <comment>Implicit FK to civicrm_option_value where option_group = email_on_hold.</comment>
115 <pseudoconstant>
116 <callback>CRM_Core_PseudoConstant::emailOnHoldOptions</callback>
117 </pseudoconstant>
118 <add>1.1</add>
119 <html>
120 <type>Select</type>
121 </html>
122 </field>
123 <field>
124 <name>is_bulkmail</name>
125 <title>Use for Bulk Mail</title>
126 <export>true</export>
127 <type>boolean</type>
128 <default>0</default>
129 <required>true</required>
130 <comment>Is this address for bulk mail ?</comment>
131 <add>1.9</add>
132 </field>
133 <field>
134 <name>hold_date</name>
135 <type>datetime</type>
136 <comment>When the address went on bounce hold</comment>
137 <add>1.1</add>
138 </field>
139 <field>
140 <name>reset_date</name>
141 <type>datetime</type>
142 <comment>When the address bounce status was last reset</comment>
143 <add>1.1</add>
144 </field>
145 <field>
146 <name>signature_text</name>
147 <type>text</type>
148 <import>true</import>
149 <default>NULL</default>
150 <comment>Text formatted signature for the email.</comment>
151 <add>3.2</add>
152 </field>
153 <field>
154 <name>signature_html</name>
155 <type>text</type>
156 <import>true</import>
157 <default>NULL</default>
158 <comment>HTML formatted signature for the email.</comment>
159 <add>3.2</add>
160 </field>
161 </table>