42 lines
1.2 KiB
C#
42 lines
1.2 KiB
C#
using RobotNet10.MapEditor.Shared.DTOs.Requests;
|
|
using RobotNet10.MapManager.Data;
|
|
|
|
namespace RobotNet10.MapManager.Services;
|
|
|
|
/// <summary>
|
|
/// Service for managing edges
|
|
/// </summary>
|
|
public interface IEdgeService
|
|
{
|
|
/// <summary>
|
|
/// Create edge with automatic node detection/creation
|
|
/// </summary>
|
|
Task<Edge> CreateAsync(CreateEdgeRequest request);
|
|
|
|
/// <summary>
|
|
/// Get all edges for a layout level
|
|
/// </summary>
|
|
Task<List<Edge>> GetEdgesByLevelAsync(Guid layoutLevelId, bool includeNodes = true, bool includeVehicleProperties = true);
|
|
|
|
/// <summary>
|
|
/// Get edge by ID
|
|
/// </summary>
|
|
Task<Edge?> GetByIdAsync(Guid edgeId, bool includeNodes = true, bool includeVehicleProperties = true);
|
|
|
|
/// <summary>
|
|
/// Update edge
|
|
/// </summary>
|
|
Task<Edge> UpdateAsync(Guid edgeId, UpdateEdgeRequest request);
|
|
|
|
/// <summary>
|
|
/// Delete edge (cascade delete orphan nodes)
|
|
/// </summary>
|
|
Task<bool> DeleteAsync(Guid edgeId);
|
|
|
|
/// <summary>
|
|
/// Delete multiple edges in a transaction
|
|
/// </summary>
|
|
Task DeleteBatchAsync(List<Guid> edgeIds);
|
|
}
|
|
|