mirror of https://github.com/Squidex/squidex.git
5 changed files with 95 additions and 0 deletions
@ -0,0 +1,38 @@ |
|||
// ==========================================================================
|
|||
// BooleanFieldPropertiesDto.cs
|
|||
// Squidex Headless CMS
|
|||
// ==========================================================================
|
|||
// Copyright (c) Squidex Group
|
|||
// All rights reserved.
|
|||
// ==========================================================================
|
|||
|
|||
using Newtonsoft.Json; |
|||
using Newtonsoft.Json.Converters; |
|||
using NJsonSchema.Annotations; |
|||
using Squidex.Core.Schemas; |
|||
using Squidex.Infrastructure.Reflection; |
|||
|
|||
namespace Squidex.Controllers.Api.Schemas.Models |
|||
{ |
|||
[JsonSchema("boolean")] |
|||
public sealed class BooleanFieldPropertiesDto : FieldPropertiesDto |
|||
{ |
|||
/// <summary>
|
|||
/// The default value for the field value.
|
|||
/// </summary>
|
|||
public bool? DefaultValue { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// The editor that is used to manage this field.
|
|||
/// </summary>
|
|||
[JsonConverter(typeof(StringEnumConverter))] |
|||
public BooleanFieldEditor Editor { get; set; } |
|||
|
|||
public override FieldProperties ToProperties() |
|||
{ |
|||
var result = SimpleMapper.Map(this, new BooleanFieldProperties()); |
|||
|
|||
return result; |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue