Merge pull request #18629 from eileenmcnaughton/aipn
[civicrm-core.git] / xml / schema / Core / IM.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
3 <table>
4 <base>CRM/Core</base>
5 <class>IM</class>
6 <name>civicrm_im</name>
7 <comment>IM information for a specific location.</comment>
8 <add>1.1</add>
9 <log>true</log>
10 <title>Instant Messaging</title>
11 <titlePlural>Instant Messaging</titlePlural>
12 <icon>fa-comments-o</icon>
13 <field>
14 <name>id</name>
15 <title>Instant Messenger ID</title>
16 <type>int unsigned</type>
17 <required>true</required>
18 <comment>Unique IM ID</comment>
19 <add>1.1</add>
20 </field>
21 <primaryKey>
22 <name>id</name>
23 <autoincrement>true</autoincrement>
24 </primaryKey>
25 <field>
26 <name>contact_id</name>
27 <title>IM Contact</title>
28 <type>int unsigned</type>
29 <comment>FK to Contact ID</comment>
30 <add>2.0</add>
31 </field>
32 <foreignKey>
33 <name>contact_id</name>
34 <table>civicrm_contact</table>
35 <key>id</key>
36 <add>2.0</add>
37 <onDelete>CASCADE</onDelete>
38 </foreignKey>
39 <field>
40 <name>location_type_id</name>
41 <title>IM Location Type</title>
42 <type>int unsigned</type>
43 <comment>Which Location does this email belong to.</comment>
44 <pseudoconstant>
45 <table>civicrm_location_type</table>
46 <keyColumn>id</keyColumn>
47 <labelColumn>display_name</labelColumn>
48 </pseudoconstant>
49 <add>2.0</add>
50 <html>
51 <type>Select</type>
52 </html>
53 </field>
54 <index>
55 <name>index_location_type</name>
56 <fieldName>location_type_id</fieldName>
57 <add>2.0</add>
58 </index>
59 <field>
60 <name>name</name>
61 <title>IM Screen Name</title>
62 <type>varchar</type>
63 <length>64</length>
64 <import>true</import>
65 <headerPattern>/I(nstant )?M(ess.*)?|screen(\s+)?name/i</headerPattern>
66 <dataPattern>/^[A-Za-z][0-9A-Za-z]{20,}$/</dataPattern>
67 <comment>IM screen name</comment>
68 <add>1.1</add>
69 <html>
70 <type>Text</type>
71 </html>
72 </field>
73 <field>
74 <name>provider_id</name>
75 <title>IM Provider</title>
76 <type>int unsigned</type>
77 <comment>Which IM Provider does this screen name belong to.</comment>
78 <add>1.1</add>
79 <pseudoconstant>
80 <optionGroupName>instant_messenger_service</optionGroupName>
81 </pseudoconstant>
82 <html>
83 <type>Select</type>
84 </html>
85 </field>
86 <index>
87 <name>UI_provider_id</name>
88 <fieldName>provider_id</fieldName>
89 <add>1.6</add>
90 </index>
91 <field>
92 <name>is_primary</name>
93 <title>Primary IM</title>
94 <type>boolean</type>
95 <default>0</default>
96 <html>
97 <type>Radio</type>
98 </html>
99 <comment>Is this the primary IM for this contact and location.</comment>
100 <add>1.1</add>
101 </field>
102 <index>
103 <name>index_is_primary</name>
104 <fieldName>is_primary</fieldName>
105 <add>2.0</add>
106 </index>
107 <field>
108 <name>is_billing</name>
109 <title>Is IM Billing?</title>
110 <type>boolean</type>
111 <default>0</default>
112 <comment>Is this the billing?</comment>
113 <add>2.0</add>
114 </field>
115 <index>
116 <name>index_is_billing</name>
117 <fieldName>is_billing</fieldName>
118 <add>2.0</add>
119 </index>
120 </table>