class DimensionUserEntity extends GenericEntity<String> {

    @Comment("维度类型ID")
    @Column(name = "dimension_type_id", nullable = false, length = 32)
    @Schema(description = "维度类型ID,如: org,tenant")
    private String dimensionTypeId;

    @Comment("维度ID")
    @Column(name = "dimension_id", nullable = false, length = 64)
    @Schema(description = "维度ID")
    private String dimensionId;

    @Comment("维度名称")
    @Column(name = "dimension_name", nullable = false)
    @NotBlank
    @Schema(description = "维度名称")
    private String dimensionName;

    @Comment("用户ID")
    @Column(name = "user_id", nullable = false, length = 64)
    @Schema(description = "用户ID")
    @NotBlank
    private String userId;

    @Comment("用户名")
    @Column(name = "user_name", nullable = false)
    @Schema(description = "用户名")
    private String userName;

    @Comment("关系")
    @Column(length = 32)
    @Schema(description = "维度关系")
    private String relation;

    @Column(name = "relation_name")
    @Comment("关系名称")
    @Schema(description = "维度关系名称")
    private String relationName;

    @Column(name = "features")
    @ColumnType(jdbcType = JDBCType.NUMERIC, javaType = Long.class)
    @EnumCodec(toMask = true)
    @Schema(description = "其他功能")
    private DimensionUserFeature[] features;

    public void generateId() {<FILL_FUNCTION_BODY>}

    public boolean hasFeature(DimensionUserFeature feature) {
        return features != null && EnumDict.in(feature, features);
    }
}

        if (StringUtils.isEmpty(getId())) {
            String id = DigestUtils
                    .md5DigestAsHex(String.format("%s-%s-%s",
                                                  dimensionTypeId,
                                                  dimensionId, userId).getBytes());
            setId(id);
        }
    
<methods>public non-sealed void <init>() ,public transient java.lang.String toString(java.lang.String[]) ,public java.lang.String toString() <variables>private java.lang.String id