Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | <?xml version="1.0" encoding="iso-8859-1" ?> |
2 | ||
3 | <table> | |
4 | <base>CRM/Contribute</base> | |
5 | <class>Product</class> | |
6 | <comment>able - stores "product info" for premiums and can be used for non-incentive products </comment> | |
7 | <name>civicrm_product</name> | |
8 | <add>1.4</add> | |
9 | <log>true</log> | |
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> | |
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> | |
40 | <field> | |
41 | <name>sku</name> | |
42 | <title>SKU</title> | |
43 | <type>varchar</type> | |
44 | <length>50</length> | |
45 | <export>true</export> | |
46 | <comment>Optional product sku or code.</comment> | |
47 | <add>1.4</add> | |
48 | </field> | |
49 | <field> | |
50 | <name>options</name> | |
51 | <title>Options</title> | |
52 | <type>text</type> | |
53 | <localizable>true</localizable> | |
54 | <comment>Store comma-delimited list of color, size, etc. options for the product.</comment> | |
55 | <add>1.4</add> | |
56 | </field> | |
57 | <field> | |
58 | <name>image</name> | |
59 | <title>Image</title> | |
60 | <type>varchar</type> | |
61 | <length>255</length> | |
62 | <comment>Full or relative URL to uploaded image - fullsize.</comment> | |
63 | <add>1.4</add> | |
64 | </field> | |
65 | <field> | |
66 | <name>thumbnail</name> | |
67 | <title>Thumbnail</title> | |
68 | <type>varchar</type> | |
69 | <length>255</length> | |
70 | <comment>Full or relative URL to image thumbnail.</comment> | |
71 | <add>1.4</add> | |
72 | </field> | |
73 | <field> | |
74 | <name>price</name> | |
75 | <title>Price</title> | |
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> | |
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> | |
87 | </field> | |
88 | <field> | |
89 | <name>financial_type_id</name> | |
90 | <title>Financial Type</title> | |
91 | <type>int unsigned</type> | |
92 | <default>NULL</default> | |
93 | <comment>FK to Financial Type.</comment> | |
94 | <add>4.3</add> | |
95 | </field> | |
96 | <foreignKey> | |
97 | <name>financial_type_id</name> | |
98 | <table>civicrm_financial_type</table> | |
99 | <key>id</key> | |
100 | <onDelete>SET NULL</onDelete> | |
101 | <add>4.3</add> | |
102 | </foreignKey> | |
103 | ||
104 | <field> | |
105 | <name>min_contribution</name> | |
106 | <title>Minimum Contribution</title> | |
107 | <type>decimal</type> | |
108 | <comment>Minimum contribution required to be eligible to select this premium.</comment> | |
109 | <add>1.4</add> | |
110 | </field> | |
111 | <field> | |
112 | <name>cost</name> | |
113 | <title>Cost</title> | |
114 | <type>decimal</type> | |
115 | <comment>Actual cost of this product. Useful to determine net return from sale or using this as an incentive.</comment> | |
116 | <add>1.4</add> | |
117 | </field> | |
118 | <field> | |
119 | <name>is_active</name> | |
120 | <title>Is Active</title> | |
121 | <type>boolean</type> | |
122 | <required>true</required> | |
123 | <comment>Disabling premium removes it from the premiums_premium join table below.</comment> | |
124 | <add>1.4</add> | |
125 | </field> | |
126 | <field> | |
127 | <name>period_type</name> | |
128 | <title>Period Type</title> | |
129 | <type>enum</type> | |
130 | <values>rolling,fixed</values> | |
131 | <default>'rolling'</default> | |
132 | <comment>Rolling means we set start/end based on current day, fixed means we set start/end for current year or month | |
133 | (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> | |
134 | <add>1.4</add> | |
135 | </field> | |
136 | <field> | |
137 | <name>fixed_period_start_day</name> | |
138 | <title>Fixed Period Start Day</title> | |
139 | <type>int</type> | |
140 | <default>0101</default> | |
141 | <comment>Month and day (MMDD) that fixed period type subscription or membership starts.</comment> | |
142 | <add>1.4</add> | |
143 | </field> | |
144 | <field> | |
145 | <name>duration_unit</name> | |
146 | <title>Duration Unit</title> | |
147 | <type>enum</type> | |
148 | <values>day,month,week,year</values> | |
149 | <default>'year'</default> | |
150 | <add>1.4</add> | |
151 | </field> | |
152 | <field> | |
153 | <name>duration_interval</name> | |
154 | <title>Duration Interval</title> | |
155 | <type>int</type> | |
156 | <comment>Number of units for total duration of subscription, service, membership (e.g. 12 Months).</comment> | |
157 | <add>1.4</add> | |
158 | </field> | |
159 | <field> | |
160 | <name>frequency_unit</name> | |
161 | <title>Frequency Unit</title> | |
162 | <type>enum</type> | |
163 | <values>day,month,week,year</values> | |
164 | <default>'month'</default> | |
165 | <comment>Frequency unit and interval allow option to store actual delivery frequency for a subscription or service.</comment> | |
166 | <add>1.4</add> | |
167 | </field> | |
168 | <field> | |
169 | <name>frequency_interval</name> | |
170 | <title>Frequency Interval</title> | |
171 | <type>int</type> | |
172 | <comment>Number of units for delivery frequency of subscription, service, membership (e.g. every 3 Months).</comment> | |
173 | <add>1.4</add> | |
174 | </field> | |
175 | </table> |