package com.njzscloud.common.gen;

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.njzscloud.common.gen.contant.TplCategory;
import com.njzscloud.common.gen.support.Tpl;
import com.njzscloud.common.mp.support.handler.j.JsonTypeHandler;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.util.Map;

/**
 * 代码模板
 */
@Getter
@Setter
@ToString
@Accessors(chain = true)
@TableName(value = "sys_tpl", autoResultMap = true)
public class SysTplEntity {

    /**
     * Id
     */
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 模板名称
     */
    private String tplName;

    /**
     * 模板类型; 字典编码：tpl_category
     */
    private TplCategory tplCategory;

    /**
     * 模板内容
     */
    @TableField(typeHandler = JsonTypeHandler.class)
    private Tpl tpl;

    /**
     * 模型数据
     */
    @TableField(typeHandler = JsonTypeHandler.class)
    private Map<String, Object> modelData;

}
