diff --git a/server/tools/protobuild/cs_msgid.proto b/server/tools/protobuild/cs_msgid.proto index e7fd59d..ca24bad 100644 --- a/server/tools/protobuild/cs_msgid.proto +++ b/server/tools/protobuild/cs_msgid.proto @@ -32,6 +32,15 @@ enum CMMessageId_e _CMGroupQuit = 205; _CMGroupDismiss = 206; _CMGroupRename = 207; + + _CMGuildCreate = 231; + _CMGuildJoin = 232; + _CMGuildAgree = 233; + _CMGuildKick = 234; + _CMGuildQuit = 235; + _CMGuildDismiss = 236; + _CMGuildRename = 237; + } enum SMMessageId_e @@ -62,6 +71,14 @@ enum SMMessageId_e _SMGroupDismiss = 206; _SMGroupRename = 207; + _SMGuildCreate = 231; + _SMGuildJoin = 232; + _SMGuildAgree = 233; + _SMGuildKick = 234; + _SMGuildQuit = 235; + _SMGuildDismiss = 236; + _SMGuildRename = 237; + _SMUserStatusNotify = 501; _SMUserInfoUpdate = 502; _SMCustomMsgNotify = 503; diff --git a/server/tools/protobuild/cs_proto.proto b/server/tools/protobuild/cs_proto.proto index 05da98b..f4bab9e 100644 --- a/server/tools/protobuild/cs_proto.proto +++ b/server/tools/protobuild/cs_proto.proto @@ -297,6 +297,84 @@ message SMGroupRename optional string errmsg = 2; //错误信息 } +//建群 +message CMGuildCreate +{ + optional string guild_name = 1; //群名称 +} +//建群返回 +message SMGuildCreate +{ + optional int32 errcode = 1; //1:群已存在 2: 你已经有群 + optional string errmsg = 2; //错误消息 +} + +//加群 +message CMGuildJoin +{ + optional int64 guild_id = 1; //群id +} +//加群返回 +message SMGuildJoin +{ + optional int32 errcode = 1; //1:群id不存在 2:群已满 + optional string errmsg = 2; //错误消息 +} + +//同意加群 +message CMGuildAgree +{ +} +message SMGuildAgree +{ + optional int32 errcode = 1; + optional string errmsg = 2; +} + +//踢人 +message CMGuildKick +{ + optional string account_id = 1; +} + +//踢人回复 +message SMGuildKick +{ + optional int32 errcode = 1; //1:群id错误 + optional string errmsg = 2; //错误消息 +} + +//退群 +message CMGuildQuit +{ +} +message SMGuildQuit +{ + optional int32 errcode = 1; //错误码 + optional string errmsg = 2; //错误消息 +} + +//解散群 +message CMGuildDismiss +{ +} +message SMGuildDismiss +{ + optional int32 errcode = 1; //错误码 + optional string errmsg = 2; //错误信息 +} + +//群改名 +message CMGuildRename +{ + optional string new_guild_name = 1; //新群名 +} +message SMGuildRename +{ + optional int32 errcode = 1; //错误码 + optional string errmsg = 2; //错误信息 +} + //发送聊天消息 message CMSendChatMsg { diff --git a/sql/relationdb_n.sql b/sql/relationdb_n.sql index 4c81ff2..cdb3fc9 100644 --- a/sql/relationdb_n.sql +++ b/sql/relationdb_n.sql @@ -79,6 +79,28 @@ CREATE TABLE `group` ( /*!40101 SET character_set_client = @saved_cs_client */; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; +-- Table structure for table `guild` +-- + +DROP TABLE IF EXISTS `guild`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `guild` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `guild_id` bigint NOT NULL COMMENT 'guild_id', + `guild_name` tinyblob COMMENT 'guild_name', + `owner_id` varchar(60) CHARACTER SET utf8 NOT NULL COMMENT '公会主', + `creator_id` varchar(60) CHARACTER SET utf8 NOT NULL COMMENT '公会创建者', + `guild_data` mediumblob COMMENT '公会数据', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`), + UNIQUE KEY `guild_id` (`guild_id`), + KEY `owner_id` (`owner_id`) +) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + -- Table structure for table `friend_apply` --