/*
Navicat MySQL Data Transfer

Source Server         : mysql
Source Server Version : 50710
Source Host           : localhost:3306
Source Database       : demodata

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

Date: 2019-02-24 11:42:06
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for `ccs_class`
-- ----------------------------
DROP TABLE IF EXISTS `ccs_class`;
CREATE TABLE `ccs_class` (
  `id` int(4) NOT NULL AUTO_INCREMENT,
  `class_name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of ccs_class
-- ----------------------------
INSERT INTO `ccs_class` VALUES ('1', '语文');
INSERT INTO `ccs_class` VALUES ('2', '数学');
INSERT INTO `ccs_class` VALUES ('3', '英语');
INSERT INTO `ccs_class` VALUES ('4', '物理');
INSERT INTO `ccs_class` VALUES ('5', '化学');

-- ----------------------------
-- Table structure for `ccs_country`
-- ----------------------------
DROP TABLE IF EXISTS `ccs_country`;
CREATE TABLE `ccs_country` (
  `id` int(4) NOT NULL AUTO_INCREMENT,
  `country_name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of ccs_country
-- ----------------------------
INSERT INTO `ccs_country` VALUES ('1', '魏国');
INSERT INTO `ccs_country` VALUES ('2', '蜀国');
INSERT INTO `ccs_country` VALUES ('3', '吴国');

-- ----------------------------
-- Table structure for `ccs_inout`
-- ----------------------------
DROP TABLE IF EXISTS `ccs_inout`;
CREATE TABLE `ccs_inout` (
  `id` int(4) NOT NULL AUTO_INCREMENT,
  `log_month` int(6) DEFAULT NULL,
  `country_id` int(4) DEFAULT NULL,
  `type_id` int(4) DEFAULT NULL,
  `money` int(12) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=55 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of ccs_inout
-- ----------------------------
INSERT INTO `ccs_inout` VALUES ('1', '201801', '1', '1', '1200');
INSERT INTO `ccs_inout` VALUES ('2', '201801', '1', '2', '790');
INSERT INTO `ccs_inout` VALUES ('3', '201801', '1', '3', '330');
INSERT INTO `ccs_inout` VALUES ('4', '201801', '1', '4', '890');
INSERT INTO `ccs_inout` VALUES ('5', '201801', '1', '5', '800');
INSERT INTO `ccs_inout` VALUES ('6', '201801', '1', '6', '700');
INSERT INTO `ccs_inout` VALUES ('7', '201801', '2', '6', '800');
INSERT INTO `ccs_inout` VALUES ('8', '201801', '2', '5', '600');
INSERT INTO `ccs_inout` VALUES ('9', '201801', '2', '4', '320');
INSERT INTO `ccs_inout` VALUES ('10', '201801', '2', '3', '700');
INSERT INTO `ccs_inout` VALUES ('11', '201801', '2', '2', '430');
INSERT INTO `ccs_inout` VALUES ('12', '201801', '2', '1', '660');
INSERT INTO `ccs_inout` VALUES ('13', '201801', '3', '6', '1100');
INSERT INTO `ccs_inout` VALUES ('14', '201801', '3', '5', '560');
INSERT INTO `ccs_inout` VALUES ('15', '201801', '3', '4', '450');
INSERT INTO `ccs_inout` VALUES ('16', '201801', '3', '3', '963');
INSERT INTO `ccs_inout` VALUES ('17', '201801', '3', '2', '660');
INSERT INTO `ccs_inout` VALUES ('18', '201801', '3', '1', '560');
INSERT INTO `ccs_inout` VALUES ('19', '201802', '1', '6', '990');
INSERT INTO `ccs_inout` VALUES ('20', '201802', '1', '5', '689');
INSERT INTO `ccs_inout` VALUES ('21', '201802', '1', '4', '660');
INSERT INTO `ccs_inout` VALUES ('22', '201802', '1', '3', '1200');
INSERT INTO `ccs_inout` VALUES ('23', '201802', '1', '2', '980');
INSERT INTO `ccs_inout` VALUES ('24', '201802', '1', '1', '780');
INSERT INTO `ccs_inout` VALUES ('25', '201802', '2', '6', '653');
INSERT INTO `ccs_inout` VALUES ('26', '201802', '2', '5', '850');
INSERT INTO `ccs_inout` VALUES ('27', '201802', '2', '4', '880');
INSERT INTO `ccs_inout` VALUES ('28', '201802', '2', '3', '780');
INSERT INTO `ccs_inout` VALUES ('29', '201802', '2', '2', '680');
INSERT INTO `ccs_inout` VALUES ('30', '201802', '2', '1', '980');
INSERT INTO `ccs_inout` VALUES ('31', '201802', '3', '6', '996');
INSERT INTO `ccs_inout` VALUES ('32', '201802', '3', '5', '563');
INSERT INTO `ccs_inout` VALUES ('33', '201802', '3', '4', '789');
INSERT INTO `ccs_inout` VALUES ('34', '201802', '3', '3', '456');
INSERT INTO `ccs_inout` VALUES ('35', '201802', '3', '2', '988');
INSERT INTO `ccs_inout` VALUES ('36', '201802', '3', '1', '780');
INSERT INTO `ccs_inout` VALUES ('37', '201803', '1', '6', '956');
INSERT INTO `ccs_inout` VALUES ('38', '201803', '1', '5', '632');
INSERT INTO `ccs_inout` VALUES ('39', '201803', '1', '4', '854');
INSERT INTO `ccs_inout` VALUES ('40', '201803', '1', '3', '776');
INSERT INTO `ccs_inout` VALUES ('41', '201803', '1', '2', '886');
INSERT INTO `ccs_inout` VALUES ('42', '201803', '1', '1', '996');
INSERT INTO `ccs_inout` VALUES ('43', '201803', '2', '6', '653');
INSERT INTO `ccs_inout` VALUES ('44', '201803', '2', '5', '789');
INSERT INTO `ccs_inout` VALUES ('45', '201803', '2', '4', '639');
INSERT INTO `ccs_inout` VALUES ('46', '201803', '2', '3', '211');
INSERT INTO `ccs_inout` VALUES ('47', '201803', '2', '2', '244');
INSERT INTO `ccs_inout` VALUES ('48', '201803', '2', '1', '985');
INSERT INTO `ccs_inout` VALUES ('49', '201803', '3', '6', '849');
INSERT INTO `ccs_inout` VALUES ('50', '201803', '3', '5', '653');
INSERT INTO `ccs_inout` VALUES ('51', '201803', '3', '4', '369');
INSERT INTO `ccs_inout` VALUES ('52', '201803', '3', '3', '761');
INSERT INTO `ccs_inout` VALUES ('53', '201803', '3', '2', '963');
INSERT INTO `ccs_inout` VALUES ('54', '201803', '3', '1', '885');

-- ----------------------------
-- Table structure for `ccs_person`
-- ----------------------------
DROP TABLE IF EXISTS `ccs_person`;
CREATE TABLE `ccs_person` (
  `id` int(4) NOT NULL AUTO_INCREMENT,
  `person_name` varchar(255) NOT NULL,
  `age` int(3) NOT NULL,
  `sex` int(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of ccs_person
-- ----------------------------
INSERT INTO `ccs_person` VALUES ('1', '刘备', '30', '0');
INSERT INTO `ccs_person` VALUES ('2', '曹操', '37', '0');
INSERT INTO `ccs_person` VALUES ('3', '孙权', '25', '1');

-- ----------------------------
-- Table structure for `ccs_score`
-- ----------------------------
DROP TABLE IF EXISTS `ccs_score`;
CREATE TABLE `ccs_score` (
  `id` int(4) NOT NULL,
  `log_date` date DEFAULT NULL,
  `person_id` int(4) DEFAULT NULL,
  `class_id` int(4) DEFAULT NULL,
  `score` int(3) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of ccs_score
-- ----------------------------
INSERT INTO `ccs_score` VALUES ('1', '2019-02-20', '1', '1', '60');
INSERT INTO `ccs_score` VALUES ('2', '2019-02-20', '1', '2', '70');
INSERT INTO `ccs_score` VALUES ('3', '2019-02-20', '1', '3', '88');
INSERT INTO `ccs_score` VALUES ('4', '2019-02-20', '1', '4', '83');
INSERT INTO `ccs_score` VALUES ('5', '2019-02-20', '1', '5', '86');
INSERT INTO `ccs_score` VALUES ('6', '2019-02-20', '2', '5', '86');
INSERT INTO `ccs_score` VALUES ('7', '2019-02-20', '2', '4', '91');
INSERT INTO `ccs_score` VALUES ('8', '2019-02-20', '2', '3', '76');
INSERT INTO `ccs_score` VALUES ('9', '2019-02-20', '2', '2', '100');
INSERT INTO `ccs_score` VALUES ('10', '2019-02-20', '2', '1', '99');
INSERT INTO `ccs_score` VALUES ('11', '2019-02-20', '3', '5', '99');
INSERT INTO `ccs_score` VALUES ('12', '2019-02-20', '3', '4', '99');
INSERT INTO `ccs_score` VALUES ('13', '2019-02-20', '3', '3', '95');
INSERT INTO `ccs_score` VALUES ('14', '2019-02-20', '3', '2', '93');
INSERT INTO `ccs_score` VALUES ('15', '2019-02-20', '3', '1', '100');
INSERT INTO `ccs_score` VALUES ('16', '2019-01-20', '1', '5', '56');
INSERT INTO `ccs_score` VALUES ('17', '2019-01-20', '1', '4', '79');
INSERT INTO `ccs_score` VALUES ('18', '2019-01-20', '1', '3', '93');
INSERT INTO `ccs_score` VALUES ('19', '2019-01-20', '1', '2', '77');
INSERT INTO `ccs_score` VALUES ('20', '2019-01-20', '1', '1', '85');
INSERT INTO `ccs_score` VALUES ('21', '2019-01-20', '2', '5', '81');
INSERT INTO `ccs_score` VALUES ('22', '2019-01-20', '2', '4', '82');
INSERT INTO `ccs_score` VALUES ('23', '2019-01-20', '2', '3', '84');
INSERT INTO `ccs_score` VALUES ('24', '2019-01-20', '2', '2', '86');
INSERT INTO `ccs_score` VALUES ('25', '2019-01-20', '2', '1', '85');
INSERT INTO `ccs_score` VALUES ('26', '2019-01-20', '3', '5', '97');
INSERT INTO `ccs_score` VALUES ('27', '2019-01-20', '3', '4', '99');
INSERT INTO `ccs_score` VALUES ('28', '2019-01-20', '3', '3', '93');
INSERT INTO `ccs_score` VALUES ('29', '2019-01-20', '3', '2', '96');
INSERT INTO `ccs_score` VALUES ('30', '2019-01-20', '3', '1', '91');
INSERT INTO `ccs_score` VALUES ('31', '2018-12-20', '1', '5', '87');
INSERT INTO `ccs_score` VALUES ('32', '2018-12-20', '1', '4', '65');
INSERT INTO `ccs_score` VALUES ('33', '2018-12-20', '1', '3', '96');
INSERT INTO `ccs_score` VALUES ('34', '2018-12-20', '1', '2', '78');
INSERT INTO `ccs_score` VALUES ('35', '2018-12-20', '1', '1', '77');
INSERT INTO `ccs_score` VALUES ('36', '2018-12-20', '2', '5', '55');
INSERT INTO `ccs_score` VALUES ('37', '2018-12-20', '2', '4', '91');
INSERT INTO `ccs_score` VALUES ('38', '2018-12-20', '2', '3', '78');
INSERT INTO `ccs_score` VALUES ('39', '2018-12-20', '2', '2', '79');
INSERT INTO `ccs_score` VALUES ('40', '2018-12-20', '2', '1', '88');
INSERT INTO `ccs_score` VALUES ('41', '2018-12-20', '3', '5', '89');
INSERT INTO `ccs_score` VALUES ('42', '2018-12-20', '3', '4', '83');
INSERT INTO `ccs_score` VALUES ('43', '2018-12-20', '3', '3', '79');
INSERT INTO `ccs_score` VALUES ('44', '2018-12-20', '3', '2', '96');
INSERT INTO `ccs_score` VALUES ('45', '2018-12-20', '3', '1', '87');

-- ----------------------------
-- Table structure for `ccs_type`
-- ----------------------------
DROP TABLE IF EXISTS `ccs_type`;
CREATE TABLE `ccs_type` (
  `id` int(4) NOT NULL AUTO_INCREMENT,
  `type_name` varchar(255) DEFAULT NULL,
  `flag` int(1) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of ccs_type
-- ----------------------------
INSERT INTO `ccs_type` VALUES ('1', '商业', '0');
INSERT INTO `ccs_type` VALUES ('2', '农业', '0');
INSERT INTO `ccs_type` VALUES ('3', '教育', '1');
INSERT INTO `ccs_type` VALUES ('4', '养老', '1');
INSERT INTO `ccs_type` VALUES ('5', '税收', '0');
INSERT INTO `ccs_type` VALUES ('6', '养兵', '1');

-- ----------------------------
-- Table structure for `days_sale`
-- ----------------------------
DROP TABLE IF EXISTS `days_sale`;
CREATE TABLE `days_sale` (
  `id` int(11) NOT NULL,
  `create_date` date DEFAULT NULL,
  `sale_value` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of days_sale
-- ----------------------------
INSERT INTO `days_sale` VALUES ('1', '2018-08-01', '3000');
INSERT INTO `days_sale` VALUES ('2', '2018-08-02', '5000');
INSERT INTO `days_sale` VALUES ('3', '2018-08-03', '4000');
INSERT INTO `days_sale` VALUES ('4', '2018-08-04', '6000');

-- ----------------------------
-- Table structure for `days_sale_detail`
-- ----------------------------
DROP TABLE IF EXISTS `days_sale_detail`;
CREATE TABLE `days_sale_detail` (
  `id` int(11) NOT NULL,
  `type_id` int(11) DEFAULT NULL,
  `sale_value` int(11) DEFAULT NULL,
  `crt_date` date DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of days_sale_detail
-- ----------------------------
INSERT INTO `days_sale_detail` VALUES ('1', '13', '1500', '2018-08-01');
INSERT INTO `days_sale_detail` VALUES ('2', '14', '1000', '2018-08-01');
INSERT INTO `days_sale_detail` VALUES ('3', '15', '300', '2018-08-01');
INSERT INTO `days_sale_detail` VALUES ('4', '16', '200', '2018-08-01');
INSERT INTO `days_sale_detail` VALUES ('5', '13', '1000', '2018-08-02');
INSERT INTO `days_sale_detail` VALUES ('6', '14', '2000', '2018-08-02');
INSERT INTO `days_sale_detail` VALUES ('7', '15', '1500', '2018-08-02');
INSERT INTO `days_sale_detail` VALUES ('8', '16', '500', '2018-08-02');
INSERT INTO `days_sale_detail` VALUES ('9', '13', '1000', '2018-08-03');
INSERT INTO `days_sale_detail` VALUES ('10', '14', '500', '2018-08-03');
INSERT INTO `days_sale_detail` VALUES ('11', '15', '500', '2018-08-03');
INSERT INTO `days_sale_detail` VALUES ('12', '16', '2000', '2018-08-03');
INSERT INTO `days_sale_detail` VALUES ('13', '13', '2000', '2018-08-04');
INSERT INTO `days_sale_detail` VALUES ('14', '15', '2000', '2018-08-04');
INSERT INTO `days_sale_detail` VALUES ('15', '14', '1000', '2018-08-04');
INSERT INTO `days_sale_detail` VALUES ('16', '16', '1000', '2018-08-04');

-- ----------------------------
-- Table structure for `school`
-- ----------------------------
DROP TABLE IF EXISTS `school`;
CREATE TABLE `school` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `school_name` varchar(255) DEFAULT NULL,
  `crt_date` date DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of school
-- ----------------------------
INSERT INTO `school` VALUES ('1', '示例小学', '2019-01-05');
INSERT INTO `school` VALUES ('2', '示例中学', '2019-01-05');

-- ----------------------------
-- Table structure for `student`
-- ----------------------------
DROP TABLE IF EXISTS `student`;
CREATE TABLE `student` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `student_name` varchar(255) DEFAULT NULL,
  `teacher_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of student
-- ----------------------------
INSERT INTO `student` VALUES ('1', '李雷', '1');
INSERT INTO `student` VALUES ('2', '韩梅梅', '1');
INSERT INTO `student` VALUES ('3', '郭靖', '1');
INSERT INTO `student` VALUES ('4', '黄蓉', '2');
INSERT INTO `student` VALUES ('5', '黄老邪', '2');
INSERT INTO `student` VALUES ('6', '洪七公', '3');

-- ----------------------------
-- Table structure for `teacher`
-- ----------------------------
DROP TABLE IF EXISTS `teacher`;
CREATE TABLE `teacher` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `teacher_name` varchar(255) DEFAULT NULL,
  `school_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of teacher
-- ----------------------------
INSERT INTO `teacher` VALUES ('1', '周老师', '1');
INSERT INTO `teacher` VALUES ('2', '陈老师', '1');
INSERT INTO `teacher` VALUES ('3', '张老师', '2');

-- ----------------------------
-- Table structure for `type_master`
-- ----------------------------
DROP TABLE IF EXISTS `type_master`;
CREATE TABLE `type_master` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(200) DEFAULT NULL,
  `type` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of type_master
-- ----------------------------
INSERT INTO `type_master` VALUES ('1', '1 月', 'month');
INSERT INTO `type_master` VALUES ('2', '2 月', 'month');
INSERT INTO `type_master` VALUES ('3', '3 月', 'month');
INSERT INTO `type_master` VALUES ('4', '4 月', 'month');
INSERT INTO `type_master` VALUES ('5', '5 月', 'month');
INSERT INTO `type_master` VALUES ('6', '6 月', 'month');
INSERT INTO `type_master` VALUES ('7', '7 月', 'month');
INSERT INTO `type_master` VALUES ('8', '8 月', 'month');
INSERT INTO `type_master` VALUES ('9', '9 月', 'month');
INSERT INTO `type_master` VALUES ('10', '10 月', 'month');
INSERT INTO `type_master` VALUES ('11', '11 月', 'month');
INSERT INTO `type_master` VALUES ('12', '12 月', 'month');
INSERT INTO `type_master` VALUES ('13', '快消品', 'type');
INSERT INTO `type_master` VALUES ('14', '电子类', 'type');
INSERT INTO `type_master` VALUES ('15', '交通类', 'type');
INSERT INTO `type_master` VALUES ('16', '服装类', 'type');
