You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
107 lines
3.9 KiB
107 lines
3.9 KiB
using CellularManagement.Domain.Entities.Device;
|
|
using CellularManagement.Domain.Repositories.Base;
|
|
|
|
namespace CellularManagement.Domain.Repositories.Device;
|
|
|
|
/// <summary>
|
|
/// 蜂窝设备运行时状态仓储接口
|
|
/// 组合命令和查询仓储接口
|
|
/// </summary>
|
|
public interface ICellularDeviceRuntimeRepository : IBaseRepository<CellularDeviceRuntime>
|
|
{
|
|
/// <summary>
|
|
/// 添加设备运行时状态
|
|
/// </summary>
|
|
Task<CellularDeviceRuntime> AddRuntimeAsync(CellularDeviceRuntime runtime, CancellationToken cancellationToken = default);
|
|
|
|
/// <summary>
|
|
/// 更新设备运行时状态
|
|
/// </summary>
|
|
void UpdateRuntime(CellularDeviceRuntime runtime);
|
|
|
|
/// <summary>
|
|
/// 删除设备运行时状态
|
|
/// </summary>
|
|
Task DeleteRuntimeAsync(string id, CancellationToken cancellationToken = default);
|
|
|
|
/// <summary>
|
|
/// 获取所有设备运行时状态
|
|
/// </summary>
|
|
Task<IList<CellularDeviceRuntime>> GetAllRuntimesAsync(CancellationToken cancellationToken = default);
|
|
|
|
/// <summary>
|
|
/// 根据ID获取设备运行时状态
|
|
/// </summary>
|
|
Task<CellularDeviceRuntime?> GetRuntimeByIdAsync(string id, CancellationToken cancellationToken = default);
|
|
|
|
/// <summary>
|
|
/// 根据设备编号获取运行时状态
|
|
/// </summary>
|
|
Task<CellularDeviceRuntime?> GetRuntimeByDeviceCodeAsync(string deviceCode, CancellationToken cancellationToken = default);
|
|
|
|
/// <summary>
|
|
/// 根据设备编号获取运行时状态(包含设备信息)
|
|
/// </summary>
|
|
Task<CellularDeviceRuntime?> GetRuntimeByDeviceCodeWithDeviceAsync(string deviceCode, CancellationToken cancellationToken = default);
|
|
|
|
/// <summary>
|
|
/// 根据运行编码获取运行时状态
|
|
/// </summary>
|
|
Task<CellularDeviceRuntime?> GetRuntimeByRuntimeCodeAsync(string runtimeCode, CancellationToken cancellationToken = default);
|
|
|
|
/// <summary>
|
|
/// 获取正在运行的设备运行时状态
|
|
/// </summary>
|
|
Task<IList<CellularDeviceRuntime>> GetRunningRuntimesAsync(CancellationToken cancellationToken = default);
|
|
|
|
/// <summary>
|
|
/// 根据运行时状态获取设备运行时状态
|
|
/// </summary>
|
|
Task<IList<CellularDeviceRuntime>> GetRuntimesByStatusAsync(DeviceRuntimeStatus runtimeStatus, CancellationToken cancellationToken = default);
|
|
|
|
/// <summary>
|
|
/// 根据网络栈配置编号获取运行时状态
|
|
/// </summary>
|
|
Task<IList<CellularDeviceRuntime>> GetRuntimesByNetworkStackCodeAsync(string networkStackCode, CancellationToken cancellationToken = default);
|
|
|
|
/// <summary>
|
|
/// 搜索设备运行时状态
|
|
/// </summary>
|
|
Task<IList<CellularDeviceRuntime>> SearchRuntimesAsync(
|
|
string? keyword,
|
|
CancellationToken cancellationToken = default);
|
|
|
|
/// <summary>
|
|
/// 搜索设备运行时状态(分页)
|
|
/// </summary>
|
|
Task<(int TotalCount, IList<CellularDeviceRuntime> Items)> SearchRuntimesAsync(
|
|
string? keyword,
|
|
int pageNumber,
|
|
int pageSize,
|
|
CancellationToken cancellationToken = default);
|
|
|
|
/// <summary>
|
|
/// 检查设备运行时状态是否存在
|
|
/// </summary>
|
|
Task<bool> ExistsAsync(string id, CancellationToken cancellationToken = default);
|
|
|
|
/// <summary>
|
|
/// 检查设备编号是否有运行时状态
|
|
/// </summary>
|
|
Task<bool> DeviceCodeExistsAsync(string deviceCode, CancellationToken cancellationToken = default);
|
|
|
|
/// <summary>
|
|
/// 检查运行编码是否存在
|
|
/// </summary>
|
|
Task<bool> RuntimeCodeExistsAsync(string runtimeCode, CancellationToken cancellationToken = default);
|
|
|
|
/// <summary>
|
|
/// 获取运行时状态总数
|
|
/// </summary>
|
|
Task<int> GetRuntimeCountAsync(CancellationToken cancellationToken = default);
|
|
|
|
/// <summary>
|
|
/// 根据设备编号删除运行时状态
|
|
/// </summary>
|
|
Task DeleteRuntimeByDeviceCodeAsync(string deviceCode, CancellationToken cancellationToken = default);
|
|
}
|