mirror of https://github.com/Squidex/squidex.git
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.
40 lines
1.2 KiB
40 lines
1.2 KiB
// ==========================================================================
|
|
// Squidex Headless CMS
|
|
// ==========================================================================
|
|
// Copyright (c) Squidex UG (haftungsbeschränkt)
|
|
// All rights reserved. Licensed under the MIT license.
|
|
// ==========================================================================
|
|
|
|
using System.Collections.Immutable;
|
|
using Squidex.Infrastructure;
|
|
|
|
namespace Squidex.Domain.Apps.Core.Schemas
|
|
{
|
|
[TypeName(nameof(StringField))]
|
|
public sealed class StringFieldProperties : FieldProperties
|
|
{
|
|
public int? MinLength { get; set; }
|
|
|
|
public int? MaxLength { get; set; }
|
|
|
|
public string DefaultValue { get; set; }
|
|
|
|
public string Pattern { get; set; }
|
|
|
|
public string PatternMessage { get; set; }
|
|
|
|
public ImmutableList<string> AllowedValues { get; set; }
|
|
|
|
public StringFieldEditor Editor { get; set; }
|
|
|
|
public override T Accept<T>(IFieldPropertiesVisitor<T> visitor)
|
|
{
|
|
return visitor.Visit(this);
|
|
}
|
|
|
|
public override Field CreateField(long id, string name, Partitioning partitioning)
|
|
{
|
|
return new StringField(id, name, partitioning, this);
|
|
}
|
|
}
|
|
}
|
|
|