CRM-15168 add titles to Price Set Entities
[civicrm-core.git] / xml / schema / Price / LineItem.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
3 <table>
4 <base>CRM/Price</base>
5 <class>LineItem</class>
6 <name>civicrm_line_item</name>
7 <add>1.7</add>
8 <log>true</log>
9 <field>
10 <name>id</name>
11 <type>int unsigned</type>
12 <required>true</required>
13 <comment>Line Item</comment>
14 <add>1.7</add>
15 </field>
16 <primaryKey>
17 <name>id</name>
18 <autoincrement>true</autoincrement>
19 </primaryKey>
20 <field>
21 <name>entity_table</name>
22 <type>varchar</type>
23 <length>64</length>
24 <required>true</required>
25 <comment>table which has the transaction</comment>
26 <add>1.7</add>
27 </field>
28 <field>
29 <name>entity_id</name>
30 <type>int unsigned</type>
31 <required>true</required>
32 <comment>entry in table</comment>
33 <add>1.7</add>
34 </field>
35 <dynamicForeignKey>
36 <idColumn>entity_id</idColumn>
37 <typeColumn>entity_table</typeColumn>
38 <add>1.7</add>
39 </dynamicForeignKey>
40 <field>
41 <name>contribution_id</name>
42 <type>int unsigned</type>
43 <comment>FK to civicrm_contribution</comment>
44 <add>4.5</add>
45 </field>
46 <foreignKey>
47 <name>contribution_id</name>
48 <table>civicrm_contribution</table>
49 <key>id</key>
50 <onDelete>SET NULL</onDelete>
51 </foreignKey>
52 <field>
53 <name>price_field_id</name>
54 <type>int unsigned</type>
55 <comment>FK to civicrm_price_field</comment>
56 <!-- changed to not required in 4.3 in order to change ON DELETE CASCADE FK constraint to SET NULL -->
57 <add>1.7</add>
58 </field>
59 <foreignKey>
60 <name>price_field_id</name>
61 <table>civicrm_price_field</table>
62 <key>id</key>
63 <onDelete>SET NULL</onDelete>
64 </foreignKey>
65 <field>
66 <name>option_group_id</name>
67 <type>int unsigned</type>
68 <required>true</required>
69 <comment>FK to option group</comment>
70 <add>1.7</add>
71 <drop>3.3</drop>
72 </field>
73 <field>
74 <name>label</name>
75 <type>varchar</type>
76 <length>255</length>
77 <default>NULL</default>
78 <!-- changed to not required in 4.2.3 -->
79 <comment>descriptive label for item - from price_field_value.label</comment>
80 <add>1.7</add>
81 <html>
82 <type>Text</type>
83 </html>
84 </field>
85 <field>
86 <name>qty</name>
87 <type>int unsigned</type>
88 <required>true</required>
89 <comment>How many items ordered</comment>
90 <add>1.7</add>
91 <html>
92 <type>Text</type>
93 </html>
94 </field>
95 <field>
96 <name>unit_price</name>
97 <type>decimal</type>
98 <required>true</required>
99 <comment>price of each item</comment>
100 <add>1.7</add>
101 <html>
102 <type>Text</type>
103 </html>
104 </field>
105 <field>
106 <name>line_total</name>
107 <type>decimal</type>
108 <required>true</required>
109 <comment>qty * unit_price</comment>
110 <add>1.7</add>
111 </field>
112 <field>
113 <name>participant_count</name>
114 <type>int unsigned</type>
115 <default>NULL</default>
116 <comment>Participant count for fiel
117 <html>
118 <type>Text</type>
119 </html>d</comment>
120 <add>3.2</add>
121
122 </field>
123 <index>
124 <name>index_entity</name>
125 <fieldName>entity_table</fieldName>
126 <fieldName>entity_id</fieldName>
127 <add>1.7</add>
128 </index>
129 <index>
130 <name>UI_line_item_value</name>
131 <fieldName>entity_table</fieldName>
132 <fieldName>entity_id</fieldName>
133 <fieldName>contribution_id</fieldName>
134 <fieldName>price_field_value_id</fieldName>
135 <fieldName>price_field_id</fieldName>
136 <unique>true</unique>
137 <add>3.3</add>
138 <change>4.5</change>
139 <!-- Add contribution_id to unique index in 4.5 -->
140 </index>
141 <field>
142 <name>price_field_value_id</name>
143 <type>int unsigned</type>
144 <default>NULL</default>
145 <comment>FK to civicrm_price_field_value</comment>
146 <add>3.3</add>
147 </field>
148 <foreignKey>
149 <name>price_field_value_id</name>
150 <table>civicrm_price_field_value</table>
151 <key>id</key>
152 <onDelete>SET NULL</onDelete>
153 </foreignKey>
154 <field>
155 <name>financial_type_id</name>
156 <title>Financial Type</title>
157 <type>int unsigned</type>
158 <default>NULL</default>
159 <pseudoconstant>
160 <table>civicrm_financial_type</table>
161 <keyColumn>id</keyColumn>
162 <labelColumn>name</labelColumn>
163 </pseudoconstant>
164 <comment>FK to Financial Type.</comment>
165 <add>4.3</add>
166 <html>
167 <type>Select</type>
168 </html>
169 </field>
170 <foreignKey>
171 <name>financial_type_id</name>
172 <table>civicrm_financial_type</table>
173 <key>id</key>
174 <onDelete>SET NULL</onDelete>
175 <add>4.3</add>
176 </foreignKey>
177 <field>
178 <name>deductible_amount</name>
179 <title>Deductible Amount</title>
180 <type>decimal</type>
181 <default>0.0</default>
182 <headerPattern>/unit?.?amoun/i</headerPattern>
183 <dataPattern>/^\d+(\.\d{2})?$/</dataPattern>
184 <required>true</required>
185 <comment>Tax-deductible portion of the amount</comment>
186 <add>4.3</add>
187 <html>
188 <type>Text</type>
189 </html>
190 </field>
191 </table>
192