Merge pull request #19507 from eileenmcnaughton/trans
[civicrm-core.git] / xml / schema / Core / Tag.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
3 <table>
4 <base>CRM/Core</base>
5 <class>Tag</class>
6 <name>civicrm_tag</name>
7 <comment>Provides support for flat or hierarchical classification of various types of entities (contacts, groups, actions...).</comment>
8 <add>1.1</add>
9 <log>true</log>
10 <icon>fa-tag</icon>
11 <labelField>name</labelField>
12 <field>
13 <name>id</name>
14 <title>Tag ID</title>
15 <type>int unsigned</type>
16 <required>true</required>
17 <comment>Tag 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>name</name>
26 <title>Tag Name</title>
27 <type>varchar</type>
28 <required>true</required>
29 <length>64</length>
30 <comment>Name of Tag.</comment>
31 <add>1.1</add>
32 </field>
33 <field>
34 <name>description</name>
35 <title>Description</title>
36 <type>varchar</type>
37 <length>255</length>
38 <comment>Optional verbose description of the tag.</comment>
39 <add>1.1</add>
40 </field>
41 <field>
42 <name>parent_id</name>
43 <title>Parent Tag</title>
44 <type>int unsigned</type>
45 <default>NULL</default>
46 <comment>Optional parent id for this tag.</comment>
47 <pseudoconstant>
48 <table>civicrm_tag</table>
49 <keyColumn>id</keyColumn>
50 <labelColumn>name</labelColumn>
51 </pseudoconstant>
52 <add>1.1</add>
53 </field>
54 <field>
55 <name>is_selectable</name>
56 <title>Display Tag?</title>
57 <type>boolean</type>
58 <default>1</default>
59 <comment>Is this tag selectable / displayed</comment>
60 <add>2.1</add>
61 </field>
62 <foreignKey>
63 <name>parent_id</name>
64 <table>civicrm_tag</table>
65 <key>id</key>
66 <add>1.1</add>
67 </foreignKey>
68 <index>
69 <name>UI_name</name>
70 <fieldName>name</fieldName>
71 <unique>true</unique>
72 <add>2.1</add>
73 </index>
74 <field>
75 <name>is_reserved</name>
76 <title>Reserved</title>
77 <type>boolean</type>
78 <default>0</default>
79 <add>3.2</add>
80 </field>
81 <field>
82 <name>is_tagset</name>
83 <title>Tagset</title>
84 <type>boolean</type>
85 <default>0</default>
86 <add>3.2</add>
87 </field>
88 <field>
89 <name>used_for</name>
90 <title>Used For</title>
91 <type>varchar</type>
92 <length>64</length>
93 <default>NULL</default>
94 <html>
95 <type>Select</type>
96 </html>
97 <pseudoconstant>
98 <optionGroupName>tag_used_for</optionGroupName>
99 </pseudoconstant>
100 <serialize>COMMA</serialize>
101 <add>3.2</add>
102 </field>
103 <field>
104 <name>created_id</name>
105 <title>Tag Created By</title>
106 <type>int unsigned</type>
107 <comment>FK to civicrm_contact, who created this tag</comment>
108 <add>3.4</add>
109 </field>
110 <field>
111 <name>color</name>
112 <title>Color</title>
113 <type>varchar</type>
114 <length>255</length>
115 <comment>Hex color value e.g. #ffffff</comment>
116 <default>NULL</default>
117 <add>4.7</add>
118 </field>
119 <foreignKey>
120 <name>created_id</name>
121 <table>civicrm_contact</table>
122 <key>id</key>
123 <add>3.4</add>
124 <onDelete>SET NULL</onDelete>
125 </foreignKey>
126 <field>
127 <name>created_date</name>
128 <type>datetime</type>
129 <title>Tag Created Date</title>
130 <comment>Date and time that tag was created.</comment>
131 <add>3.4</add>
132 </field>
133 </table>