refactor: reorganize modules and add Linux build tooling
This commit is contained in:
67
module/social/group/proto/blocks.proto
Normal file
67
module/social/group/proto/blocks.proto
Normal file
@@ -0,0 +1,67 @@
|
||||
syntax = "proto3";
|
||||
package group;
|
||||
option go_package = ".;group";
|
||||
|
||||
message FetchRequest {
|
||||
int64 page_no=1; // 页数
|
||||
int64 page_size=2; // 每页记录数
|
||||
map<string,string> params=3; // 条件参数,key=val,eg key:category_id=?,vlaue=11
|
||||
}
|
||||
|
||||
message IdentRequest{
|
||||
int64 id = 1; // 唯一ID
|
||||
string identity = 2; // 唯一码
|
||||
}
|
||||
|
||||
message VersionRequest {
|
||||
int64 version=1; // 时序版本号
|
||||
}
|
||||
|
||||
|
||||
message SearchRequest {
|
||||
string keyword=1; //关键词
|
||||
}
|
||||
|
||||
message StatusReply{
|
||||
string data=1; // 数据
|
||||
int64 timeseq=2; // 响应时间序列
|
||||
}
|
||||
|
||||
|
||||
message Empty{
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 推文列表
|
||||
message PostListReply{
|
||||
repeated PostItem list = 1;
|
||||
int64 cnt = 2;
|
||||
}
|
||||
|
||||
// 推文
|
||||
message PostItem{
|
||||
string identity = 1; // 唯一标识
|
||||
string content = 2; // 内容
|
||||
int64 passport_id=3; // 通行证ID
|
||||
string passport_identity = 4; // 通行证Identity
|
||||
bool is_open =5; // 是否公开:默认为0-公开,1-不公开
|
||||
int64 cnt_unlike = 6; // 点踩数量
|
||||
int64 cnt_comment = 7; // 评论数量
|
||||
int64 cnt_like = 8; // 点赞数量
|
||||
repeated AttachItem attachs = 9; // 附件信息
|
||||
repeated TagItem tags = 10; // 所属话题
|
||||
}
|
||||
|
||||
// 附件
|
||||
message AttachItem{
|
||||
string identity = 1; // 唯一标识
|
||||
string attach_type = 2; // 文件类型
|
||||
string url = 3; // 文件路径
|
||||
}
|
||||
|
||||
// 标签
|
||||
message TagItem {
|
||||
string key = 1; // 标签唯一码
|
||||
string content = 2; // 标签内容
|
||||
}
|
||||
49
module/social/group/proto/group.proto
Normal file
49
module/social/group/proto/group.proto
Normal file
@@ -0,0 +1,49 @@
|
||||
syntax = "proto3";
|
||||
package group;
|
||||
option go_package = ".;group";
|
||||
import "blocks.proto";
|
||||
|
||||
// 群组
|
||||
service Basic{
|
||||
//搜索
|
||||
rpc Search(SearchRequest) returns (GroupsReply);
|
||||
|
||||
//获取群组列表
|
||||
rpc Fetch(Empty) returns (GroupsReply);
|
||||
|
||||
//获取群组信息
|
||||
rpc Get(IdentRequest) returns (GroupItem);
|
||||
|
||||
//创建群组
|
||||
rpc Create(GroupItem) returns (StatusReply);
|
||||
|
||||
//修改群组信息
|
||||
rpc Modify(GroupItem) returns (StatusReply);
|
||||
|
||||
//解散群组
|
||||
rpc Disband(IdentRequest) returns (StatusReply);
|
||||
}
|
||||
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; //群组信息
|
||||
}
|
||||
90
module/social/group/proto/member.proto
Normal file
90
module/social/group/proto/member.proto
Normal file
@@ -0,0 +1,90 @@
|
||||
syntax = "proto3";
|
||||
package group;
|
||||
option go_package = ".;group";
|
||||
import "blocks.proto";
|
||||
|
||||
// relation-关系管理:群组
|
||||
service Member{
|
||||
//获取群组成员列表
|
||||
rpc Fetch(IdentRequest) returns (GroupMemberReply);
|
||||
|
||||
//申请加群
|
||||
rpc DoJoin(DoJoinRequest) returns (StatusReply);
|
||||
|
||||
//申请加群列表
|
||||
rpc JoinFetch(Empty) returns (JoinFetchReply);
|
||||
|
||||
//申请加群处理
|
||||
rpc JoinDoHandle(GroupOPRequest) returns (StatusReply);
|
||||
|
||||
|
||||
//设置或取消管理员
|
||||
rpc DoSetManager(GroupOPRequest) returns (StatusReply);
|
||||
|
||||
//踢人
|
||||
rpc DoKick(GroupOPRequest) returns (StatusReply);
|
||||
|
||||
//退群
|
||||
rpc DoQuit(GroupOPRequest) returns (StatusReply);
|
||||
|
||||
}
|
||||
|
||||
message PassportInfoSimpleCard{
|
||||
string identity=1;
|
||||
string nickname=2; //昵称
|
||||
string remark_name=3; // 备注名称
|
||||
string avatar=4;
|
||||
int32 sex = 5; //性别,1为男性,2为女性
|
||||
int32 role=6;//角色,主要是群组内的角色使用
|
||||
}
|
||||
|
||||
message PassportInfoDetailCard{
|
||||
string identity=1;
|
||||
string nickname=2; //昵称
|
||||
string remark_name=3; // 备注名称
|
||||
int32 popular=4; //是否置顶
|
||||
string avatar=5;
|
||||
string birthday = 6; //生日
|
||||
int32 sex = 7; //性别,1为男性,2为女性
|
||||
int32 province = 8; //省
|
||||
int32 city = 9; //市
|
||||
int32 area = 10; //区
|
||||
string sign = 11; //签名
|
||||
repeated string tags=12; //所属标签组
|
||||
int32 foreign_status=13; //外表的状态值,根据表不同,值的作用不同
|
||||
}
|
||||
|
||||
message GroupMemberReply {
|
||||
int32 total=1; // 总记录数
|
||||
int64 version=2; //版本号
|
||||
repeated PassportInfoSimpleCard members=3; //成员信息
|
||||
}
|
||||
|
||||
message DoJoinRequest{
|
||||
int64 id = 1; // 群组ID
|
||||
string identity = 2; // 群组唯一码
|
||||
string message=3;//加群留言
|
||||
}
|
||||
|
||||
message JoinFetchReply {
|
||||
int32 total=1; // 总记录数
|
||||
repeated ApplyJoinGroupItem applys=2; //群组信息
|
||||
}
|
||||
|
||||
message ApplyJoinGroupItem {
|
||||
string identity=1; // 唯一标识
|
||||
int64 group_id =2; // 主键
|
||||
PassportInfoDetailCard from=3;
|
||||
string message=4;
|
||||
string created_at=5; //时间
|
||||
int32 status =6; // 状态
|
||||
}
|
||||
|
||||
|
||||
message GroupOPRequest {
|
||||
string identity=1; // 唯一标识
|
||||
string group_identity=2; //群组identity
|
||||
string direction=3; //操作方式:Pass通过,Reject拒绝,Set设置,cancel取消
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user