

DROP TABLE IF EXISTS `monitoring_indicator`;
CREATE TABLE `monitoring_indicator` (
  `id` int(20) NOT NULL AUTO_INCREMENT,
  `alarm_amount` decimal(18,0) NOT NULL DEFAULT '0' COMMENT '报警金额',
  `limit_amount` decimal(18,0) NOT NULL DEFAULT '0' COMMENT '限制金额',
  `sub_type` varchar(2) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='风险监控';


DROP TABLE IF EXISTS `sys_dept_sub`;
CREATE TABLE `sys_dept_sub` (
  `sub_id` int(11) NOT NULL AUTO_INCREMENT,
  `dept_id` int(20) NOT NULL,
  `subject_type` varchar(2) NOT NULL DEFAULT '0' COMMENT '认证方式0-人力家 1-税邦云',
  `app_id` varchar(32) DEFAULT NULL,
  `app_secret` varchar(64) DEFAULT NULL,
  `rsa_public_key` varchar(255) DEFAULT NULL,
  `query_url` varchar(255) DEFAULT NULL,
  `subject_name` varchar(128) DEFAULT NULL COMMENT '结算主体',
  `limit_amount` decimal(18,2) DEFAULT NULL,
  `enable_flag` varchar(2) DEFAULT '0',
  PRIMARY KEY (`sub_id`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8mb4 COMMENT='部门结算主体管理';

DROP TABLE IF EXISTS `wm_dept_budget`;
CREATE TABLE `wm_dept_budget` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `dept_id` int(11) DEFAULT NULL COMMENT '所属机构',
  `belong_date` varchar(20) DEFAULT NULL COMMENT '预算月份',
  `declare_dept` varchar(255) DEFAULT NULL COMMENT '申报机构',
  `budget_type` varchar(2) DEFAULT NULL COMMENT '预算类型',
  `budget` int(20) DEFAULT NULL COMMENT '预算值',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COMMENT='预算管理';
