CRM-13497 - getting there on main tables
[civicrm-core.git] / xml / schema / Price / PriceFieldValue.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
3 <table>
4 <base>CRM/Price</base>
5 <class>PriceFieldValue</class>
6 <name>civicrm_price_field_value</name>
7 <add>3.3</add>
8 <field>
9 <name>id</name>
10 <type>int unsigned</type>
11 <required>true</required>
12 <comment>Price Field Value</comment>
13 <add>3.3</add>
14 </field>
15 <primaryKey>
16 <name>id</name>
17 <autoincrement>true</autoincrement>
18 </primaryKey>
19 <field>
20 <name>price_field_id</name>
21 <type>int unsigned</type>
22 <required>true</required>
23 <comment>FK to civicrm_price_field</comment>
24 <add>3.3</add>
25 </field>
26 <foreignKey>
27 <name>price_field_id</name>
28 <table>civicrm_price_field</table>
29 <key>id</key>
30 <add>3.3</add>
31 </foreignKey>
32 <field>
33 <name>name</name>
34 <type>varchar</type>
35 <title>Name</title>
36 <length>255</length>
37 <comment>Price field option name</comment>
38 <html>
39 <type>Text</type>
40 </html>
41 <add>3.3</add>
42 </field>
43 <field>
44 <name>label</name>
45 <type>varchar</type>
46 <title>Label</title>
47 <length>255</length>
48 <localizable>true</localizable>
49 <comment>Price field option label</comment>
50 <html>
51 <type>Text</type>
52 </html>
53 <add>3.3</add>
54 </field>
55 <field>
56 <name>description</name>
57 <type>text</type>
58 <html>
59 <type>TextArea</type>
60 <rows>2</rows>
61 <cols>60</cols>
62 </html>
63 <default>NULL</default>
64 <localizable>true</localizable>
65 <comment>>Price field option description.</comment>
66 <add>3.3</add>
67 </field>
68 <field>
69 <name>amount</name>
70 <type>varchar</type>
71 <title>Amount</title>
72 <length>512</length>
73 <html>
74 <type>Text</type>
75 <size>EIGHT</size>
76 </html>
77 <required>true</required>
78 <comment>Price field option amount</comment>
79 <add>3.3</add>
80 </field>
81 <field>
82 <name>count</name>
83 <type>int unsigned</type>
84 <default>NULL</default>
85 <comment>Number of participants per field option</comment>
86 <add>3.3</add>
87 <html>
88 <type>Text</type>
89 </html>
90 </field>
91 <field>
92 <name>max_value</name>
93 <type>int unsigned</type>
94 <default>NULL</default>
95 <comment>Max number of participants per field options</comment>
96 <add>3.3</add>
97 <html>
98 <type>Text</type>
99 </html>
100 </field>
101 <field>
102 <name>weight</name>
103 <type>int</type>
104 <default>1</default>
105 <comment>Order in which the field options should appear</comment>
106 <add>3.3</add>
107 <html>
108 <type>Text</type>
109 </html>
110 </field>
111 <field>
112 <name>membership_type_id</name>
113 <type>int unsigned</type>
114 <default>NULL</default>
115 <comment>FK to Membership Type</comment>
116 <html>
117 <type>Select</type>
118 </html>
119 <add>3.4</add>
120 </field>
121 <foreignKey>
122 <name>membership_type_id</name>
123 <table>civicrm_membership_type</table>
124 <key>id</key>
125 <add>3.4</add>
126 <onDelete>SET NULL</onDelete>
127 </foreignKey>
128 <field>
129 <name>membership_num_terms</name>
130 <type>int unsigned</type>
131 <default>NULL</default>
132 <comment>Number of terms for this membership</comment>
133 <add>4.3</add>
134 <html>
135 <type>Text</type>
136 </html>
137 </field>
138 <field>
139 <name>is_default</name>
140 <type>boolean</type>
141 <comment>Is this default price field option</comment>
142 <default>0</default>
143 <add>3.3</add>
144 <html>
145 <type>CheckBox</type>
146 </html>
147 </field>
148 <field>
149 <name>is_active</name>
150 <type>boolean</type>
151 <comment>Is this price field value active</comment>
152 <default>1</default>
153 <add>3.3</add>
154 </field>
155 <field>
156 <name>financial_type_id</name>
157 <title>Financial Type</title>
158 <type>int unsigned</type>
159 <default>NULL</default>
160 <comment>FK to Financial Type.</comment>
161 <add>4.3</add>
162 <html>
163 <type>Select</type>
164 </html>
165 </field>
166 <foreignKey>
167 <name>financial_type_id</name>
168 <table>civicrm_financial_type</table>
169 <key>id</key>
170 <onDelete>SET NULL</onDelete>
171 <add>4.3</add>
172 </foreignKey>
173 <field>
174 <name>deductible_amount</name>
175 <title>Deductible Amount</title>
176 <type>decimal</type>
177 <default>0.0</default>
178 <headerPattern>/unit?.?amoun/i</headerPattern>
179 <dataPattern>/^\d+(\.\d{2})?$/</dataPattern>
180 <required>true</required>
181 <comment>Tax-deductible portion of the amount</comment>
182 <add>4.1</add>
183 <html>
184 <type>Text</type>
185 </html>
186 </field>
187 </table>
188