DepartmentProject/DepartmentPortal/Security/SecurityBusinessLogic/ViewModels/EnviromentSettingViewModels.cs

34 lines
1.2 KiB
C#
Raw Normal View History

using ModuleTools.Attributes;
2021-03-30 22:34:31 +04:00
using ModuleTools.Enums;
using ModuleTools.ViewModels;
namespace SecurityBusinessLogic.ViewModels
{
/// <summary>
/// Список общих настроек системы
/// </summary>
public class EnviromentSettingListViewModel : ListViewModel<EnviromentSettingViewModel> { }
/// <summary>
/// Элемент общих настроек системы
/// </summary>
public class EnviromentSettingViewModel : ElementViewModel
{
[ViewModelOnListProperty("Ключ")]
2021-03-30 22:34:31 +04:00
[ViewModelOnElementProperty("Ключ", ControlType.ControlString, MustHaveValue = true, ReadOnly = true)]
[MapConfiguration("Key", AllowCopyWithoutRigth = false)]
public string Key { get; set; }
[ViewModelOnListProperty("Значение")]
2021-03-30 22:34:31 +04:00
[ViewModelOnElementProperty("Значение", ControlType.ControlString, MustHaveValue = true)]
[MapConfiguration("Value", AllowCopyWithoutRigth = false)]
public string Value { get; set; }
[ViewModelOnListProperty("Описание")]
2021-03-30 22:34:31 +04:00
[ViewModelOnElementProperty("Описание", ControlType.ControlText, 0, 200)]
[MapConfiguration("Description", AllowCopyWithoutRigth = false)]
public string Description { get; set; }
public override string ToString() => Key;
}
}