CRM-13497 - getting there on main tables
[civicrm-core.git] / xml / schema / Pledge / PledgePayment.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
3 <table>
4 <base>CRM/Pledge</base>
5 <class>PledgePayment</class>
6 <name>civicrm_pledge_payment</name>
7 <comment>Pledge Payment</comment>
8 <add>2.1</add>
9 <log>true</log>
10 <field>
11 <name>id</name>
12 <uniqueName>pledge_payment_id</uniqueName>
13 <title>Payment ID</title>
14 <type>int unsigned</type>
15 <required>true</required>
16 <import>true</import>
17 <add>2.1</add>
18 </field>
19 <primaryKey>
20 <name>id</name>
21 <autoincrement>true</autoincrement>
22 </primaryKey>
23 <field>
24 <name>pledge_id</name>
25 <type>int unsigned</type>
26 <required>true</required>
27 <comment>FK to Pledge table</comment>
28 <add>2.1</add>
29 </field>
30 <foreignKey>
31 <name>pledge_id</name>
32 <table>civicrm_pledge</table>
33 <key>id</key>
34 <add>2.1</add>
35 <onDelete>CASCADE</onDelete>
36 </foreignKey>
37 <field>
38 <name>contribution_id</name>
39 <type>int unsigned</type>
40 <comment>FK to contribution table.</comment>
41 <add>2.1</add>
42 </field>
43 <foreignKey>
44 <name>contribution_id</name>
45 <table>civicrm_contribution</table>
46 <key>id</key>
47 <add>2.1</add>
48 <onDelete>CASCADE</onDelete>
49 </foreignKey>
50 <index>
51 <name>index_contribution_pledge</name>
52 <fieldName>contribution_id</fieldName>
53 <fieldName>pledge_id</fieldName>
54 <add>2.1</add>
55 </index>
56 <field>
57 <name>scheduled_amount</name>
58 <uniqueName>pledge_payment_scheduled_amount</uniqueName>
59 <title>Scheduled Amount</title>
60 <import>true</import>
61 <type>decimal</type>
62 <required>true</required>
63 <comment>Pledged amount for this payment (the actual contribution amount might be different).</comment>
64 <add>2.1</add>
65 </field>
66 <field>
67 <name>actual_amount</name>
68 <uniqueName>pledge_payment_actual_amount</uniqueName>
69 <title>Actual Amount</title>
70 <import>true</import>
71 <type>decimal</type>
72 <comment>Actual amount that is paid as the Pledged installment amount.</comment>
73 <add>3.2</add>
74 </field>
75 <field>
76 <name>currency</name>
77 <type>varchar</type>
78 <length>3</length>
79 <default>NULL</default>
80 <comment>3 character string, value from config setting or input via user.</comment>
81 <add>3.2</add>
82 <pseudoconstant>
83 <table>civicrm_currency</table>
84 <keyColumn>name</keyColumn>
85 <labelColumn>full_name</labelColumn>
86 <nameColumn>numeric_code</nameColumn>
87 </pseudoconstant>
88 <html>
89 <type>Select></type>
90 </html>
91 </field>
92 <field>
93 <name>scheduled_date</name>
94 <uniqueName>pledge_payment_scheduled_date</uniqueName>
95 <title>Scheduled Date</title>
96 <import>true</import>
97 <type>datetime</type>
98 <required>true</required>
99 <comment>The date the pledge payment is supposed to happen.</comment>
100 <add>2.1</add>
101 </field>
102 <field>
103 <name>reminder_date</name>
104 <uniqueName>pledge_payment_reminder_date</uniqueName>
105 <title>Last Reminder</title>
106 <import>true</import>
107 <type>datetime</type>
108 <comment>The date that the most recent payment reminder was sent.</comment>
109 <add>2.1</add>
110 </field>
111 <field>
112 <name>reminder_count</name>
113 <uniqueName>pledge_payment_reminder_count</uniqueName>
114 <title>Reminders Sent</title>
115 <import>true</import>
116 <type>int unsigned</type>
117 <default>0</default>
118 <comment>The number of payment reminders sent.</comment>
119 <add>2.1</add>
120 </field>
121 <field>
122 <name>status_id</name>
123 <title>Payment Status</title>
124 <uniqueName>pledge_payment_status_id</uniqueName>
125 <import>true</import>
126 <export>false</export>
127 <type>int unsigned</type>
128 <add>2.1</add>
129 </field>
130 <index>
131 <name>index_status</name>
132 <fieldName>status_id</fieldName>
133 <add>2.1</add>
134 </index>
135 </table>