revert Menu.is_public requiredness
[civicrm-core.git] / xml / schema / Event / Participant.xml
CommitLineData
3c7d2158 1<?xml version="1.0" encoding="iso-8859-1" ?>
2
3<table>
4 <base>CRM/Event</base>
5 <class>Participant</class>
6 <name>civicrm_participant</name>
2562d09a 7 <description>Records of contacts' attendance and roles in events.</description>
3c7d2158 8 <add>1.7</add>
6a488035 9 <log>true</log>
449c4e6b 10 <icon>fa-ticket</icon>
d31fb4e3 11 <component>CiviEvent</component>
3c7d2158 12 <field>
8f069c03
EM
13 <name>id</name>
14 <uniqueName>participant_id</uniqueName>
15 <title>Participant ID</title>
16 <type>int unsigned</type>
17 <required>true</required>
047c5009 18 <comment>Participant ID</comment>
8f069c03
EM
19 <import>true</import>
20 <headerPattern>/(^(participant(.)?)?id$)/i</headerPattern>
0481e12c
A
21 <html>
22 <type>Number</type>
23 </html>
8f069c03 24 <add>1.7</add>
3c7d2158 25 </field>
26 <primaryKey>
8f069c03
EM
27 <name>id</name>
28 <autoincrement>true</autoincrement>
3c7d2158 29 </primaryKey>
30 <field>
8f069c03
EM
31 <name>contact_id</name>
32 <uniqueName>participant_contact_id</uniqueName>
33 <type>int unsigned</type>
34 <title>Contact ID</title>
35 <headerPattern>/contact(.?id)?/i</headerPattern>
36 <import>true</import>
37 <required>true</required>
38 <comment>FK to Contact ID</comment>
57e94608
A
39 <html>
40 <label>Contact</label>
41 </html>
8f069c03 42 <add>1.7</add>
6a488035 43 </field>
3c7d2158 44 <foreignKey>
8f069c03
EM
45 <name>contact_id</name>
46 <table>civicrm_contact</table>
47 <key>id</key>
48 <onDelete>CASCADE</onDelete>
6a488035 49 </foreignKey>
3c7d2158 50 <field>
8f069c03
EM
51 <name>event_id</name>
52 <type>int unsigned</type>
57e94608 53 <title>Event ID</title>
8f069c03
EM
54 <import>true</import>
55 <headerPattern>/event id$/i</headerPattern>
56 <required>true</required>
57 <comment>FK to Event ID</comment>
57e94608
A
58 <html>
59 <label>Event</label>
60 </html>
8f069c03 61 <add>1.7</add>
6a488035 62 </field>
3c7d2158 63 <foreignKey>
8f069c03
EM
64 <name>event_id</name>
65 <table>civicrm_event</table>
66 <key>id</key>
67 <onDelete>CASCADE</onDelete>
6a488035 68 </foreignKey>
3c7d2158 69 <field>
8f069c03
EM
70 <name>status_id</name>
71 <uniqueName>participant_status_id</uniqueName>
047c5009 72 <title>Status ID</title>
8f069c03
EM
73 <headerPattern>/(participant.)?(status)$/i</headerPattern>
74 <import>true</import>
75 <type>int unsigned</type>
e51b7372 76 <export>true</export>
8f069c03
EM
77 <required>true</required>
78 <default>1</default>
bd7d6a3d 79 <comment>Participant status ID. FK to civicrm_participant_status_type. Default of 1 should map to status = Registered.</comment>
8f069c03
EM
80 <add>1.7</add>
81 <pseudoconstant>
82 <table>civicrm_participant_status_type</table>
83 <keyColumn>id</keyColumn>
84 <labelColumn>label</labelColumn>
85 </pseudoconstant>
86 <html>
87 <type>Select</type>
047c5009 88 <label>Status</label>
8f069c03 89 </html>
6a488035
TO
90 </field>
91 <foreignKey>
92 <name>status_id</name>
93 <table>civicrm_participant_status_type</table>
94 <key>id</key>
95 <add>3.0</add>
96 </foreignKey>
97 <index>
98 <name>index_status_id</name>
99 <fieldName>status_id</fieldName>
100 <add>1.8</add>
101 </index>
3c7d2158 102 <field>
8f069c03
EM
103 <name>role_id</name>
104 <uniqueName>participant_role_id</uniqueName>
210ff615 105 <title>Participant Role ID</title>
8f069c03
EM
106 <pseudoconstant>
107 <optionGroupName>participant_role</optionGroupName>
108 </pseudoconstant>
109 <html>
110 <type>Select</type>
2a5c9b4d 111 <multiple>1</multiple>
210ff615 112 <label>Participant Role</label>
8f069c03 113 </html>
2a5c9b4d 114 <serialize>SEPARATOR_TRIMMED</serialize>
8f069c03
EM
115 <headerPattern>/(participant.)?(role)$/i</headerPattern>
116 <import>true</import>
117 <type>varchar</type>
118 <length>128</length>
f5d67b2a 119 <export>true</export>
8f069c03
EM
120 <default>NULL</default>
121 <comment>Participant role ID. Implicit FK to civicrm_option_value where option_group = participant_role.</comment>
122 <add>1.7</add>
6a488035
TO
123 </field>
124 <index>
125 <name>index_role_id</name>
126 <fieldName>role_id</fieldName>
127 <add>1.8</add>
128 </index>
3c7d2158 129 <field>
8f069c03
EM
130 <name>register_date</name>
131 <uniqueName>participant_register_date</uniqueName>
132 <title>Register date</title>
133 <headerPattern>/^(r(egister\s)?date)$/i</headerPattern>
134 <import>true</import>
135 <type>datetime</type>
136 <comment>When did contact register for event?</comment>
137 <add>1.7</add>
3cef3c00 138 <html>
139 <type>Select Date</type>
24317d89 140 <formatType>activityDateTime</formatType>
3cef3c00 141 </html>
6a488035
TO
142 </field>
143 <field>
8f069c03
EM
144 <name>source</name>
145 <uniqueName>participant_source</uniqueName>
146 <title>Participant Source</title>
147 <headerPattern>/(participant.)?(source)$/i</headerPattern>
148 <import>true</import>
149 <type>varchar</type>
150 <length>128</length>
151 <comment>Source of this event registration.</comment>
c1a6d6ac
SL
152 <html>
153 <type>Text</type>
154 </html>
8f069c03 155 <add>1.7</add>
3c7d2158 156 </field>
157 <field>
8f069c03
EM
158 <name>fee_level</name>
159 <uniqueName>participant_fee_level</uniqueName>
160 <title>Fee level</title>
161 <headerPattern>/^(f(ee\s)?level)$/i</headerPattern>
162 <type>text</type>
163 <import>true</import>
2a5c9b4d 164 <serialize>SEPARATOR_BOOKEND</serialize>
8f069c03 165 <comment>Populate with the label (text) associated with a fee level for paid events with multiple levels. Note that
fb607354 166 we store the label value and not the key</comment>
8f069c03 167 <add>1.7</add>
3c7d2158 168 </field>
169 <field>
8f069c03
EM
170 <name>is_test</name>
171 <uniqueName>participant_is_test</uniqueName>
172 <title>Test</title>
173 <type>boolean</type>
174 <default>0</default>
c1e814c7 175 <required>true</required>
8f069c03
EM
176 <import>true</import>
177 <add>1.7</add>
6a488035 178 </field>
3c7d2158 179 <field>
8f069c03
EM
180 <name>is_pay_later</name>
181 <uniqueName>participant_is_pay_later</uniqueName>
182 <title>Is Pay Later</title>
183 <type>boolean</type>
184 <default>0</default>
c1e814c7 185 <required>true</required>
8f069c03
EM
186 <import>true</import>
187 <headerPattern>/(is.)?(pay(.)?later)$/i</headerPattern>
188 <add>2.1</add>
6a488035 189 </field>
3c7d2158 190
191 <field>
8f069c03
EM
192 <name>fee_amount</name>
193 <uniqueName>participant_fee_amount</uniqueName>
194 <title>Fee Amount</title>
195 <type>decimal</type>
196 <import>true</import>
197 <headerPattern>/fee(.?am(ou)?nt)?/i</headerPattern>
198 <dataPattern>/^\d+(\.\d{2})?$/</dataPattern>
199 <comment>actual processor fee if known - may be 0.</comment>
200 <add>2.1</add>
3c7d2158 201 </field>
202 <field>
8f069c03
EM
203 <name>registered_by_id</name>
204 <uniqueName>participant_registered_by_id</uniqueName>
205 <type>int unsigned</type>
57e94608 206 <title>Registered By Participant ID</title>
8f069c03
EM
207 <import>true</import>
208 <default>NULL</default>
209 <comment>FK to Participant ID</comment>
57e94608
A
210 <html>
211 <label>Registered By</label>
212 </html>
8f069c03
EM
213 <add>2.1</add>
214 <export>true</export>
6a488035 215 </field>
3c7d2158 216 <foreignKey>
8f069c03
EM
217 <name>registered_by_id</name>
218 <table>civicrm_participant</table>
219 <key>id</key>
220 <add>2.1</add>
221 <onDelete>SET NULL</onDelete>
3c7d2158 222 </foreignKey>
223 <field>
8f069c03
EM
224 <name>discount_id</name>
225 <uniqueName>participant_discount_id</uniqueName>
226 <type>int unsigned</type>
227 <title>Discount ID</title>
228 <default>NULL</default>
229 <comment>FK to Discount ID</comment>
57e94608
A
230 <html>
231 <label>Discount</label>
232 </html>
8f069c03 233 <add>2.1</add>
6a488035 234 </field>
3c7d2158 235 <foreignKey>
8f069c03
EM
236 <name>discount_id</name>
237 <table>civicrm_discount</table>
238 <key>id</key>
239 <add>2.1</add>
240 <onDelete>SET NULL</onDelete>
3c7d2158 241 </foreignKey>
242 <field>
8f069c03
EM
243 <name>fee_currency</name>
244 <uniqueName>participant_fee_currency</uniqueName>
245 <title>Fee Currency</title>
246 <type>varchar</type>
247 <length>3</length>
248 <default>NULL</default>
249 <import>true</import>
250 <headerPattern>/(fee)?.?cur(rency)?/i</headerPattern>
251 <dataPattern>/^[A-Z]{3}$/i</dataPattern>
252 <comment>3 character string, value derived from config setting.</comment>
253 <add>3.0</add>
254 <pseudoconstant>
255 <table>civicrm_currency</table>
256 <keyColumn>name</keyColumn>
257 <labelColumn>full_name</labelColumn>
c3de5c5a 258 <nameColumn>name</nameColumn>
a8fdb24e 259 <abbrColumn>symbol</abbrColumn>
8f069c03
EM
260 </pseudoconstant>
261 <html>
262 <type>Select</type>
263 </html>
6a488035 264 </field>
3c7d2158 265 <field>
8f069c03 266 <name>campaign_id</name>
88c31c05 267 <component>CiviCampaign</component>
8f069c03
EM
268 <uniqueName>participant_campaign_id</uniqueName>
269 <type>int unsigned</type>
57e94608 270 <title>Campaign ID</title>
8f069c03
EM
271 <import>true</import>
272 <comment>The campaign for which this participant has been registered.</comment>
57e94608 273 <html>
8813f972 274 <type>EntityRef</type>
57e94608
A
275 <label>Campaign</label>
276 </html>
8f069c03 277 <add>3.4</add>
25ad69f2
CW
278 <pseudoconstant>
279 <table>civicrm_campaign</table>
280 <keyColumn>id</keyColumn>
281 <labelColumn>title</labelColumn>
282 <prefetch>FALSE</prefetch>
283 </pseudoconstant>
3c7d2158 284 </field>
285 <foreignKey>
8f069c03
EM
286 <name>campaign_id</name>
287 <table>civicrm_campaign</table>
288 <key>id</key>
289 <onDelete>SET NULL</onDelete>
6a488035
TO
290 </foreignKey>
291 <field>
8f069c03
EM
292 <name>discount_amount</name>
293 <type>int unsigned</type>
294 <title>Discount Amount</title>
295 <comment>Discount Amount</comment>
296 <add>4.1</add>
6a488035
TO
297 </field>
298 <field>
8f069c03
EM
299 <name>cart_id</name>
300 <type>int unsigned</type>
301 <title>Event Cart ID</title>
302 <comment>FK to civicrm_event_carts</comment>
57e94608
A
303 <html>
304 <label>Event Cart</label>
305 </html>
8f069c03 306 <add>4.1</add>
6a488035
TO
307 </field>
308 <foreignKey>
8f069c03
EM
309 <name>cart_id</name>
310 <table>civicrm_event_carts</table>
311 <key>id</key>
312 <onDelete>SET NULL</onDelete>
6a488035
TO
313 </foreignKey>
314 <field>
8f069c03
EM
315 <name>must_wait</name>
316 <type>int</type>
317 <title>Must Wait on List</title>
318 <comment>On Waiting List</comment>
319 <add>4.1</add>
6a488035 320 </field>
7dbb67ae
DG
321 <field>
322 <name>transferred_to_contact_id</name>
323 <uniqueName>transferred_to_contact_id</uniqueName>
324 <type>int unsigned</type>
325 <default>NULL</default>
326 <title>Transferred to Contact ID</title>
327 <headerPattern>/transfer(.?id)?/i</headerPattern>
328 <import>true</import>
329 <comment>FK to Contact ID</comment>
57e94608
A
330 <html>
331 <label>Transferred to</label>
332 </html>
7dbb67ae
DG
333 <add>4.7</add>
334 </field>
335 <foreignKey>
336 <name>transferred_to_contact_id</name>
337 <table>civicrm_contact</table>
338 <key>id</key>
339 <onDelete>SET NULL</onDelete>
340 </foreignKey>
6a488035 341</table>