Headless CMS and Content Managment Hub
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

34 lines
963 B

// ==========================================================================
// Squidex Headless CMS
// ==========================================================================
// Copyright (c) Squidex UG (haftungsbeschraenkt)
// All rights reserved. Licensed under the MIT license.
// ==========================================================================
using Squidex.Infrastructure.States;
using Squidex.Infrastructure.Validation;
using Squidex.Web;
namespace Squidex.Areas.Api.Controllers.Schemas.Models;
[OpenApiRequest]
public sealed class CreateIndexDto
{
/// <summary>
/// The index fields.
/// </summary>
[LocalizedRequired]
public List<IndexFieldDto> Fields { get; set; }
public IndexDefinition ToIndex()
{
var result = new IndexDefinition();
foreach (var field in Fields)
{
result.Add(new IndexField(field.Name, field.Order));
}
return result;
}
}