package cn.lihongjie.coal.noteBookChapter.dto;

import cn.lihongjie.coal.base.dto.CommonDto;

import lombok.Data;

import org.hibernate.annotations.Comment;
import org.hibernate.annotations.Formula;

@Data
public class UpdateNoteBookChapterDto extends CommonDto {
    @Comment("标题")
    private String title;


    @Comment("内容类型 0 html 1 markdown")
    private String contentType;

    @Formula(
            "(select i.name\n"
            + "from t_dictionary d,\n"
            + "     t_dictionary_item i\n"
            + "where d.id = i.dictionary_id\n"
            + "  and d.code = 'notebook.contentType'\n"
            + "  and i.code = content_type)")
    private String contentTypeName;

    @Comment("内容")
    private String content;




    @Comment("父节点")
    private String parent;
}
