Merge pull request #22920 from civicrm/5.48
[civicrm-core.git] / xml / schema / Contact / Group.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
3 <table>
4 <base>CRM/Contact</base>
5 <class>Group</class>
6 <name>civicrm_group</name>
7 <comment>Provide grouping of related contacts</comment>
8 <add>1.1</add>
9 <log>true</log>
10 <icon>fa-users</icon>
11 <labelField>title</labelField>
12 <paths>
13 <add>civicrm/group/add?reset=1</add>
14 <view>civicrm/group/search?force=1&amp;context=smog&amp;gid=[id]&amp;component_mode=1</view>
15 <update>civicrm/group?reset=1&amp;action=update&amp;id=[id]</update>
16 <delete>civicrm/group?reset=1&amp;action=delete&amp;id=[id]</delete>
17 </paths>
18 <field>
19 <name>id</name>
20 <type>int unsigned</type>
21 <title>Group ID</title>
22 <required>true</required>
23 <comment>Group ID</comment>
24 <html>
25 <type>Number</type>
26 </html>
27 <add>1.1</add>
28 </field>
29 <primaryKey>
30 <name>id</name>
31 <autoincrement>true</autoincrement>
32 </primaryKey>
33 <field>
34 <name>name</name>
35 <type>varchar</type>
36 <title>Group Name</title>
37 <length>64</length>
38 <comment>Internal name of Group.</comment>
39 <add>1.1</add>
40 </field>
41 <field>
42 <name>title</name>
43 <type>varchar</type>
44 <title>Group Title</title>
45 <length>255</length>
46 <localizable>true</localizable>
47 <comment>Name of Group.</comment>
48 <add>1.1</add>
49 <html>
50 <type>Text</type>
51 </html>
52 </field>
53 <field>
54 <name>description</name>
55 <type>text</type>
56 <title>Group Description</title>
57 <html>
58 <type>TextArea</type>
59 <rows>2</rows>
60 <cols>60</cols>
61 </html>
62 <comment>Optional verbose description of the group.</comment>
63 <add>1.1</add>
64 </field>
65 <field>
66 <name>source</name>
67 <type>varchar</type>
68 <title>Group Source</title>
69 <length>64</length>
70 <comment>Module or process which created this group.</comment>
71 <add>1.1</add>
72 </field>
73 <field>
74 <name>saved_search_id</name>
75 <type>int unsigned</type>
76 <title>Saved Search ID</title>
77 <comment>FK to saved search table.</comment>
78 <html>
79 <label>Saved Search</label>
80 </html>
81 <add>1.1</add>
82 </field>
83 <foreignKey>
84 <name>saved_search_id</name>
85 <table>civicrm_saved_search</table>
86 <key>id</key>
87 <add>1.1</add>
88 <onDelete>CASCADE</onDelete>
89 </foreignKey>
90 <field>
91 <name>is_active</name>
92 <type>boolean</type>
93 <title>Group Enabled</title>
94 <comment>Is this entry active?</comment>
95 <add>1.1</add>
96 </field>
97 <field>
98 <name>visibility</name>
99 <type>varchar</type>
100 <length>24</length>
101 <title>Group Visibility Setting</title>
102 <default>'User and User Admin Only'</default>
103 <comment>In what context(s) is this field visible.</comment>
104 <pseudoconstant>
105 <callback>CRM_Core_SelectValues::groupVisibility</callback>
106 </pseudoconstant>
107 <add>1.2</add>
108 <html>
109 <type>Select</type>
110 </html>
111 </field>
112 <field>
113 <name>where_clause</name>
114 <type>text</type>
115 <title>Group Where Clause</title>
116 <comment>the sql where clause if a saved search acl</comment>
117 <readonly>true</readonly>
118 <add>1.6</add>
119 </field>
120 <field>
121 <name>select_tables</name>
122 <type>text</type>
123 <title>Tables For Select Clause</title>
124 <comment>the tables to be included in a select data</comment>
125 <readonly>true</readonly>
126 <serialize>PHP</serialize>
127 <add>1.6</add>
128 </field>
129 <field>
130 <name>where_tables</name>
131 <type>text</type>
132 <title>Tables For Where Clause</title>
133 <comment>the tables to be included in the count statement</comment>
134 <readonly>true</readonly>
135 <serialize>PHP</serialize>
136 <add>1.6</add>
137 </field>
138 <field>
139 <name>group_type</name>
140 <type>varchar</type>
141 <title>Group Type</title>
142 <length>128</length>
143 <comment>FK to group type</comment>
144 <pseudoconstant>
145 <optionGroupName>group_type</optionGroupName>
146 </pseudoconstant>
147 <serialize>SEPARATOR_BOOKEND</serialize>
148 <add>1.9</add>
149 </field>
150 <field>
151 <name>cache_date</name>
152 <type>timestamp</type>
153 <title>Group Cache Date</title>
154 <required>false</required>
155 <readonly>true</readonly>
156 <comment>Date when we created the cache for a smart group</comment>
157 <add>2.1</add>
158 </field>
159 <index>
160 <name>UI_cache_date</name>
161 <fieldName>cache_date</fieldName>
162 <add>5.34</add>
163 </index>
164 <field>
165 <name>refresh_date</name>
166 <type>timestamp</type>
167 <title>Next Group Refresh Time</title>
168 <required>false</required>
169 <readonly>true</readonly>
170 <comment>Date and time when we need to refresh the cache next.</comment>
171 <add>4.3</add>
172 </field>
173 <field>
174 <name>parents</name>
175 <type>text</type>
176 <title>Group Parents</title>
177 <comment>IDs of the parent(s)</comment>
178 <add>2.1</add>
179 <serialize>COMMA</serialize>
180 <pseudoconstant>
181 <callback>CRM_Core_PseudoConstant::allGroup</callback>
182 </pseudoconstant>
183 </field>
184 <field>
185 <name>children</name>
186 <type>text</type>
187 <title>Group Children</title>
188 <comment>IDs of the child(ren)</comment>
189 <add>2.1</add>
190 </field>
191 <field>
192 <name>is_hidden</name>
193 <type>boolean</type>
194 <title>Group is Hidden</title>
195 <default>0</default>
196 <comment>Is this group hidden?</comment>
197 <add>2.2</add>
198 </field>
199 <field>
200 <name>is_reserved</name>
201 <type>boolean</type>
202 <title>Group is Reserved</title>
203 <default>0</default>
204 <add>4.2</add>
205 </field>
206 <index>
207 <name>index_group_type</name>
208 <fieldName>group_type</fieldName>
209 <add>1.9</add>
210 </index>
211 <index>
212 <name>UI_title</name>
213 <fieldName>title</fieldName>
214 <unique>true</unique>
215 <add>2.1</add>
216 </index>
217 <index>
218 <name>UI_name</name>
219 <fieldName>name</fieldName>
220 <unique>true</unique>
221 <add>2.1</add>
222 </index>
223 <field>
224 <name>created_id</name>
225 <type>int unsigned</type>
226 <title>Created By Contact ID</title>
227 <comment>FK to contact table.</comment>
228 <html>
229 <label>Created By</label>
230 </html>
231 <add>4.3</add>
232 </field>
233 <foreignKey>
234 <name>created_id</name>
235 <table>civicrm_contact</table>
236 <key>id</key>
237 <add>4.3</add>
238 <onDelete>SET NULL</onDelete>
239 </foreignKey>
240 <field>
241 <name>modified_id</name>
242 <type>int unsigned</type>
243 <title>Modified By Contact ID</title>
244 <comment>FK to contact table.</comment>
245 <html>
246 <label>Modified By</label>
247 </html>
248 <readonly>true</readonly>
249 <add>4.5</add>
250 </field>
251 <foreignKey>
252 <name>modified_id</name>
253 <table>civicrm_contact</table>
254 <key>id</key>
255 <add>4.5</add>
256 <onDelete>SET NULL</onDelete>
257 </foreignKey>
258 <field>
259 <name>frontend_title</name>
260 <type>varchar</type>
261 <title>Public Group Title</title>
262 <length>255</length>
263 <localizable>true</localizable>
264 <comment>Alternative public title for this Group.</comment>
265 <default>NULL</default>
266 <add>5.31</add>
267 <html>
268 <type>Text</type>
269 </html>
270 </field>
271 <field>
272 <name>frontend_description</name>
273 <type>text</type>
274 <title>Public Group Description</title>
275 <html>
276 <type>TextArea</type>
277 <rows>2</rows>
278 <cols>60</cols>
279 </html>
280 <comment>Alternative public description of the group.</comment>
281 <localizable>true</localizable>
282 <default>NULL</default>
283 <add>5.31</add>
284 </field>
285 </table>