mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-12-05 02:39:25 -05:00
Nests showed only the decimal (0.135), while the shop thinks in gauges. A nest now keeps a ThicknessName in its file, record and the server (schema v20), set from Nest Information's new box, which suggests the machine's name or the nearest standard gauge. The Open list, status bar and reports show "10 ga (0.135)"; nests saved without a name get one looked up for display only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
66 lines
2.1 KiB
C#
66 lines
2.1 KiB
C#
using OpenNest;
|
|
|
|
namespace OpenNest.Data;
|
|
|
|
/// <summary>
|
|
/// Server-side metadata for one saved nest. The .nest archive itself is stored
|
|
/// alongside; this record is what lists, filters and status tracking read.
|
|
/// Counts are captured by the client at save time.
|
|
/// </summary>
|
|
public sealed class NestRecord
|
|
{
|
|
public Guid Id { get; set; }
|
|
|
|
/// <summary>Server revision; zero means the server does not support history.</summary>
|
|
public int Revision { get; set; }
|
|
|
|
public bool Deleted { get; set; }
|
|
|
|
/// <summary>Selected historical revision promoted by an explicit Restore.</summary>
|
|
public int? RestoredFromRevision { get; set; }
|
|
|
|
public string Name { get; set; } = "";
|
|
|
|
public string Customer { get; set; } = "";
|
|
|
|
public DateTime DateCreated { get; set; }
|
|
|
|
public DateTime DateModified { get; set; }
|
|
|
|
public string Material { get; set; } = "";
|
|
|
|
/// <summary>Material grade; blank when none was chosen or the server predates grades.</summary>
|
|
public string MaterialGrade { get; set; } = "";
|
|
|
|
public double Thickness { get; set; }
|
|
|
|
/// <summary>
|
|
/// The shop's name for <see cref="Thickness"/>, such as "10 ga"; blank when the nest names
|
|
/// none or the server predates thickness names.
|
|
/// </summary>
|
|
public string ThicknessName { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// The nest's units, which <see cref="Thickness"/> is in. The server reads them from the
|
|
/// archive like the counts; inches when the archive has none or the server predates them.
|
|
/// </summary>
|
|
public Units Units { get; set; }
|
|
|
|
/// <summary>quote | toBeCut | hasBeenCut (camelCase on the wire, case-insensitive readers).</summary>
|
|
public NestStatus Status { get; set; } = NestStatus.Quote;
|
|
|
|
public int PlateCount { get; set; }
|
|
|
|
public int PartCount { get; set; }
|
|
|
|
public string Comments { get; set; } = "";
|
|
|
|
public string MadeBy { get; set; } = "";
|
|
|
|
/// <summary>Size of the stored .nest archive in bytes.</summary>
|
|
public long FileSize { get; set; }
|
|
|
|
/// <summary>When the server last stored the nest contents or metadata.</summary>
|
|
public DateTime SavedAt { get; set; }
|
|
}
|