class RoleEntity extends GenericEntity<String> implements RecordCreationEntity {

    @Column(length = 64)
    @Length(min = 1, max = 64)
    @Schema(description = "名称")
    private String name;

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

    @Column(length = 32)
    @EnumCodec
    @ColumnType(javaType = String.class)
    @Schema(description = "状态。enabled为正常，disabled为已禁用")
    @DefaultValue("enabled")
    private RoleState state;

    @Column(length = 64)
    @Schema(description = "所属分组")
    @DefaultValue(RoleGroupService.DEFAULT_GROUP_ID)
    private String groupId;

    @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;

    public Dimension toDimension() {<FILL_FUNCTION_BODY>}
}

        SimpleDimension dimension = new SimpleDimension();
        dimension.setId(getId());
        dimension.setName(name);
        dimension.setType(DefaultDimensionType.role);
        return dimension;
    
<no_super_class>