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