Skip to content

Category

// RB2 Core Connect
using CoreConnect.Commerce.Core;
using HotChocolate;
using HotChocolate.Types;
namespace CoreConnect.Commerce.Catalog;
public class Category : Node
{
/// <summary>
/// The ID of the Category.
/// </summary>
public required string Id { get; set; }
/// <summary>
/// The Key of the Category.
/// </summary>
public string? Key { get; set; }
/// <summary>
/// The Name of the Category.
/// </summary>
public required string Name { get; set; }
/// <summary>
/// The Slug of the Category.
/// </summary>
public required string Slug { get; set; }
/// <summary>
/// The Path of the Category.
/// </summary>
public required string Path { get; set; }
/// <summary>
/// The Description of the Category.
/// </summary>
public required string Description { get; set; }
/// <summary>
/// The SEO of the Category.
/// </summary>
public required Seo Seo { get; set; }
public IEnumerable<Breadcrumbs>? Breadcrumbs { get; set; }
/// <summary>
/// The Sub Categories of the Category.
/// </summary>
public required IEnumerable<Category> Children { get; set; }
/// <summary>
/// The parent category
/// </summary>
public Category? Parent { get; set; }
/// <summary>
/// The localized paths
/// </summary>
[GraphQLType(typeof(AnyType))]
public Dictionary<string, object>? LocalizedPaths { get; set; }
/// <summary>
/// The localized slugs
/// </summary>
[GraphQLType(typeof(AnyType))]
public Dictionary<string, object>? LocalizedSlugs { get; set; }
/// <summary>
/// The Assets of the Category.
/// </summary>
public IEnumerable<Asset>? Assets { get; set; }
public int? ProductCount { get; set; }
/// <summary>
/// Gets or sets the version.
/// </summary>
/// <value>
/// The version.
/// </value>
public long Version { get; set; }
/// <summary>
/// Decimal value between 0 and 1.
/// Client apps can use this value for ordering Categories
/// within the same level in the category tree.
/// </summary>
public string? OrderHint { get; set; }
}
public class Asset
{
public required string Id { get; set; }
public required string Key { set; get; }
public IEnumerable<AssetSource>? Sources { get; set; }
}
public class AssetSource
{
public required string Uri { get; set; }
public required string Key { get; set; }
}