using ERPCore.Common.Http;
using ERPCore.Domain.Enums;
using ERPCore.Dtos.Common;
using ERPCore.Dtos.Hrm;

namespace ERPCore.Services.Interfaces;

/// <summary>Department master business logic, incl. self-nesting cycle guard (docs/13-BACKEND-HRM-API.md §2).</summary>
public interface IDepartmentService
{
    Task<PagedResponse<DepartmentDto>> ListAsync(PageQuery query, EntityStatus? status, CancellationToken ct = default);
    Task<ETagged<DepartmentDto>?> GetAsync(int departmentId, CancellationToken ct = default);
    Task<ETagged<DepartmentDto>> CreateAsync(CreateDepartmentRequest request, CancellationToken ct = default);
    Task<ETagged<DepartmentDto>> UpdateAsync(int departmentId, UpdateDepartmentRequest request, uint expectedRowVersion, CancellationToken ct = default);
    Task SetStatusAsync(int departmentId, EntityStatus status, CancellationToken ct = default);
}
