mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-10-27 02:41:06 -04:00
A drawing set is a named list of library drawings with quantities (a kit,
an assembly, a recurring order) that will later be released into one nest
per material. This is the server half: sets get the same revision,
If-Match and archive contract as /api/drawings so the client and tests
follow a known shape.
Schema v7 adds drawing_sets, drawing_set_revisions and
drawing_set_members. Members reference drawings by id and mean each
drawing's current revision, so reads join the current drawing record:
the client can group members by material without one request per drawing,
and the joined record is ignored on save so a read record can be sent
back unchanged. Every change keeps its own member list, and
/api/drawings/{id}/sets answers "used in" from current revisions only.
The drawing query's enum, integer and history-paging parsing is now shared
so both APIs refuse bad input identically.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
16 lines
535 B
C#
16 lines
535 B
C#
namespace OpenNest.Data;
|
|
|
|
/// <summary>One bounded page of drawing set records, without their members.</summary>
|
|
public sealed class DrawingSetPage
|
|
{
|
|
/// <summary>At most <see cref="Limit"/> records, in the requested order.</summary>
|
|
public IReadOnlyList<DrawingSetRecord> Items { get; init; } = Array.Empty<DrawingSetRecord>();
|
|
|
|
/// <summary>Number of records matching the request across all pages.</summary>
|
|
public int Total { get; init; }
|
|
|
|
public int Offset { get; init; }
|
|
|
|
public int Limit { get; init; }
|
|
}
|