Merge pull request #14800 from colemanw/mapperKeys
[civicrm-core.git] / xml / schema / Financial / PaymentToken.xml
CommitLineData
ccbfa640
RT
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>
78c35cc9 8 <add>4.6</add>
ccbfa640 9 <field>
78c35cc9
RT
10 <name>id</name>
11 <uniqueName>payment_token_id</uniqueName>
12 <title>Payment Token ID</title>
ccbfa640
RT
13 <type>int unsigned</type>
14 <required>true</required>
15 <comment>Payment Token ID</comment>
78c35cc9 16 <add>4.6</add>
ccbfa640
RT
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>
78c35cc9 28 <add>4.6</add>
ccbfa640
RT
29 </field>
30 <foreignKey>
31 <name>contact_id</name>
32 <table>civicrm_contact</table>
33 <key>id</key>
78c35cc9 34 <add>4.6</add>
ccbfa640
RT
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>
78c35cc9 43 <add>4.6</add>
ccbfa640
RT
44 </field>
45 <foreignKey>
46 <name>payment_processor_id</name>
47 <table>civicrm_payment_processor</table>
48 <key>id</key>
78c35cc9 49 <add>4.6</add>
ccbfa640
RT
50 <onDelete>RESTRICT</onDelete>
51 </foreignKey>
52 <field>
53 <name>token</name>
78c35cc9
RT
54 <type>varchar</type>
55 <title>Token</title>
ccbfa640
RT
56 <length>255</length>
57 <required>true</required>
58 <comment>Externally provided token string</comment>
78c35cc9 59 <add>4.6</add>
ccbfa640
RT
60 </field>
61 <field>
78c35cc9
RT
62 <name>created_date</name>
63 <title>Created Date</title>
ccbfa640 64 <type>timestamp</type>
25567300
EM
65 <comment>Date created</comment>
66 <default>CURRENT_TIMESTAMP</default>
78c35cc9 67 <add>4.6</add>
ccbfa640
RT
68 </field>
69 <field>
78c35cc9
RT
70 <name>created_id</name>
71 <title>Created ID</title>
51c381a3 72 <type>int unsigned</type>
ccbfa640 73 <comment>Contact ID of token creator</comment>
78c35cc9 74 <add>4.6</add>
ccbfa640 75 </field>
51c381a3
RT
76 <foreignKey>
77 <name>created_id</name>
78 <table>civicrm_contact</table>
79 <key>id</key>
78c35cc9 80 <add>4.6</add>
51c381a3
RT
81 <onDelete>SET NULL</onDelete>
82 </foreignKey>
ccbfa640 83 <field>
78c35cc9
RT
84 <name>expiry_date</name>
85 <title>Expiry Date</title>
ccbfa640
RT
86 <type>datetime</type>
87 <comment>Date this token expires</comment>
78c35cc9 88 <add>4.6</add>
ccbfa640
RT
89 </field>
90 <field>
78c35cc9
RT
91 <name>email</name>
92 <title>Email</title>
ccbfa640
RT
93 <length>255</length>
94 <type>varchar</type>
95 <comment>Email at the time of token creation. Useful for fraud forensics</comment>
78c35cc9 96 <add>4.6</add>
ccbfa640
RT
97 </field>
98 <field>
78c35cc9
RT
99 <name>billing_first_name</name>
100 <title>Billing First Name</title>
410baf21 101 <type>varchar</type>
ccbfa640
RT
102 <length>255</length>
103 <comment>Billing first name at the time of token creation. Useful for fraud forensics</comment>
78c35cc9 104 <add>4.6</add>
ccbfa640
RT
105 </field>
106 <field>
107 <name>billing_middle_name</name>
78c35cc9 108 <title>Billing Middle Name</title>
410baf21 109 <type>varchar</type>
ccbfa640
RT
110 <length>255</length>
111 <comment>Billing middle name at the time of token creation. Useful for fraud forensics</comment>
78c35cc9 112 <add>4.6</add>
ccbfa640
RT
113 </field>
114 <field>
115 <name>billing_last_name</name>
78c35cc9 116 <title>Billing Last Name</title>
410baf21 117 <type>varchar</type>
ccbfa640
RT
118 <length>255</length>
119 <comment>Billing last name at the time of token creation. Useful for fraud forensics</comment>
78c35cc9 120 <add>4.6</add>
ccbfa640
RT
121 </field>
122 <field>
78c35cc9
RT
123 <name>masked_account_number</name>
124 <title>Masked Account Number</title>
ccbfa640
RT
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>
78c35cc9 128 <add>4.6</add>
ccbfa640
RT
129 </field>
130 <field>
78c35cc9
RT
131 <name>ip_address</name>
132 <title>IP Address</title>
ccbfa640
RT
133 <type>varchar</type>
134 <length>255</length>
135 <comment>IP used when creating the token. Useful for fraud forensics</comment>
78c35cc9 136 <add>4.6</add>
ccbfa640
RT
137 </field>
138</table>