refactor(entity): 优化实体类字段描述

- 更新 image 实体类字段描述,明确各字段含义
- 修改 MarkdownFile 实体类字段描述,提高字段可理解性
This commit is contained in:
ikmkj
2025-06-16 20:57:35 +08:00
parent 3eb2edbe85
commit 764184047f
2 changed files with 10 additions and 9 deletions

View File

@@ -16,27 +16,28 @@ public class Image {
@Schema(description = "图片id",implementation = Long.class) @Schema(description = "图片id",implementation = Long.class)
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
private Long id; private Long id;
@Schema(description = "图片名称",implementation = Long.class ) @Schema(description = "外键关联用户ID标识图片所有者\n",implementation = Long.class )
private Long userId; private Long userId;
@Schema(description = "图片名称",implementation = Long.class ) @Schema(description = " 外键关联Markdown文件ID标识图片所属文档",implementation = Long.class )
private Long markdownId; private Long markdownId;
@Schema(description = "图片名称",implementation = String.class ) @Schema(description = "原始文件名(用户上传时的文件名)",implementation = String.class )
@TableField("original_name") @TableField("original_name")
private String originalName; private String originalName;
@Schema(description = "图片名称",implementation = String.class ) @Schema(description = "存储文件名(系统生成的唯一文件名)",implementation = String.class )
@TableField("stored_name") @TableField("stored_name")
private String storedName; private String storedName;
@Schema(description = "图片名称",implementation = String.class ) @Schema(description = " 图片访问URL",implementation = String.class )
private String url; private String url;
@Schema(description = "图片大小",implementation = Long.class ) @Schema(description = "图片大小(字节)",implementation = Long.class )
private Long size; private Long size;
@Schema(description = "图片类型",implementation = String.class ) @Schema(description = "图片MIME类型如image/jpeg",implementation = String.class )
@TableField("content_type") @TableField("content_type")
private String contentType; private String contentType;
@Schema(description = "图片上传时间",implementation = LocalDateTime.class )
private LocalDateTime createdAt; private LocalDateTime createdAt;
} }

View File

@@ -21,11 +21,11 @@ public class MarkdownFile {
@Schema(description = "文本标题",implementation = String.class) @Schema(description = "文本标题",implementation = String.class)
private String title; private String title;
@Schema(description = "文本内容",implementation = String.class) @Schema(description = " 文件名(带.md后缀用于存储和识别",implementation = String.class)
@TableField("file_name") @TableField("file_name")
private String fileName; private String fileName;
@Schema(description = "文本内容",implementation = String.class) @Schema(description = "Markdown内容存储实际文档内容",implementation = String.class)
private String content; private String content;
@Schema(description = "创建时间",implementation = LocalDateTime.class) @Schema(description = "创建时间",implementation = LocalDateTime.class)
private LocalDateTime createdAt; private LocalDateTime createdAt;