Commit | Line | Data |
---|---|---|
6a488035 TO |
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 | </field> | |
33 | <foreignKey> | |
34 | <name>contact_id</name> | |
35 | <table>civicrm_contact</table> | |
36 | <key>id</key> | |
37 | <add>1.8</add> | |
38 | <onDelete>CASCADE</onDelete> | |
39 | </foreignKey> | |
40 | <field> | |
41 | <name>application_received_date</name> | |
42 | <title>Application received date</title> | |
43 | <type>date</type> | |
44 | <export>true</export> | |
45 | <comment>Date on which grant application was received by donor.</comment> | |
46 | <add>1.8</add> | |
47 | </field> | |
48 | <field> | |
49 | <name>decision_date</name> | |
50 | <title>Decision date</title> | |
51 | <type>date</type> | |
52 | <comment>Date on which grant decision was made.</comment> | |
53 | <import>true</import> | |
54 | <add>1.8</add> | |
55 | </field> | |
56 | <field> | |
57 | <name>money_transfer_date</name> | |
58 | <title>Grant Money transfer date</title> | |
59 | <type>date</type> | |
60 | <comment>Date on which grant money transfer was made.</comment> | |
61 | <import>true</import> | |
62 | <add>1.8</add> | |
63 | </field> | |
64 | <field> | |
65 | <name>grant_due_date</name> | |
66 | <type>date</type> | |
67 | <title>Grant Due Date</title> | |
68 | <comment>Date on which grant report is due.</comment> | |
69 | <add>1.8</add> | |
70 | </field> | |
71 | <field> | |
72 | <name>grant_report_received</name> | |
73 | <title>Grant report received</title> | |
74 | <type>boolean</type> | |
75 | <comment>Yes/No field stating whether grant report was received by donor.</comment> | |
76 | <import>true</import> | |
77 | <add>1.8</add> | |
78 | </field> | |
79 | <field> | |
80 | <name>grant_type_id</name> | |
81 | <type>int unsigned</type> | |
82 | <title>Grant Type Id</title> | |
83 | <pseudoconstant> | |
84 | <name>grantType</name> | |
85 | <optionGroupName>grant_type</optionGroupName> | |
86 | </pseudoconstant> | |
87 | <export>false</export> | |
88 | <required>true</required> | |
89 | <comment>Type of grant. Implicit FK to civicrm_option_value in grant_type option_group.</comment> | |
90 | <add>1.8</add> | |
91 | </field> | |
92 | <index> | |
93 | <name>index_grant_type_id</name> | |
94 | <fieldName>grant_type_id</fieldName> | |
95 | <add>1.8</add> | |
96 | </index> | |
97 | <field> | |
98 | <name>amount_total</name> | |
99 | <title>Total Amount</title> | |
100 | <type>decimal</type> | |
101 | <required>true</required> | |
102 | <dataPattern>/^\d+(\.\d{2})?$/</dataPattern> | |
103 | <import>true</import> | |
104 | <comment>Requested grant amount, in default currency.</comment> | |
105 | <add>1.8</add> | |
106 | </field> | |
107 | <field> | |
108 | <name>amount_requested</name> | |
109 | <title>Amount Requested</title> | |
110 | <type>decimal</type> | |
111 | <dataPattern>/^\d+(\.\d{2})?$/</dataPattern> | |
112 | <comment>Requested grant amount, in original currency (optional).</comment> | |
113 | <add>1.8</add> | |
114 | </field> | |
115 | <field> | |
116 | <name>amount_granted</name> | |
117 | <title>Amount granted</title> | |
118 | <type>decimal</type> | |
119 | <dataPattern>/^\d+(\.\d{2})?$/</dataPattern> | |
120 | <import>true</import> | |
121 | <comment>Granted amount, in default currency.</comment> | |
122 | <add>1.8</add> | |
123 | </field> | |
124 | <field> | |
125 | <name>currency</name> | |
126 | <type>varchar</type> | |
127 | <length>3</length> | |
128 | <required>true</required> | |
129 | <comment>3 character string, value from config setting or input via user.</comment> | |
130 | <add>3.2</add> | |
bd44e0df AS |
131 | <pseudoconstant> |
132 | <table>civicrm_currency</table> | |
133 | <keyColumn>name</keyColumn> | |
134 | <labelColumn>symbol</labelColumn> | |
135 | </pseudoconstant> | |
6a488035 TO |
136 | </field> |
137 | <field> | |
138 | <name>currency</name> | |
139 | <type>varchar</type> | |
140 | <length>8</length> | |
141 | <default>NULL</default> | |
142 | <comment>3 character string, value from config setting or input via user.</comment> | |
143 | <add>3.2</add> | |
144 | <drop>4.3</drop> | |
145 | </field> | |
146 | <field> | |
147 | <name>rationale</name> | |
148 | <type>text</type> | |
149 | <title>Grant Rationale</title> | |
150 | <comment>Grant rationale.</comment> | |
151 | <htmlType>textarea</htmlType> | |
152 | <rows>4</rows> | |
153 | <cols>60</cols> | |
154 | <import>true</import> | |
155 | <add>1.8</add> | |
156 | </field> | |
157 | <field> | |
158 | <name>status_id</name> | |
159 | <type>int unsigned</type> | |
160 | <title>Grant Status Id</title> | |
161 | <uniqueName>grant_status_id</uniqueName> | |
162 | <required>true</required> | |
163 | <import>true</import> | |
164 | <export>false</export> | |
165 | <comment>Id of Grant status.</comment> | |
166 | <add>1.8</add> | |
167 | </field> | |
168 | <index> | |
169 | <name>index_status_id</name> | |
170 | <fieldName>status_id</fieldName> | |
171 | <add>1.8</add> | |
172 | </index> | |
173 | <field> | |
174 | <name>financial_type_id</name> | |
175 | <title>Financial Type</title> | |
176 | <type>int unsigned</type> | |
177 | <default>NULL</default> | |
178 | <comment>FK to Financial Type.</comment> | |
179 | <add>4.3</add> | |
180 | </field> | |
181 | <foreignKey> | |
182 | <name>financial_type_id</name> | |
183 | <table>civicrm_financial_type</table> | |
184 | <key>id</key> | |
185 | <onDelete>SET NULL</onDelete> | |
186 | <add>4.3</add> | |
187 | </foreignKey> | |
188 | </table> |