diff --git a/service/resource.proto b/service/resource.proto index f7578cd..1b48c05 100644 --- a/service/resource.proto +++ b/service/resource.proto @@ -45,7 +45,52 @@ service resource { // 设置示例logo rpc SetExampleLogo(SetExampleLogoReq) returns (SetExampleLogoRes) {} + // 导出文件--CSV + rpc ExportCsv(ExportCsvReq) returns (ExportCsvRes) {} + + // 导出文件--Excel + rpc ExportExcel(ExportExcelReq) returns (ExportExcelRes) {} + + // 导出文件--zip + rpc ExportZip(ExportZipReq) returns (ExportZipRes) {} + } +message ExportData { + repeated string child = 1; +} + +message ExportFile { + string file_type = 1;// 文件类型 + string file_name = 2;// 文件名称 + bytes file_bytes = 3;// 文件流 +} + +message ExportCsvReq { + repeated ExportData file_data = 1; // 文件数据 + string file_name = 2;// 文件名称 + int64 total = 3; // 数据量 +} +message ExportCsvRes { + string export_file_path = 1; // 下载链接 +} + +message ExportExcelReq { + repeated ExportData file_data = 1; // 文件数据 + string file_name = 2;// 文件名称 +} +message ExportExcelRes { + string export_file_path = 1; // 下载链接 +} + +message ExportZipReq { + repeated ExportFile file_data = 1; // 文件数据 + string file_name = 2;// 文件名称 +} +message ExportZipRes { + string export_file_path = 1; // 下载链接 +} + + /* 设置示例logo */ message SetExampleLogoReq { int64 is_example = 1; @@ -304,4 +349,5 @@ message ResourceIds { repeated string resource_ids = 1; } -/* 获取资源详情 */ \ No newline at end of file +/* 获取资源详情 */ +