text: /*
   Navicat Premium Data Transfer
  
   Source Server         : MySQL-本机-127.0.0.1
   Source Server Type    : MySQL
   Source Server Version : 50717
   Source Host           : localhost:3306
   Source Schema         : lucky_log
  
   Target Server Type    : MySQL
   Target Server Version : 50717
   File Encoding         : 65001
  
   Date: 18/01/2021 10:32:27
  */
  
  SET NAMES utf8mb4;
  SET FOREIGN_KEY_CHECKS = 0;
  
  -- ----------------------------
  -- Table structure for sys_log
  -- ----------------------------
  DROP TABLE IF EXISTS `sys_log`;
  CREATE TABLE `sys_log`  (
    `log_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
    `app_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目名',
    `log_type` int(11) NOT NULL COMMENT '1-登录日志 2-操作日志 3-异常日志 4-调试信息',
    `log_time` datetime(0) NOT NULL COMMENT '操作时间',
    `process_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '业务主键',
    `log_content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '动作',
    `log_json` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '源数据',
    `module` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '操作模块',
    `op_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '具体操作类型  如登录 删除 修改',
    `host` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '主机 域名',
    `ip_address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'ip',
    `ip_location` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
    `device` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '操作系统 浏览器 设备信息',
    `user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
    `user_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
    `remark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
    `is_enable` int(11) NOT NULL,
    PRIMARY KEY (`log_id`) USING BTREE
  ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  