Initial commit

This commit is contained in:
2026-07-03 16:31:37 +07:00
commit 899c7c637d
1939 changed files with 641750 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
namespace RobotNet10.CustomConfiguration.DTOs;
/// <summary>
/// DTO cho ConfigFile (response)
/// </summary>
public class ConfigFileDto
{
public Guid Id { get; set; }
public string ConfigType { get; set; } = string.Empty; // Tên định danh duy nhất
public List<ConfigVariableDto> 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.DTOs;
/// <summary>
/// DTO cho ConfigFileMetadata (list view)
/// </summary>
public class ConfigFileMetadataDto
{
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.DTOs;
/// <summary>
/// DTO cho ConfigVariable
/// </summary>
public class ConfigVariableDto
{
public string Name { get; set; } = string.Empty;
public string Type { get; set; } = string.Empty; // "string", "int", "double", "bool", "object", "array", "enum"
public object? Value { get; set; }
// Optional properties
public double? Min { get; set; } // Cho int và double (0 nếu không dùng)
public double? Max { get; set; } // Cho int và double (0 nếu không dùng)
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,14 @@
using RobotNet10.CustomConfiguration.DTOs;
namespace RobotNet10.CustomConfiguration.DTOs.Requests;
/// <summary>
/// Request DTO cho tạo config mới
/// </summary>
public class CreateConfigRequest
{
public string ConfigType { get; set; } = string.Empty; // Tên định danh duy nhất (ví dụ: MQTTBrokerConfig)
public List<ConfigVariableDto> Variables { get; set; } = [];
public string? Description { get; set; }
}

View File

@@ -0,0 +1,13 @@
using RobotNet10.CustomConfiguration.DTOs;
namespace RobotNet10.CustomConfiguration.DTOs.Requests;
/// <summary>
/// Request DTO cho update config
/// </summary>
public class UpdateConfigRequest
{
public List<ConfigVariableDto>? Variables { get; set; }
public string? Description { get; set; }
}

View File

@@ -0,0 +1,14 @@
namespace RobotNet10.CustomConfiguration.DTOs.Requests;
/// <summary>
/// Request DTO cho update variable value
/// </summary>
public class UpdateVariableRequest
{
public object? Value { get; set; }
}