Merge pull request #19539 from eileenmcnaughton/repeat_fin
[civicrm-core.git] / xml / schema / Financial / PaymentToken.xml
CommitLineData
d31fb4e3 1<?xml version="1.0" encoding="iso-8859-1" ?>
ccbfa640 2
d31fb4e3
CW
3<table>
4 <base>CRM/Financial</base>
5 <class>PaymentToken</class>
6 <name>civicrm_payment_token</name>
7 <comment>Payment Token</comment>
8 <add>4.6</add>
9 <component>CiviContribute</component>
10 <field>
78c35cc9
RT
11 <name>id</name>
12 <uniqueName>payment_token_id</uniqueName>
13 <title>Payment Token ID</title>
d31fb4e3
CW
14 <type>int unsigned</type>
15 <required>true</required>
16 <comment>Payment Token ID</comment>
17 <add>4.6</add>
18 </field>
19 <primaryKey>
20 <name>id</name>
21 <autoincrement>true</autoincrement>
22 </primaryKey>
23 <field>
24 <name>contact_id</name>
25 <title>Contact ID</title>
26 <type>int unsigned</type>
27 <required>true</required>
28 <comment>FK to Contact ID for the owner of the token</comment>
29 <add>4.6</add>
30 </field>
31 <foreignKey>
32 <name>contact_id</name>
33 <table>civicrm_contact</table>
34 <key>id</key>
35 <add>4.6</add>
36 <onDelete>CASCADE</onDelete>
37 </foreignKey>
38 <field>
39 <name>payment_processor_id</name>
40 <title>Payment Processor ID</title>
41 <type>int unsigned</type>
42 <required>true</required>
43 <comment></comment>
44 <add>4.6</add>
45 </field>
46 <foreignKey>
47 <name>payment_processor_id</name>
48 <table>civicrm_payment_processor</table>
49 <key>id</key>
50 <add>4.6</add>
51 <onDelete>RESTRICT</onDelete>
52 </foreignKey>
53 <field>
54 <name>token</name>
78c35cc9
RT
55 <type>varchar</type>
56 <title>Token</title>
d31fb4e3
CW
57 <length>255</length>
58 <required>true</required>
59 <comment>Externally provided token string</comment>
60 <add>4.6</add>
61 </field>
62 <field>
78c35cc9
RT
63 <name>created_date</name>
64 <title>Created Date</title>
d31fb4e3 65 <type>timestamp</type>
25567300
EM
66 <comment>Date created</comment>
67 <default>CURRENT_TIMESTAMP</default>
d31fb4e3
CW
68 <add>4.6</add>
69 </field>
70 <field>
78c35cc9
RT
71 <name>created_id</name>
72 <title>Created ID</title>
d31fb4e3
CW
73 <type>int unsigned</type>
74 <comment>Contact ID of token creator</comment>
75 <add>4.6</add>
76 </field>
51c381a3
RT
77 <foreignKey>
78 <name>created_id</name>
79 <table>civicrm_contact</table>
80 <key>id</key>
78c35cc9 81 <add>4.6</add>
51c381a3
RT
82 <onDelete>SET NULL</onDelete>
83 </foreignKey>
d31fb4e3 84 <field>
78c35cc9
RT
85 <name>expiry_date</name>
86 <title>Expiry Date</title>
d31fb4e3
CW
87 <type>datetime</type>
88 <comment>Date this token expires</comment>
89 <add>4.6</add>
90 </field>
91 <field>
78c35cc9
RT
92 <name>email</name>
93 <title>Email</title>
d31fb4e3
CW
94 <length>255</length>
95 <type>varchar</type>
96 <comment>Email at the time of token creation. Useful for fraud forensics</comment>
97 <add>4.6</add>
98 </field>
99 <field>
78c35cc9
RT
100 <name>billing_first_name</name>
101 <title>Billing First Name</title>
d31fb4e3
CW
102 <type>varchar</type>
103 <length>255</length>
104 <comment>Billing first name at the time of token creation. Useful for fraud forensics</comment>
105 <add>4.6</add>
106 </field>
107 <field>
108 <name>billing_middle_name</name>
78c35cc9 109 <title>Billing Middle Name</title>
d31fb4e3
CW
110 <type>varchar</type>
111 <length>255</length>
112 <comment>Billing middle name at the time of token creation. Useful for fraud forensics</comment>
113 <add>4.6</add>
114 </field>
115 <field>
116 <name>billing_last_name</name>
78c35cc9 117 <title>Billing Last Name</title>
d31fb4e3
CW
118 <type>varchar</type>
119 <length>255</length>
120 <comment>Billing last name at the time of token creation. Useful for fraud forensics</comment>
121 <add>4.6</add>
122 </field>
123 <field>
78c35cc9
RT
124 <name>masked_account_number</name>
125 <title>Masked Account Number</title>
d31fb4e3
CW
126 <type>varchar</type>
127 <length>255</length>
128 <comment>Holds the part of the card number or account details that may be retained or displayed</comment>
129 <add>4.6</add>
130 </field>
131 <field>
78c35cc9
RT
132 <name>ip_address</name>
133 <title>IP Address</title>
d31fb4e3
CW
134 <type>varchar</type>
135 <length>255</length>
136 <comment>IP used when creating the token. Useful for fraud forensics</comment>
137 <add>4.6</add>
138 </field>
139</table>