// ==========================================================================
// GeolocationPropertiesDto.cs
// Squidex Headless CMS
// ==========================================================================
// Copyright (c) Squidex Group
// All rights reserved.
// ==========================================================================
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using NJsonSchema.Annotations;
using Squidex.Domain.Apps.Core.Schemas;
using Squidex.Infrastructure.Reflection;
namespace Squidex.Controllers.Api.Schemas.Models.Fields
{
[JsonSchema("Geolocation")]
public sealed class GeolocationFieldPropertiesDto : FieldPropertiesDto
{
///
/// The default value for the field value.
///
public bool? DefaultValue { get; set; }
///
/// The editor that is used to manage this field.
///
[JsonConverter(typeof(StringEnumConverter))]
public GeolocationFieldEditor Editor { get; set; }
public override FieldProperties ToProperties()
{
var result = SimpleMapper.Map(this, new GeolocationFieldProperties());
return result;
}
}
}