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