82 lines
1.8 KiB
Protocol Buffer
82 lines
1.8 KiB
Protocol Buffer
syntax = "proto3";
|
||
|
||
package hyapp.events.room.v1;
|
||
|
||
option go_package = "hyapp/api/proto/events/room/v1;roomeventsv1";
|
||
|
||
// EventEnvelope 是 room-service outbox 的统一事件外壳。
|
||
// body 保存具体事件消息序列化后的二进制,event_type 负责告诉消费者如何解码。
|
||
message EventEnvelope {
|
||
string event_id = 1;
|
||
string room_id = 2;
|
||
string event_type = 3;
|
||
int64 room_version = 4;
|
||
int64 occurred_at_ms = 5;
|
||
bytes body = 6;
|
||
}
|
||
|
||
// RoomCreated 表达房间第一次建立成功。
|
||
message RoomCreated {
|
||
int64 owner_user_id = 1;
|
||
int64 host_user_id = 2;
|
||
int32 seat_count = 3;
|
||
string mode = 4;
|
||
}
|
||
|
||
// RoomUserJoined 表达用户业务态进房成功。
|
||
message RoomUserJoined {
|
||
int64 user_id = 1;
|
||
string role = 2;
|
||
}
|
||
|
||
// RoomUserLeft 表达用户离房成功。
|
||
message RoomUserLeft {
|
||
int64 user_id = 1;
|
||
}
|
||
|
||
// RoomMicChanged 表达任意上下麦和换麦位动作。
|
||
message RoomMicChanged {
|
||
int64 actor_user_id = 1;
|
||
int64 target_user_id = 2;
|
||
int32 from_seat = 3;
|
||
int32 to_seat = 4;
|
||
string action = 5;
|
||
}
|
||
|
||
// RoomUserMuted 表达禁言状态变更。
|
||
message RoomUserMuted {
|
||
int64 actor_user_id = 1;
|
||
int64 target_user_id = 2;
|
||
bool muted = 3;
|
||
}
|
||
|
||
// RoomUserKicked 表达踢人动作。
|
||
message RoomUserKicked {
|
||
int64 actor_user_id = 1;
|
||
int64 target_user_id = 2;
|
||
}
|
||
|
||
// RoomGiftSent 表达送礼成功且已落房间状态。
|
||
message RoomGiftSent {
|
||
int64 sender_user_id = 1;
|
||
int64 target_user_id = 2;
|
||
string gift_id = 3;
|
||
int32 gift_count = 4;
|
||
int64 gift_value = 5;
|
||
string billing_receipt_id = 6;
|
||
}
|
||
|
||
// RoomHeatChanged 表达热度变化结果。
|
||
message RoomHeatChanged {
|
||
int64 delta = 1;
|
||
int64 current_heat = 2;
|
||
}
|
||
|
||
// RoomRankChanged 表达本地礼物榜变化结果。
|
||
message RoomRankChanged {
|
||
int64 user_id = 1;
|
||
int64 score = 2;
|
||
int64 gift_value = 3;
|
||
}
|
||
|