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