IMapNodeRepository.cs
1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Rcs.Domain.Entities;
namespace Rcs.Domain.Repositories
{
/// <summary>
/// 地图节点仓储接口
/// </summary>
public interface IMapNodeRepository : IRepository<MapNode>
{
/// <summary>
/// 根据地图ID获取所有节点
/// </summary>
Task<IEnumerable<MapNode>> GetByMapIdAsync(
Guid mapId,
CancellationToken cancellationToken = default);
/// <summary>
/// 根据节点编码获取节点
/// </summary>
Task<MapNode?> GetByNodeCodeAsync(
string nodeCode,
CancellationToken cancellationToken = default);
/// <summary>
/// 根据地图ID和节点编码获取节点
/// </summary>
Task<MapNode?> GetByMapIdAndNodeCodeAsync(
Guid mapId,
string nodeCode,
CancellationToken cancellationToken = default);
/// <summary>
/// 根据节点类型获取节点列表
/// </summary>
Task<IEnumerable<MapNode>> GetByTypeAsync(
MapNodeTYPE type,
CancellationToken cancellationToken = default);
/// <summary>
/// 根据地图ID和节点类型获取节点列表
/// </summary>
Task<IEnumerable<MapNode>> GetByMapIdAndTypeAsync(
Guid mapId,
MapNodeTYPE type,
CancellationToken cancellationToken = default);
/// <summary>
/// 获取充电点列表
/// </summary>
Task<IEnumerable<MapNode>> GetChargerNodesAsync(
Guid mapId,
CancellationToken cancellationToken = default);
/// <summary>
/// 获取停车位列表
/// </summary>
Task<IEnumerable<MapNode>> GetParkingNodesAsync(
Guid mapId,
CancellationToken cancellationToken = default);
}
}