Merge pull request #19421 from eileenmcnaughton/act2
[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 <add>3.1</add>
30 <required>true</required>
31 </field>
32 <index>
33 <name>contact_type</name>
34 <fieldName>name</fieldName>
35 <unique>true</unique>
36 <add>3.1</add>
37 </index>
38 <field>
39 <name>label</name>
40 <title>Contact Type Label</title>
41 <type>varchar</type>
42 <length>64</length>
43 <comment>localized Name of Contact Type.</comment>
44 <localizable>true</localizable>
45 <add>3.1</add>
46 </field>
47 <field>
48 <name>description</name>
49 <title>Contact Type Description</title>
50 <type>text</type>
51 <html>
52 <type>TextArea</type>
53 <rows>2</rows>
54 <cols>60</cols>
55 </html>
56 <comment>localized Optional verbose description of the type.</comment>
57 <localizable>true</localizable>
58 <add>3.1</add>
59 </field>
60 <field>
61 <name>image_URL</name>
62 <title>Contact Type Image URL</title>
63 <type>varchar</type>
64 <length>255</length>
65 <comment>URL of image if any.</comment>
66 <add>3.1</add>
67 </field>
68 <field>
69 <name>parent_id</name>
70 <title>Parent ID</title>
71 <type>int unsigned</type>
72 <comment>Optional FK to parent contact type.</comment>
73 <pseudoconstant>
74 <table>civicrm_contact_type</table>
75 <keyColumn>id</keyColumn>
76 <labelColumn>label</labelColumn>
77 <condition>parent_id IS NULL</condition>
78 </pseudoconstant>
79 <html>
80 <label>Parent</label>
81 </html>
82 <add>3.1</add>
83 </field>
84 <foreignKey>
85 <name>parent_id</name>
86 <table>civicrm_contact_type</table>
87 <key>id</key>
88 <add>3.1</add>
89 </foreignKey>
90 <field>
91 <name>is_active</name>
92 <title>Contact Type Is Active?</title>
93 <type>boolean</type>
94 <default>1</default>
95 <comment>Is this entry active?</comment>
96 <add>3.1</add>
97 </field>
98 <field>
99 <name>is_reserved</name>
100 <title>Contact Type is Reserved?</title>
101 <type>boolean</type>
102 <default>0</default>
103 <comment>Is this contact type a predefined system type</comment>
104 <add>3.1</add>
105 </field>
106 </table>