shoc-backend/SeaHaven.DataServices/Interfaces/IVendorCompanyRosterDataService.cs
Alexandre Brandizzi 669e9b2932
Some checks are pending
Validate and deploy dev / Validate deployable source bundle (push) Waiting to run
Validate and deploy dev / Deploy shoc-backend to Elastic Beanstalk dev (push) Blocked by required conditions
feat(vendors): add company roster management (SH-198) (#48)
* feat(vendors): add company roster management

* fix(security): remove request-controlled write guards

* fix(vendors): synchronize roster company fields

* fix(vendors): source facets from companies
2026-08-03 17:53:24 -03:00

28 lines
1.3 KiB
C#

using SeaHaven.DataServices.Models;
namespace SeaHaven.DataServices.Interfaces
{
public interface IVendorCompanyRosterDataService
{
// Loads the company roster from either a vendor row id and/or a company id,
// returning the company plus all non-deleted technician rows.
Task<VendorCompanyRosterReadModel?> GetRosterAsync(
int? vendorId,
int? companyId,
CancellationToken cancellationToken);
// Reconciles the company roster (add/update/soft-delete/rename) and updates the
// company Notes in a single SaveChangesAsync. A technician omitted from the
// snapshot is soft-deleted only when it has no open linked work orders; otherwise
// the whole save fails (VendorRosterConflictException) and nothing is persisted.
Task<VendorCompanyRosterReadModel> SaveRosterAsync(
VendorCompanyRosterWriteModel roster,
CancellationToken cancellationToken);
// Creates a new company together with its initial technicians (which may be zero)
// in a single SaveChangesAsync.
Task<VendorCompanyRosterReadModel> CreateRosterAsync(
VendorCompanyRosterWriteModel roster,
CancellationToken cancellationToken);
}
}