mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-09-30 09:33:13 +00:00
* fix(migrations): make Phase6 completion slide-over migration idempotent Use IF EXISTS / IF COL_LENGTH guards and explicit EF migration metadata so partial environments can apply Phase 6 safely. * feat(locations): add sites options endpoint and vendor contactName Expose GET /api/locations/sites for the WO create wizard and include vendor contactName on dropdown responses. * fix(work-orders): make stacked tip build for CI quality gates --------- Co-authored-by: Arthur Bassi <arthur.winiarski.ranger@outlook.com>
28 lines
1.1 KiB
C#
28 lines
1.1 KiB
C#
using Data.SeaHavenIndustries;
|
|
|
|
namespace SeaHaven.DataServices.Interfaces
|
|
{
|
|
public record SiteOptionRow(int Id, string? Code, string? City, string? State);
|
|
|
|
public interface ILocationDataService
|
|
{
|
|
Task<Locations?> GetByIdAsync(int id);
|
|
Task<Locations?> GetByIdWithDetailsAsync(int id);
|
|
Task<IEnumerable<Locations>> GetAllAsync();
|
|
Task<IEnumerable<Locations>> GetByAccountIdAsync(int accountId);
|
|
|
|
// Paged results returning DTOs
|
|
Task<(IEnumerable<Locations> Items, int TotalCount)> GetPagedAsync(int page, int pageSize, string? search = null);
|
|
|
|
// For addressbook endpoint - returns simplified DTO
|
|
Task<(IEnumerable<object> Items, int TotalCount)> GetAddressbookPagedAsync(int page, int pageSize, string? search = null);
|
|
|
|
Task<IReadOnlyList<SiteOptionRow>> GetSiteOptionsAsync(string? search = null);
|
|
|
|
Task<Locations> AddAsync(Locations location);
|
|
Task UpdateAsync(Locations location);
|
|
Task DeleteAsync(int id);
|
|
Task<bool> ExistsAsync(int id);
|
|
Task<int> CountAsync();
|
|
}
|
|
}
|