mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-10-28 04:51:05 -04:00
A record's thickness is in the nest's units, but nothing on the record said which, so a list of nests could not tell 9.525 mm from 9.525 inches without reading each archive. Records now carry units, read from the uploaded archive like the counts (absent or unknown values are inches) and kept by a metadata-only save. Schema v12 adds the column and reads every stored archive, current and historical, so existing millimeter nests report it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
60 lines
1.9 KiB
C#
60 lines
1.9 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 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; }
|
|
}
|