Switch priceset selector to addField method
[civicrm-core.git] / xml / schema / Grant / Grant.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2 <table>
3 <base>CRM/Grant</base>
4 <class>Grant</class>
5 <name>civicrm_grant</name>
6 <comment>This table stores information about grants given to a contact.</comment>
7 <add>1.8</add>
8 <log>true</log>
9 <field>
10 <name>id</name>
11 <type>int unsigned</type>
12 <uniqueName>grant_id</uniqueName>
13 <title>Grant ID</title>
14 <required>true</required>
15 <comment>Unique Grant id</comment>
16 <import>true</import>
17 <add>1.8</add>
18 </field>
19 <primaryKey>
20 <name>id</name>
21 <autoincrement>true</autoincrement>
22 </primaryKey>
23 <field>
24 <name>contact_id</name>
25 <type>int unsigned</type>
26 <uniqueName>grant_contact_id</uniqueName>
27 <title>Contact ID</title>
28 <export>true</export>
29 <required>true</required>
30 <comment>Contact ID of contact record given grant belongs to.</comment>
31 <add>1.8</add>
32 <html>
33 <type>EntityRef</type>
34 </html>
35 </field>
36 <foreignKey>
37 <name>contact_id</name>
38 <table>civicrm_contact</table>
39 <key>id</key>
40 <add>1.8</add>
41 <onDelete>CASCADE</onDelete>
42 </foreignKey>
43 <field>
44 <name>application_received_date</name>
45 <title>Application received date</title>
46 <uniqueName>grant_application_received_date</uniqueName>
47 <type>date</type>
48 <export>true</export>
49 <import>true</import>
50 <comment>Date on which grant application was received by donor.</comment>
51 <add>1.8</add>
52 <html>
53 <type>Select Date</type>
54 <formatType>activityDate</formatType>
55 </html>
56 </field>
57 <field>
58 <name>decision_date</name>
59 <title>Decision date</title>
60 <uniqueName>grant_decision_date</uniqueName>
61 <type>date</type>
62 <comment>Date on which grant decision was made.</comment>
63 <import>true</import>
64 <add>1.8</add>
65 <html>
66 <type>Select Date</type>
67 <formatType>activityDate</formatType>
68 </html>
69 </field>
70 <field>
71 <name>money_transfer_date</name>
72 <uniqueName>grant_money_transfer_date</uniqueName>
73 <title>Grant Money transfer date</title>
74 <type>date</type>
75 <comment>Date on which grant money transfer was made.</comment>
76 <import>true</import>
77 <add>1.8</add>
78 <html>
79 <type>Select Date</type>
80 <formatType>activityDate</formatType>
81 </html>
82 </field>
83 <field>
84 <name>grant_due_date</name>
85 <type>date</type>
86 <title>Grant Report Due Date</title>
87 <comment>Date on which grant report is due.</comment>
88 <add>1.8</add>
89 <import>true</import>
90 <html>
91 <type>Select Date</type>
92 <formatType>activityDate</formatType>
93 </html>
94 </field>
95 <field>
96 <name>grant_report_received</name>
97 <title>Grant report received</title>
98 <type>boolean</type>
99 <comment>Yes/No field stating whether grant report was received by donor.</comment>
100 <import>true</import>
101 <add>1.8</add>
102 <html>
103 <type>CheckBox</type>
104 </html>
105 </field>
106 <field>
107 <name>grant_type_id</name>
108 <type>int unsigned</type>
109 <title>Grant Type</title>
110 <pseudoconstant>
111 <optionGroupName>grant_type</optionGroupName>
112 </pseudoconstant>
113 <html>
114 <type>Select</type>
115 </html>
116 <export>true</export>
117 <required>true</required>
118 <comment>Type of grant. Implicit FK to civicrm_option_value in grant_type option_group.</comment>
119 <add>1.8</add>
120 </field>
121 <index>
122 <name>index_grant_type_id</name>
123 <fieldName>grant_type_id</fieldName>
124 <add>1.8</add>
125 </index>
126 <field>
127 <name>amount_total</name>
128 <title>Total Amount</title>
129 <type>decimal</type>
130 <required>true</required>
131 <dataPattern>/^\d+(\.\d{2})?$/</dataPattern>
132 <import>true</import>
133 <comment>Requested grant amount, in default currency.</comment>
134 <add>1.8</add>
135 <html>
136 <type>Text</type>
137 </html>
138 </field>
139 <field>
140 <name>amount_requested</name>
141 <title>Amount Requested</title>
142 <type>decimal</type>
143 <dataPattern>/^\d+(\.\d{2})?$/</dataPattern>
144 <comment>Requested grant amount, in original currency (optional).</comment>
145 <add>1.8</add>
146 <html>
147 <type>Text</type>
148 </html>
149 </field>
150 <field>
151 <name>amount_granted</name>
152 <title>Amount granted</title>
153 <type>decimal</type>
154 <dataPattern>/^\d+(\.\d{2})?$/</dataPattern>
155 <import>true</import>
156 <comment>Granted amount, in default currency.</comment>
157 <add>1.8</add>
158 <html>
159 <type>Text</type>
160 </html>
161 </field>
162 <field>
163 <name>currency</name>
164 <title>Grant Currency</title>
165 <type>varchar</type>
166 <length>3</length>
167 <required>true</required>
168 <comment>3 character string, value from config setting or input via user.</comment>
169 <add>3.2</add>
170 <pseudoconstant>
171 <table>civicrm_currency</table>
172 <keyColumn>name</keyColumn>
173 <labelColumn>full_name</labelColumn>
174 <nameColumn>name</nameColumn>
175 </pseudoconstant>
176 <html>
177 <type>Select</type>
178 </html>
179 </field>
180 <field>
181 <name>currency</name>
182 <type>varchar</type>
183 <length>8</length>
184 <default>NULL</default>
185 <comment>3 character string, value from config setting or input via user.</comment>
186 <add>3.2</add>
187 <drop>4.3</drop>
188 </field>
189 <field>
190 <name>rationale</name>
191 <type>text</type>
192 <title>Grant Rationale</title>
193 <comment>Grant rationale.</comment>
194 <html>
195 <type>TextArea</type>
196 <rows>4</rows>
197 <cols>60</cols>
198 </html>
199 <import>true</import>
200 <add>1.8</add>
201 </field>
202 <field>
203 <name>status_id</name>
204 <type>int unsigned</type>
205 <title>Grant Status</title>
206 <uniqueName>grant_status_id</uniqueName>
207 <required>true</required>
208 <import>true</import>
209 <export>false</export>
210 <comment>Id of Grant status.</comment>
211 <pseudoconstant>
212 <optionGroupName>grant_status</optionGroupName>
213 </pseudoconstant>
214 <html>
215 <type>Select</type>
216 </html>
217 <add>1.8</add>
218 </field>
219 <index>
220 <name>index_status_id</name>
221 <fieldName>status_id</fieldName>
222 <add>1.8</add>
223 </index>
224 <field>
225 <name>financial_type_id</name>
226 <title>Financial Type</title>
227 <type>int unsigned</type>
228 <default>NULL</default>
229 <pseudoconstant>
230 <table>civicrm_financial_type</table>
231 <keyColumn>id</keyColumn>
232 <labelColumn>name</labelColumn>
233 </pseudoconstant>
234 <comment>FK to Financial Type.</comment>
235 <add>4.3</add>
236 </field>
237 <foreignKey>
238 <name>financial_type_id</name>
239 <table>civicrm_financial_type</table>
240 <key>id</key>
241 <onDelete>SET NULL</onDelete>
242 <add>4.3</add>
243 </foreignKey>
244 </table>