Skip to content

Commit 617b0ed

Browse files
committed
同步table
1 parent 8624bd0 commit 617b0ed

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

‎table/sys_Request.sql‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ DROP TABLE IF EXISTS `Request`;
2323
/*!40101 SET @saved_cs_client = @@character_set_client */;
2424
/*!40101 SET character_set_client = utf8 */;
2525
CREATE TABLE `Request` (
26-
`id` int(11) NOT NULL,
27-
`method` varchar(10) DEFAULT 'GET',
26+
`id` int(11) NOT NULL AUTO_INCREMENT,
27+
`version` tinyint(4) DEFAULT '0',
2828
`tag` varchar(20) NOT NULL,
29+
`method` varchar(10) DEFAULT 'GET',
2930
`structure` json NOT NULL,
3031
`description` varchar(10000) DEFAULT NULL,
3132
`date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
32-
PRIMARY KEY (`id`),
33-
UNIQUE KEY `id_UNIQUE` (`id`)
34-
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='每次启动服务器时加载整个表到内存。';
33+
PRIMARY KEY (`id`)
34+
) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=utf8 COMMENT='最好编辑完后删除主键,这样就是只读状态,不能随意更改。需要更改就重新加上主键。\n\n每次启动服务器时加载整个表到内存。\n这个表不可省略,model内注解的权限只是客户端能用的,其它可以保证即便服务端代码错误时也不会误删数据。';
3535
/*!40101 SET character_set_client = @saved_cs_client */;
3636

3737
--
@@ -40,7 +40,7 @@ CREATE TABLE `Request` (
4040

4141
LOCK TABLES `Request` WRITE;
4242
/*!40000 ALTER TABLE `Request` DISABLE KEYS */;
43-
INSERT INTO `Request` VALUES (1,'POST','User','{\"User\": {\"disallowColumns\": \"id\", \"necessaryColumns\": \"name,phone\"}, \"necessaryColumns\": \"password,verify\"}','\"User:toUser\":{}转化为\"toUser\":User的JSONObject ?','2017-02-01 11:19:51'),(2,'POST','Moment','{\"disallowColumns\": \"id\", \"necessaryColumns\": \"userId,pictureList\"}',NULL,'2017-02-01 11:19:51'),(3,'POST','Comment','{\"disallowColumns\": \"id\", \"necessaryColumns\": \"userId,momentId,content\"}',NULL,'2017-02-01 11:19:51'),(4,'PUT','User','{\"disallowColumns\": \"phone\", \"necessaryColumns\": \"id\"}',NULL,'2017-02-01 11:19:51'),(6,'PUT','userPhone','{\"User\": {\"disallowColumns\": \"!\", \"necessaryColumns\": \"id,phone\"}}','! 表示其它所有,这里指necessaryColumns所有未包含的字段','2017-02-01 11:19:51'),(7,'DELETE','Moment','{\"necessaryColumns\": \"id\"}','所有删除都要有currentUserId和loginPassword?','2017-02-01 11:19:51'),(8,'DELETE','Comment','{\"necessaryColumns\": \"id\"}','disallowColumns没必要用于DELETE','2017-02-01 11:19:51'),(9,'PUT','Password','{\"Password\": {\"disallowColumns\": \"!\", \"necessaryColumns\": \"id,value\"}, \"necessaryColumns\": \"oldPassword\"}','对安全要求高,不允许客户端改type,date等字段','2017-02-01 11:19:51'),(10,'PUT','User.phone','{\"User\": {\"disallowColumns\": \"!\", \"necessaryColumns\": \"id,phone\"}}','! 表示其它所有,这里指necessaryColumns所有未包含的字段','2017-02-01 11:19:51'),(13,'POST','MomentWithComment','{\"Moment\": {\"Comment\": {\"disallowColumns\": \"id\", \"necessaryColumns\": \"userId,workId,content\"}, \"disallowColumns\": \"id\", \"necessaryColumns\": \"userId,title,content,picture\"}}','用的极少,可能根本用不上','2017-02-01 11:19:51'),(18,'DELETE','User','{\"necessaryColumns\": \"id\"}','','2017-02-01 11:19:51'),(19,'POST_GET','Password','{\"disallowColumns\": \"!\", \"necessaryColumns\": \"table,tableId\"}','String:table, Long: tableId 限制类型?','2017-02-18 12:03:17'),(20,'POST_GET','Wallet','{\"Wallet\": {\"disallowColumns\": \"!\", \"necessaryColumns\": \"userId\"}, \"necessaryColumns\": \"currentUserId,loginPassword\"}',NULL,'2017-02-18 14:20:43'),(22,'POST_GET','Login','{\"User\": {\"necessaryColumns\": \"phone\"}, \"Password\": {\"disallowColumns\": \"!\", \"necessaryColumns\": \"table,phone,value\"}}',NULL,'2017-02-18 14:20:43'),(23,'POST','Login','{\"disallowColumns\": \"!\", \"necessaryColumns\": \"userId,type\"}',NULL,'2017-02-18 14:20:43'),(24,'POST','Verify','{\"disallowColumns\": \"!\", \"necessaryColumns\": \"id,code\"}',NULL,'2017-02-18 14:20:43'),(25,'POST_GET','Verify','{\"necessaryColumns\": \"id\"}',NULL,'2017-02-18 14:20:43'),(26,'DELETE','Verify','{\"disallowColumns\": \"!\", \"necessaryColumns\": \"id\"}',NULL,'2017-02-18 14:20:43'),(27,'POST_HEAD','Verify','{}',NULL,'2017-02-18 14:20:43'),(28,'PUT','Moment','{\"disallowColumns\": \"userId,date\", \"necessaryColumns\": \"id\"}',NULL,'2017-02-01 11:19:51');
43+
INSERT INTO `Request` VALUES (1,0,'User','POST','{\"User\": {\"disallow\": \"id\", \"necessary\": \"name,phone\"}, \"necessary\": \"password,verify\"}','\"User:toUser\":{}转化为\"toUser\":User的JSONObject ?','2017-02-01 11:19:51'),(2,0,'Moment','POST','{\"disallow\": \"id\", \"necessary\": \"userId,pictureList\"}',NULL,'2017-02-01 11:19:51'),(3,0,'Comment','POST','{\"disallow\": \"id\", \"necessary\": \"userId,momentId,content\"}',NULL,'2017-02-01 11:19:51'),(4,0,'User','PUT','{\"disallow\": \"phone\", \"necessary\": \"id\"}',NULL,'2017-02-01 11:19:51'),(6,0,'Moment','DELETE','{\"necessary\": \"id\"}','所有删除都要有currentUserId和loginPassword?','2017-02-01 11:19:51'),(7,0,'Comment','DELETE','{\"put\": {\"Comment:child\": {\"toId@\": \"Comment/id\"}}, \"Comment\": {\"necessary\": \"id\"}}','disallow没必要用于DELETE','2017-02-01 11:19:51'),(8,0,'Password','PUT','{\"Password\": {\"disallow\": \"!\", \"necessary\": \"id,password\"}, \"necessary\": \"oldPassword\"}','对安全要求高,不允许客户端改type,date等字段','2017-02-01 11:19:51'),(9,0,'User.phone','PUT','{\"User\": {\"disallow\": \"!\", \"necessary\": \"id,phone\"}}','! 表示其它所有,这里指necessary所有未包含的字段','2017-02-01 11:19:51'),(10,0,'MomentWithComment','POST','{\"Moment\": {\"Comment\": {\"disallow\": \"id\", \"necessary\": \"userId,workId,content\"}, \"disallow\": \"id\", \"necessary\": \"userId,title,content,picture\"}}','用的极少,可能根本用不上','2017-02-01 11:19:51'),(11,0,'User','DELETE','{\"necessary\": \"id\"}','','2017-02-01 11:19:51'),(12,0,'Password','POST_GET','{\"disallow\": \"!\", \"necessary\": \"id,model\"}','String:table, Long: tableId 限制类型?','2017-02-18 12:03:17'),(13,0,'Wallet','POST_GET','{\"Wallet\": {\"disallow\": \"!\", \"necessary\": \"userId\"}, \"necessary\": \"currentUserId,loginPassword\"}',NULL,'2017-02-18 14:20:43'),(14,0,'Login','POST_GET','{\"User\": {\"necessary\": \"phone\"}, \"Password\": {\"disallow\": \"!\", \"necessary\": \"table,phone,value\"}}',NULL,'2017-02-18 14:20:43'),(15,0,'Login','POST','{\"disallow\": \"!\", \"necessary\": \"userId,type\"}',NULL,'2017-02-18 14:20:43'),(16,0,'Verify','POST','{\"disallow\": \"!\", \"necessary\": \"id,code\"}',NULL,'2017-02-18 14:20:43'),(17,0,'Verify','POST_GET','{\"necessary\": \"id\"}',NULL,'2017-02-18 14:20:43'),(18,0,'Verify','DELETE','{\"disallow\": \"!\", \"necessary\": \"id\"}',NULL,'2017-02-18 14:20:43'),(19,0,'Verify','POST_HEAD','{}',NULL,'2017-02-18 14:20:43'),(20,0,'Moment','PUT','{\"disallow\": \"userId,date\", \"necessary\": \"id\"}',NULL,'2017-02-01 11:19:51'),(30,0,'Wallet','POST','{\"Wallet\": {\"disallow\": \"!\", \"necessary\": \"userId\"}, \"necessary\": \"payPassword\"}',NULL,'2017-02-18 14:20:43'),(31,0,'Wallet','PUT','{\"Wallet\": {\"disallow\": \"!\", \"necessary\": \"userId,balance+\"}, \"necessary\": \"payPassword,oldPassword\"}',NULL,'2017-02-18 14:20:43'),(32,0,'Wallet','DELETE','{\"Wallet\": {\"disallow\": \"!\", \"necessary\": \"userId\"}, \"necessary\": \"payPassword\"}',NULL,'2017-02-18 14:20:43'),(33,0,'Login','POST_HEAD','{\"disallow\": \"!\", \"necessary\": \"userId,type\"}',NULL,'2017-02-18 14:20:43');
4444
/*!40000 ALTER TABLE `Request` ENABLE KEYS */;
4545
UNLOCK TABLES;
4646
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
@@ -53,4 +53,4 @@ UNLOCK TABLES;
5353
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
5454
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
5555

56-
-- Dump completed on 2017-04-23 16:15:42
56+
-- Dump completed on 2017-05-04 2:30:14

‎table/sys_Response.sql‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ CREATE TABLE `Response` (
4040

4141
LOCK TABLES `Response` WRITE;
4242
/*!40000 ALTER TABLE `Response` DISABLE KEYS */;
43-
INSERT INTO `Response` VALUES (1,NULL,'User','{\"add\": {\"extra\": \"Response is effective!\"}, \"put\": {\"certified\": 0}, \"remove\": \"phone\"}','remove-移除字段;add-如果没有对应字段就添加字段;replace-如果有就替换;put-添加或替换字段','2017-02-01 11:19:51');
43+
INSERT INTO `Response` VALUES (1,NULL,'User','{\"add\": {\"extra\": \"Response is effective!\"}, \"put\": {\"certified\": 0}, \"remove\": \"phone\"}','remove-移除字段;add-如果没有对应字段就添加字段;replace-如果有就替换;put-添加或替换字段','2017-02-01 11:19:51'),(2,'DELETE','Comment','{\"remove\": \"Comment:child\"}',NULL,'2017-05-03 17:51:26');
4444
/*!40000 ALTER TABLE `Response` ENABLE KEYS */;
4545
UNLOCK TABLES;
4646
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
@@ -53,4 +53,4 @@ UNLOCK TABLES;
5353
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
5454
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
5555

56-
-- Dump completed on 2017-04-23 16:15:47
56+
-- Dump completed on 2017-05-04 2:30:14

0 commit comments

Comments
 (0)