Merge pull request #20802 from civicrm/5.39
[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 <component>CiviContribute</component>
10 <field>
11 <name>id</name>
12 <title>Contribution Product ID</title>
13 <type>int unsigned</type>
14 <required>true</required>
15 <html>
16 <type>Number</type>
17 </html>
18 <add>1.4</add>
19 </field>
20 <primaryKey>
21 <name>id</name>
22 <autoincrement>true</autoincrement>
23 </primaryKey>
24 <field>
25 <name>product_id</name>
26 <title>Product ID</title>
27 <type>int unsigned</type>
28 <required>true</required>
29 <add>1.4</add>
30 </field>
31 <foreignKey>
32 <name>product_id</name>
33 <table>civicrm_product</table>
34 <key>id</key>
35 <add>5.39</add>
36 <onDelete>CASCADE</onDelete>
37 </foreignKey>
38 <field>
39 <name>contribution_id</name>
40 <title>Contribution ID</title>
41 <type>int unsigned</type>
42 <required>true</required>
43 <html>
44 <label>Contribution</label>
45 </html>
46 <add>1.4</add>
47 </field>
48 <foreignKey>
49 <name>contribution_id</name>
50 <table>civicrm_contribution</table>
51 <key>id</key>
52 <add>1.4</add>
53 <onDelete>CASCADE</onDelete>
54 </foreignKey>
55 <field>
56 <name>product_option</name>
57 <title>Product Option</title>
58 <type>varchar</type>
59 <length>255</length>
60 <export>true</export>
61 <comment>Option value selected if applicable - e.g. color, size etc.</comment>
62 <add>1.4</add>
63 </field>
64 <field>
65 <name>quantity</name>
66 <title>Quantity</title>
67 <type>int</type>
68 <export>true</export>
69 <comment></comment>
70 <add>1.4</add>
71 </field>
72 <field>
73 <name>fulfilled_date</name>
74 <type>date</type>
75 <title>Fulfilled Date</title>
76 <export>true</export>
77 <comment>Optional. Can be used to record the date this product was fulfilled or shipped.</comment>
78 <add>1.4</add>
79 <html>
80 <type>Select Date</type>
81 <formatType>activityDate</formatType>
82 </html>
83 </field>
84 <field>
85 <name>start_date</name>
86 <uniqueName>contribution_start_date</uniqueName>
87 <title>Start date for premium</title>
88 <type>date</type>
89 <export>true</export>
90 <comment>Actual start date for a time-delimited premium (subscription, service or membership)</comment>
91 <add>1.4</add>
92 </field>
93 <field>
94 <name>end_date</name>
95 <uniqueName>contribution_end_date</uniqueName>
96 <type>date</type>
97 <title>End date for premium</title>
98 <export>true</export>
99 <comment>Actual end date for a time-delimited premium (subscription, service or membership)</comment>
100 <add>1.4</add>
101 </field>
102 <field>
103 <name>comment</name>
104 <title>Premium comment</title>
105 <type>text</type>
106 <add>1.4</add>
107 </field>
108 <field>
109 <name>financial_type_id</name>
110 <title>Financial Type ID</title>
111 <type>int unsigned</type>
112 <default>NULL</default>
113 <pseudoconstant>
114 <table>civicrm_financial_type</table>
115 <keyColumn>id</keyColumn>
116 <labelColumn>name</labelColumn>
117 </pseudoconstant>
118 <comment>FK to Financial Type(for membership price sets only).</comment>
119 <html>
120 <label>Financial Type</label>
121 </html>
122 <add>4.3</add>
123 </field>
124 <foreignKey>
125 <name>financial_type_id</name>
126 <table>civicrm_financial_type</table>
127 <key>id</key>
128 <onDelete>SET NULL</onDelete>
129 <add>4.3</add>
130 </foreignKey>
131 </table>