mail.proto 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. syntax = "proto3";
  2. package protos.modules;
  3. option go_package = ".;protos";
  4. /// 一封邮件
  5. message Mail {
  6. int64 id = 1;
  7. string subject = 2;
  8. string body = 3;
  9. int64 ts = 4;
  10. string sender = 5;
  11. repeated string itemIds = 6; // 可领取的道具列表,空表示没有
  12. string btnText = 7; // 按钮上的文字,如果空,表示没有按钮
  13. int64 expiresAt = 9; // 过期时间,0 永不过期
  14. int32 read = 10; // 是否已读
  15. int32 valid = 12; // 是否有效
  16. }
  17. message C_UserMails {
  18. }
  19. message S_UserMails {
  20. repeated Mail mails = 1;
  21. }
  22. // 标记已读
  23. message C_ReadMails {
  24. repeated int64 ids = 1;
  25. }
  26. message S_ReadMails {
  27. repeated int64 ids = 1;
  28. }
  29. // 点击邮箱中按钮领取物品
  30. // 此时,背包中需要有空槽,否则领取失败
  31. message C_RetrieveMails {
  32. repeated int64 ids = 1;
  33. }
  34. message S_RetrieveMails {
  35. repeated int64 ids = 1;
  36. }