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