| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- syntax = "proto3";
- package api.user;
- import "google/api/annotations.proto";
- //import "google/protobuf/struct.proto";
- import "google/protobuf/empty.proto";
- import "api/chat/chat.proto";
- import "api/common/common.proto";
- option go_package = "git.ikuban.com/server/pw-protobuf/api/user;user";
- option java_multiple_files = true;
- option java_package = "api.user";
- service User {
- // 更新用户信息
- rpc UpdateUserInformation (UpdateUserInformationRequest) returns (google.protobuf.Empty){
- option (google.api.http) = {
- post: "/api/user/update/information",
- body:"*"
- };
- };
- // 获取用户详情
- rpc GetUserInfo (google.protobuf.Empty) returns (UserInfo){
- option (google.api.http) = {
- post: "/api/user/info",
- body:"*"
- };
- };
- // 检查用户是否与陪聊关联
- rpc CheckUserPartnerIsRelationship (common.PartnerIDParam) returns (chat.CheckUserPartnerIsRelationshipReply){
- option (google.api.http) = {
- post: "/api/user/check/relationship",
- body:"*"
- };
- };
- // 创建用户与陪聊的关联
- rpc CreateUserPartnerIsRelationship (common.PartnerIDParam) returns (chat.CreateUserPartnerIsRelationshipReply){
- option (google.api.http) = {
- post: "/api/user/create/relationship",
- body:"*"
- };
- };
- // 获取陪聊的确认通过页面信息
- rpc GetPartnerCircleInfo (common.PartnerIDParam) returns (common.AddFriendMessageInfo){
- option (google.api.http) = {
- post: "/api/partner/circle/info",
- body:"*"
- };
- };
- // 用户获取主页信息
- rpc UserGetHomeInfo (common.PersonParam) returns (common.HomeInfo){
- option (google.api.http) = {
- post: "/api/user/home",
- body:"*"
- };
- };
- // 通过用户IDs查看用户信息列表
- rpc FindUserDBList (common.PersonIDList) returns (common.PersonDBReply);
- }
- message UserInfo{
- string id = 1; // id
- string nickname = 2;// 昵称
- string avatarUrl =3;// 头像链接
- int64 age = 4;// 年龄
- int64 sex = 5;// 性别
- int64 credit = 6;// 积分
- int64 likeNum = 7;// 我喜欢
- int64 likedNum = 8;// 喜欢我
- int64 likedUnreadNum = 9; // 喜欢我的未读数
- int64 lookNum = 10;// 看过我
- int64 lookUnreadNum = 11;// 看过我的未读数
- }
- message UpdateUserInformationRequest {
- string Nickname = 1; // 昵称
- string avatarUrl = 2;// 头像
- int64 sex = 3; // 性别
- }
|