feat(management): additive Skip/Take paging on template/instance lists (arch-review P2)

Claude-Session: https://claude.ai/code/session_01MtdgwpEeCUn6cUA5f1LMPj
This commit is contained in:
Joseph Doherty
2026-07-10 05:57:14 -04:00
parent 8221ee797e
commit 655834f0b8
10 changed files with 152 additions and 13 deletions
@@ -1,6 +1,8 @@
namespace ZB.MOM.WW.ScadaBridge.Commons.Messages.Management;
public record ListInstancesCommand(int? SiteId = null, int? TemplateId = null, string? SearchTerm = null);
// Skip/Take are additive offset paging (arch-review P2), applied AFTER in-memory
// site-scope filtering. Take = null preserves the historical unpaged behaviour.
public record ListInstancesCommand(int? SiteId = null, int? TemplateId = null, string? SearchTerm = null, int Skip = 0, int? Take = null);
public record GetInstanceCommand(int InstanceId);
public record CreateInstanceCommand(string UniqueName, int TemplateId, int SiteId, int? AreaId = null);
public record MgmtDeployInstanceCommand(int InstanceId);
@@ -1,6 +1,8 @@
namespace ZB.MOM.WW.ScadaBridge.Commons.Messages.Management;
public record ListTemplatesCommand;
// Skip/Take are additive offset paging (arch-review P2). Take = null preserves the
// historical unpaged behaviour (unlimited), so existing callers/UI are untouched.
public record ListTemplatesCommand(int Skip = 0, int? Take = null);
public record GetTemplateCommand(int TemplateId);
public record CreateTemplateCommand(string Name, string? Description, int? ParentTemplateId);