Commit | Line | Data |
---|---|---|
3c7d2158 | 1 | <?xml version="1.0" encoding="iso-8859-1" ?> |
2 | ||
3 | <table> | |
4 | <base>CRM/Contribute</base> | |
6a488035 TO |
5 | <class>Product</class> |
6 | <comment>able - stores "product info" for premiums and can be used for non-incentive products </comment> | |
3c7d2158 | 7 | <name>civicrm_product</name> |
8 | <add>1.4</add> | |
6a488035 | 9 | <log>true</log> |
3c7d2158 | 10 | <field> |
11 | <name>id</name> | |
12 | <type>int unsigned</type> | |
13 | <required>true</required> | |
14 | <add>1.4</add> | |
15 | </field> | |
16 | <primaryKey> | |
17 | <name>id</name> | |
18 | <autoincrement>true</autoincrement> | |
6a488035 TO |
19 | </primaryKey> |
20 | <field> | |
21 | <name>name</name> | |
22 | <uniqueName>product_name</uniqueName> | |
23 | <title>Product Name</title> | |
24 | <type>varchar</type> | |
25 | <length>255</length> | |
26 | <required>true</required> | |
27 | <export>true</export> | |
28 | <localizable>true</localizable> | |
29 | <comment>Required product/premium name</comment> | |
30 | <add>1.4</add> | |
31 | </field> | |
32 | <field> | |
33 | <name>description</name> | |
34 | <title>Description</title> | |
35 | <type>text</type> | |
36 | <localizable>true</localizable> | |
37 | <comment>Optional description of the product/premium.</comment> | |
38 | <add>1.4</add> | |
39 | </field> | |
3c7d2158 | 40 | <field> |
41 | <name>sku</name> | |
6a488035 TO |
42 | <title>SKU</title> |
43 | <type>varchar</type> | |
44 | <length>50</length> | |
3c7d2158 | 45 | <export>true</export> |
6a488035 | 46 | <comment>Optional product sku or code.</comment> |
3c7d2158 | 47 | <add>1.4</add> |
48 | </field> | |
49 | <field> | |
50 | <name>options</name> | |
6a488035 TO |
51 | <title>Options</title> |
52 | <type>text</type> | |
53 | <localizable>true</localizable> | |
3c7d2158 | 54 | <comment>Store comma-delimited list of color, size, etc. options for the product.</comment> |
55 | <add>1.4</add> | |
56 | </field> | |
57 | <field> | |
6a488035 TO |
58 | <name>image</name> |
59 | <title>Image</title> | |
3c7d2158 | 60 | <type>varchar</type> |
6a488035 | 61 | <length>255</length> |
3c7d2158 | 62 | <comment>Full or relative URL to uploaded image - fullsize.</comment> |
63 | <add>1.4</add> | |
64 | </field> | |
65 | <field> | |
6a488035 TO |
66 | <name>thumbnail</name> |
67 | <title>Thumbnail</title> | |
3c7d2158 | 68 | <type>varchar</type> |
6a488035 | 69 | <length>255</length> |
3c7d2158 | 70 | <comment>Full or relative URL to image thumbnail.</comment> |
71 | <add>1.4</add> | |
72 | </field> | |
73 | <field> | |
74 | <name>price</name> | |
6a488035 | 75 | <title>Price</title> |
3c7d2158 | 76 | <type>decimal</type> |
77 | <comment>Sell price or market value for premiums. For tax-deductible contributions, this will be stored as non_deductible_amount in the contribution record.</comment> | |
78 | <add>1.4</add> | |
6a488035 TO |
79 | </field> |
80 | <field> | |
81 | <name>currency</name> | |
82 | <type>varchar</type> | |
83 | <length>3</length> | |
84 | <default>NULL</default> | |
85 | <comment>3 character string, value from config setting or input via user.</comment> | |
86 | <add>3.2</add> | |
bd44e0df AS |
87 | <pseudoconstant> |
88 | <table>civicrm_currency</table> | |
89 | <keyColumn>name</keyColumn> | |
a38a89fc CW |
90 | <labelColumn>full_name</labelColumn> |
91 | <nameColumn>numeric_code</nameColumn> | |
bd44e0df | 92 | </pseudoconstant> |
614d72ec | 93 | <html> |
e0991796 | 94 | <type>Select</type> |
614d72ec | 95 | </html> |
6a488035 | 96 | </field> |
3c7d2158 | 97 | <field> |
98 | <name>financial_type_id</name> | |
6a488035 | 99 | <title>Financial Type</title> |
3c7d2158 | 100 | <type>int unsigned</type> |
6a488035 | 101 | <default>NULL</default> |
6cc0b7bd EM |
102 | <pseudoconstant> |
103 | <table>civicrm_financial_type</table> | |
104 | <keyColumn>id</keyColumn> | |
105 | <labelColumn>name</labelColumn> | |
106 | </pseudoconstant> | |
6a488035 | 107 | <comment>FK to Financial Type.</comment> |
3c7d2158 | 108 | <add>4.3</add> |
109 | </field> | |
110 | <foreignKey> | |
111 | <name>financial_type_id</name> | |
112 | <table>civicrm_financial_type</table> | |
113 | <key>id</key> | |
6a488035 TO |
114 | <onDelete>SET NULL</onDelete> |
115 | <add>4.3</add> | |
3c7d2158 | 116 | </foreignKey> |
117 | ||
118 | <field> | |
6a488035 TO |
119 | <name>min_contribution</name> |
120 | <title>Minimum Contribution</title> | |
121 | <type>decimal</type> | |
3c7d2158 | 122 | <comment>Minimum contribution required to be eligible to select this premium.</comment> |
123 | <add>1.4</add> | |
6a488035 | 124 | </field> |
3c7d2158 | 125 | <field> |
6a488035 TO |
126 | <name>cost</name> |
127 | <title>Cost</title> | |
3c7d2158 | 128 | <type>decimal</type> |
129 | <comment>Actual cost of this product. Useful to determine net return from sale or using this as an incentive.</comment> | |
130 | <add>1.4</add> | |
6a488035 | 131 | </field> |
3c7d2158 | 132 | <field> |
6a488035 TO |
133 | <name>is_active</name> |
134 | <title>Is Active</title> | |
3c7d2158 | 135 | <type>boolean</type> |
136 | <required>true</required> | |
137 | <comment>Disabling premium removes it from the premiums_premium join table below.</comment> | |
138 | <add>1.4</add> | |
6a488035 | 139 | </field> |
3c7d2158 | 140 | <field> |
6a488035 TO |
141 | <name>period_type</name> |
142 | <title>Period Type</title> | |
dc73c80d | 143 | <type>varchar</type> |
144 | <length>8</length> | |
6a488035 TO |
145 | <default>'rolling'</default> |
146 | <comment>Rolling means we set start/end based on current day, fixed means we set start/end for current year or month | |
3c7d2158 | 147 | (e.g. 1 year + fixed -> we would set start/end for 1/1/06 thru 12/31/06 for any premium chosen in 2006) </comment> |
f80ce889 | 148 | <pseudoconstant> |
93bfa565 | 149 | <callback>CRM_Core_SelectValues::periodType</callback> |
f80ce889 | 150 | </pseudoconstant> |
3c7d2158 | 151 | <add>1.4</add> |
614d72ec | 152 | <html> |
153 | <type>Select</type> | |
154 | </html> | |
6a488035 | 155 | </field> |
3c7d2158 | 156 | <field> |
6a488035 TO |
157 | <name>fixed_period_start_day</name> |
158 | <title>Fixed Period Start Day</title> | |
159 | <type>int</type> | |
160 | <default>0101</default> | |
3c7d2158 | 161 | <comment>Month and day (MMDD) that fixed period type subscription or membership starts.</comment> |
162 | <add>1.4</add> | |
6a488035 | 163 | </field> |
3c7d2158 | 164 | <field> |
6a488035 TO |
165 | <name>duration_unit</name> |
166 | <title>Duration Unit</title> | |
dc73c80d | 167 | <type>varchar</type> |
168 | <length>8</length> | |
6a488035 | 169 | <default>'year'</default> |
f80ce889 | 170 | <pseudoconstant> |
93bfa565 | 171 | <callback>CRM_Core_SelectValues::getPremiumUnits</callback> |
f80ce889 | 172 | </pseudoconstant> |
3c7d2158 | 173 | <add>1.4</add> |
614d72ec | 174 | <html> |
175 | <type>Select</type> | |
176 | </html> | |
6a488035 | 177 | </field> |
3c7d2158 | 178 | <field> |
6a488035 TO |
179 | <name>duration_interval</name> |
180 | <title>Duration Interval</title> | |
181 | <type>int</type> | |
3c7d2158 | 182 | <comment>Number of units for total duration of subscription, service, membership (e.g. 12 Months).</comment> |
183 | <add>1.4</add> | |
6a488035 | 184 | </field> |
3c7d2158 | 185 | <field> |
6a488035 TO |
186 | <name>frequency_unit</name> |
187 | <title>Frequency Unit</title> | |
dc73c80d | 188 | <type>varchar</type> |
189 | <length>8</length> | |
6a488035 TO |
190 | <default>'month'</default> |
191 | <comment>Frequency unit and interval allow option to store actual delivery frequency for a subscription or service.</comment> | |
f80ce889 | 192 | <pseudoconstant> |
93bfa565 | 193 | <callback>CRM_Core_SelectValues::getPremiumUnits</callback> |
f80ce889 | 194 | </pseudoconstant> |
3c7d2158 | 195 | <add>1.4</add> |
614d72ec | 196 | <html> |
197 | <type>Select</type> | |
198 | </html> | |
6a488035 | 199 | </field> |
3c7d2158 | 200 | <field> |
6a488035 TO |
201 | <name>frequency_interval</name> |
202 | <title>Frequency Interval</title> | |
203 | <type>int</type> | |
3c7d2158 | 204 | <comment>Number of units for delivery frequency of subscription, service, membership (e.g. every 3 Months).</comment> |
205 | <add>1.4</add> | |
6a488035 TO |
206 | </field> |
207 | </table> |