/*
Navicat MySQL Data Transfer

Source Server         : yesdevnew
Source Server Version : 50640
Source Host           : 120.78.152.115:33348
Source Database       : phalapi_pro_2x

Target Server Type    : MYSQL
Target Server Version : 50640
File Encoding         : 65001

Date: 2021-01-18 13:28:53
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for `pp_work_order`
-- ----------------------------
DROP TABLE IF EXISTS `pp_work_order`;
CREATE TABLE `pp_work_order` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `order_no` varchar(64) NOT NULL DEFAULT '' COMMENT '订单号',
  `title` text COMMENT '工单标题',
  `module_id` int(11) NOT NULL DEFAULT '0' COMMENT '模块id',
  `problem_desc` text NOT NULL COMMENT '问题描述',
  `email` text COMMENT '邮箱',
  `phone_pre` varchar(255) NOT NULL DEFAULT '' COMMENT '手机前缀',
  `phone` varchar(11) NOT NULL DEFAULT '' COMMENT '手机号码',
  `file_ids` text COMMENT '文件ids',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '审核状态：1待受理，2待回复 3已解决 4已关闭',
  `chat_recode` text NOT NULL COMMENT '聊天记录',
  `admin_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
  `accept_service_id` int(11) NOT NULL DEFAULT '0' COMMENT '受理客户id',
  `accept_service_name` varchar(255) NOT NULL DEFAULT '' COMMENT '受理客户名字',
  `add_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `app_key` varchar(100) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='工单表';

insert into `pp_operation` ( `path`, `id`, `project`, `title`, `white_list`) values ( '/api-usb-workorder/list', '219', 'platform', '工单列表', '');
insert into `pp_operation` ( `path`, `id`, `project`, `title`, `white_list`) values ( '/api-usb-workorder/add', '220', 'platform', '创建工单', '');
insert into `pp_operation` ( `path`, `id`, `project`, `title`, `white_list`) values ( '/api-usb-workorder', '221', 'platform', '工单管理', '');

insert into `pp_operation_permission` ( `id`, `member_level`, `project`, `op_id`, `is_allow`) values ( '139', '100', 'platform', '219', '1');
insert into `pp_operation_permission` ( `id`, `member_level`, `project`, `op_id`, `is_allow`) values ( '140', '101', 'platform', '219', '1');
insert into `pp_operation_permission` ( `id`, `member_level`, `project`, `op_id`, `is_allow`) values ( '142', '100', 'platform', '220', '1');
insert into `pp_operation_permission` ( `id`, `member_level`, `project`, `op_id`, `is_allow`) values ( '143', '101', 'platform', '220', '1');
insert into `pp_operation_permission` ( `id`, `member_level`, `project`, `op_id`, `is_allow`) values ( '144', '100', 'platform', '221', '1');
insert into `pp_operation_permission` ( `id`, `member_level`, `project`, `op_id`, `is_allow`) values ( '145', '101', 'platform', '221', '1');



