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.
54 lines
1.3 KiB
54 lines
1.3 KiB
// ==========================================================================
|
|
// BooleanFieldProperties.cs
|
|
// Squidex Headless CMS
|
|
// ==========================================================================
|
|
// Copyright (c) Squidex Group
|
|
// All rights reserved.
|
|
// ==========================================================================
|
|
|
|
using System.Collections.Generic;
|
|
using Newtonsoft.Json.Linq;
|
|
using Squidex.Infrastructure;
|
|
|
|
namespace Squidex.Domain.Apps.Core.Schemas
|
|
{
|
|
[TypeName(nameof(BooleanField))]
|
|
public sealed class BooleanFieldProperties : FieldProperties
|
|
{
|
|
private BooleanFieldEditor editor;
|
|
private bool? defaultValue;
|
|
|
|
public bool? DefaultValue
|
|
{
|
|
get
|
|
{
|
|
return defaultValue;
|
|
}
|
|
set
|
|
{
|
|
ThrowIfFrozen();
|
|
|
|
defaultValue = value;
|
|
}
|
|
}
|
|
|
|
public BooleanFieldEditor Editor
|
|
{
|
|
get
|
|
{
|
|
return editor;
|
|
}
|
|
set
|
|
{
|
|
ThrowIfFrozen();
|
|
|
|
editor = value;
|
|
}
|
|
}
|
|
|
|
public override T Accept<T>(IFieldPropertiesVisitor<T> visitor)
|
|
{
|
|
return visitor.Visit(this);
|
|
}
|
|
}
|
|
}
|
|
|