package cn.lihongjie.coal.excelTemplate.entity;

import cn.lihongjie.coal.base.entity.CommonEntity;

import jakarta.persistence.Entity;

import lombok.Data;

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

@Data
@Entity
public class ExcelTemplateEntity extends CommonEntity {



    private String content;

    @Comment("模板类型")
    private String templateType;

    @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 = 'excel.template.type'\n"
                    + "  and i.code = template_type)")
    private String templateTypeName;
}
