Switch UpdateSubscription to use datepicker and add metadata for all date fields...
[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 <type>date</type>
47 <export>true</export>
48 <import>true</import>
49 <comment>Date on which grant application was received by donor.</comment>
50 <add>1.8</add>
51 <html>
52 <type>Select Date</type>
53 <formatType>activityDate</formatType>
54 </html>
55 </field>
56 <field>
57 <name>decision_date</name>
58 <title>Decision date</title>
59 <type>date</type>
60 <comment>Date on which grant decision was made.</comment>
61 <import>true</import>
62 <add>1.8</add>
63 <html>
64 <type>Select Date</type>
65 <formatType>activityDate</formatType>
66 </html>
67 </field>
68 <field>
69 <name>money_transfer_date</name>
70 <uniqueName>grant_money_transfer_date</uniqueName>
71 <title>Grant Money transfer date</title>
72 <type>date</type>
73 <comment>Date on which grant money transfer was made.</comment>
74 <import>true</import>
75 <add>1.8</add>
76 <html>
77 <type>Select Date</type>
78 <formatType>activityDate</formatType>
79 </html>
80 </field>
81 <field>
82 <name>grant_due_date</name>
83 <type>date</type>
84 <title>Grant Due Date</title>
85 <comment>Date on which grant report is due.</comment>
86 <add>1.8</add>
87 <import>true</import>
88 <html>
89 <type>Select Date</type>
90 <formatType>activityDate</formatType>
91 </html>
92 </field>
93 <field>
94 <name>grant_report_received</name>
95 <title>Grant report received</title>
96 <type>boolean</type>
97 <comment>Yes/No field stating whether grant report was received by donor.</comment>
98 <import>true</import>
99 <add>1.8</add>
100 <html>
101 <type>CheckBox</type>
102 </html>
103 </field>
104 <field>
105 <name>grant_type_id</name>
106 <type>int unsigned</type>
107 <title>Grant Type</title>
108 <pseudoconstant>
109 <optionGroupName>grant_type</optionGroupName>
110 </pseudoconstant>
111 <html>
112 <type>Select</type>
113 </html>
114 <export>true</export>
115 <required>true</required>
116 <comment>Type of grant. Implicit FK to civicrm_option_value in grant_type option_group.</comment>
117 <add>1.8</add>
118 </field>
119 <index>
120 <name>index_grant_type_id</name>
121 <fieldName>grant_type_id</fieldName>
122 <add>1.8</add>
123 </index>
124 <field>
125 <name>amount_total</name>
126 <title>Total Amount</title>
127 <type>decimal</type>
128 <required>true</required>
129 <dataPattern>/^\d+(\.\d{2})?$/</dataPattern>
130 <import>true</import>
131 <comment>Requested grant amount, in default currency.</comment>
132 <add>1.8</add>
133 <html>
134 <type>Text</type>
135 </html>
136 </field>
137 <field>
138 <name>amount_requested</name>
139 <title>Amount Requested</title>
140 <type>decimal</type>
141 <dataPattern>/^\d+(\.\d{2})?$/</dataPattern>
142 <comment>Requested grant amount, in original currency (optional).</comment>
143 <add>1.8</add>
144 <html>
145 <type>Text</type>
146 </html>
147 </field>
148 <field>
149 <name>amount_granted</name>
150 <title>Amount granted</title>
151 <type>decimal</type>
152 <dataPattern>/^\d+(\.\d{2})?$/</dataPattern>
153 <import>true</import>
154 <comment>Granted amount, in default currency.</comment>
155 <add>1.8</add>
156 <html>
157 <type>Text</type>
158 </html>
159 </field>
160 <field>
161 <name>currency</name>
162 <title>Grant Currency</title>
163 <type>varchar</type>
164 <length>3</length>
165 <required>true</required>
166 <comment>3 character string, value from config setting or input via user.</comment>
167 <add>3.2</add>
168 <pseudoconstant>
169 <table>civicrm_currency</table>
170 <keyColumn>name</keyColumn>
171 <labelColumn>full_name</labelColumn>
172 <nameColumn>name</nameColumn>
173 </pseudoconstant>
174 <html>
175 <type>Select</type>
176 </html>
177 </field>
178 <field>
179 <name>currency</name>
180 <type>varchar</type>
181 <length>8</length>
182 <default>NULL</default>
183 <comment>3 character string, value from config setting or input via user.</comment>
184 <add>3.2</add>
185 <drop>4.3</drop>
186 </field>
187 <field>
188 <name>rationale</name>
189 <type>text</type>
190 <title>Grant Rationale</title>
191 <comment>Grant rationale.</comment>
192 <html>
193 <type>TextArea</type>
194 <rows>4</rows>
195 <cols>60</cols>
196 </html>
197 <import>true</import>
198 <add>1.8</add>
199 </field>
200 <field>
201 <name>status_id</name>
202 <type>int unsigned</type>
203 <title>Grant Status</title>
204 <uniqueName>grant_status_id</uniqueName>
205 <required>true</required>
206 <import>true</import>
207 <export>false</export>
208 <comment>Id of Grant status.</comment>
209 <pseudoconstant>
210 <optionGroupName>grant_status</optionGroupName>
211 </pseudoconstant>
212 <html>
213 <type>Select</type>
214 </html>
215 <add>1.8</add>
216 </field>
217 <index>
218 <name>index_status_id</name>
219 <fieldName>status_id</fieldName>
220 <add>1.8</add>
221 </index>
222 <field>
223 <name>financial_type_id</name>
224 <title>Financial Type</title>
225 <type>int unsigned</type>
226 <default>NULL</default>
227 <pseudoconstant>
228 <table>civicrm_financial_type</table>
229 <keyColumn>id</keyColumn>
230 <labelColumn>name</labelColumn>
231 </pseudoconstant>
232 <comment>FK to Financial Type.</comment>
233 <add>4.3</add>
234 </field>
235 <foreignKey>
236 <name>financial_type_id</name>
237 <table>civicrm_financial_type</table>
238 <key>id</key>
239 <onDelete>SET NULL</onDelete>
240 <add>4.3</add>
241 </foreignKey>
242 </table>