MarketingSystemDataExportTool/grpc/mix/mixv1/oprate_log.proto

98 lines
2.2 KiB
Protocol Buffer

syntax = "proto3";
package mixservice.mixv1;
import "validate/validate.proto";
import "mix/mixv1/common.proto";
option go_package = "./mix/mixv1;mixv1";
// 操作日志
service OperateLog {
// 合同列表
rpc SearchList (ReqOperateLogSearchList) returns (RespOperateLogSearchList) {}
// 创建
rpc Create (ReqOperateLogCreate) returns (RespOperateLogDetail) {}
}
// 搜索日志列表
message ReqOperateLogSearchList {
// 分页
ReqPage page = 1;
// 用户ids
repeated int32 user_ids = 2 [(validate.rules).repeated = {unique:true, items:{int32:{gt:0}}}];
// 业务类型
repeated int32 types = 3 [(validate.rules).repeated = {unique:true, items:{int32:{gt:0}}}];
// 操作类型
repeated int32 sub_types = 4 [(validate.rules).repeated = {unique:true, items:{int32:{gt:0}}}];
// 外部id
repeated int32 type_out_ids = 5 [(validate.rules).repeated = {unique:true, items:{int32:{gt:0}}}];
}
// 响应操作日志搜索列表
message RespOperateLogSearchList {
// 列表
repeated RespOperateLogDetail list = 1;
// 分页
RespPage page = 2;
}
message ReqOperateLogCreate {
enum EnumOperateLogType {
// 未知
T_UNKNOWN = 0;
// 合同
T_CONTRACT = 1;
}
enum EnumOperateLogSubType {
// 未知
TS_UNKNOWN = 0;
// 查看
TS_VIEW = 1;
// 创建
TS_CREATE = 2;
// 更新
TS_UPDATE = 3;
// 删除
TS_DELETE = 4;
// 下载
TS_DOWNLOAD = 5;
}
// 用户id
int32 user_id = 2;
// 业务类型
EnumOperateLogType type = 3 [(validate.rules).enum = {not_in: [0]}];
// 操作类型
EnumOperateLogSubType sub_type = 4 [(validate.rules).enum = {not_in: [0]}];
// 外部id
int32 type_out_id = 5;
//扩展数据
string ext_data = 7;
// 日志内容
string msg = 8;
}
// 日志详情
message RespOperateLogDetail {
//日志id
int32 id = 1;
// 用户id
int32 user_id = 2;
// 业务类型
int32 type = 3;
// 操作类型
int32 sub_type = 4;
// 外部id
int32 type_out_id = 5;
// 创建时间
int32 create_time = 6;
//扩展数据
string ext_data = 7;
// 日志内容
string msg = 8;
// 业务类型名称
string type_name = 9;
// 操作类型名称
string sub_type_name = 10;
}