26 lines
1.2 KiB
C#
26 lines
1.2 KiB
C#
using Fitness_core_BE.Models;
|
|
|
|
namespace Fitness_core_BE.Interfaces
|
|
{
|
|
public interface IPlaceRepo
|
|
{
|
|
Task<List<Place>> GetAllPlaces(Guid clientId, bool includeInactive = false);
|
|
Task<Place?> GetPlaceById(Guid placeId);
|
|
Task<Place> CreatePlace(Place place);
|
|
Task<Place> UpdatePlace(Place place);
|
|
Task<Place?> SetPlaceActive(Guid placeId, Guid clientId, bool isActive);
|
|
|
|
Task<AccessDevice?> GetDeviceByIdForClientAsync(Guid deviceId, Guid clientId);
|
|
Task<Dictionary<Guid, AccessDevice>> GetDevicesByPlaceIdsAsync(List<Guid> placeIds);
|
|
Task<bool> IsDeviceAssignedToAnotherPlaceAsync(Guid deviceId, Guid placeId);
|
|
Task AssignDeviceAsync(Guid placeId, Guid deviceId);
|
|
Task UnassignDeviceAsync(Guid placeId);
|
|
|
|
// CustomerPlan <-> Place (many-to-many). Replace-all semantics, like a tags field.
|
|
Task SetPlanPlacesAsync(Guid customerPlanId, List<Guid> placeIds);
|
|
Task<List<Guid>> GetPlaceIdsForPlanAsync(Guid customerPlanId);
|
|
Task<Dictionary<Guid, List<Guid>>> GetPlaceIdsByPlanIdsAsync(List<Guid> customerPlanIds);
|
|
Task<Dictionary<Guid, string>> GetPlaceNamesByIdsAsync(List<Guid> placeIds);
|
|
}
|
|
}
|