package com.test.bijihoudaun.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 com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.Date;

@Data
@Schema(name = "文本实体")
@TableName("markdown_file")
public class MarkdownFile {
    @Schema(description = "文本id",implementation = Long.class)
    @TableId(type = IdType.AUTO)
    @JsonFormat(shape = JsonFormat.Shape.STRING) // 仅作用于此字段
    private Long id;
    @Schema(description = "分组表id",implementation = Long.class)
    private Long groupingId;
    @Schema(description = "文本标题",implementation = String.class)
    private String title;

    @Schema(description = " 文件名（带.md后缀），用于存储和识别",implementation = String.class)
    @TableField("file_name")
    private String fileName;

    @Schema(description = "Markdown内容，存储实际文档内容",implementation = String.class)
    private String content;
    @Schema(description = "创建时间",implementation = Date.class)
    private Date createdAt;
    @Schema(description = "更新时间",implementation = Date.class)
    private Date updatedAt;
}
