erp-platform/api/modules/Erp.Settings/Erp.Settings.Application.Contracts/SettingDefinitionWithGroupDto.cs
2025-11-11 22:49:52 +03:00

39 lines
1.2 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
namespace Erp.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");
}