/*
Navicat MySQL Data Transfer
Source Server : xxx
Source Server Version : 50528
Source Host : localhost:3306
Source Database : sys
Target Server Type : MYSQL
Target Server Version : 50528
File Encoding : 65001
Date: 2019-05-01 10:48:04
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for tb_accient
-- ----------------------------
DROP TABLE IF EXISTS `tb_accient`;
CREATE TABLE `tb_accient` (
`acc_id` varchar(255) NOT NULL,
`acc_info` varchar(50) DEFAULT NULL,
`acc_oid` varchar(255) NOT NULL,
`acc_time` datetime NOT NULL,
PRIMARY KEY (`acc_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of tb_accient
-- ----------------------------
INSERT INTO `tb_accient` VALUES ('18930d2dfa1f46c7a9085b5f99ace0a8', '11', 'd2f276c39a104f4595681870f78d0789', '2019-04-18 00:00:00');
INSERT INTO `tb_accient` VALUES ('33e6a735da344acc81879bdad96bddc1', '3333', '1ae9fb4536b745839d95d9038de7272d', '2019-04-13 00:00:00');
INSERT INTO `tb_accient` VALUES ('5dc115feaade4c83b8c662342d3d3c80', '1111', '1ae9fb4536b745839d95d9038de7272d', '2019-04-05 00:00:00');
INSERT INTO `tb_accient` VALUES ('db9d0a35a448410eb2597b04da5f4c47', '222', '1ae9fb4536b745839d95d9038de7272d', '2019-04-12 00:00:00');
INSERT INTO `tb_accient` VALUES ('dfc77230dee944ab945739e40852dd85', '11', '1ae9fb4536b745839d95d9038de7272d', '2019-04-13 00:00:00');
-- ----------------------------
-- Table structure for tb_bed
-- ----------------------------
DROP TABLE IF EXISTS `tb_bed`;
CREATE TABLE `tb_bed` (
`bed_id` varchar(255) NOT NULL,
`bed_status` varchar(50) NOT NULL DEFAULT '0',
PRIMARY KEY (`bed_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of tb_bed
-- ----------------------------
INSERT INTO `tb_bed` VALUES ('1', '1');
INSERT INTO `tb_bed` VALUES ('10', '1');
INSERT INTO `tb_bed` VALUES ('11', '1');
INSERT INTO `tb_bed` VALUES ('2', '1');
INSERT INTO `tb_bed` VALUES ('3', '1');
INSERT INTO `tb_bed` VALUES ('4', '1');
INSERT INTO `tb_bed` VALUES ('5', '1');
INSERT INTO `tb_bed` VALUES ('6', '1');
INSERT INTO `tb_bed` VALUES ('7', '0');
INSERT INTO `tb_bed` VALUES ('8', '0');
INSERT INTO `tb_bed` VALUES ('9', '1');
-- ----------------------------
-- Table structure for tb_leave
-- ----------------------------
DROP TABLE IF EXISTS `tb_leave`;
CREATE TABLE `tb_leave` (
`lea_id` varchar(255) NOT NULL,
`begin_time` date DEFAULT NULL,
`end_time` date DEFAULT NULL,
`lea_reason` varchar(50) DEFAULT NULL,
PRIMARY KEY (`lea_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of tb_leave
-- ----------------------------
INSERT INTO `tb_leave` VALUES ('13', null, null, '喝酒');
INSERT INTO `tb_leave` VALUES ('14', '2019-03-26', '2019-03-27', '1111111');
INSERT INTO `tb_leave` VALUES ('16b3a2b186e9482c80ec3f1e3603b8b5', null, null, '1111111');
INSERT INTO `tb_leave` VALUES ('8b351e533e2c4ebc8d54523d28714385', '2019-04-23', '2019-05-02', '222');
INSERT INTO `tb_leave` VALUES ('8c7a672f10b84cbe926b5447ab159fed', '2019-04-23', '2019-05-02', '222');
-- ----------------------------
-- Table structure for tb_nurse
-- ----------------------------
DROP TABLE IF EXISTS `tb_nurse`;
CREATE TABLE `tb_nurse` (
`nurse_id` varchar(255) NOT NULL,
`lea_id` varchar(255) DEFAULT NULL,
`nurse_name` varchar(50) DEFAULT NULL,
`nurse_sal` double(50,0) DEFAULT NULL,
`nurse_type` varchar(50) DEFAULT '0',
`money` varchar(50) DEFAULT NULL COMMENT '本月薪资',
`num` varchar(50) DEFAULT NULL COMMENT '护工编号',
PRIMARY KEY (`nurse_id`),
KEY `lea_id` (`lea_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of tb_nurse
-- ----------------------------
INSERT INTO `tb_nurse` VALUES ('4decac70b46043b9953637bc8d9e9bc6', null, '111', '111', '0', null, '111');
INSERT INTO `tb_nurse` VALUES ('6878ba6c77d949d0be84a993327a2383', null, '22223', null, '0', null, null);
INSERT INTO `tb_nurse` VALUES ('84db2d331adc4e2e91a7b1060c8d16b4', null, '1', '1', '0', null, '1');
INSERT INTO `tb_nurse` VALUES ('bd8a4c13b4fe4130a41e303d878d78ed', null, '1234', '6000', null, null, '0252');
INSERT INTO `tb_nurse` VALUES ('c6990f4b0f7948ad9ad8c49663a6147e', '16b3a2b186e9482c80ec3f1e3603b8b5', '果园', '22222222', '0', null, '22');
INSERT INTO `tb_nurse` VALUES ('faa5aaec623a4eb094243227a4cc579d', null, '2222', '2222', '1', null, '2222');
-- ----------------------------
-- Table structure for tb_old
-- ----------------------------
DROP TABLE IF EXISTS `tb_old`;
CREATE TABLE `tb_old` (
`old_id` varchar(255) NOT NULL,
`old_name` varchar(50) DEFAULT NULL,
`old_age` int(11) DEFAULT NULL,
`old_sex` varchar(2) DEFAULT NULL,
`old_address` varchar(50) DEFAULT NULL,
`old_phone` bigint(20) DEFAULT NULL,
`old_health` int(11) DEFAULT NULL,
`old_card` varchar(50) DEFAULT NULL,
`nurse_id` varchar(255) DEFAULT NULL,
`bed_id` varchar(255) DEFAULT NULL,
`lea_id` varchar(255) DEFAULT NULL,
`old_family_name` varchar(50) DEFAULT NULL COMMENT '紧急联系人',
`old_family_phone` varchar(50) DEFAULT NULL COMMENT '紧急联系人电话',
`resaon` varchar(50) DEFAULT NULL,
PRIMARY KEY (`old_id`),
KEY `bed_id` (`bed_id`),
KEY `nurse_id` (`nurse_id`),
KEY `lea_id` (`lea_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of tb_old
-- ----------------------------
INSERT INTO `tb_old` VALUES ('1ae9fb4536b745839d95d9038de7272d', '1', null, '', '', null, null, '', null, '4', null, '', '', null);
INSERT INTO `tb_old` VALUES ('3474303140514e188352223627b691f1', '', null, '', '', null, null, '', null, '6', null, '', '', null);
INSERT INTO `tb_old` VALUES ('94fe1abef5a84f07bb5f84377581f80a', '', null, '', '', null, null, '', null, '5', null, '', '', null);
INSERT INTO `tb_old` VALUES ('d2f276c39a104f4595681870f78d0789', '222', '11', '1', '11', '1', '1', '1', null, '11', '', '1', '1', null);
INSERT INTO `tb_old` VALUES ('edc4598630ed43a5892a26ef97d990ec', '11', '111', '11', '1', '1', null, '', null, '2', null, '', '', null);
-- ----------------------------
-- Table structure for tb_old_accient
-- ----------------------------
DROP TABLE IF EXISTS `tb_old_accient`;
CREATE TABLE `tb_old_accient` (
`old_id` varchar(255) NOT NULL,
`acc_id` varchar(255) NOT NULL,
KEY `acc_id` (`acc_id`),
KEY `old_id` (`old_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of tb_old_accient
-- ----------------------------
-- ----------------------------
-- Table structure for tb_pay
-- ----------------------------
DROP TABLE IF EXISTS `tb_pay`;
CREATE TABLE `tb_pay` (
`id` varchar(255) NOT NULL,
`pay` varchar(50) DEFAULT NULL COMMENT '缴费金额',
`old_id` varchar(255) DEFAULT NULL COMMENT '老人id',
`in_time` datetime DEFAULT NULL,
`out_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of tb_pay
-- ----------------------------
-- ----------------------------
-- Table structure for tb_user
-- ----------------------------
DROP TABLE IF EXISTS `tb_user`;
CREATE TABLE `tb_user` (
`user_id` varchar(255) NOT NULL,
`user_name` varchar(50) DEFAULT NULL,
`user_age` int(11) DEFAULT NULL,
`user_password` varchar(50) DEFAULT NULL,
`user_sex` varchar(2) DEFAULT NULL,
`user_phone` varchar(50) DEFAULT NULL,
`user_address` varchar(50) DEFAULT NULL,
`user_type` int(11) DEFAULT NULL,
PRIMARY KEY (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of tb_user
-- ----------------------------
INSERT INTO `tb_user` VALUES ('018c0e1a3a68425d9d4fb0aa9379ba57', '111', null, '111', '男', '', '', '1');
INSERT INTO `tb_user`