-
Notifications
You must be signed in to change notification settings - Fork 15
/
data.sql
33 lines (32 loc) · 3.76 KB
/
data.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
CREATE TABLE `orders` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`user_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
`bill_money` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '订单金额(分)',
`order_no` varchar(32) NOT NULL DEFAULT '' COMMENT '业务支付订单号',
`platform_order_no` varchar(32) NOT NULL DEFAULT '' COMMENT '支付中心订单号',
`order_goods_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '订单对应的商品ID',
`state` tinyint(2) unsigned NOT NULL DEFAULT '1' COMMENT '1-待支付,2-支付成功,3-支付失败',
`paid_at` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`),
KEY `idx_created_at` (`created_at`),
KEY `idx_updated_at` (`updated_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='订单表';
INSERT INTO `orders` (`id`, `user_id`, `bill_money`, `order_no`, `platform_order_no`, `state`, `paid_at`, `created_at`, `updated_at`)
VALUES
(19,534321467,126000,'20230704000000001365252146','qa202307040001899329431467_o_00',1,'0000-00-00 00:00:00','2023-07-04 15:27:57','2023-07-04 15:27:57'),
(20,534321467,126000,'20230704000000001365272146','qa202307040001899329451467_o_00',1,'0000-00-00 00:00:00','2023-07-04 15:28:55','2023-07-04 15:28:55'),
(21,534321467,126000,'20230704000000001365292146','qa202307040001899329471467_o_00',1,'0000-00-00 00:00:00','2023-07-04 15:29:28','2023-07-04 15:29:28'),
(22,534321467,100,'20230704000000001365482146','qa202307040001899329651467_o_00',1,'0000-00-00 00:00:00','2023-07-04 15:56:50','2023-07-04 15:56:50'),
(23,534321467,126000,'20230704000000001365642146','qa202307040001899329701467_o_00',1,'0000-00-00 00:00:00','2023-07-04 16:13:19','2023-07-04 16:13:19'),
(24,534321467,126000,'20230704000000001365792146','qa202307040001899329731467_o_00',1,'0000-00-00 00:00:00','2023-07-04 16:15:47','2023-07-04 16:15:47'),
(25,534321467,126000,'20230704000000001365982146','qa202307040001899329801467_o_00',1,'0000-00-00 00:00:00','2023-07-04 16:28:00','2023-07-04 16:28:00'),
(26,534321467,126000,'20230704000000001366262146','qa202307040001899330231467_o_00',1,'0000-00-00 00:00:00','2023-07-04 17:27:08','2023-07-04 17:27:08'),
(27,534321467,126000,'20230704000000001366342146','qa202307040001899330251467_o_00',1,'0000-00-00 00:00:00','2023-07-04 17:27:48','2023-07-04 17:27:48'),
(28,534321467,126000,'20230704000000001366352146','qa202307040001899330261467_o_00',1,'0000-00-00 00:00:00','2023-07-04 17:29:42','2023-07-04 17:29:42'),
(29,534321467,126000,'20230704000000001366362146','qa202307040001899330271467_o_00',1,'0000-00-00 00:00:00','2023-07-04 17:30:51','2023-07-04 17:30:51'),
(30,534321467,126000,'20230704000000001366372146','qa202307040001899330281467_o_00',1,'0000-00-00 00:00:00','2023-07-04 17:32:30','2023-07-04 17:32:30'),
(31,534321467,126000,'20230704000000001366382146','qa202307040001899330291467_o_00',1,'0000-00-00 00:00:00','2023-07-04 17:33:21','2023-07-04 17:33:21'),
(32,534321467,126000,'20230704000000001366972146','qa202307040001899336241467_o_00',1,'0000-00-00 00:00:00','2023-07-04 19:41:42','2023-07-04 19:41:42'),
(33,534321467,126000,'20230705000000001375612146','qa202307050001899338491467_o_00',1,'0000-00-00 00:00:00','2023-07-05 09:33:35','2023-07-05 09:33:35');