| 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 | <value>1</value> |
| 55 | <export>true</export> |
| 56 | <comment></comment> |
| 57 | <add>1.4</add> |
| 58 | </field> |
| 59 | <field> |
| 60 | <name>total_cost</name> |
| 61 | <type>decimal</type> |
| 62 | <required>true</required> |
| 63 | <import>true</import> |
| 64 | <headerPattern>/^total|(.?^am(ou)?nt)/i</headerPattern> |
| 65 | <dataPattern>/^\d+(\.\d{2})?$/</dataPattern> |
| 66 | <comment>quantity X civicrm_product.cost.</comment> |
| 67 | <add>1.3</add> |
| 68 | <drop>4.1</drop> |
| 69 | </field> |
| 70 | <field> |
| 71 | <name>fulfilled_date</name> |
| 72 | <type>date</type> |
| 73 | <title>Fulfilled Date</title> |
| 74 | <export>true</export> |
| 75 | <comment>Optional. Can be used to record the date this product was fulfilled or shipped.</comment> |
| 76 | <add>1.4</add> |
| 77 | </field> |
| 78 | <field> |
| 79 | <name>start_date</name> |
| 80 | <uniqueName>contribution_start_date</uniqueName> |
| 81 | <title>Start date for premium</title> |
| 82 | <type>date</type> |
| 83 | <export>true</export> |
| 84 | <comment>Actual start date for a time-delimited premium (subscription, service or membership)</comment> |
| 85 | <add>1.4</add> |
| 86 | </field> |
| 87 | <field> |
| 88 | <name>end_date</name> |
| 89 | <uniqueName>contribution_end_date</uniqueName> |
| 90 | <type>date</type> |
| 91 | <title>End date for premium</title> |
| 92 | <export>true</export> |
| 93 | <comment>Actual end date for a time-delimited premium (subscription, service or membership)</comment> |
| 94 | <add>1.4</add> |
| 95 | </field> |
| 96 | <field> |
| 97 | <name>comment</name> |
| 98 | <title>Premium comment</title> |
| 99 | <type>text</type> |
| 100 | <add>1.4</add> |
| 101 | </field> |
| 102 | <field> |
| 103 | <name>financial_type_id</name> |
| 104 | <title>Financial Type</title> |
| 105 | <type>int unsigned</type> |
| 106 | <default>NULL</default> |
| 107 | <pseudoconstant> |
| 108 | <table>civicrm_financial_type</table> |
| 109 | <keyColumn>id</keyColumn> |
| 110 | <labelColumn>name</labelColumn> |
| 111 | </pseudoconstant> |
| 112 | <comment>FK to Financial Type(for membership price sets only).</comment> |
| 113 | <add>4.3</add> |
| 114 | </field> |
| 115 | <foreignKey> |
| 116 | <name>financial_type_id</name> |
| 117 | <table>civicrm_financial_type</table> |
| 118 | <key>id</key> |
| 119 | <onDelete>SET NULL</onDelete> |
| 120 | <add>4.3</add> |
| 121 | </foreignKey> |
| 122 | </table> |