erp-platform/api/modules/Erp.Settings/Erp.Settings.Application.Contracts/SettingDefinitionWithGroupDto.cs

40 lines
1.2 KiB
C#
Raw Normal View History

2025-11-04 10:32:55 +00:00
using System;
using System.Collections.Generic;
2025-05-06 06:45:49 +00:00
using System.Linq;
2025-11-11 19:49:52 +00:00
namespace Erp.Settings;
2025-05-06 06:45:49 +00:00
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; }
2025-11-04 10:32:55 +00:00
public string Providers { get; set; }
2025-05-06 06:45:49 +00:00
// True if prodivers allow editing (U,T,G)
2025-11-04 10:32:55 +00:00
public bool IsEditable =>
Providers.Split(Constants.MultiValueDelimiter).Count() == 0
|| Providers.Split(Constants.MultiValueDelimiter).Any(a => a == "U" || a == "T" || a == "G");
2025-05-06 06:45:49 +00:00
}
2025-11-11 19:49:52 +00:00