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