Files
IM_NEW/IM.Protocols/Protos/user.proto
T
2026-05-09 17:06:30 +08:00

34 lines
811 B
Protocol Buffer

syntax = "proto3";
// 导入时间戳支持
import "google/protobuf/timestamp.proto";
// 指定生成的 C# 代码命名空间
option csharp_namespace = "IM.Protocols.Grpc.User";
package User;
service UserInternal {
// 获取用户信息
rpc GetUserInfoAsync (GetUserInfoRequest) returns (UserResponse);
}
// 请求参数:Guid 在 proto 中通常传 string 格式
message GetUserInfoRequest {
string userId = 1;
}
message UserResponse {
string id = 1; // Guid 映射为 string
string userName = 2;
string nickName = 3;
optional string email = 4; // 使用 optional 对应 string?
optional string phone = 5;
string region = 6;
string description = 7;
optional string avatar = 8;
// 使用官方时间戳类型
google.protobuf.Timestamp creationTime = 9;
optional google.protobuf.Timestamp deletion = 10;
}