|
- -- MySQL dump 10.13 Distrib 5.7.30, for Linux (x86_64)
- --
- -- Host: localhost Database: pccb
- -- ------------------------------------------------------
- -- Server version 5.7.30
-
- DROP SCHEMA `pccb`;
- CREATE SCHEMA `pccb` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin ;
- USE `pccb`;
-
- /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
- /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
- /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
- /*!40101 SET NAMES utf8mb4 */;
- /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
- /*!40103 SET TIME_ZONE='+00:00' */;
- /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
- /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
- /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
- /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
-
- --
- -- Table structure for table `agent_docker_port`
- --
-
- DROP TABLE IF EXISTS `agent_docker_port`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `agent_docker_port` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `task_group_id` int(11) DEFAULT NULL,
- `port` varchar(45) DEFAULT NULL COMMENT 'Save the running port of AI agent and delete the entry when AI agent stop for task group.',
- `job_id` varchar(50) DEFAULT NULL,
- `pod_id` varchar(50) DEFAULT NULL,
- `pod_ip` varchar(30) DEFAULT NULL,
- `task_id` int(11) DEFAULT NULL,
- PRIMARY KEY (`id`),
- UNIQUE KEY `idx_agent_docker_port_task_key` (`task_group_id`,`task_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
-
-
- --
- -- Table structure for table `algorithm`
- --
-
- DROP TABLE IF EXISTS `algorithm`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `algorithm` (
- `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'algorithm ID',
- `name` varchar(200) NOT NULL COMMENT 'Algorithm 名称',
- `version` varchar(20) DEFAULT NULL COMMENT 'version no.',
- `description` varchar(1024) DEFAULT NULL,
- `docker_path` varchar(1024) DEFAULT NULL COMMENT 'Docker path, Client Image for AI',
- `docker_agent_path` varchar(1024) DEFAULT NULL COMMENT 'Docker path, Agent Image for AI',
- `add_date` datetime DEFAULT NULL COMMENT '添加日期',
- `modify_date` datetime DEFAULT NULL COMMENT '修改日期',
- `users_id` int(11) DEFAULT NULL COMMENT 'Created by',
- `classification_id` int(11) DEFAULT NULL COMMENT '算法分类',
- `min_tasks` int(11) DEFAULT '2',
- `max_tasks` int(11) DEFAULT '2',
- `train_count` int(11) DEFAULT NULL COMMENT 'number of train round',
- PRIMARY KEY (`id`),
- KEY `algorithm_users_id_fk` (`users_id`),
- KEY `algorithm_classification_id_fk` (`classification_id`),
- CONSTRAINT `algorithm_classification_id_fk` FOREIGN KEY (`classification_id`) REFERENCES `classification` (`id`),
- CONSTRAINT `algorithm_users_id_fk` FOREIGN KEY (`users_id`) REFERENCES `users` (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
-
- --
- -- Dumping data for table `algorithm`
- --
-
- LOCK TABLES `algorithm` WRITE;
- /*!40000 ALTER TABLE `algorithm` DISABLE KEYS */;
- INSERT INTO `algorithm` VALUES (2,'CIFAR10','1.0.0',NULL,'192.168.202.74:5000/octopus/jcce-client:1.2','192.168.202.74:5000/octopus/jcce-agent:1.2','2019-12-24 12:50:32','2020-06-30 10:13:37',NULL,2,2,2,100);
- /*!40000 ALTER TABLE `algorithm` ENABLE KEYS */;
- UNLOCK TABLES;
-
- --
- -- Table structure for table `chain_record`
- --
-
- DROP TABLE IF EXISTS `chain_record`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `chain_record` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `add_date` datetime DEFAULT NULL,
- `block` varchar(255) DEFAULT NULL,
- `hash` varchar(255) DEFAULT NULL,
- `value` varchar(255) DEFAULT NULL,
- `type` int(1) DEFAULT NULL COMMENT '1创建组、2添加/修改使用方、3添加/修改参与方、4修改任务',
- `task_group_id` int(11) DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE
- ) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
- /*!40101 SET character_set_client = @saved_cs_client */;
-
- --
- -- Dumping data for table `chain_record`
- --
-
- LOCK TABLES `chain_record` WRITE;
- /*!40000 ALTER TABLE `chain_record` DISABLE KEYS */;
- INSERT INTO `chain_record` VALUES (1,'2020-04-22 15:10:25','null','47e4536d80592997f1bcb483554dcd4eab560029587fa61ff30d194828a18c3f',NULL,1,1),(26,'2020-04-22 17:18:14','','d2a57be05885f17da11cd947894365fb15b9a7ee3f3f514d70fa32afa741b03e','',2,1);
- /*!40000 ALTER TABLE `chain_record` ENABLE KEYS */;
- UNLOCK TABLES;
-
- --
- -- Table structure for table `classification`
- --
-
- DROP TABLE IF EXISTS `classification`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `classification` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `name` varchar(200) DEFAULT NULL COMMENT 'classification name',
- `description` varchar(1024) DEFAULT NULL,
- `add_date` datetime DEFAULT NULL COMMENT '添加日期',
- `modify_date` datetime DEFAULT NULL COMMENT '修改日期',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
-
- --
- -- Dumping data for table `classification`
- --
-
- LOCK TABLES `classification` WRITE;
- /*!40000 ALTER TABLE `classification` DISABLE KEYS */;
- INSERT INTO `classification` VALUES (2,'图片','这是属于图片','2019-11-11 00:16:45','2019-11-11 00:16:45'),(3,'视频','这个属于视频','2019-11-11 23:51:17','2019-11-11 23:51:17'),(4,'文本','这个属于文本','2019-11-11 23:51:26','2019-11-11 23:51:26');
- /*!40000 ALTER TABLE `classification` ENABLE KEYS */;
- UNLOCK TABLES;
-
- --
- -- Table structure for table `dataset`
- --
-
- DROP TABLE IF EXISTS `dataset`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `dataset` (
- `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'dataset id',
- `name` varchar(200) NOT NULL COMMENT '数据集名称',
- `size` int(11) NOT NULL COMMENT '数据集大小',
- `classification_id` int(11) DEFAULT NULL COMMENT 'classification id',
- `path` varchar(1024) DEFAULT NULL COMMENT '数据集路径 (Should be network path in case of multiple machine need access)',
- `version` varchar(20) DEFAULT NULL COMMENT '版本',
- `add_date` datetime DEFAULT NULL COMMENT '添加日期',
- `modify_date` datetime DEFAULT NULL COMMENT '修改日期',
- `machine_groups_id` int(11) DEFAULT NULL COMMENT '机器编号',
- `machine_id` int(11) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `dataset_machine_groups_id_fk` (`machine_groups_id`),
- CONSTRAINT `dataset_machine_groups_id_fk` FOREIGN KEY (`machine_groups_id`) REFERENCES `machine_groups` (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
-
- --
- -- Dumping data for table `dataset`
- --
-
- LOCK TABLES `dataset` WRITE;
- /*!40000 ALTER TABLE `dataset` DISABLE KEYS */;
- INSERT INTO `dataset` VALUES (1,'CIFAR-A',100,2,'/root/xy/FederalAI/docker/cifar_data/part_a','1.0.0','2020-07-01 11:56:09','2020-07-01 11:56:09',1,1),(2,'CIFAR-B',100,2,'/root/xy/FederalAI/docker/cifar_data/part_b','1.0.0','2020-07-01 11:56:28','2020-07-01 11:56:28',1,1),(3,'CIFAR10-A',100,2,'/gdata/cifar_data/part_a','1.0.1','2020-07-01 15:18:24','2020-07-01 15:18:24',2,2),(4,'CIFAR10-B',100,2,'/gdata/cifar_data/part_b','1.1.0','2020-07-01 15:18:39','2020-07-01 15:18:39',2,2);
- /*!40000 ALTER TABLE `dataset` ENABLE KEYS */;
- UNLOCK TABLES;
-
- --
- -- Table structure for table `machine`
- --
-
- DROP TABLE IF EXISTS `machine`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `machine` (
- `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '机器编号',
- `name` varchar(200) NOT NULL COMMENT '机器名称',
- `cpu` int(11) DEFAULT NULL COMMENT 'CPU',
- `gpu` int(11) DEFAULT NULL COMMENT 'GPU',
- `ram` int(11) DEFAULT NULL COMMENT '内存',
- `capacity` int(11) DEFAULT NULL COMMENT 'Hard disk capacity',
- `ip_address` varchar(1024) DEFAULT NULL COMMENT 'list of IP地址 on machine',
- `add_date` datetime DEFAULT NULL COMMENT '添加日期',
- `modify_date` datetime DEFAULT NULL COMMENT '修改日期',
- `machine_groups_id` int(11) NOT NULL COMMENT 'machine group id',
- `online` int(11) DEFAULT NULL COMMENT '0: offline, 1: online',
- `machine_uuid` varchar(256) DEFAULT NULL COMMENT 'UUID',
- `public_ip` varchar(200) DEFAULT NULL COMMENT 'Public IP address',
- `port` varchar(200) DEFAULT NULL COMMENT 'Open port with public IP for Access from internet.',
- PRIMARY KEY (`id`),
- KEY `machine_machine_groups_id_fk` (`machine_groups_id`),
- CONSTRAINT `machine_machine_groups_id_fk` FOREIGN KEY (`machine_groups_id`) REFERENCES `machine_groups` (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
-
- --
- -- Dumping data for table `machine`
- --
-
- LOCK TABLES `machine` WRITE;
- /*!40000 ALTER TABLE `machine` DISABLE KEYS */;
- INSERT INTO `machine` VALUES (1,'国防科大-JointAI-Test',80,2,125,3665,'192.168.99.2','2026-07-16 19:49:33','2020-07-01 21:11:10',6,1,NULL,'127.0.0.1','50053'),(2,'鹏城云脑-Dev',80,2,125,3665,'192.168.99.2','2026-07-16 19:49:33','2020-07-01 21:11:10',6,1,NULL,'127.0.0.1','50053');
- /*!40000 ALTER TABLE `machine` ENABLE KEYS */;
- UNLOCK TABLES;
-
- --
- -- Table structure for table `machine_groups`
- --
-
- DROP TABLE IF EXISTS `machine_groups`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `machine_groups` (
- `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Machine Group ID',
- `name` varchar(200) NOT NULL,
- `organization_id` int(11) DEFAULT NULL COMMENT '组织编号',
- `created_by` int(11) DEFAULT NULL COMMENT 'User ID',
- `add_date` datetime DEFAULT NULL COMMENT '添加日期',
- `modify_date` datetime DEFAULT NULL COMMENT '修改日期',
- PRIMARY KEY (`id`),
- UNIQUE KEY `machine_groups_name_unique` (`created_by`,`name`),
- CONSTRAINT `machine_groups_users_id` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
-
- --
- -- Dumping data for table `machine_groups`
- --
-
- LOCK TABLES `machine_groups` WRITE;
- /*!40000 ALTER TABLE `machine_groups` DISABLE KEYS */;
- INSERT INTO `machine_groups` VALUES (1,'信息科机房',1,1,'2019-11-10 21:16:12','2019-11-10 21:16:12'),(2,'信息科机房',2,2,'2019-11-10 21:16:12','2019-11-10 21:16:12'),(3,'信息科机房',3,3,'2019-12-23 12:40:47',NULL),(4,'信息科机房',4,4,'2019-12-23 12:40:47',NULL);
- /*!40000 ALTER TABLE `machine_groups` ENABLE KEYS */;
- UNLOCK TABLES;
-
- --
- -- Table structure for table `model`
- --
-
- DROP TABLE IF EXISTS `model`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `model` (
- `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '型号编号',
- `name` varchar(200) NOT NULL COMMENT '型号名称',
- `version` varchar(20) DEFAULT NULL COMMENT 'version no.',
- `precision` float(8,6) DEFAULT NULL COMMENT 'status of model. ready for training model (0), trained model ready for using(1)',
- `published` int(11) DEFAULT NULL COMMENT 'Not Published(0), Published(1)',
- `description` varchar(1024) DEFAULT NULL,
- `add_date` datetime DEFAULT NULL COMMENT '添加日期',
- `modify_date` datetime DEFAULT NULL COMMENT '修改日期',
- `users_id` int(11) DEFAULT NULL COMMENT 'Created by',
- `classification_id` int(11) DEFAULT NULL COMMENT '算法分类',
- `task_id` int(11) DEFAULT NULL,
- `recall` float(5,2) DEFAULT NULL,
- `round` int(11) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `model_users_id_fk` (`users_id`),
- KEY `model_classification_id_fk` (`classification_id`),
- CONSTRAINT `model_classification_id_fk` FOREIGN KEY (`classification_id`) REFERENCES `classification` (`id`),
- CONSTRAINT `model_users_id_fk` FOREIGN KEY (`users_id`) REFERENCES `users` (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
-
- --
- -- Dumping data for table `model`
- --
-
- LOCK TABLES `model` WRITE;
- /*!40000 ALTER TABLE `model` DISABLE KEYS */;
- INSERT INTO `model` VALUES (3,'New Model','1.0',0.560000,NULL,NULL,'2019-11-12 15:10:33','2019-11-12 15:10:33',6,2,1,0.38,9);
- /*!40000 ALTER TABLE `model` ENABLE KEYS */;
- UNLOCK TABLES;
-
- --
- -- Table structure for table `model_use_record`
- --
-
- DROP TABLE IF EXISTS `model_use_record`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `model_use_record` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `model_id` int(11) NOT NULL,
- `user_id` int(11) NOT NULL,
- `score` float(5,2) DEFAULT NULL,
- `sample_size` int(11) DEFAULT NULL,
- `spend` decimal(10,2) DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE,
- KEY `users_id_fk` (`user_id`) USING BTREE,
- KEY `model_id_fk` (`model_id`) USING BTREE,
- CONSTRAINT `users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
- /*!40101 SET character_set_client = @saved_cs_client */;
-
- --
- -- Dumping data for table `model_use_record`
- --
-
- LOCK TABLES `model_use_record` WRITE;
- /*!40000 ALTER TABLE `model_use_record` DISABLE KEYS */;
- INSERT INTO `model_use_record` VALUES (1,3,6,4.50,8,25.00);
- /*!40000 ALTER TABLE `model_use_record` ENABLE KEYS */;
- UNLOCK TABLES;
-
- --
- -- Table structure for table `organization`
- --
-
- DROP TABLE IF EXISTS `organization`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `organization` (
- `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '组织编号',
- `name` varchar(200) NOT NULL COMMENT '机构名称',
- `area` varchar(200) DEFAULT NULL COMMENT '区域',
- `join_date` datetime DEFAULT NULL COMMENT '参加日期',
- `modify_date` datetime DEFAULT NULL COMMENT '修改日期',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
-
- --
- -- Dumping data for table `organization`
- --
-
- LOCK TABLES `organization` WRITE;
- /*!40000 ALTER TABLE `organization` DISABLE KEYS */;
- INSERT INTO `organization` VALUES
- (1,'国防科大','长沙','2019-11-12 02:01:01','2019-11-12 02:01:01'),
- (2,'鹏城实验室','深圳','2019-11-13 12:05:51','2019-11-13 12:05:53'),
- (3,'湘雅附二','长沙','2019-12-23 11:38:03',NULL),
- (4,'广州军区总医院','广州','2019-12-23 11:38:33',NULL);
- /*!40000 ALTER TABLE `organization` ENABLE KEYS */;
- UNLOCK TABLES;
-
- --
- -- Table structure for table `task_groups`
- --
-
- DROP TABLE IF EXISTS `task_groups`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `task_groups` (
- `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Task group id',
- `name` varchar(30) DEFAULT NULL COMMENT 'Name of task group',
- `algorithm_id` int(11) DEFAULT NULL COMMENT 'Algorithm id for current task group',
- `description` varchar(1024) DEFAULT NULL COMMENT 'Description for task group',
- `users_id` int(11) DEFAULT NULL,
- `status` int(11) DEFAULT NULL COMMENT '状态 Not defined(0), Ready(1) , Training(2), End(3), Error(-1)',
- `classification_id` int(11) DEFAULT NULL COMMENT 'classification',
- `task_count` int(11) DEFAULT NULL COMMENT 'tasks limit',
- `machine_id` int(11) DEFAULT NULL COMMENT 'Machine Id of the machine that will run agent container.',
- `dataset_id` int(11) DEFAULT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
-
-
- --
- -- Table structure for table `task_machines_map`
- --
-
- DROP TABLE IF EXISTS `task_machines_map`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `task_machines_map` (
- `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'task machine map ID',
- `task_id` int(11) DEFAULT NULL,
- `machine_id` int(11) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `task_machines_map_task_id_fk` (`task_id`),
- KEY `task_machines_map_machine_id_fk` (`machine_id`),
- CONSTRAINT `task_machines_map_machine_id_fk` FOREIGN KEY (`machine_id`) REFERENCES `machine` (`id`),
- CONSTRAINT `task_machines_map_task_id_fk` FOREIGN KEY (`task_id`) REFERENCES `tasks` (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
-
-
-
- --
- -- Table structure for table `task_training_data`
- --
-
- DROP TABLE IF EXISTS `task_training_data`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `task_training_data` (
- `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'task training data ID',
- `recall` float(8,6) DEFAULT NULL COMMENT '进展',
- `precision` float(8,6) DEFAULT NULL COMMENT '精确',
- `round` int(11) DEFAULT NULL COMMENT 'Round No.',
- `start_time` datetime DEFAULT NULL,
- `end_time` datetime DEFAULT NULL,
- `task_id` int(11) DEFAULT '0' COMMENT '任务ID',
- `task_group_id` int(11) DEFAULT NULL COMMENT 'Task group id',
- PRIMARY KEY (`id`),
- KEY `task_training_data_tasks_id_fk_idx` (`task_id`),
- CONSTRAINT `task_training_data_tasks_id_fk` FOREIGN KEY (`task_id`) REFERENCES `tasks` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
- ) ENGINE=InnoDB AUTO_INCREMENT=249 DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
-
-
- --
- -- Table structure for table `tasks`
- --
-
- DROP TABLE IF EXISTS `tasks`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `tasks` (
- `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '任务ID',
- `name` varchar(200) NOT NULL COMMENT '任务名称',
- `task_type` varchar(20) DEFAULT NULL COMMENT '任务类型',
- `status` int(11) DEFAULT NULL COMMENT '状态 Not defined(0), Ready(1) , Training(2), End(3), Error(-1)',
- `message` varchar(1024) DEFAULT NULL COMMENT 'Messages for task',
- `algorithm_id` int(11) DEFAULT NULL COMMENT '算法模型',
- `dataset_id` int(11) DEFAULT NULL COMMENT 'Dataset ID',
- `add_date` datetime DEFAULT NULL COMMENT '添加日期',
- `modify_date` datetime DEFAULT NULL COMMENT '修改日期',
- `completed_date` datetime DEFAULT NULL COMMENT '完成日期',
- `users_id` int(11) DEFAULT NULL COMMENT '用户身份',
- `classification_id` int(11) DEFAULT NULL,
- `task_group_id` int(11) DEFAULT NULL COMMENT 'ID for task group',
- PRIMARY KEY (`id`),
- KEY `tasks_dataset_id_fk` (`dataset_id`),
- KEY `tasks_users_id_fk` (`users_id`),
- KEY `tasks_algorithm_id_fk_idx` (`algorithm_id`),
- CONSTRAINT `tasks_algorithm_id_fk` FOREIGN KEY (`algorithm_id`) REFERENCES `algorithm` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
- CONSTRAINT `tasks_dataset_id_fk` FOREIGN KEY (`dataset_id`) REFERENCES `dataset` (`id`),
- CONSTRAINT `tasks_users_id_fk` FOREIGN KEY (`users_id`) REFERENCES `users` (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
-
-
-
- --
- -- Table structure for table `training_parameters`
- --
-
- DROP TABLE IF EXISTS `training_parameters`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `training_parameters` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `task_id` int(11) DEFAULT NULL,
- `download_size` int(11) DEFAULT NULL,
- `upload_size` int(11) DEFAULT NULL,
- `received_time` datetime DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `training_parameters_tasks_id_fk_idx` (`task_id`),
- CONSTRAINT `training_parameters_tasks_id_fk` FOREIGN KEY (`task_id`) REFERENCES `tasks` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
- ) ENGINE=InnoDB AUTO_INCREMENT=337 DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
-
-
-
- --
- -- Table structure for table `users`
- --
-
- DROP TABLE IF EXISTS `users`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `users` (
- `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '用户身份',
- `email` varchar(200) NOT NULL COMMENT 'Email',
- `user_name` varchar(20) NOT NULL COMMENT '用户名',
- `password` varchar(500) NOT NULL COMMENT 'Password',
- `join_date` datetime DEFAULT NULL COMMENT '参加日期',
- `modify_date` datetime DEFAULT NULL COMMENT '修改日期',
- `organization_id` int(11) DEFAULT NULL COMMENT '组织编号',
- `token` varchar(500) DEFAULT NULL COMMENT 'sha256(password+modify_date)',
- `role` varchar(20) NOT NULL COMMENT '用户角色',
- `is_enable` int(2) NOT NULL COMMENT '状态(1启用,0禁用)',
- PRIMARY KEY (`id`),
- UNIQUE KEY `phone_no_UNIQUE` (`user_name`),
- UNIQUE KEY `email_UNIQUE` (`email`),
- KEY `users_organization_id_fk` (`organization_id`),
- CONSTRAINT `users_organization_id_fk` FOREIGN KEY (`organization_id`) REFERENCES `organization` (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
-
- --
- -- Dumping data for table `users`
- --
-
- LOCK TABLES `users` WRITE;
- /*!40000 ALTER TABLE `users` DISABLE KEYS */;
- INSERT INTO `users` VALUES
- (1,'admin@ntd.edu.cn','admin','ef797c8118f02dfb649607dd5d3f8c7623048c9c063d532cc95c5ed7a898a64f','2020-07-01 11:47:07','2020-07-01 11:47:07',1,null,'super',1),
- (2,'admin@pcl.cn','pcl','ef797c8118f02dfb649607dd5d3f8c7623048c9c063d532cc95c5ed7a898a64f','2020-07-01 11:47:07','2020-07-01 11:47:07',2,null,'super',1),
- (3,'xyf2@pcl.cn','xyf2','ef797c8118f02dfb649607dd5d3f8c7623048c9c063d532cc95c5ed7a898a64f','2019-11-12 10:01:59','2020-07-01 09:07:42',3,null,'admin',1),
- (4,'admin@gzjqzyy.com','gzjqzyy','ef797c8118f02dfb649607dd5d3f8c7623048c9c063d532cc95c5ed7a898a64f','2019-12-23 12:37:29','2019-12-23 12:37:29',4,null,'normal',1),
- (5,'a@pcl.cn','UserA','ef797c8118f02dfb649607dd5d3f8c7623048c9c063d532cc95c5ed7a898a64f','2019-11-12 12:02:41','2020-07-01 11:47:16',2,null,'normal',1),
- (6,'b@pcl.cn','UserB','ef797c8118f02dfb649607dd5d3f8c7623048c9c063d532cc95c5ed7a898a64f','2019-11-13 19:10:21','2020-07-01 15:48:56',2,null,'normal',1);
- /*!40000 ALTER TABLE `users` ENABLE KEYS */;
- UNLOCK TABLES;
-
- --
- -- Table structure for table `users_account`
- --
-
- DROP TABLE IF EXISTS `users_account`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `users_account` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `users_id` int(11) DEFAULT NULL,
- `account` decimal(10,2) DEFAULT NULL,
- `name` varchar(50) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `fk_users_account_1_idx` (`users_id`),
- CONSTRAINT `fk_users_account_1` FOREIGN KEY (`users_id`) REFERENCES `users` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
- ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
-
- --
- -- Dumping data for table `users_account`
- --
-
- LOCK TABLES `users_account` WRITE;
- /*!40000 ALTER TABLE `users_account` DISABLE KEYS */;
- INSERT INTO `users_account` VALUES (1,7,123.46,'Main'),(2,6,121.00,'Test');
- /*!40000 ALTER TABLE `users_account` ENABLE KEYS */;
- UNLOCK TABLES;
-
- --
- -- Table structure for table `users_account_record`
- --
-
- DROP TABLE IF EXISTS `users_account_record`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!40101 SET character_set_client = utf8 */;
- CREATE TABLE `users_account_record` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `account_id` int(11) DEFAULT NULL,
- `source` varchar(50) DEFAULT NULL,
- `type` varchar(30) DEFAULT NULL,
- `time` datetime DEFAULT NULL,
- `detail` varchar(512) DEFAULT NULL COMMENT 'Transaction details',
- `chain_txid` varchar(50) DEFAULT NULL COMMENT 'Transaction id on block chain',
- `value` decimal(10,2) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `fk_users_account_record_1_idx` (`account_id`),
- CONSTRAINT `fk_users_account_record_1` FOREIGN KEY (`account_id`) REFERENCES `users_account` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
- ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
-
- --
- -- Dumping data for table `users_account_record`
- --
-
- LOCK TABLES `users_account_record` WRITE;
- /*!40000 ALTER TABLE `users_account_record` DISABLE KEYS */;
- INSERT INTO `users_account_record` VALUES (1,1,'Training',NULL,'2019-11-13 12:00:00','','',100.00),(2,1,'Training',NULL,'2019-11-11 12:00:00',NULL,NULL,50.00),(3,1,'Use',NULL,'2019-11-12 12:00:00',NULL,NULL,26.54);
- /*!40000 ALTER TABLE `users_account_record` ENABLE KEYS */;
- UNLOCK TABLES;
- /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
-
- /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
- /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
- /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
- /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
- /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
- /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
- /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-
- -- Dump completed on 2020-07-01 13:11:13
|