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