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