mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-09-30 07:13:12 +00:00
19 lines
1 KiB
C#
19 lines
1 KiB
C#
using System.Security.Claims;
|
|
using Data.SeaHavenIndustries.Enums;
|
|
using SeaHaven.Services.DTOs;
|
|
|
|
namespace SeaHaven.Services.Interfaces
|
|
{
|
|
// Global Services registry. Tenant scope is global (no AccountId),
|
|
// matching DropdownOptions. Reads are authenticated; create/update require
|
|
// the Scheduler or Admin role and deactivation is Admin-only, enforced at
|
|
// this service entry — never in the controller alone.
|
|
public interface IServicesRegistryService
|
|
{
|
|
Task<IReadOnlyList<ServiceDto>> GetAllAsync(bool? isActive, WorkOrderType? workOrderType, CancellationToken cancellationToken);
|
|
Task<ServiceDto?> GetByIdAsync(int id, CancellationToken cancellationToken);
|
|
Task<ServiceDto> CreateAsync(ClaimsPrincipal user, ServiceInput input, CancellationToken cancellationToken);
|
|
Task<ServiceDto> UpdateAsync(ClaimsPrincipal user, int id, ServiceInput input, CancellationToken cancellationToken);
|
|
Task DeactivateAsync(ClaimsPrincipal user, int id, CancellationToken cancellationToken);
|
|
}
|
|
}
|