class NotifyTemplateEntity extends GenericEntity<String> implements RecordCreationEntity {
    private static final long serialVersionUID = -6849794470754667710L;

    @Override
    @GeneratedValue(generator = Generators.SNOW_FLAKE)
    @Pattern(regexp = "^[0-9a-zA-Z_\\-]+$", groups = CreateGroup.class)
    @Schema(description = "模板ID(只能由数字,字母,下划线和中划线组成)")
    public String getId() {
        return super.getId();
    }

    @Column
    @Schema(description = "通知类型ID")
    @NotBlank(groups = CreateGroup.class)
    private String type;

    @Column
    @Schema(description = "通知服务商ID")
    @NotBlank(groups = CreateGroup.class)
    private String provider;

    @Column
    @Schema(description = "模版名称")
    private String name;

    @Column
    @ColumnType(jdbcType = JDBCType.LONGVARCHAR,javaType = String.class)
    @JsonCodec
    @Schema(description = "模版内容(根据服务商不同而不同)")
    private Map<String,Object> template;

    @Column(updatable = false)
    @Schema(
        description = "创建者ID(只读)"
        , accessMode = Schema.AccessMode.READ_ONLY
    )
    private String creatorId;

    @Column(updatable = false)
    @DefaultValue(generator = Generators.CURRENT_TIME)
    @Schema(
        description = "创建时间(只读)"
        , accessMode = Schema.AccessMode.READ_ONLY
    )
    private Long createTime;

    @Column
    @ColumnType(jdbcType = JDBCType.LONGVARCHAR, javaType = String.class)
    @JsonCodec
    @Schema(description = "变量定义")
    private List<VariableDefinition> variableDefinitions;

    //绑定通知配置ID,表示模版必须使用指定的配置进行发送
    @Column(length = 64)
    @Schema(description = "通知配置ID")
    private String configId;

    @Column
    @Schema(description = "说明")
    private String description;

    public TemplateProperties toTemplateProperties() {<FILL_FUNCTION_BODY>}
}

        TemplateProperties properties = new TemplateProperties();
        properties.setId(getId());
        properties.setProvider(provider);
        properties.setType(type);
        properties.setConfigId(configId);
        properties.setName(name);
        properties.setTemplate(template);
        properties.setVariableDefinitions(variableDefinitions);
        properties.setDescription(description);
        return properties;
    
<no_super_class>