ecs/proto/idl/mod_mail.proto
2025-07-16 10:05:22 +08:00

93 lines
2.2 KiB
Protocol Buffer
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

syntax = "proto3";
package Pb;
option go_package = "pb/";
import "enums.proto";
import "mod_item.proto";
// ModId.ModuleMail = 8000;
// 邮件模块消息定义
// 如果定义的消息内没有字段或者消息被注释掉了,说明该请求不需要参数,发送消息时仅发送包头即可,包体可为空, 返回的消息亦是如此。
message Mail {
uint64 Uid = 1; //唯一ID
MailType Type = 2; //邮件类型见MailType
uint64 SentUserId = 3;
uint32 SentServerId = 4;
uint64 SentRoleId = 5;
string title = 6; //标题
string content = 7; //内容
int64 CreateTime = 8; //创建时间
int64 Expiration = 9; //过期时间0不过期
MailStatus Status = 10; //邮件状态见MailStatus
repeated string Args = 11; //邮件参数,用于替换内容中的占符
repeated Item ItemList = 12; //物品列表, 没有物品为空
}
message MailChange {
uint64 Uid = 1; //唯一ID
MailStatus Status = 7; //邮件状态见MailStatus
}
// MsgId.ModMailList = 8001;
// MsgId.ModMailSend = 8002;
// 邮件列表返回
message MailListAck {
repeated Mail MailList = 1;
}
// MsgId.ModMailSend = 8002;
// 邮件发送请求
message MailSendReq {
uint64 UserId = 1; //用户ID
uint32 AreaId = 2; //区ID服务器ID
uint64 RoleId = 3; //角色ID
Mail Mail = 4; //邮件
}
// MsgId.ModMailSend = 8002;
// 邮件发送返回
message MailSendAck {
Mail Mail = 1;
}
// MsgId.ModMailChange = 8003;
// 邮件为变更列表返回
message MailChangeListAck {
repeated MailChange ChangeList = 1;
}
// MsgId.ModMailRead = 8004;
// 邮件读取请求
message MailReadReq {
uint64 Uid = 1; //唯一ID
}
// MsgId.ModMailItemGet = 8005;
// 邮件物品领取请求
message MailItemGetReq {
uint64 Uid = 1; //唯一ID
}
// MsgId.ModMailItemGetAll = 8006;
// 邮件物品领取所有
message MailItemGetAllReq {
}
// MsgId.ModMailItemGet = 8005;
// MsgId.ModMailItemGetAll = 8006;
// 邮件物品领取返回
message MailItemGetAck {
repeated Item ItemList = 1;
}
// MsgId.ModMailDelete = 8007;
// 邮件删除请求
message MailDeleteReq {
uint64 Uid = 1; //唯一ID
}
// MsgId.ModMailDeleteAll = 8008;
// 邮件删除所有请求
message MailDeleteAllReq {
}