# ************************************************************
# Sequel Pro SQL dump
# Version 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: 192.168.1.201 (MySQL 5.7.9-log)
# Database: sx_photo_manage_logs
# Generation Time: 2020-07-12 02:09:11 +0000
# ************************************************************


/*!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 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;


# Dump of table action_log
# ------------------------------------------------------------

DROP TABLE IF EXISTS `action_log`;

CREATE TABLE `action_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `module` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '模块名称',
  `controller` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '是哪个控制器的',
  `action` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '进行的操作名称-',
  `old_data` text COLLATE utf8_unicode_ci,
  `data` text COLLATE utf8_unicode_ci COMMENT '操作的数据项',
  `staff_id` int(11) DEFAULT NULL COMMENT '操作的员工主键',
  `ip` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '操作客户的IP，如果是接口，则需要调用端转证customer_ip',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `create_time` datetime DEFAULT NULL COMMENT '添加时间',
  `delete_time` datetime DEFAULT NULL COMMENT '删除时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='记录系统内所有操作日志信息';



# Dump of table api_logs
# ------------------------------------------------------------

DROP TABLE IF EXISTS `api_logs`;

CREATE TABLE `api_logs` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `hash` varchar(50) CHARACTER SET latin1 DEFAULT NULL,
  `api_url` varchar(50) CHARACTER SET latin1 DEFAULT NULL,
  `result_code` varchar(50) CHARACTER SET latin1 DEFAULT NULL,
  `app_id` varchar(50) CHARACTER SET latin1 DEFAULT NULL COMMENT '应用ID',
  `data` text CHARACTER SET latin1,
  `api_start_time` decimal(16,5) DEFAULT NULL,
  `api_end_time` decimal(16,5) DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `create_ip` varchar(100) CHARACTER SET latin1 DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;




/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!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 */;
