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> | |
449c4e6b | 10 | <icon>fa-phone</icon> |
8ab43c93 | 11 | <labelField>phone</labelField> |
6a488035 | 12 | <field> |
b05e6d0d EM |
13 | <name>id</name> |
14 | <title>Phone ID</title> | |
15 | <type>int unsigned</type> | |
16 | <required>true</required> | |
17 | <comment>Unique Phone ID</comment> | |
0481e12c A |
18 | <html> |
19 | <type>Number</type> | |
20 | </html> | |
b05e6d0d | 21 | <add>1.1</add> |
6a488035 TO |
22 | </field> |
23 | <primaryKey> | |
b05e6d0d EM |
24 | <name>id</name> |
25 | <autoincrement>true</autoincrement> | |
6a488035 TO |
26 | </primaryKey> |
27 | <field> | |
b05e6d0d | 28 | <name>contact_id</name> |
047c5009 | 29 | <title>Contact ID</title> |
b05e6d0d EM |
30 | <type>int unsigned</type> |
31 | <comment>FK to Contact ID</comment> | |
57e94608 | 32 | <html> |
047c5009 | 33 | <label>Contact</label> |
57e94608 | 34 | </html> |
b05e6d0d | 35 | <add>2.0</add> |
6a488035 TO |
36 | </field> |
37 | <foreignKey> | |
b05e6d0d EM |
38 | <name>contact_id</name> |
39 | <table>civicrm_contact</table> | |
40 | <key>id</key> | |
41 | <add>2.0</add> | |
42 | <onDelete>CASCADE</onDelete> | |
6a488035 TO |
43 | </foreignKey> |
44 | <field> | |
b05e6d0d | 45 | <name>location_type_id</name> |
1c0d6845 | 46 | <title>Location Type ID</title> |
b05e6d0d EM |
47 | <type>int unsigned</type> |
48 | <comment>Which Location does this phone belong to.</comment> | |
49 | <pseudoconstant> | |
50 | <table>civicrm_location_type</table> | |
51 | <keyColumn>id</keyColumn> | |
52 | <labelColumn>display_name</labelColumn> | |
53 | </pseudoconstant> | |
54 | <html> | |
55 | <type>Select</type> | |
1c0d6845 | 56 | <label>Location Type</label> |
b05e6d0d EM |
57 | </html> |
58 | <add>2.0</add> | |
6a488035 TO |
59 | </field> |
60 | <index> | |
61 | <name>index_location_type</name> | |
62 | <fieldName>location_type_id</fieldName> | |
63 | <add>2.0</add> | |
64 | </index> | |
65 | <field> | |
b05e6d0d | 66 | <name>is_primary</name> |
b6673dcd | 67 | <title>Primary phone</title> |
b05e6d0d EM |
68 | <type>boolean</type> |
69 | <default>0</default> | |
b6673dcd CW |
70 | <html> |
71 | <type>Radio</type> | |
72 | </html> | |
b05e6d0d EM |
73 | <comment>Is this the primary phone for this contact and location.</comment> |
74 | <add>1.1</add> | |
6a488035 TO |
75 | </field> |
76 | <index> | |
77 | <name>index_is_primary</name> | |
78 | <fieldName>is_primary</fieldName> | |
79 | <add>2.0</add> | |
80 | </index> | |
81 | <field> | |
b05e6d0d EM |
82 | <name>is_billing</name> |
83 | <title>Is Billing Phone</title> | |
84 | <type>boolean</type> | |
85 | <default>0</default> | |
86 | <comment>Is this the billing?</comment> | |
87 | <add>2.0</add> | |
6a488035 TO |
88 | </field> |
89 | <index> | |
90 | <name>index_is_billing</name> | |
91 | <fieldName>is_billing</fieldName> | |
92 | <add>2.0</add> | |
93 | </index> | |
94 | <field> | |
b05e6d0d | 95 | <name>mobile_provider_id</name> |
455cfd16 | 96 | <title>Mobile Provider</title> |
b05e6d0d EM |
97 | <type>int unsigned</type> |
98 | <comment>Which Mobile Provider does this phone belong to.</comment> | |
99 | <add>1.1</add> | |
6a488035 TO |
100 | </field> |
101 | <index> | |
b05e6d0d EM |
102 | <name>UI_mobile_provider_id</name> |
103 | <fieldName>mobile_provider_id</fieldName> | |
104 | <add>1.6</add> | |
6a488035 TO |
105 | </index> |
106 | <field> | |
b05e6d0d EM |
107 | <name>phone</name> |
108 | <type>varchar</type> | |
109 | <length>32</length> | |
110 | <import>true</import> | |
111 | <headerPattern>/phone/i</headerPattern> | |
112 | <dataPattern>/^[\d\(\)\-\.\s]+$/</dataPattern> | |
113 | <comment>Complete phone number.</comment> | |
114 | <add>1.1</add> | |
a6c04811 TM |
115 | <html> |
116 | <type>Text</type> | |
fd735f54 | 117 | <label>Phone</label> |
a6c04811 | 118 | </html> |
6a488035 TO |
119 | </field> |
120 | <field> | |
b05e6d0d EM |
121 | <name>phone_ext</name> |
122 | <title>Phone Extension</title> | |
123 | <type>varchar</type> | |
124 | <length>16</length> | |
125 | <html> | |
126 | <type>Text</type> | |
54f5e87f | 127 | <size>4</size> |
b05e6d0d EM |
128 | </html> |
129 | <import>true</import> | |
130 | <export>true</export> | |
131 | <headerPattern>/extension/i</headerPattern> | |
132 | <dataPattern>/^\d+$/</dataPattern> | |
133 | <comment>Optional extension for a phone number.</comment> | |
134 | <add>3.3</add> | |
6a488035 TO |
135 | </field> |
136 | <field> | |
b05e6d0d EM |
137 | <name>phone_numeric</name> |
138 | <type>varchar</type> | |
139 | <length>32</length> | |
140 | <comment>Phone number stripped of all whitespace, letters, and punctuation.</comment> | |
1662d426 A |
141 | <html> |
142 | <label>Numeric</label> | |
143 | </html> | |
b05e6d0d | 144 | <add>4.3</add> |
6a488035 TO |
145 | </field> |
146 | <index> | |
147 | <name>index_phone_numeric</name> | |
148 | <fieldName>phone_numeric</fieldName> | |
149 | <add>4.3</add> | |
150 | </index> | |
6a488035 | 151 | <field> |
b05e6d0d | 152 | <name>phone_type_id</name> |
0b23ab2b | 153 | <title>Phone Type ID</title> |
b05e6d0d | 154 | <type>int unsigned</type> |
219c47d6 | 155 | <export>true</export> |
b05e6d0d EM |
156 | <comment>Which type of phone does this number belongs.</comment> |
157 | <pseudoconstant> | |
158 | <optionGroupName>phone_type</optionGroupName> | |
159 | </pseudoconstant> | |
160 | <html> | |
161 | <type>Select</type> | |
9ac33d0f | 162 | <label>Phone Type</label> |
b05e6d0d EM |
163 | </html> |
164 | <add>2.2</add> | |
3c7d2158 | 165 | </field> |
6a488035 | 166 | </table> |