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