// ==========================================================================
// NumberFieldPropertiesDto.cs
// Squidex Headless CMS
// ==========================================================================
// Copyright (c) Squidex Group
// All rights reserved.
// ==========================================================================
using NJsonSchema.Annotations;
using Squidex.Core.Schemas;
using Squidex.Infrastructure.Reflection;
namespace Squidex.Controllers.Api.Schemas.Models
{
[JsonSchema("Number")]
public sealed class NumberFieldPropertiesDto : FieldPropertiesDto
{
///
/// The default value for the field value.
///
public double? DefaultValue { get; set; }
///
/// The maximum allowed value for the field value.
///
public double? MaxValue { get; set; }
///
/// The minimum allowed value for the field value.
///
public double? MinValue { get; set; }
///
/// The allowed values for the field value.
///
public double[] AllowedValues { get; set; }
public override FieldProperties ToProperties()
{
return SimpleMapper.Map(this, new NumberFieldProperties());
}
}
}