Add html tag to all files in xml/schema
[civicrm-core.git] / xml / schema / Core / Phone.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
3 <table>
4 <base>CRM/Core</base>
5 <class>Phone</class>
6 <name>civicrm_phone</name>
7 <comment>Phone information for a specific location.</comment>
8 <add>1.1</add>
9 <log>true</log>
10 <icon>fa-phone</icon>
11 <labelField>phone</labelField>
12 <field>
13 <name>id</name>
14 <title>Phone ID</title>
15 <type>int unsigned</type>
16 <required>true</required>
17 <comment>Unique Phone 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>Phone Contact</title>
30 <type>int unsigned</type>
31 <comment>FK to Contact ID</comment>
32 <add>2.0</add>
33 </field>
34 <foreignKey>
35 <name>contact_id</name>
36 <table>civicrm_contact</table>
37 <key>id</key>
38 <add>2.0</add>
39 <onDelete>CASCADE</onDelete>
40 </foreignKey>
41 <field>
42 <name>location_type_id</name>
43 <title>Phone Location Type ID</title>
44 <type>int unsigned</type>
45 <comment>Which Location does this phone belong to.</comment>
46 <pseudoconstant>
47 <table>civicrm_location_type</table>
48 <keyColumn>id</keyColumn>
49 <labelColumn>display_name</labelColumn>
50 </pseudoconstant>
51 <html>
52 <type>Select</type>
53 <label>Phone Location Type</label>
54 </html>
55 <add>2.0</add>
56 </field>
57 <index>
58 <name>index_location_type</name>
59 <fieldName>location_type_id</fieldName>
60 <add>2.0</add>
61 </index>
62 <field>
63 <name>is_primary</name>
64 <title>Primary phone</title>
65 <type>boolean</type>
66 <default>0</default>
67 <html>
68 <type>Radio</type>
69 </html>
70 <comment>Is this the primary phone for this contact and location.</comment>
71 <add>1.1</add>
72 </field>
73 <index>
74 <name>index_is_primary</name>
75 <fieldName>is_primary</fieldName>
76 <add>2.0</add>
77 </index>
78 <field>
79 <name>is_billing</name>
80 <title>Is Billing Phone</title>
81 <type>boolean</type>
82 <default>0</default>
83 <comment>Is this the billing?</comment>
84 <add>2.0</add>
85 </field>
86 <index>
87 <name>index_is_billing</name>
88 <fieldName>is_billing</fieldName>
89 <add>2.0</add>
90 </index>
91 <field>
92 <name>mobile_provider_id</name>
93 <title>Mobile Provider</title>
94 <type>int unsigned</type>
95 <comment>Which Mobile Provider does this phone belong to.</comment>
96 <add>1.1</add>
97 </field>
98 <index>
99 <name>UI_mobile_provider_id</name>
100 <fieldName>mobile_provider_id</fieldName>
101 <add>1.6</add>
102 </index>
103 <field>
104 <name>phone</name>
105 <type>varchar</type>
106 <length>32</length>
107 <import>true</import>
108 <headerPattern>/phone/i</headerPattern>
109 <dataPattern>/^[\d\(\)\-\.\s]+$/</dataPattern>
110 <comment>Complete phone number.</comment>
111 <add>1.1</add>
112 <html>
113 <type>Text</type>
114 </html>
115 </field>
116 <field>
117 <name>phone_ext</name>
118 <title>Phone Extension</title>
119 <type>varchar</type>
120 <length>16</length>
121 <html>
122 <type>Text</type>
123 <size>4</size>
124 </html>
125 <import>true</import>
126 <export>true</export>
127 <headerPattern>/extension/i</headerPattern>
128 <dataPattern>/^\d+$/</dataPattern>
129 <comment>Optional extension for a phone number.</comment>
130 <add>3.3</add>
131 </field>
132 <field>
133 <name>phone_numeric</name>
134 <type>varchar</type>
135 <length>32</length>
136 <comment>Phone number stripped of all whitespace, letters, and punctuation.</comment>
137 <add>4.3</add>
138 </field>
139 <index>
140 <name>index_phone_numeric</name>
141 <fieldName>phone_numeric</fieldName>
142 <add>4.3</add>
143 </index>
144 <field>
145 <name>phone_type_id</name>
146 <title>Phone Type ID</title>
147 <type>int unsigned</type>
148 <export>true</export>
149 <comment>Which type of phone does this number belongs.</comment>
150 <pseudoconstant>
151 <optionGroupName>phone_type</optionGroupName>
152 </pseudoconstant>
153 <html>
154 <type>Select</type>
155 <label>Phone Type</label>
156 </html>
157 <add>2.2</add>
158 </field>
159 </table>