Commit | Line | Data |
---|---|---|
6a488035 TO |
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> | |
71e5aa5c ARW |
35 | <dynamicForeignKey> |
36 | <idColumn>entity_id</idColumn> | |
37 | <typeColumn>entity_table</typeColumn> | |
38 | <add>1.7</add> | |
39 | </dynamicForeignKey> | |
6a488035 TO |
40 | <field> |
41 | <name>price_field_id</name> | |
42 | <type>int unsigned</type> | |
43 | <comment>FK to civicrm_price_field</comment> | |
44 | <!-- changed to not required in 4.3 in order to change ON DELETE CASCADE FK constraint to SET NULL --> | |
45 | <add>1.7</add> | |
46 | </field> | |
47 | <foreignKey> | |
48 | <name>price_field_id</name> | |
49 | <table>civicrm_price_field</table> | |
50 | <key>id</key> | |
51 | <onDelete>SET NULL</onDelete> | |
52 | </foreignKey> | |
53 | <field> | |
54 | <name>option_group_id</name> | |
55 | <type>int unsigned</type> | |
56 | <required>true</required> | |
57 | <comment>FK to option group</comment> | |
58 | <add>1.7</add> | |
59 | <drop>3.3</drop> | |
60 | </field> | |
61 | <field> | |
62 | <name>label</name> | |
63 | <type>varchar</type> | |
64 | <length>255</length> | |
65 | <default>NULL</default> | |
66 | <!-- changed to not required in 4.2.3 --> | |
67 | <comment>descriptive label for item - from price_field_value.label</comment> | |
68 | <add>1.7</add> | |
69 | </field> | |
70 | <field> | |
71 | <name>qty</name> | |
72 | <type>int unsigned</type> | |
73 | <required>true</required> | |
74 | <comment>How many items ordered</comment> | |
75 | <add>1.7</add> | |
76 | </field> | |
77 | <field> | |
78 | <name>unit_price</name> | |
79 | <type>decimal</type> | |
80 | <required>true</required> | |
81 | <comment>price of each item</comment> | |
82 | <add>1.7</add> | |
83 | </field> | |
84 | <field> | |
85 | <name>line_total</name> | |
86 | <type>decimal</type> | |
87 | <required>true</required> | |
88 | <comment>qty * unit_price</comment> | |
89 | <add>1.7</add> | |
90 | </field> | |
91 | <field> | |
92 | <name>participant_count</name> | |
93 | <type>int unsigned</type> | |
94 | <default>NULL</default> | |
95 | <comment>Participant count for field</comment> | |
96 | <add>3.2</add> | |
97 | </field> | |
98 | <index> | |
99 | <name>index_entity</name> | |
100 | <fieldName>entity_table</fieldName> | |
101 | <fieldName>entity_id</fieldName> | |
102 | <add>1.7</add> | |
103 | </index> | |
104 | <index> | |
105 | <name>UI_line_item_value</name> | |
106 | <fieldName>entity_table</fieldName> | |
107 | <fieldName>entity_id</fieldName> | |
108 | <fieldName>price_field_value_id</fieldName> | |
109 | <fieldName>price_field_id</fieldName> | |
110 | <unique>true</unique> | |
111 | <add>3.3</add> | |
112 | </index> | |
113 | <field> | |
114 | <name>price_field_value_id</name> | |
115 | <type>int unsigned</type> | |
116 | <default>NULL</default> | |
117 | <comment>FK to civicrm_price_field_value</comment> | |
118 | <add>3.3</add> | |
119 | </field> | |
120 | <foreignKey> | |
121 | <name>price_field_value_id</name> | |
122 | <table>civicrm_price_field_value</table> | |
123 | <key>id</key> | |
124 | <onDelete>SET NULL</onDelete> | |
125 | </foreignKey> | |
126 | <field> | |
127 | <name>financial_type_id</name> | |
128 | <title>Financial Type</title> | |
129 | <type>int unsigned</type> | |
130 | <default>NULL</default> | |
131 | <comment>FK to Financial Type.</comment> | |
132 | <add>4.3</add> | |
133 | </field> | |
134 | <foreignKey> | |
135 | <name>financial_type_id</name> | |
136 | <table>civicrm_financial_type</table> | |
137 | <key>id</key> | |
138 | <onDelete>SET NULL</onDelete> | |
139 | <add>4.3</add> | |
140 | </foreignKey> | |
141 | <field> | |
142 | <name>deductible_amount</name> | |
143 | <title>Deductible Amount</title> | |
144 | <type>decimal</type> | |
145 | <default>0.0</default> | |
146 | <headerPattern>/unit?.?amoun/i</headerPattern> | |
147 | <dataPattern>/^\d+(\.\d{2})?$/</dataPattern> | |
148 | <required>true</required> | |
149 | <comment>Tax-deductible portion of the amount</comment> | |
150 | <add>4.3</add> | |
151 | </field> | |
152 | </table> | |
153 |