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