syntax = "proto3"; option go_package = ".;pb"; import "allhelp/allhelp_db.proto"; // ===== 定时提醒任务 ===== // 获取用户任务列表 message AllhelpGetTasksReq { int32 status = 1; //@go_tags(`json:"status"`) 按状态筛选,-1 表示全部 int32 page = 2; //@go_tags(`json:"page"`) 页码(从1开始) int32 size = 3; //@go_tags(`json:"size"`) 每页数量 } message AllhelpGetTasksResp { repeated DBTask tasks = 1; //@go_tags(`json:"tasks"`) 任务列表 int64 total = 2; //@go_tags(`json:"total"`) 总数 } // 添加任务 message AllhelpAddTaskReq { string task_name = 1; //@go_tags(`json:"task_name"`) 任务标题 string task_desc = 2; //@go_tags(`json:"task_desc"`) 任务描述 int32 task_type = 3; //@go_tags(`json:"task_type"`) 任务类型 string trigger_time = 4; //@go_tags(`json:"trigger_time"`) 触发时间(带时区的RFC3339字符串) string cron_expr = 5; //@go_tags(`json:"cron_expr"`) cron表达式 string extra = 6; //@go_tags(`json:"extra"`) 扩展信息 } message AllhelpAddTaskResp { DBTask task = 1; //@go_tags(`json:"task"`) 创建的任务 } // 取消任务 message AllhelpCancelTaskReq { uint64 task_id = 1; //@go_tags(`json:"task_id"`) 任务ID } message AllhelpCancelTaskResp { } // 完成任务 message AllhelpCompleteTaskReq { uint64 task_id = 1; //@go_tags(`json:"task_id"`) 任务ID } message AllhelpCompleteTaskResp { } // ===== 每日聊天总结 ===== // 提交每日聊天总结(异步,立即返回 Pending 记录) // 同一 uid+summary_date 重复提交时覆盖重算 message AllhelpSubmitChatSummaryReq { string summary_date = 1; //@go_tags(`json:"summary_date"`) 日期 YYYY-MM-DD(客户端按本地时区选择) repeated ChatMsg msgs = 2; //@go_tags(`json:"msgs"`) 当日聊天消息列表 } message AllhelpSubmitChatSummaryResp { DBChatSummary record = 1; //@go_tags(`json:"record"`) 入库记录(state=Pending) } // 按日期查询(客户端轮询) message AllhelpGetChatSummaryReq { string summary_date = 1; //@go_tags(`json:"summary_date"`) YYYY-MM-DD } message AllhelpGetChatSummaryResp { DBChatSummary record = 1; //@go_tags(`json:"record"`) 记录(不存在时 record.id=0) } // 按日期范围列表 message AllhelpListChatSummariesReq { string start_date = 1; //@go_tags(`json:"start_date"`) 含,YYYY-MM-DD string end_date = 2; //@go_tags(`json:"end_date"`) 含,YYYY-MM-DD int32 page = 3; //@go_tags(`json:"page"`) 从1开始 int32 size = 4; //@go_tags(`json:"size"`) } message AllhelpListChatSummariesResp { repeated DBChatSummary records = 1; //@go_tags(`json:"records"`) int64 total = 2; //@go_tags(`json:"total"`) } // 删除指定记录 message AllhelpDelChatSummaryReq { uint64 id = 1; //@go_tags(`json:"id"`) } message AllhelpDelChatSummaryResp { }