forked from Tai7sy/card-system
-
Notifications
You must be signed in to change notification settings - Fork 0
/
card.sql
188 lines (168 loc) · 7.78 KB
/
card.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
/*
Navicat MySQL Data Transfer
Source Server : 127.0.0.1
Source Server Version : 50540
Source Host : 127.0.0.1:53342
Source Database : card
Target Server Type : MYSQL
Target Server Version : 50540
File Encoding : 65001
Date: 2018-01-03 10:42:04
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for cards
-- ----------------------------
DROP TABLE IF EXISTS `cards`;
CREATE TABLE `cards` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`good_id` int(11) NOT NULL,
`card` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`type` int(11) NOT NULL,
`status` int(11) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- ----------------------------
-- Records of cards
-- ----------------------------
INSERT INTO `cards` VALUES ('1', '1', '123456', '1', '0', '2018-01-03 10:39:28', '2018-01-03 10:39:28');
-- ----------------------------
-- Table structure for card_order
-- ----------------------------
DROP TABLE IF EXISTS `card_order`;
CREATE TABLE `card_order` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`order_id` int(11) NOT NULL,
`card_id` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- ----------------------------
-- Records of card_order
-- ----------------------------
-- ----------------------------
-- Table structure for goods
-- ----------------------------
DROP TABLE IF EXISTS `goods`;
CREATE TABLE `goods` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`group_id` int(11) NOT NULL,
`name` text COLLATE utf8mb4_unicode_ci NOT NULL,
`description` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`sold_count` int(11) NOT NULL DEFAULT '0',
`all_count` int(11) NOT NULL,
`price` int(11) NOT NULL,
`enabled` tinyint(1) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- ----------------------------
-- Records of goods
-- ----------------------------
INSERT INTO `goods` VALUES ('1', '1', '测试商品', '这里是测试商品的一段描述, 可以插入html文本', '0', '10', '1', '1', '2018-01-03 10:39:28', '2018-01-03 10:39:28');
-- ----------------------------
-- Table structure for groups
-- ----------------------------
DROP TABLE IF EXISTS `groups`;
CREATE TABLE `groups` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` text COLLATE utf8mb4_unicode_ci NOT NULL,
`enabled` tinyint(1) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- ----------------------------
-- Records of groups
-- ----------------------------
INSERT INTO `groups` VALUES ('1', '测试分组', '1', '2018-01-03 10:39:28', '2018-01-03 10:39:28');
-- ----------------------------
-- Table structure for migrations
-- ----------------------------
DROP TABLE IF EXISTS `migrations`;
CREATE TABLE `migrations` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`batch` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- ----------------------------
-- Records of migrations
-- ----------------------------
INSERT INTO `migrations` VALUES ('1', '2014_10_12_000000_create_users_table', '1');
INSERT INTO `migrations` VALUES ('2', '2017_12_23_223031_create_groups_table', '1');
INSERT INTO `migrations` VALUES ('3', '2017_12_23_223124_create_goods_table', '1');
INSERT INTO `migrations` VALUES ('4', '2017_12_23_223252_create_cards_table', '1');
INSERT INTO `migrations` VALUES ('5', '2017_12_23_223508_create_orders_table', '1');
INSERT INTO `migrations` VALUES ('6', '2017_12_23_223755_create_pays_table', '1');
INSERT INTO `migrations` VALUES ('7', '2018_01_02_142012_create_card_order', '1');
-- ----------------------------
-- Table structure for orders
-- ----------------------------
DROP TABLE IF EXISTS `orders`;
CREATE TABLE `orders` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`order_no` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`good_id` int(11) NOT NULL,
`count` int(11) NOT NULL,
`email` text COLLATE utf8mb4_unicode_ci NOT NULL,
`email_sent` tinyint(1) NOT NULL,
`comment` text COLLATE utf8mb4_unicode_ci,
`amount` int(11) NOT NULL,
`pay_id` int(11) NOT NULL,
`pay_trade_no` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`paid` tinyint(1) NOT NULL,
`paid_at` datetime DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `orders_order_no_index` (`order_no`(250))
) ENGINE=MyISAM AUTO_INCREMENT=1001 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- ----------------------------
-- Records of orders
-- ----------------------------
-- ----------------------------
-- Table structure for pays
-- ----------------------------
DROP TABLE IF EXISTS `pays`;
CREATE TABLE `pays` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`img` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`driver` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`way` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`config` text COLLATE utf8mb4_unicode_ci NOT NULL,
`comment` text COLLATE utf8mb4_unicode_ci,
`enabled` tinyint(1) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- ----------------------------
-- Records of pays
-- ----------------------------
INSERT INTO `pays` VALUES ('1', '支付宝', '/plugins/images/ali.png', 'Alipay', 'Alipay', '{\n \"partner\": \"partner\",\n \"key\": \"key\"\n}', null, '1', '2018-01-03 10:39:28', '2018-01-03 10:39:28');
INSERT INTO `pays` VALUES ('2', '手机支付宝', '/plugins/images/ali.png', 'Aliwap', 'Aliwap', '{\n \"partner\": \"partner\",\n \"key\": \"key\"\n}', null, '2', '2018-01-03 10:39:28', '2018-01-03 10:39:28');
INSERT INTO `pays` VALUES ('3', '支付宝扫码(当面付)', '/plugins/images/ali.png', 'Aliqr', 'Aliqr', '{\n \"app_id\": \"app_id\",\n \"alipay_public_key\": \"alipay_public_key\",\n \"merchant_private_key\": \"merchant_private_key\"\n}', null, '3', '2018-01-03 10:39:28', '2018-01-03 10:39:28');
INSERT INTO `pays` VALUES ('4', '微信扫码支付', '/plugins/images/wx.png', 'Wechat', 'Wechat', '{\n \"APPID\": \"APPID\",\n \"MCHID\": \"商户ID\",\n \"KEY\": \"KEY\",\n \"APPSECRET\": \"APPSECRET\"\n}', null, '3', '2018-01-03 10:39:28', '2018-01-03 10:39:28');
-- ----------------------------
-- Table structure for users
-- ----------------------------
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
`password` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
`remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `users_username_unique` (`username`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- ----------------------------
-- Records of users
-- ----------------------------
INSERT INTO `users` VALUES ('1', 'admin', '$2y$10$uc/Fk0Q2vlonDA.jOgTFeeQv5uD20syRJm2msbTL0RgIMMigbIji6', 'UEJG8y8YgTw0C7mTkLHfMKL6FPnzaW8nDleBAIgFkLQdmmWYV5vhHZkrvSSX', '2018-01-03 10:39:28', '2018-01-03 10:39:28');
SET FOREIGN_KEY_CHECKS=1;