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