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