text: /*
   Navicat Premium Data Transfer
  
   Source Server         : localhost
   Source Server Type    : MySQL
   Source Server Version : 80020
   Source Host           : localhost:3306
   Source Schema         : test
  
   Target Server Type    : MySQL
   Target Server Version : 80020
   File Encoding         : 65001
  
   Date: 16/05/2021 21:35:33
  */
  
  SET NAMES utf8mb4;
  SET FOREIGN_KEY_CHECKS = 0;
  
  -- ----------------------------
  -- Table structure for t_order
  -- ----------------------------
  DROP TABLE IF EXISTS `t_order`;
  CREATE TABLE `t_order`  (
    `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
    `order_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '订单ID',
    `amount` decimal(10, 2) UNSIGNED NOT NULL COMMENT '订单金额',
    `payment_time` datetime NOT NULL COMMENT '支付时间',
    `order_status` tinyint NOT NULL DEFAULT 0 COMMENT '订单状态,0:处理中,1:支付成功,2:支付失败',
    `create_time` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
    `update_time` datetime NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
    PRIMARY KEY (`id`) USING BTREE,
    INDEX `idx_payment_time`(`payment_time`) USING BTREE COMMENT '支付时间,普通索引'
  ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '订单表' ROW_FORMAT = Dynamic;
  
  SET FOREIGN_KEY_CHECKS = 1;
  