class AlarmLevelEntity extends GenericEntity<String> {

    @Column(length = 64)
    @Schema(description = "名称")
    private String name;

    @Column(name = "config")
    @ColumnType(jdbcType = JDBCType.LONGVARCHAR)
    @JsonCodec
    @Schema(description = "配置信息")
    private List<AlarmLevelInfo> levels;

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


    public static AlarmLevelEntity of(List<AlarmLevelInfo> levels){
        AlarmLevelEntity entity = new AlarmLevelEntity();
        entity.setLevels(levels);
        return entity;
    }

    public static AlarmLevelEntity defaultOf(List<AlarmLevelInfo> levels){<FILL_FUNCTION_BODY>}
}

        AlarmLevelEntity entity = new AlarmLevelEntity();
        entity.setId(AlarmLevelService.DEFAULT_ALARM_ID);
        entity.setName("default");
        entity.setDescription("default");
        entity.setLevels(levels);
        return entity;
    
<no_super_class>