删除导图实体、枚举、DTO 和 Mapper
This commit is contained in:
-16
@@ -1,16 +0,0 @@
|
|||||||
package com.guo.learningprogresstracker.dto.request;
|
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotBlank;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class UpsertReviewMindMapRequest {
|
|
||||||
|
|
||||||
@NotBlank(message = "思维导图标题不可为空")
|
|
||||||
private String title;
|
|
||||||
|
|
||||||
@NotBlank(message = "思维导图内容不可为空")
|
|
||||||
private String content;
|
|
||||||
|
|
||||||
private String contentFormat;
|
|
||||||
}
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
package com.guo.learningprogresstracker.entity;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
@TableName(value = "review_mind_maps")
|
|
||||||
@Data
|
|
||||||
public class ReviewMindMapEntity extends BaseEntity implements Serializable {
|
|
||||||
|
|
||||||
@TableId(value = "id", type = IdType.AUTO)
|
|
||||||
private Integer id;
|
|
||||||
|
|
||||||
@TableField(value = "task_num")
|
|
||||||
private String taskNum;
|
|
||||||
|
|
||||||
@TableField(value = "title")
|
|
||||||
private String title;
|
|
||||||
|
|
||||||
@TableField(value = "content")
|
|
||||||
private String content;
|
|
||||||
|
|
||||||
@TableField(value = "content_format")
|
|
||||||
private String contentFormat;
|
|
||||||
|
|
||||||
@TableField(value = "source_type")
|
|
||||||
private String sourceType;
|
|
||||||
|
|
||||||
@TableField(value = "file_name")
|
|
||||||
private String fileName;
|
|
||||||
|
|
||||||
@TableField(value = "file_path")
|
|
||||||
private String filePath;
|
|
||||||
|
|
||||||
@TableField(value = "file_format")
|
|
||||||
private String fileFormat;
|
|
||||||
|
|
||||||
@TableField(value = "parsed_content")
|
|
||||||
private String parsedContent;
|
|
||||||
|
|
||||||
@TableField(value = "parse_status")
|
|
||||||
private String parseStatus;
|
|
||||||
|
|
||||||
@TableField(value = "parse_error")
|
|
||||||
private String parseError;
|
|
||||||
|
|
||||||
@TableField(value = "summary")
|
|
||||||
private String summary;
|
|
||||||
|
|
||||||
@TableField(value = "last_parsed_time")
|
|
||||||
private LocalDateTime lastParsedTime;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
}
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
package com.guo.learningprogresstracker.enums;
|
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
|
|
||||||
import java.util.Locale;
|
|
||||||
|
|
||||||
@AllArgsConstructor
|
|
||||||
public enum ReviewMindMapFileFormatEnum {
|
|
||||||
XMIND("XMIND"),
|
|
||||||
MARKDOWN("MARKDOWN"),
|
|
||||||
OPML("OPML"),
|
|
||||||
FREEMIND("FREEMIND"),
|
|
||||||
TEXT("TEXT");
|
|
||||||
|
|
||||||
private final String code;
|
|
||||||
|
|
||||||
public String getCode() {
|
|
||||||
return code;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static ReviewMindMapFileFormatEnum fromFileName(String fileName) {
|
|
||||||
String normalized = fileName == null ? "" : fileName.toLowerCase(Locale.ROOT);
|
|
||||||
if (normalized.endsWith(".xmind")) {
|
|
||||||
return XMIND;
|
|
||||||
}
|
|
||||||
if (normalized.endsWith(".md") || normalized.endsWith(".markdown")) {
|
|
||||||
return MARKDOWN;
|
|
||||||
}
|
|
||||||
if (normalized.endsWith(".opml")) {
|
|
||||||
return OPML;
|
|
||||||
}
|
|
||||||
if (normalized.endsWith(".mm")) {
|
|
||||||
return FREEMIND;
|
|
||||||
}
|
|
||||||
if (normalized.endsWith(".txt")) {
|
|
||||||
return TEXT;
|
|
||||||
}
|
|
||||||
return TEXT;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
package com.guo.learningprogresstracker.enums;
|
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
|
|
||||||
@AllArgsConstructor
|
|
||||||
public enum ReviewMindMapParseStatusEnum {
|
|
||||||
SUCCESS("SUCCESS"),
|
|
||||||
FAILED("FAILED");
|
|
||||||
|
|
||||||
private final String code;
|
|
||||||
|
|
||||||
public String getCode() {
|
|
||||||
return code;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
package com.guo.learningprogresstracker.mapper;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.guo.learningprogresstracker.entity.ReviewMindMapEntity;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
@Mapper
|
|
||||||
public interface ReviewMindMapMapper extends BaseMapper<ReviewMindMapEntity> {
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user