2024-07-04 11:02:45 +05:00
|
|
|
using AsbCloudApp.Data.SAUB;
|
2022-11-18 12:58:53 +05:00
|
|
|
using System;
|
2021-04-23 10:21:25 +05:00
|
|
|
using System.Collections.Generic;
|
2022-06-10 17:36:03 +05:00
|
|
|
using System.Threading;
|
|
|
|
using System.Threading.Tasks;
|
2021-04-23 10:21:25 +05:00
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
namespace AsbCloudApp.Services;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// сервис пользователей телеметрии
|
|
|
|
/// </summary>
|
|
|
|
public interface ITelemetryUserService
|
2021-04-23 10:21:25 +05:00
|
|
|
{
|
2022-08-09 11:10:01 +05:00
|
|
|
/// <summary>
|
2024-08-19 10:01:07 +05:00
|
|
|
/// get user by ids
|
2022-08-09 11:10:01 +05:00
|
|
|
/// </summary>
|
2024-08-19 10:01:07 +05:00
|
|
|
/// <param name="idTelemetry"></param>
|
|
|
|
/// <param name="idUser"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
TelemetryUserDto? GetOrDefault(int idTelemetry, int idUser);
|
2022-11-18 12:58:53 +05:00
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
/// <summary>
|
|
|
|
/// get users by id telemetry and predicate
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="idTelemetry"></param>
|
|
|
|
/// <param name="predicate"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
IEnumerable<TelemetryUserDto> GetUsers(int idTelemetry, Func<TelemetryUserDto, bool>? predicate = default);
|
2022-11-18 12:58:53 +05:00
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
/// <summary>
|
|
|
|
/// получает и сохраняет/обновляет список пользователей панели оператора
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="uid"></param>
|
|
|
|
/// <param name="dtos"></param>
|
|
|
|
/// <param name="token"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
Task UpsertAsync(string uid, IEnumerable<TelemetryUserDto> dtos, CancellationToken token = default);
|
2021-04-23 10:21:25 +05:00
|
|
|
}
|