﻿-- ----------------------------
-- Table structure for app_business_template app业务分组数据模板
-- ----------------------------
DROP TABLE IF EXISTS `app_business_template`;
CREATE TABLE `app_business_template` (
  `GROUP_CODE` varchar(900) DEFAULT NULL,
  `DONO` varchar(96) DEFAULT NULL,
  `SORTNO` varchar(54) DEFAULT NULL,
  `DATA_NAME` varchar(900) DEFAULT NULL,
  `DATA_CODE` varchar(900) DEFAULT NULL,
  `ISLIST` varchar(54) DEFAULT NULL,
  `ISSHOW` varchar(54) DEFAULT NULL,
  `DATA_POSITION` bigint(20) DEFAULT NULL,
  `ISCONVERT` varchar(54) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for app_version app版本
-- ----------------------------
DROP TABLE IF EXISTS `app_version`;
CREATE TABLE `app_version` (
  `ID` varchar(96) DEFAULT NULL,
  `version_desc` varchar(765) DEFAULT NULL,
  `up_date` varchar(60) DEFAULT NULL,
  `image_path` varchar(1536) DEFAULT NULL,
  `is_new` varchar(30) DEFAULT NULL,
  `phone_type` varchar(30) DEFAULT NULL,
  `create_date` varchar(60) DEFAULT NULL,
  `modify_date` varchar(60) DEFAULT NULL,
  `base_file_id` varchar(96) DEFAULT NULL,
  `creator` varchar(96) DEFAULT NULL,
  `modificator` varchar(96) DEFAULT NULL,
  `version_code` varchar(765) DEFAULT NULL,
  `version_name` varchar(765) DEFAULT NULL,
  `must_update` varchar(30) DEFAULT NULL,
  `file_name` varchar(765) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for app_flow_show  app流程配置
-- ----------------------------
DROP TABLE IF EXISTS `app_flow_show`;
CREATE TABLE `app_flow_show` (
  `ID` varchar(96) DEFAULT NULL,
  `FLOW_NO` varchar(4000) DEFAULT NULL,
  `FLOW_NAME` varchar(4000) DEFAULT NULL,
  `APP_FLOW_NAME` varchar(2000) DEFAULT NULL,
  `FILE_NAME` varchar(300) DEFAULT NULL,
  `FILE_PATH` varchar(4000) DEFAULT NULL,
  `FILE_SIZE` bigint(20) DEFAULT NULL,
  `POSITION` bigint(20) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for app_business_group app业务分组
-- ----------------------------
DROP TABLE IF EXISTS `app_business_group`;
CREATE TABLE `app_business_group` (
  `GROUP_CODE` varchar(900) DEFAULT NULL,
  `GROUP_NAME` varchar(900) DEFAULT NULL,
  `FLOWNO` varchar(6000) DEFAULT NULL,
  `PHASENO` varchar(6000) DEFAULT NULL,
  `ISLIST` varchar(3) DEFAULT NULL,
  `GROUP_POSITION` bigint(20) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for app_push_config  app推送配置
-- ----------------------------
DROP TABLE IF EXISTS `app_push_config`;
CREATE TABLE `app_push_config` (
  `ID` varchar(32) COLLATE utf8_bin NOT NULL COMMENT 'ID',
  `IS_PUSH` varchar(1) COLLATE utf8_bin DEFAULT NULL COMMENT '是否开启推送功能',
  `APP_SECRET_KEY_ANDROID` varchar(4000) COLLATE utf8_bin DEFAULT NULL COMMENT '安卓手机推送秘钥',
  `APP_SECRET_KEY_IOS` varchar(4000) COLLATE utf8_bin DEFAULT NULL COMMENT 'IOS手机推送秘钥',
  `MY_PACKAGE_NAME` varchar(4000) COLLATE utf8_bin DEFAULT NULL COMMENT '安卓应用程序包名',
  PRIMARY KEY (`ID`),
  UNIQUE KEY `P_PK_APP_PUSH_MESSAGE` (`ID`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Records of app_push_config
-- ----------------------------
INSERT INTO `app_push_config` VALUES ('1', 'Y', 'WZ5jwvsdAFzo+sDY7wrZgA==', 'rfL+5IFP/fHrsIiCZlJu5Q==', 'com.tenwa.sinopharmEleasing');

-- ----------------------------
-- Table structure for app_push_message app推送信息查询
-- ----------------------------
DROP TABLE IF EXISTS `app_push_message`;
CREATE TABLE `app_push_message` (
  `id` varchar(32) COLLATE utf8_bin NOT NULL COMMENT 'id',
  `userid` varchar(32) COLLATE utf8_bin DEFAULT NULL COMMENT '登录账号',
  `title` varchar(4000) COLLATE utf8_bin DEFAULT NULL COMMENT '消息标题',
  `message_content` varchar(4000) COLLATE utf8_bin DEFAULT NULL COMMENT '消息内容',
  `push_type` varchar(1) COLLATE utf8_bin DEFAULT NULL COMMENT '推送状态',
  `push_result` varchar(4000) COLLATE utf8_bin DEFAULT NULL COMMENT '推送结果',
  `push_ts` varchar(80) COLLATE utf8_bin DEFAULT NULL COMMENT '推送时间',
  `record_ts` varchar(80) COLLATE utf8_bin DEFAULT NULL COMMENT '记录时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `p_pk_app_push_message` (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for token_session  app登录token session 记录
-- ----------------------------
CREATE TABLE `token_session` (
  `TOKEN` varchar(255) DEFAULT NULL,
  `USER_ID` varchar(32) DEFAULT NULL,
  `DEV_ID` varchar(255) DEFAULT NULL,
  `DEV_OS` varchar(255) DEFAULT NULL,
  `CREATED` varchar(40) DEFAULT NULL,
  `EXPIRE_IN` varchar(40) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

-- ----------------------------
-- Table structure for role_flow  app角色流程绑定
-- ----------------------------
DROP TABLE IF EXISTS `role_flow`;
CREATE TABLE `role_flow` (
  `roleid` varchar(96) DEFAULT NULL,
  `flowname` varchar(6000) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- 添加 APP登录设备ID 设备系统 设备推送id 是否开启手势密码 手势密码 字段
-- ----------------------------
ALTER TABLE USER_INFO ADD DEV_ID VARCHAR(100) NULL;
ALTER TABLE USER_INFO ADD DEV_OS VARCHAR(40) NULL;
ALTER TABLE USER_INFO ADD DEV_REG_ID VARCHAR(100) NULL;
ALTER TABLE USER_INFO ADD ENABLE_GESTURE VARCHAR(1) NULL;
ALTER TABLE USER_INFO ADD GESTURE_PASSWORD VARCHAR(100) NULL;
