diff --git a/server/internal/adapter/gql/gqlmodel/convert_schema.go b/server/internal/adapter/gql/gqlmodel/convert_schema.go index 7a1cdef0b..3948c193c 100644 --- a/server/internal/adapter/gql/gqlmodel/convert_schema.go +++ b/server/internal/adapter/gql/gqlmodel/convert_schema.go @@ -268,10 +268,10 @@ func ToSchemaFieldTypeProperty(tp *schema.TypeProperty, dv *value.Multiple, mult v, _ = dv.First().ValueNumber() } } - res = &SchemaFieldInteger{ + res = &SchemaFieldNumber{ DefaultValue: v, - Min: util.ToPtrIfNotEmpty(int(lo.FromPtr(f.Min()))), - Max: util.ToPtrIfNotEmpty(int(lo.FromPtr(f.Max()))), + Min: util.ToPtrIfNotEmpty(float64(lo.FromPtr(f.Min()))), + Max: util.ToPtrIfNotEmpty(float64(lo.FromPtr(f.Max()))), } }, Integer: func(f *schema.FieldInteger) { diff --git a/server/internal/adapter/gql/gqlmodel/convert_value.go b/server/internal/adapter/gql/gqlmodel/convert_value.go index 0af3e0331..00c6f69df 100644 --- a/server/internal/adapter/gql/gqlmodel/convert_value.go +++ b/server/internal/adapter/gql/gqlmodel/convert_value.go @@ -25,7 +25,7 @@ func ToValueType(t value.Type) SchemaFieldType { case value.TypeSelect: return SchemaFieldTypeSelect case value.TypeNumber: - return SchemaFieldTypeInteger + return SchemaFieldTypeNumber case value.TypeInteger: return SchemaFieldTypeInteger case value.TypeReference: @@ -69,6 +69,8 @@ func FromValueType(t SchemaFieldType) value.Type { return value.TypeCheckbox case SchemaFieldTypeInteger: return value.TypeInteger + case SchemaFieldTypeNumber: + return value.TypeNumber case SchemaFieldTypeReference: return value.TypeReference case SchemaFieldTypeURL: