feat: 系统参数应用层与验证
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
using MediatR;
|
||||
using TakeoutSaaS.Application.App.SystemParameters.Dto;
|
||||
|
||||
namespace TakeoutSaaS.Application.App.SystemParameters.Commands;
|
||||
|
||||
/// <summary>
|
||||
/// 创建系统参数命令。
|
||||
/// </summary>
|
||||
public sealed class CreateSystemParameterCommand : IRequest<SystemParameterDto>
|
||||
{
|
||||
/// <summary>
|
||||
/// 参数键。
|
||||
/// </summary>
|
||||
public string Key { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 参数值。
|
||||
/// </summary>
|
||||
public string Value { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 描述。
|
||||
/// </summary>
|
||||
public string? Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 排序值。
|
||||
/// </summary>
|
||||
public int SortOrder { get; set; } = 100;
|
||||
|
||||
/// <summary>
|
||||
/// 是否启用。
|
||||
/// </summary>
|
||||
public bool IsEnabled { get; set; } = true;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using MediatR;
|
||||
|
||||
namespace TakeoutSaaS.Application.App.SystemParameters.Commands;
|
||||
|
||||
/// <summary>
|
||||
/// 删除系统参数命令。
|
||||
/// </summary>
|
||||
public sealed record DeleteSystemParameterCommand : IRequest<bool>
|
||||
{
|
||||
/// <summary>
|
||||
/// 参数 ID。
|
||||
/// </summary>
|
||||
public long ParameterId { get; init; }
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
using MediatR;
|
||||
using TakeoutSaaS.Application.App.SystemParameters.Dto;
|
||||
|
||||
namespace TakeoutSaaS.Application.App.SystemParameters.Commands;
|
||||
|
||||
/// <summary>
|
||||
/// 更新系统参数命令。
|
||||
/// </summary>
|
||||
public sealed record UpdateSystemParameterCommand : IRequest<SystemParameterDto?>
|
||||
{
|
||||
/// <summary>
|
||||
/// 参数 ID。
|
||||
/// </summary>
|
||||
public long ParameterId { 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; } = 100;
|
||||
|
||||
/// <summary>
|
||||
/// 是否启用。
|
||||
/// </summary>
|
||||
public bool IsEnabled { get; init; } = true;
|
||||
}
|
||||
Reference in New Issue
Block a user