Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | <?xml version="1.0" encoding="iso-8859-1" ?> |
2 | ||
3 | <table> | |
4 | <base>CRM/Core</base> | |
5 | <class>Discount</class> | |
6 | <name>civicrm_discount</name> | |
7 | <comment>Stores discounts for events on the basis of date</comment> | |
929a1c14 | 8 | <add>2.1</add> |
6a488035 TO |
9 | <log>true</log> |
10 | <field> | |
11 | <name>id</name> | |
f3ea5182 | 12 | <title>Discount ID</title> |
6a488035 TO |
13 | <type>int unsigned</type> |
14 | <required>true</required> | |
15 | <comment>primary key</comment> | |
16 | <add>2.1</add> | |
17 | </field> | |
18 | <primaryKey> | |
19 | <name>id</name> | |
20 | <autoincrement>true</autoincrement> | |
21 | </primaryKey> | |
22 | <field> | |
23 | <name>entity_table</name> | |
f3ea5182 | 24 | <title>Entity Table</title> |
6a488035 TO |
25 | <type>varchar</type> |
26 | <length>64</length> | |
27 | <comment>physical tablename for entity being joined to discount, e.g. civicrm_event</comment> | |
28 | <add>2.1</add> | |
29 | </field> | |
30 | <field> | |
31 | <name>entity_id</name> | |
f3ea5182 | 32 | <title>Entity ID</title> |
6a488035 TO |
33 | <type>int unsigned</type> |
34 | <required>true</required> | |
35 | <comment>FK to entity table specified in entity_table column.</comment> | |
36 | <add>2.1</add> | |
37 | </field> | |
71e5aa5c ARW |
38 | <dynamicForeignKey> |
39 | <idColumn>entity_id</idColumn> | |
40 | <typeColumn>entity_table</typeColumn> | |
41 | <add>2.1</add> | |
42 | </dynamicForeignKey> | |
6a488035 TO |
43 | <index> |
44 | <name>index_entity</name> | |
45 | <fieldName>entity_table</fieldName> | |
46 | <fieldName>entity_id</fieldName> | |
47 | <add>2.1</add> | |
48 | </index> | |
49 | <field> | |
50 | <name>option_group_id</name> | |
3c7d2158 | 51 | <uniqueName>participant_discount_name</uniqueName> |
6a488035 TO |
52 | <title>Discount Name</title> |
53 | <type>int unsigned</type> | |
54 | <required>true</required> | |
55 | <export>true</export> | |
56 | <comment>FK to civicrm_price_set</comment> | |
57 | <add>2.1</add> | |
58 | <drop>4.3</drop> | |
59 | </field> | |
60 | <foreignKey> | |
61 | <name>option_group_id</name> | |
62 | <table>civicrm_price_set</table> | |
63 | <key>id</key> | |
64 | <add>2.1</add> | |
65 | <onDelete>CASCADE</onDelete> | |
66 | <drop>4.3</drop> | |
67 | </foreignKey> | |
68 | <field> | |
69 | <name>price_set_id</name> | |
70 | <uniqueName>participant_discount_name</uniqueName> | |
71 | <title>Discount Name</title> | |
72 | <type>int unsigned</type> | |
73 | <required>true</required> | |
a0fc5967 PN |
74 | <pseudoconstant> |
75 | <table>civicrm_price_set</table> | |
76 | <keyColumn>id</keyColumn> | |
77 | <labelColumn>title</labelColumn> | |
78 | </pseudoconstant> | |
6a488035 TO |
79 | <export>true</export> |
80 | <comment>FK to civicrm_price_set</comment> | |
81 | <add>4.3</add> | |
82 | </field> | |
83 | <foreignKey> | |
84 | <name>price_set_id</name> | |
85 | <table>civicrm_price_set</table> | |
86 | <key>id</key> | |
87 | <add>4.3</add> | |
88 | <onDelete>CASCADE</onDelete> | |
89 | </foreignKey> | |
90 | <index> | |
91 | <name>index_entity_option_id</name> | |
92 | <fieldName>entity_table</fieldName> | |
93 | <fieldName>entity_id</fieldName> | |
94 | <fieldName>price_set_id</fieldName> | |
95 | <add>2.1</add> | |
96 | </index> | |
97 | <field> | |
98 | <name>start_date</name> | |
f3ea5182 | 99 | <title>Discount Start Date</title> |
6a488035 TO |
100 | <type>date</type> |
101 | <comment>Date when discount starts.</comment> | |
102 | <add>2.1</add> | |
103 | </field> | |
104 | <field> | |
105 | <name>end_date</name> | |
f3ea5182 | 106 | <title>Discount End Date</title> |
6a488035 TO |
107 | <type>date</type> |
108 | <comment>Date when discount ends.</comment> | |
109 | <add>2.1</add> | |
110 | </field> | |
111 | </table> |