CRM-13584: installer template.css: cleanup CSS, set max-width of body to 1200px.
[civicrm-core.git] / xml / schema / Grant / Grant.xml
CommitLineData
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>
de25aed1 39 </foreignKey>
6a488035
TO
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>
6a488035
TO
84 <optionGroupName>grant_type</optionGroupName>
85 </pseudoconstant>
86 <export>false</export>
87 <required>true</required>
88 <comment>Type of grant. Implicit FK to civicrm_option_value in grant_type option_group.</comment>
89 <add>1.8</add>
90 </field>
91 <index>
92 <name>index_grant_type_id</name>
93 <fieldName>grant_type_id</fieldName>
fb1fd730
CW
94 <pseudoconstant>
95 <optionGroupName>grant_type</optionGroupName>
96 </pseudoconstant>
6a488035
TO
97 <add>1.8</add>
98 </index>
de25aed1 99 <field>
6a488035
TO
100 <name>amount_total</name>
101 <title>Total Amount</title>
102 <type>decimal</type>
103 <required>true</required>
104 <dataPattern>/^\d+(\.\d{2})?$/</dataPattern>
105 <import>true</import>
106 <comment>Requested grant amount, in default currency.</comment>
107 <add>1.8</add>
108 </field>
109 <field>
110 <name>amount_requested</name>
111 <title>Amount Requested</title>
112 <type>decimal</type>
113 <dataPattern>/^\d+(\.\d{2})?$/</dataPattern>
114 <comment>Requested grant amount, in original currency (optional).</comment>
115 <add>1.8</add>
116 </field>
117 <field>
118 <name>amount_granted</name>
119 <title>Amount granted</title>
120 <type>decimal</type>
121 <dataPattern>/^\d+(\.\d{2})?$/</dataPattern>
122 <import>true</import>
123 <comment>Granted amount, in default currency.</comment>
124 <add>1.8</add>
125 </field>
126 <field>
127 <name>currency</name>
de25aed1 128 <title>Grant Currency</title>
6a488035
TO
129 <type>varchar</type>
130 <length>3</length>
131 <required>true</required>
132 <comment>3 character string, value from config setting or input via user.</comment>
133 <add>3.2</add>
bd44e0df
AS
134 <pseudoconstant>
135 <table>civicrm_currency</table>
136 <keyColumn>name</keyColumn>
a38a89fc
CW
137 <labelColumn>full_name</labelColumn>
138 <nameColumn>numeric_code</nameColumn>
bd44e0df 139 </pseudoconstant>
6a488035
TO
140 </field>
141 <field>
142 <name>currency</name>
143 <type>varchar</type>
144 <length>8</length>
145 <default>NULL</default>
146 <comment>3 character string, value from config setting or input via user.</comment>
de25aed1 147 <add>3.2</add>
6a488035
TO
148 <drop>4.3</drop>
149 </field>
de25aed1 150 <field>
6a488035
TO
151 <name>rationale</name>
152 <type>text</type>
153 <title>Grant Rationale</title>
154 <comment>Grant rationale.</comment>
155 <htmlType>textarea</htmlType>
156 <rows>4</rows>
157 <cols>60</cols>
158 <import>true</import>
159 <add>1.8</add>
160 </field>
de25aed1 161 <field>
6a488035
TO
162 <name>status_id</name>
163 <type>int unsigned</type>
164 <title>Grant Status Id</title>
165 <uniqueName>grant_status_id</uniqueName>
166 <required>true</required>
de25aed1 167 <import>true</import>
6a488035
TO
168 <export>false</export>
169 <comment>Id of Grant status.</comment>
fb1fd730
CW
170 <pseudoconstant>
171 <optionGroupName>grant_status</optionGroupName>
172 </pseudoconstant>
6a488035
TO
173 <add>1.8</add>
174 </field>
de25aed1 175 <index>
6a488035
TO
176 <name>index_status_id</name>
177 <fieldName>status_id</fieldName>
178 <add>1.8</add>
179 </index>
de25aed1 180 <field>
181 <name>financial_type_id</name>
6a488035 182 <title>Financial Type</title>
de25aed1 183 <type>int unsigned</type>
6a488035
TO
184 <default>NULL</default>
185 <comment>FK to Financial Type.</comment>
de25aed1 186 <add>4.3</add>
187 </field>
188 <foreignKey>
189 <name>financial_type_id</name>
190 <table>civicrm_financial_type</table>
191 <key>id</key>
6a488035
TO
192 <onDelete>SET NULL</onDelete>
193 <add>4.3</add>
de25aed1 194 </foreignKey>
6a488035 195</table>