1 <?xml version=
"1.0" encoding=
"iso-8859-1" ?>
5 <class>LineItem
</class>
6 <name>civicrm_line_item
</name>
11 <type>int unsigned
</type>
12 <required>true
</required>
13 <comment>Line Item
</comment>
18 <autoincrement>true
</autoincrement>
21 <name>entity_table
</name>
24 <required>true
</required>
25 <comment>table which has the transaction
</comment>
29 <name>entity_id
</name>
30 <type>int unsigned
</type>
31 <required>true
</required>
32 <comment>entry in table
</comment>
36 <idColumn>entity_id
</idColumn>
37 <typeColumn>entity_table
</typeColumn>
41 <name>contribution_id
</name>
42 <type>int unsigned
</type>
43 <comment>FK to civicrm_contribution
</comment>
47 <name>contribution_id
</name>
48 <table>civicrm_contribution
</table>
50 <onDelete>SET NULL
</onDelete>
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 -->
60 <name>price_field_id
</name>
61 <table>civicrm_price_field
</table>
63 <onDelete>SET NULL
</onDelete>
66 <name>option_group_id
</name>
67 <type>int unsigned
</type>
68 <required>true
</required>
69 <comment>FK to option group
</comment>
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>
87 <type>int unsigned
</type>
88 <required>true
</required>
89 <comment>How many items ordered
</comment>
96 <name>unit_price
</name>
98 <required>true
</required>
99 <comment>price of each item
</comment>
106 <name>line_total
</name>
108 <required>true
</required>
109 <comment>qty * unit_price
</comment>
113 <name>participant_count
</name>
114 <type>int unsigned
</type>
115 <default>NULL
</default>
116 <comment>Participant count for fiel
124 <name>index_entity
</name>
125 <fieldName>entity_table
</fieldName>
126 <fieldName>entity_id
</fieldName>
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>
139 <!-- Add contribution_id to unique index in 4.5 -->
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>
149 <name>price_field_value_id
</name>
150 <table>civicrm_price_field_value
</table>
152 <onDelete>SET NULL
</onDelete>
155 <name>financial_type_id
</name>
156 <title>Financial Type
</title>
157 <type>int unsigned
</type>
158 <default>NULL
</default>
160 <table>civicrm_financial_type
</table>
161 <keyColumn>id
</keyColumn>
162 <labelColumn>name
</labelColumn>
164 <comment>FK to Financial Type.
</comment>
171 <name>financial_type_id
</name>
172 <table>civicrm_financial_type
</table>
174 <onDelete>SET NULL
</onDelete>
178 <name>deductible_amount
</name>
179 <title>Deductible Amount
</title>
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>