38 lines
1.2 KiB
C#
38 lines
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
namespace Kurs.Settings;
|
|
|
|
public class MainGroupedSettingDto
|
|
{
|
|
public string GroupName { get; set; }
|
|
public List<SubGroupedSettingDto> SubGroups { get; set; }
|
|
}
|
|
public class SubGroupedSettingDto
|
|
{
|
|
public string SubGroupName { get; set; }
|
|
public List<SettingDefinitionWithGroupDto> Settings { get; set; }
|
|
}
|
|
|
|
public class SettingDefinitionWithGroupDto
|
|
{
|
|
public string Code { get; set; }
|
|
public string Name { get; set; }
|
|
public string Description { get; set; }
|
|
public string Value { get; set; }
|
|
public bool ValueBool { get; set; }
|
|
public Dictionary<string, object> Properties { get; set; }
|
|
|
|
public string MainGroup { get; set; }
|
|
public string SubGroup { get; set; }
|
|
public string DataType { get; set; }
|
|
public Dictionary<string, string> SelectOptions { get; set; }
|
|
|
|
public string FormName { get; set; }
|
|
public string Providers { get; set; }
|
|
// True if prodivers allow editing (U,T,G)
|
|
public bool IsEditable =>
|
|
Providers.Split(Constants.MultiValueDelimiter).Count() == 0
|
|
|| Providers.Split(Constants.MultiValueDelimiter).Any(a => a == "U" || a == "T" || a == "G");
|
|
}
|