feat: 系统参数应用层与验证

This commit is contained in:
2025-12-02 12:53:06 +08:00
parent dd15a88ff4
commit 3b2b376787
18 changed files with 771 additions and 0 deletions

View File

@@ -0,0 +1,57 @@
using System.Text.Json.Serialization;
using TakeoutSaaS.Shared.Abstractions.Serialization;
namespace TakeoutSaaS.Application.App.SystemParameters.Dto;
/// <summary>
/// 系统参数 DTO。
/// </summary>
public sealed class SystemParameterDto
{
/// <summary>
/// 参数 ID。
/// </summary>
[JsonConverter(typeof(SnowflakeIdJsonConverter))]
public long Id { get; init; }
/// <summary>
/// 租户 ID。
/// </summary>
[JsonConverter(typeof(SnowflakeIdJsonConverter))]
public long TenantId { get; init; }
/// <summary>
/// 参数键。
/// </summary>
public string Key { get; init; } = string.Empty;
/// <summary>
/// 参数值。
/// </summary>
public string Value { get; init; } = string.Empty;
/// <summary>
/// 描述。
/// </summary>
public string? Description { get; init; }
/// <summary>
/// 排序值。
/// </summary>
public int SortOrder { get; init; }
/// <summary>
/// 是否启用。
/// </summary>
public bool IsEnabled { get; init; }
/// <summary>
/// 创建时间。
/// </summary>
public DateTime CreatedAt { get; init; }
/// <summary>
/// 最近更新时间。
/// </summary>
public DateTime? UpdatedAt { get; init; }
}