feat: 系统参数应用层与验证
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using TakeoutSaaS.Domain.SystemParameters.Entities;
|
||||
|
||||
namespace TakeoutSaaS.Domain.SystemParameters.Repositories;
|
||||
|
||||
/// <summary>
|
||||
/// 系统参数仓储接口:提供基础 CRUD 与查询能力。
|
||||
/// </summary>
|
||||
public interface ISystemParameterRepository
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据标识获取系统参数。
|
||||
/// </summary>
|
||||
Task<SystemParameter?> FindByIdAsync(long id, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 根据键获取系统参数(当前租户)。
|
||||
/// </summary>
|
||||
Task<SystemParameter?> FindByKeyAsync(string key, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 查询系统参数列表。
|
||||
/// </summary>
|
||||
Task<IReadOnlyList<SystemParameter>> SearchAsync(string? keyword, bool? isEnabled, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 新增系统参数。
|
||||
/// </summary>
|
||||
Task AddAsync(SystemParameter parameter, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 删除系统参数。
|
||||
/// </summary>
|
||||
Task RemoveAsync(SystemParameter parameter, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 更新系统参数。
|
||||
/// </summary>
|
||||
Task UpdateAsync(SystemParameter parameter, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 持久化更改。
|
||||
/// </summary>
|
||||
Task SaveChangesAsync(CancellationToken cancellationToken = default);
|
||||
}
|
||||
Reference in New Issue
Block a user