topfans/backend/proto/event.proto

26 lines
1.0 KiB
Protocol Buffer
Raw Permalink 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 topfans.event;
option go_package = "github.com/topfans/backend/pkg/proto/event;event";
// ==================== 通用事件 ====================
// 独立 proto 文件,跨服务复用。其他服务(如 socialService、assetService 等)
// 可以只引用 event.proto 而不必引用 statistic.proto避免循环依赖。
// 单条事件
message Event {
string event_id = 1; // 事件 IDUUID客户端生成用于去重
int64 user_id = 2; // 用户 ID
int64 star_id = 3; // 顶粉星城 ID
string event_type = 4; // 事件类型(如 "asset.like", "exhibition.start"
int64 occurred_at = 5; // 事件发生时间ms timestamp
int64 received_at = 6; // 服务端接收时间ms服务端填充
map<string, string> properties = 7; // 自定义属性(扁平 key-value
}
// 批量事件请求
message BatchEventRequest {
repeated Event events = 1;
}