Files
full/module/social/group/proto/group.proto

50 lines
1.5 KiB
Protocol Buffer

syntax = "proto3";
package group;
option go_package = "bsm/full/module/social/group/pb;group";
import "protobuf/blocks.proto";
// 群组
service Basic{
//搜索
rpc Search(blocks.SearchRequest) returns (GroupsReply);
//获取群组列表
rpc Fetch(blocks.Empty) returns (GroupsReply);
//获取群组信息
rpc Get(blocks.IdentRequest) returns (GroupItem);
//创建群组
rpc Create(GroupItem) returns (blocks.DataStatusReply);
//修改群组信息
rpc Modify(GroupItem) returns (blocks.DataStatusReply);
//解散群组
rpc Disband(blocks.IdentRequest) returns (blocks.DataStatusReply);
}
message GroupItem {
int64 id =1; // 主键
string identity=2; // 唯一标识
int64 number = 3; // 群组编号
string avatar = 4; // 群组头像
string name=5; // 群组名称
string introduce = 6; // 群组简介
int64 creator_id=7; // 创建者ID
string cretor_identity=8; // 创建者Identity
int32 member_limit=9;//最大成员数,0代表不限制
repeated string master=10; // 管理员
string notice = 11; // 群组公告
string background=12; // 群组背景
repeated string tags=13; // 群组标签
int32 member_total=14; // 群组成员数
bool enable_search_by_number=15; //是否开启群号搜索
bool enable_search_by_name=16; //是否开启群名搜索
string created_at=17; // 群组创建时间
}
message GroupsReply {
int32 total=1; // 总记录数
int64 version=2; //版本号
repeated GroupItem groups=3; //群组信息
}