//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using System.Runtime.Serialization;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
namespace Microsoft.SqlTools.ServiceLayer.TableDesigner.Contracts
{
///
/// Represents a component/property in the table designer
///
public class DesignerDataPropertyInfo
{
///
/// The name of the property
///
public string PropertyName { get; set; }
///
/// The description of the property
///
public string Description { get; set; }
///
/// The component type of the property
///
public DesignerComponentType ComponentType { get; set; }
///
/// The name of the group the property will be placed in whe displayed in
///
public string Group { get; set; }
///
/// The name of the group the property will be placed in whe displayed in
///
public bool ShowInPropertiesView { get; set; } = true;
///
/// The properties of component
///
public ComponentPropertiesBase ComponentProperties { get; set; }
}
[JsonConverter(typeof(StringEnumConverter))]
public enum DesignerComponentType
{
[EnumMember(Value = "checkbox")]
Checkbox,
[EnumMember(Value = "dropdown")]
Dropdown,
[EnumMember(Value = "input")]
Input,
[EnumMember(Value = "table")]
Table
}
}