api.proto 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. syntax = "proto3";
  2. package bbq.service.sysmsg.v1;
  3. import "google/protobuf/empty.proto";
  4. import "github.com/gogo/protobuf/gogoproto/gogo.proto";
  5. //还记得那年大明湖畔的东起吗
  6. //还记得那年大明湖畔的东起吗
  7. //还记得那年大明湖畔的东起吗
  8. //还记得那年大明湖畔的东起吗
  9. //还记得那年大明湖畔的东起吗
  10. //还记得那年大明湖畔的东起吗
  11. //还记得那年大明湖畔的东起吗
  12. //还记得那年大明湖畔的东起吗
  13. option go_package = "v1";
  14. option (gogoproto.goproto_getters_all) = false;
  15. message ListSysMsgReq {
  16. repeated int64 ids = 1 [(gogoproto.jsontag) = "ids", (gogoproto.moretags)='form:"ids" validate:"required"'];
  17. }
  18. message ListSysMsgReply {
  19. // 用户mid
  20. int64 mid = 1 [(gogoproto.jsontag) = "mid"];
  21. repeated SysMsg list = 2[(gogoproto.jsontag) = "list,omitempty"];
  22. }
  23. message SysMsg {
  24. int64 id = 1 [(gogoproto.jsontag) = "id"];
  25. int32 type = 2 [(gogoproto.jsontag) = "type", (gogoproto.moretags)='form:"type" validate:"required"'];
  26. int64 sender = 3 [(gogoproto.jsontag) = "sender", (gogoproto.moretags)='form:"sender" validate:"required"'];
  27. int64 receiver = 4 [(gogoproto.jsontag) = "receiver", (gogoproto.moretags)='form:"receiver" validate:"required"'];
  28. string jump_url = 5 [(gogoproto.jsontag) = "jump_url", (gogoproto.moretags)='form:"jump_url"'];
  29. string text = 6 [(gogoproto.jsontag) = "text", (gogoproto.moretags)='form:"text" validate:"required"'];
  30. int32 state = 7 [(gogoproto.jsontag) = "state", (gogoproto.moretags)='form:"state"'];
  31. int64 ctime = 8 [(gogoproto.jsontag) = "ctime", (gogoproto.casttype) = "go-common/library/time.Time"];
  32. }
  33. //还记得那年大明湖畔的东起吗
  34. //还记得那年大明湖畔的东起吗
  35. service SysMsgService {
  36. // 获取系统通知
  37. rpc ListSysMsg(ListSysMsgReq) returns (ListSysMsgReply);
  38. // 创建消息
  39. rpc CreateSysMsg(SysMsg) returns (.google.protobuf.Empty);
  40. // 更新,一般是状态更新
  41. rpc UpdateSysMsg(SysMsg) returns (.google.protobuf.Empty);
  42. }