Initial commit

This commit is contained in:
2026-07-13 09:25:40 +07:00
parent c08ff54676
commit bccfb156d7
1938 changed files with 641646 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
namespace RobotNet10.CustomConfiguration.Models;
/// <summary>
/// Model đại diện cho một file config
/// ConfigType là tên định danh duy nhất (ví dụ: MQTTBrokerConfig)
/// </summary>
public class ConfigFile
{
public Guid Id { get; set; }
public string ConfigType { get; set; } = string.Empty; // Tên định danh duy nhất (ví dụ: MQTTBrokerConfig)
public string FilePath { get; set; } = string.Empty; // Path trong StorageManager
public List<ConfigVariable> Variables { get; set; } = [];
public DateTime CreatedAt { get; set; }
public DateTime UpdatedAt { get; set; }
public string? Description { get; set; }
}

View File

@@ -0,0 +1,14 @@
namespace RobotNet10.CustomConfiguration.Models;
/// <summary>
/// Metadata của config file (không bao gồm nội dung variables)
/// </summary>
public class ConfigFileMetadata
{
public Guid Id { get; set; }
public string ConfigType { get; set; } = string.Empty; // Tên định danh duy nhất
public DateTime CreatedAt { get; set; }
public DateTime UpdatedAt { get; set; }
public string? Description { get; set; }
}

View File

@@ -0,0 +1,18 @@
namespace RobotNet10.CustomConfiguration.Models;
/// <summary>
/// Model đại diện cho một variable trong config
/// </summary>
public class ConfigVariable
{
public string Name { get; set; } = string.Empty;
public ConfigVariableType Type { get; set; }
public object? Value { get; set; }
// Optional properties
public double? Min { get; set; } // Cho int và double
public double? Max { get; set; } // Cho int và double
public string Roles { get; set; } = string.Empty; // Roles string (có thể empty)
public List<string>? EnumValues { get; set; } // Cho type Enum - danh sách các giá trị cho phép
}

View File

@@ -0,0 +1,16 @@
namespace RobotNet10.CustomConfiguration.Models;
/// <summary>
/// Enum định nghĩa các loại variable type được hỗ trợ
/// </summary>
public enum ConfigVariableType
{
String,
Int,
Double,
Bool,
Object, // JSON object (Dictionary<string, object>)
Array, // JSON array (List<object>)
Enum // Enum với các giá trị được định nghĩa trong EnumValues
}