知识库文件日志
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
package org.xyzh.api.ai.constance;
|
||||
|
||||
|
||||
public enum KnowledgeFileLogAction {
|
||||
UPLOAD("upload", "上传文件"),
|
||||
DELETE("delete", "删除文件"),
|
||||
DOWNLOAD("download", "下载文件"),
|
||||
UPDATE("update", "更新文件"),
|
||||
SEGMENT_CREATE("segment_create", "创建分段"),
|
||||
SEGMENT_UPDATE("segment_update", "更新分段"),
|
||||
SEGMENT_DELETE("segment_delete", "更新分段");
|
||||
|
||||
private String action;
|
||||
private String description;
|
||||
private KnowledgeFileLogAction(String action, String description) {
|
||||
this.action = action;
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getAction() {
|
||||
return action;
|
||||
}
|
||||
|
||||
public String getDescription(){
|
||||
return description;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package org.xyzh.api.ai.dto;
|
||||
|
||||
import org.xyzh.common.dto.BaseDTO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@Schema(description = "知识库文件日志")
|
||||
public class TbKnowledgeFileLog extends BaseDTO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "日志Id")
|
||||
private String logId;
|
||||
|
||||
@Schema(description = "知识库Id")
|
||||
private String knowledgeId;
|
||||
|
||||
@Schema(description = "文件根Id")
|
||||
private String fileRootId;
|
||||
|
||||
@Schema(description = "文件Id")
|
||||
private String fileId;
|
||||
|
||||
@Schema(description = "文件名称")
|
||||
private String fileName;
|
||||
|
||||
@Schema(description = "服务名称")
|
||||
private String service;
|
||||
|
||||
@Schema(description = "文件版本")
|
||||
private Integer version;
|
||||
|
||||
@Schema(description = "操作")
|
||||
private String action;
|
||||
|
||||
@Schema(description = "操作人用户名")
|
||||
private String creatorName;
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package org.xyzh.api.ai.service;
|
||||
|
||||
import org.xyzh.api.ai.dto.TbKnowledgeFileLog;
|
||||
import org.xyzh.common.core.domain.ResultDomain;
|
||||
import org.xyzh.common.core.page.PageRequest;
|
||||
|
||||
/**
|
||||
* @description 知识库文件操作日志
|
||||
* @filename KnowledgeFileLogService.java
|
||||
* @author yslg
|
||||
* @copyright yslg
|
||||
* @since 2025-12-31
|
||||
*/
|
||||
public interface KnowledgeFileLogService {
|
||||
|
||||
/**
|
||||
* @description 新增知识库文件操作日志
|
||||
* @param knowledgeFileLog
|
||||
* @return 日志
|
||||
* @author yslg
|
||||
* @since 2025-12-31
|
||||
*/
|
||||
ResultDomain<TbKnowledgeFileLog> addKnowledgeFileLog(TbKnowledgeFileLog knowledgeFileLog);
|
||||
|
||||
/**
|
||||
* @description 查询知识库日志操作列表
|
||||
* @param filter
|
||||
* @return 日志列表
|
||||
* @author yslg
|
||||
* @since 2025-12-31
|
||||
*/
|
||||
ResultDomain<TbKnowledgeFileLog> getKnowledgeFileLogList(TbKnowledgeFileLog filter);
|
||||
|
||||
/**
|
||||
* @description 查询知识库日志操作分页
|
||||
* @param pageRequest
|
||||
* @return 日志分页数据
|
||||
* @author yslg
|
||||
* @since 2025-12-31
|
||||
*/
|
||||
ResultDomain<TbKnowledgeFileLog> getKnowledgeFileLogPage(PageRequest<TbKnowledgeFileLog> pageRequest);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user