-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrecurly.sql
212 lines (189 loc) · 10 KB
/
recurly.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
-- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 07, 2017 at 04:50 PM
-- Server version: 5.5.44-0ubuntu0.14.04.1
-- PHP Version: 5.5.9-1ubuntu4.20
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- Database: `recurly_app_poc`
--
-- --------------------------------------------------------
--
-- Table structure for table `recurly_responses`
--
CREATE TABLE IF NOT EXISTS `recurly_responses` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_master_id` int(11) DEFAULT NULL,
`recurly_data` text,
`uuid` varchar(100) DEFAULT NULL COMMENT 'subscription id',
`created` datetime DEFAULT NULL,
`modified` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Recurly data' AUTO_INCREMENT=8 ;
-- --------------------------------------------------------
--
-- Table structure for table `recurly_subscriptions`
--
CREATE TABLE IF NOT EXISTS `recurly_subscriptions` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`entity_plan_detail_id` int(11) DEFAULT NULL COMMENT 'entity plan detail id',
`user_master_id` int(11) DEFAULT NULL,
`recurly_account_code` varchar(50) DEFAULT NULL COMMENT 'account id of recurly',
`uuid` varchar(100) DEFAULT NULL COMMENT 'subscription id',
`state` varchar(50) DEFAULT NULL COMMENT 'state of subscription',
`quantity` int(11) DEFAULT NULL COMMENT 'subscription quantity',
`unit_amount_in_cents` int(11) DEFAULT NULL COMMENT 'total subscription amount in cents',
`activated_at` datetime DEFAULT NULL COMMENT 'GMT',
`canceled_at` datetime DEFAULT NULL,
`expires_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL COMMENT 'GMT',
`current_period_started_at` datetime DEFAULT NULL COMMENT 'GMT',
`current_period_ends_at` datetime DEFAULT NULL COMMENT 'GMT',
`collection_method` varchar(50) DEFAULT NULL,
`recurly_app_status` int(2) DEFAULT '1' COMMENT '1=active,2=cancelled',
`created` datetime DEFAULT NULL,
`modified` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='user subscription data.' AUTO_INCREMENT=3 ;
-- --------------------------------------------------------
--
-- Table structure for table `recurly_webhook_accounts`
--
CREATE TABLE IF NOT EXISTS `recurly_webhook_accounts` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`type` varchar(50) DEFAULT NULL,
`account_code` varchar(100) DEFAULT NULL COMMENT 'recurly account code',
`username` varchar(50) DEFAULT NULL COMMENT 'recurly account username',
`email` varchar(100) DEFAULT NULL COMMENT 'recurly account email',
`first_name` varchar(100) DEFAULT NULL COMMENT 'recurly account first name',
`last_name` varchar(100) DEFAULT NULL COMMENT 'recurly account last name',
`company_name` varchar(100) DEFAULT NULL COMMENT 'recurly account company name',
`whole_request` text COMMENT 'whole request that we get from recurly webhook',
`recurly_app_status` tinyint(4) DEFAULT '1' COMMENT 'status maintain by us',
`cron_flag` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'flag set to 1 if cron has proceed it',
`cron_group_id` int(11) DEFAULT '0' COMMENT 'group of records to process for one cron',
`created` datetime DEFAULT NULL,
`modified` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Notifications related to accounts that we get from recurly' AUTO_INCREMENT=508 ;
-- --------------------------------------------------------
--
-- Table structure for table `recurly_webhook_invoices`
--
CREATE TABLE IF NOT EXISTS `recurly_webhook_invoices` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`type` varchar(50) DEFAULT NULL,
`account_code` varchar(100) DEFAULT NULL COMMENT 'recurly account code',
`username` varchar(50) DEFAULT NULL COMMENT 'recurly account username',
`email` varchar(100) DEFAULT NULL COMMENT 'recurly account email',
`first_name` varchar(100) DEFAULT NULL COMMENT 'recurly account first name',
`last_name` varchar(100) DEFAULT NULL COMMENT 'recurly account last name',
`company_name` varchar(100) DEFAULT NULL COMMENT 'recurly account company name',
`uuid` varchar(100) DEFAULT NULL COMMENT 'invoice id',
`subscription_id` varchar(100) DEFAULT NULL COMMENT 'id of subscription',
`state` varchar(50) DEFAULT NULL COMMENT 'state of subscription',
`invoice_number_prefix` varchar(100) DEFAULT NULL,
`invoice_number` int(11) DEFAULT NULL COMMENT 'recurly invoice number',
`po_number` varchar(50) DEFAULT NULL,
`vat_number` varchar(50) DEFAULT NULL,
`total_in_cents` int(11) DEFAULT NULL COMMENT 'total amount in cents',
`currency` varchar(20) DEFAULT NULL,
`date` datetime DEFAULT NULL,
`closed_at` datetime DEFAULT NULL,
`net_terms` int(11) DEFAULT '0',
`collection_method` varchar(50) DEFAULT NULL,
`whole_request` text COMMENT 'whole request that we get from recurly webhook',
`recurly_app_status` tinyint(4) DEFAULT '1' COMMENT 'status maintain by us',
`created` datetime DEFAULT NULL,
`modified` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Notifications related to invoice that we get from recurly' AUTO_INCREMENT=737 ;
-- --------------------------------------------------------
--
-- Table structure for table `recurly_webhook_payments`
--
CREATE TABLE IF NOT EXISTS `recurly_webhook_payments` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`type` varchar(50) DEFAULT NULL,
`account_code` varchar(100) DEFAULT NULL COMMENT 'recurly account code',
`username` varchar(50) DEFAULT NULL COMMENT 'recurly account username',
`email` varchar(100) DEFAULT NULL COMMENT 'recurly account email',
`first_name` varchar(100) DEFAULT NULL COMMENT 'recurly account first name',
`last_name` varchar(100) DEFAULT NULL COMMENT 'recurly account last name',
`company_name` varchar(100) DEFAULT NULL COMMENT 'recurly account company name',
`transaction_id` varchar(100) DEFAULT NULL COMMENT 'id of recurly transaction',
`invoice_id` varchar(100) DEFAULT NULL COMMENT 'recurly invoice id',
`invoice_number_prefix` varchar(100) DEFAULT NULL,
`invoice_number` int(11) DEFAULT NULL COMMENT 'recurly invoice number',
`subscription_id` varchar(100) DEFAULT NULL COMMENT 'id of recurly subscription',
`action` varchar(50) DEFAULT NULL COMMENT 'recurly payment or transaction action',
`date` datetime DEFAULT NULL,
`amount_in_cents` int(11) DEFAULT NULL COMMENT 'transaction amount in cent',
`status` varchar(50) DEFAULT NULL COMMENT 'recurly payment status',
`message` varchar(255) DEFAULT NULL COMMENT 'message or reason from recurly',
`reference` varchar(50) DEFAULT NULL,
`source` varchar(50) DEFAULT NULL,
`cvv_result` varchar(50) DEFAULT NULL,
`avs_result` varchar(50) DEFAULT NULL,
`avs_result_street` varchar(100) DEFAULT NULL,
`avs_result_postal` varchar(100) DEFAULT NULL,
`test` tinyint(1) DEFAULT NULL,
`voidable` tinyint(1) DEFAULT NULL,
`refundable` tinyint(1) DEFAULT NULL,
`manually_entered` tinyint(1) DEFAULT NULL,
`payment_method` varchar(50) DEFAULT NULL,
`gateway` varchar(50) DEFAULT NULL COMMENT 'related to fail payment. not in use for use currently',
`gateway_error_codes` varchar(50) DEFAULT NULL COMMENT 'related to fail payment. not in use for use currently',
`failure_type` varchar(255) DEFAULT NULL COMMENT 'related to fail payment. not in use for use currently',
`whole_request` text COMMENT 'whole request that we get from recurly webhook',
`recurly_app_status` tinyint(4) DEFAULT '1' COMMENT 'status maintain by us',
`created` datetime DEFAULT NULL,
`modified` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Notifications related to payment that we get from recurly' AUTO_INCREMENT=282 ;
-- --------------------------------------------------------
--
-- Table structure for table `recurly_webhook_subscriptions`
--
CREATE TABLE IF NOT EXISTS `recurly_webhook_subscriptions` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`type` varchar(50) DEFAULT NULL,
`account_code` varchar(100) DEFAULT NULL COMMENT 'recurly account code',
`username` varchar(50) DEFAULT NULL COMMENT 'recurly account username',
`email` varchar(100) DEFAULT NULL COMMENT 'recurly account email',
`first_name` varchar(100) DEFAULT NULL COMMENT 'recurly account first name',
`last_name` varchar(100) DEFAULT NULL COMMENT 'recurly account last name',
`company_name` varchar(100) DEFAULT NULL COMMENT 'recurly account company name',
`plan_code` varchar(50) DEFAULT NULL COMMENT 'recurly plan code',
`plan_name` varchar(50) DEFAULT NULL COMMENT 'name of plan',
`uuid` varchar(100) DEFAULT NULL COMMENT 'subscription id',
`state` varchar(50) DEFAULT NULL COMMENT 'state of subscription',
`quantity` int(11) DEFAULT NULL COMMENT 'subscription quantity',
`total_amount_in_cents` int(11) DEFAULT NULL COMMENT 'total subscription amount in cents',
`activated_at` datetime DEFAULT NULL,
`canceled_at` datetime DEFAULT NULL,
`expires_at` datetime DEFAULT NULL,
`current_period_started_at` datetime DEFAULT NULL,
`current_period_ends_at` datetime DEFAULT NULL,
`trial_started_at` datetime DEFAULT NULL,
`trial_ends_at` datetime DEFAULT NULL,
`collection_method` varchar(50) DEFAULT NULL,
`whole_request` text COMMENT 'whole request that we get from recurly webhook',
`recurly_app_status` tinyint(4) DEFAULT '1' COMMENT 'status maintain by us',
`cron_flag` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'flag set to 1 if cron has proceed it',
`cron_group_id` int(11) DEFAULT '0' COMMENT 'group of records to process for one cron',
`created` datetime DEFAULT NULL,
`modified` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Notifications related to subscription that we get from recu' AUTO_INCREMENT=369 ;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;