Merge pull request #19061 from christianwach/lab-core-2217
[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 <component>CiviPledge</component>
11 <field>
12 <name>id</name>
13 <uniqueName>pledge_payment_id</uniqueName>
14 <title>Payment ID</title>
15 <type>int unsigned</type>
16 <required>true</required>
17 <import>true</import>
18 <add>2.1</add>
19 </field>
20 <primaryKey>
21 <name>id</name>
22 <autoincrement>true</autoincrement>
23 </primaryKey>
24 <field>
25 <name>pledge_id</name>
26 <title>Pledge</title>
27 <type>int unsigned</type>
28 <required>true</required>
29 <comment>FK to Pledge table</comment>
30 <add>2.1</add>
31 </field>
32 <foreignKey>
33 <name>pledge_id</name>
34 <table>civicrm_pledge</table>
35 <key>id</key>
36 <add>2.1</add>
37 <onDelete>CASCADE</onDelete>
38 </foreignKey>
39 <field>
40 <name>contribution_id</name>
41 <title>Contribution</title>
42 <type>int unsigned</type>
43 <comment>FK to contribution table.</comment>
44 <add>2.1</add>
45 </field>
46 <foreignKey>
47 <name>contribution_id</name>
48 <table>civicrm_contribution</table>
49 <key>id</key>
50 <add>2.1</add>
51 <onDelete>CASCADE</onDelete>
52 </foreignKey>
53 <index>
54 <name>index_contribution_pledge</name>
55 <fieldName>contribution_id</fieldName>
56 <fieldName>pledge_id</fieldName>
57 <add>2.1</add>
58 </index>
59 <field>
60 <name>scheduled_amount</name>
61 <uniqueName>pledge_payment_scheduled_amount</uniqueName>
62 <title>Scheduled Amount</title>
63 <import>true</import>
64 <export>true</export>
65 <type>decimal</type>
66 <required>true</required>
67 <comment>Pledged amount for this payment (the actual contribution amount might be different).</comment>
68 <add>2.1</add>
69 </field>
70 <field>
71 <name>actual_amount</name>
72 <uniqueName>pledge_payment_actual_amount</uniqueName>
73 <title>Actual Amount</title>
74 <import>true</import>
75 <type>decimal</type>
76 <comment>Actual amount that is paid as the Pledged installment amount.</comment>
77 <add>3.2</add>
78 </field>
79 <field>
80 <name>currency</name>
81 <title>Currency</title>
82 <type>varchar</type>
83 <length>3</length>
84 <default>NULL</default>
85 <comment>3 character string, value from config setting or input via user.</comment>
86 <add>3.2</add>
87 <pseudoconstant>
88 <table>civicrm_currency</table>
89 <keyColumn>name</keyColumn>
90 <labelColumn>full_name</labelColumn>
91 <nameColumn>name</nameColumn>
92 <abbrColumn>symbol</abbrColumn>
93 </pseudoconstant>
94 <html>
95 <type>Select</type>
96 </html>
97 </field>
98 <field>
99 <name>scheduled_date</name>
100 <uniqueName>pledge_payment_scheduled_date</uniqueName>
101 <title>Scheduled Date</title>
102 <import>true</import>
103 <export>true</export>
104 <type>datetime</type>
105 <required>true</required>
106 <comment>The date the pledge payment is supposed to happen.</comment>
107 <add>2.1</add>
108 <html>
109 <type>Select Date</type>
110 <formatType>activityDate</formatType>
111 </html>
112 <uniqueTitle>Payment Scheduled</uniqueTitle>
113 </field>
114 <field>
115 <name>reminder_date</name>
116 <uniqueName>pledge_payment_reminder_date</uniqueName>
117 <title>Last Reminder</title>
118 <import>true</import>
119 <type>datetime</type>
120 <comment>The date that the most recent payment reminder was sent.</comment>
121 <add>2.1</add>
122 </field>
123 <field>
124 <name>reminder_count</name>
125 <uniqueName>pledge_payment_reminder_count</uniqueName>
126 <title>Reminders Sent</title>
127 <import>true</import>
128 <type>int unsigned</type>
129 <default>0</default>
130 <comment>The number of payment reminders sent.</comment>
131 <add>2.1</add>
132 </field>
133 <field>
134 <name>status_id</name>
135 <title>Payment Status</title>
136 <uniqueName>pledge_payment_status_id</uniqueName>
137 <import>true</import>
138 <export>false</export>
139 <type>int unsigned</type>
140 <add>2.1</add>
141 <pseudoconstant>
142 <optionGroupName>contribution_status</optionGroupName>
143 </pseudoconstant>
144 </field>
145 <index>
146 <name>index_status</name>
147 <fieldName>status_id</fieldName>
148 <add>2.1</add>
149 </index>
150 </table>