Commit | Line | Data |
---|---|---|
6a488035 TO |
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 | <field> | |
b05e6d0d EM |
11 | <name>id</name> |
12 | <title>Phone ID</title> | |
13 | <type>int unsigned</type> | |
14 | <required>true</required> | |
15 | <comment>Unique Phone ID</comment> | |
16 | <add>1.1</add> | |
6a488035 TO |
17 | </field> |
18 | <primaryKey> | |
b05e6d0d EM |
19 | <name>id</name> |
20 | <autoincrement>true</autoincrement> | |
6a488035 TO |
21 | </primaryKey> |
22 | <field> | |
b05e6d0d EM |
23 | <name>contact_id</name> |
24 | <title>Phone Contact</title> | |
25 | <type>int unsigned</type> | |
26 | <comment>FK to Contact ID</comment> | |
27 | <add>2.0</add> | |
6a488035 TO |
28 | </field> |
29 | <foreignKey> | |
b05e6d0d EM |
30 | <name>contact_id</name> |
31 | <table>civicrm_contact</table> | |
32 | <key>id</key> | |
33 | <add>2.0</add> | |
34 | <onDelete>CASCADE</onDelete> | |
6a488035 TO |
35 | </foreignKey> |
36 | <field> | |
b05e6d0d EM |
37 | <name>location_type_id</name> |
38 | <title>Phone Location Type</title> | |
39 | <type>int unsigned</type> | |
40 | <comment>Which Location does this phone belong to.</comment> | |
41 | <pseudoconstant> | |
42 | <table>civicrm_location_type</table> | |
43 | <keyColumn>id</keyColumn> | |
44 | <labelColumn>display_name</labelColumn> | |
45 | </pseudoconstant> | |
46 | <html> | |
47 | <type>Select</type> | |
48 | </html> | |
49 | <add>2.0</add> | |
6a488035 TO |
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> | |
b05e6d0d EM |
57 | <name>is_primary</name> |
58 | <title>Is Phone Primary?</title> | |
59 | <type>boolean</type> | |
60 | <default>0</default> | |
61 | <comment>Is this the primary phone for this contact and location.</comment> | |
62 | <add>1.1</add> | |
6a488035 TO |
63 | </field> |
64 | <index> | |
65 | <name>index_is_primary</name> | |
66 | <fieldName>is_primary</fieldName> | |
67 | <add>2.0</add> | |
68 | </index> | |
69 | <field> | |
b05e6d0d EM |
70 | <name>is_billing</name> |
71 | <title>Is Billing Phone</title> | |
72 | <type>boolean</type> | |
73 | <default>0</default> | |
74 | <comment>Is this the billing?</comment> | |
75 | <add>2.0</add> | |
6a488035 TO |
76 | </field> |
77 | <index> | |
78 | <name>index_is_billing</name> | |
79 | <fieldName>is_billing</fieldName> | |
80 | <add>2.0</add> | |
81 | </index> | |
82 | <field> | |
b05e6d0d | 83 | <name>mobile_provider_id</name> |
455cfd16 | 84 | <title>Mobile Provider</title> |
b05e6d0d EM |
85 | <type>int unsigned</type> |
86 | <comment>Which Mobile Provider does this phone belong to.</comment> | |
87 | <add>1.1</add> | |
6a488035 TO |
88 | </field> |
89 | <index> | |
b05e6d0d EM |
90 | <name>UI_mobile_provider_id</name> |
91 | <fieldName>mobile_provider_id</fieldName> | |
92 | <add>1.6</add> | |
6a488035 TO |
93 | </index> |
94 | <field> | |
b05e6d0d EM |
95 | <name>phone</name> |
96 | <type>varchar</type> | |
97 | <length>32</length> | |
98 | <import>true</import> | |
99 | <headerPattern>/phone/i</headerPattern> | |
100 | <dataPattern>/^[\d\(\)\-\.\s]+$/</dataPattern> | |
101 | <comment>Complete phone number.</comment> | |
102 | <add>1.1</add> | |
a6c04811 TM |
103 | <html> |
104 | <type>Text</type> | |
105 | </html> | |
6a488035 TO |
106 | </field> |
107 | <field> | |
b05e6d0d EM |
108 | <name>phone_ext</name> |
109 | <title>Phone Extension</title> | |
110 | <type>varchar</type> | |
111 | <length>16</length> | |
112 | <html> | |
113 | <type>Text</type> | |
54f5e87f | 114 | <size>4</size> |
b05e6d0d EM |
115 | </html> |
116 | <import>true</import> | |
117 | <export>true</export> | |
118 | <headerPattern>/extension/i</headerPattern> | |
119 | <dataPattern>/^\d+$/</dataPattern> | |
120 | <comment>Optional extension for a phone number.</comment> | |
121 | <add>3.3</add> | |
6a488035 TO |
122 | </field> |
123 | <field> | |
b05e6d0d EM |
124 | <name>phone_numeric</name> |
125 | <type>varchar</type> | |
126 | <length>32</length> | |
127 | <comment>Phone number stripped of all whitespace, letters, and punctuation.</comment> | |
128 | <add>4.3</add> | |
6a488035 TO |
129 | </field> |
130 | <index> | |
131 | <name>index_phone_numeric</name> | |
132 | <fieldName>phone_numeric</fieldName> | |
133 | <add>4.3</add> | |
134 | </index> | |
135 | <field> | |
b05e6d0d EM |
136 | <name>phone_type</name> |
137 | <type>enum</type> | |
138 | <values>Phone, Mobile, Fax, Pager</values> | |
139 | <headerPattern>/phone\s+type/i</headerPattern> | |
140 | <dataPattern>/phone|mobile|fax|pager/i</dataPattern> | |
141 | <comment>What type of telecom device is this.</comment> | |
142 | <add>1.1</add> | |
143 | <drop>2.2</drop> | |
6a488035 TO |
144 | </field> |
145 | <field> | |
b05e6d0d EM |
146 | <name>phone_type_id</name> |
147 | <title>Phone Type</title> | |
148 | <type>int unsigned</type> | |
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 | </html> | |
156 | <add>2.2</add> | |
3c7d2158 | 157 | </field> |
6a488035 | 158 | </table> |