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.
 
 
 
 
 

43 lines
1.3 KiB

// ==========================================================================
// 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
{
/// <summary>
/// The default value for the field value.
/// </summary>
public double? DefaultValue { get; set; }
/// <summary>
/// The maximum allowed value for the field value.
/// </summary>
public double? MaxValue { get; set; }
/// <summary>
/// The minimum allowed value for the field value.
/// </summary>
public double? MinValue { get; set; }
/// <summary>
/// The allowed values for the field value.
/// </summary>
public double[] AllowedValues { get; set; }
public override FieldProperties ToProperties()
{
return SimpleMapper.Map(this, new NumberFieldProperties());
}
}
}