Merge pull request #23073 from colemanw/contactTypeIcon
[civicrm-core.git] / xml / schema / Contact / ContactType.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
3 <table>
4 <base>CRM/Contact</base>
5 <class>ContactType</class>
6 <name>civicrm_contact_type</name>
7 <comment>Provide type information for contacts</comment>
8 <add>3.1</add>
9 <field>
10 <name>id</name>
11 <title>Contact Type ID</title>
12 <type>int unsigned</type>
13 <required>true</required>
14 <comment>Contact Type ID</comment>
15 <html>
16 <type>Number</type>
17 </html>
18 <add>1.1</add>
19 </field>
20 <primaryKey>
21 <name>id</name>
22 <autoincrement>true</autoincrement>
23 </primaryKey>
24 <field>
25 <name>name</name>
26 <type>varchar</type>
27 <length>64</length>
28 <comment>Internal name of Contact Type (or Subtype).</comment>
29 <html>
30 <label>Name</label>
31 </html>
32 <add>3.1</add>
33 <required>true</required>
34 </field>
35 <index>
36 <name>contact_type</name>
37 <fieldName>name</fieldName>
38 <unique>true</unique>
39 <add>3.1</add>
40 </index>
41 <field>
42 <name>label</name>
43 <title>Contact Type Label</title>
44 <type>varchar</type>
45 <length>64</length>
46 <comment>localized Name of Contact Type.</comment>
47 <localizable>true</localizable>
48 <add>3.1</add>
49 </field>
50 <field>
51 <name>description</name>
52 <title>Contact Type Description</title>
53 <type>text</type>
54 <html>
55 <type>TextArea</type>
56 <rows>2</rows>
57 <cols>60</cols>
58 </html>
59 <comment>localized Optional verbose description of the type.</comment>
60 <localizable>true</localizable>
61 <add>3.1</add>
62 </field>
63 <field>
64 <name>image_URL</name>
65 <title>Contact Type Image URL</title>
66 <type>varchar</type>
67 <length>255</length>
68 <comment>URL of image if any.</comment>
69 <add>3.1</add>
70 </field>
71 <field>
72 <name>icon</name>
73 <title>Icon</title>
74 <type>varchar</type>
75 <length>255</length>
76 <default>NULL</default>
77 <comment>crm-i icon class representing this contact type</comment>
78 <add>5.49</add>
79 </field>
80 <field>
81 <name>parent_id</name>
82 <title>Parent ID</title>
83 <type>int unsigned</type>
84 <comment>Optional FK to parent contact type.</comment>
85 <pseudoconstant>
86 <table>civicrm_contact_type</table>
87 <keyColumn>id</keyColumn>
88 <labelColumn>label</labelColumn>
89 <condition>parent_id IS NULL</condition>
90 </pseudoconstant>
91 <html>
92 <label>Parent</label>
93 </html>
94 <add>3.1</add>
95 </field>
96 <foreignKey>
97 <name>parent_id</name>
98 <table>civicrm_contact_type</table>
99 <key>id</key>
100 <add>3.1</add>
101 </foreignKey>
102 <field>
103 <name>is_active</name>
104 <title>Contact Type Is Active?</title>
105 <type>boolean</type>
106 <default>1</default>
107 <comment>Is this entry active?</comment>
108 <add>3.1</add>
109 </field>
110 <field>
111 <name>is_reserved</name>
112 <title>Contact Type is Reserved?</title>
113 <type>boolean</type>
114 <default>0</default>
115 <comment>Is this contact type a predefined system type</comment>
116 <add>3.1</add>
117 </field>
118 </table>