diff --git a/src/VirtoCommerce.Xapi.Core/Models/Facets/FacetResult.cs b/src/VirtoCommerce.Xapi.Core/Models/Facets/FacetResult.cs index e3ffe7a..7c58185 100644 --- a/src/VirtoCommerce.Xapi.Core/Models/Facets/FacetResult.cs +++ b/src/VirtoCommerce.Xapi.Core/Models/Facets/FacetResult.cs @@ -10,6 +10,7 @@ protected FacetResult(FacetTypes facetType) public string Name { get; set; } public string Label { get; set; } public string DisplayStyle { get; set; } + public int Order { get; set; } public FacetTypes FacetType { get; private set; } } } diff --git a/src/VirtoCommerce.Xapi.Core/Schemas/Facets/FacetInterface.cs b/src/VirtoCommerce.Xapi.Core/Schemas/Facets/FacetInterface.cs index 2529f04..6b9e4b2 100644 --- a/src/VirtoCommerce.Xapi.Core/Schemas/Facets/FacetInterface.cs +++ b/src/VirtoCommerce.Xapi.Core/Schemas/Facets/FacetInterface.cs @@ -9,8 +9,9 @@ public FacetInterface() { Name = "Facet"; - Field(d => d.Name, nullable: false).Description("The key/name of the facet."); - Field(d => d.Label, nullable: false).Description("Localized name of the facet."); + Field(x => x.Name, nullable: false).Description("The key/name of the facet."); + Field(x => x.Label, nullable: false).Description("Localized name of the facet."); + Field(x => x.Order, nullable: true).Description("Display order of the facet."); Field>("FacetType").Description("Three facet types: Terms, Range, and Filter"); } } diff --git a/src/VirtoCommerce.Xapi.Core/Schemas/Facets/FilterFacetResultType.cs b/src/VirtoCommerce.Xapi.Core/Schemas/Facets/FilterFacetResultType.cs index 9afc3b3..7bad5ea 100644 --- a/src/VirtoCommerce.Xapi.Core/Schemas/Facets/FilterFacetResultType.cs +++ b/src/VirtoCommerce.Xapi.Core/Schemas/Facets/FilterFacetResultType.cs @@ -11,6 +11,7 @@ public FilterFacetResultType() Field(d => d.Name, nullable: false).Description("The key/name of the facet."); Field(d => d.Label, nullable: false).Description("Localized name of the facet."); + Field(x => x.Order, nullable: true).Description("Display order of the facet."); Field>("FacetType") .Description("The three types of facets. Terms, Range, Filter"); Field(d => d.Count, nullable: false).Description("The number of products matching the value specified in the filter facet expression"); diff --git a/src/VirtoCommerce.Xapi.Core/Schemas/Facets/RangeFacetResultType.cs b/src/VirtoCommerce.Xapi.Core/Schemas/Facets/RangeFacetResultType.cs index 3eb252a..bb4e185 100644 --- a/src/VirtoCommerce.Xapi.Core/Schemas/Facets/RangeFacetResultType.cs +++ b/src/VirtoCommerce.Xapi.Core/Schemas/Facets/RangeFacetResultType.cs @@ -11,6 +11,7 @@ public RangeFacetResultType() Field(d => d.Name, nullable: false).Description("The key/name of the facet."); Field(d => d.Label, nullable: false).Description("Localized name of the facet."); + Field(x => x.Order, nullable: true).Description("Display order of the facet."); Field>("FacetType") .Description("The three types of facets. Terms, Range, Filter"); diff --git a/src/VirtoCommerce.Xapi.Core/Schemas/Facets/TermFacetResultType.cs b/src/VirtoCommerce.Xapi.Core/Schemas/Facets/TermFacetResultType.cs index 1de9084..4d6be7d 100644 --- a/src/VirtoCommerce.Xapi.Core/Schemas/Facets/TermFacetResultType.cs +++ b/src/VirtoCommerce.Xapi.Core/Schemas/Facets/TermFacetResultType.cs @@ -11,6 +11,7 @@ public TermFacetResultType() Field(d => d.Name, nullable: false).Description("The key/name of the facet."); Field(d => d.Label, nullable: false).Description("Localized name of the facet."); + Field(x => x.Order, nullable: true).Description("Display order of the facet."); Field>("FacetType") .Description("Three facet types: Terms, Range, and Filter"); Field>>>("Terms")