Merge pull request #10244 from eileenmcnaughton/uffield1
[civicrm-core.git] / xml / schema / Contribute / ContributionProduct.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
3 <table>
4 <base>CRM/Contribute</base>
5 <class>ContributionProduct</class>
6 <name>civicrm_contribution_product</name>
7 <add>1.4</add>
8 <log>true</log>
9 <field>
10 <name>id</name>
11 <title>Contribution Product ID</title>
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>product_id</name>
22 <title>Product ID</title>
23 <type>int unsigned</type>
24 <required>true</required>
25 <add>1.4</add>
26 </field>
27 <field>
28 <name>contribution_id</name>
29 <title>Contribution ID</title>
30 <type>int unsigned</type>
31 <required>true</required>
32 <add>1.4</add>
33 </field>
34 <foreignKey>
35 <name>contribution_id</name>
36 <table>civicrm_contribution</table>
37 <key>id</key>
38 <add>1.4</add>
39 <onDelete>CASCADE</onDelete>
40 </foreignKey>
41 <field>
42 <name>product_option</name>
43 <title>Product Option</title>
44 <type>varchar</type>
45 <length>255</length>
46 <export>true</export>
47 <comment>Option value selected if applicable - e.g. color, size etc.</comment>
48 <add>1.4</add>
49 </field>
50 <field>
51 <name>quantity</name>
52 <title>Quantity</title>
53 <type>int</type>
54 <export>true</export>
55 <comment></comment>
56 <add>1.4</add>
57 </field>
58 <field>
59 <name>total_cost</name>
60 <type>decimal</type>
61 <required>true</required>
62 <import>true</import>
63 <headerPattern>/^total|(.?^am(ou)?nt)/i</headerPattern>
64 <dataPattern>/^\d+(\.\d{2})?$/</dataPattern>
65 <comment>quantity X civicrm_product.cost.</comment>
66 <add>1.3</add>
67 <drop>4.1</drop>
68 </field>
69 <field>
70 <name>fulfilled_date</name>
71 <type>date</type>
72 <title>Fulfilled Date</title>
73 <export>true</export>
74 <comment>Optional. Can be used to record the date this product was fulfilled or shipped.</comment>
75 <add>1.4</add>
76 </field>
77 <field>
78 <name>start_date</name>
79 <uniqueName>contribution_start_date</uniqueName>
80 <title>Start date for premium</title>
81 <type>date</type>
82 <export>true</export>
83 <comment>Actual start date for a time-delimited premium (subscription, service or membership)</comment>
84 <add>1.4</add>
85 </field>
86 <field>
87 <name>end_date</name>
88 <uniqueName>contribution_end_date</uniqueName>
89 <type>date</type>
90 <title>End date for premium</title>
91 <export>true</export>
92 <comment>Actual end date for a time-delimited premium (subscription, service or membership)</comment>
93 <add>1.4</add>
94 </field>
95 <field>
96 <name>comment</name>
97 <title>Premium comment</title>
98 <type>text</type>
99 <add>1.4</add>
100 </field>
101 <field>
102 <name>financial_type_id</name>
103 <title>Financial Type</title>
104 <type>int unsigned</type>
105 <default>NULL</default>
106 <pseudoconstant>
107 <table>civicrm_financial_type</table>
108 <keyColumn>id</keyColumn>
109 <labelColumn>name</labelColumn>
110 </pseudoconstant>
111 <comment>FK to Financial Type(for membership price sets only).</comment>
112 <add>4.3</add>
113 </field>
114 <foreignKey>
115 <name>financial_type_id</name>
116 <table>civicrm_financial_type</table>
117 <key>id</key>
118 <onDelete>SET NULL</onDelete>
119 <add>4.3</add>
120 </foreignKey>
121 </table>