|
|
|
@ -5,9 +5,9 @@ |
|
|
|
// All rights reserved. Licensed under the MIT license.
|
|
|
|
// ==========================================================================
|
|
|
|
|
|
|
|
using System.Collections.Generic; |
|
|
|
using Squidex.Domain.Apps.Core.Schemas; |
|
|
|
using Squidex.Domain.Apps.Entities.Schemas.Commands; |
|
|
|
using Squidex.Infrastructure.Reflection; |
|
|
|
|
|
|
|
namespace Squidex.Areas.Api.Controllers.Schemas.Models |
|
|
|
{ |
|
|
|
@ -16,16 +16,28 @@ namespace Squidex.Areas.Api.Controllers.Schemas.Models |
|
|
|
/// <summary>
|
|
|
|
/// The name of fields that are used in content lists.
|
|
|
|
/// </summary>
|
|
|
|
public FieldNames? FieldsInLists { get; set; } |
|
|
|
public List<string>? FieldsInLists { get; set; } |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// The name of fields that are used in content references.
|
|
|
|
/// </summary>
|
|
|
|
public FieldNames? FieldsInReferences { get; set; } |
|
|
|
public List<string>? FieldsInReferences { get; set; } |
|
|
|
|
|
|
|
public ConfigureUIFields ToCommand() |
|
|
|
{ |
|
|
|
return SimpleMapper.Map(this, new ConfigureUIFields()); |
|
|
|
var command = new ConfigureUIFields(); |
|
|
|
|
|
|
|
if (FieldsInLists != null) |
|
|
|
{ |
|
|
|
command.FieldsInLists = new FieldNames(FieldsInLists); |
|
|
|
} |
|
|
|
|
|
|
|
if (FieldsInReferences != null) |
|
|
|
{ |
|
|
|
command.FieldsInReferences = new FieldNames(FieldsInReferences); |
|
|
|
} |
|
|
|
|
|
|
|
return command; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|