namespace OpenNest.Data; /// An undo request: who is undoing the release, and which changed nests to leave as they are. public sealed class SetReleaseUndoRequest { public string UndoneBy { get; set; } = ""; /// /// Nests of the release to leave alone. Every other nest must still be at the revision /// the release wrote, or nothing is undone. /// public IReadOnlyList SkipNests { get; set; } = Array.Empty(); } public enum SetReleaseUndoRefusal { /// The release was undone before. AlreadyUndone, /// Nests not skipped have changed since the release; lists them. NestsChanged, } /// Why an undo was refused. Nothing was changed. public sealed class SetReleaseUndoConflict { public SetReleaseUndoRefusal Reason { get; set; } /// The release as it is now. public SetReleaseRecord Release { get; set; } = new(); /// The current metadata of each nest that moved on since the release, deleted or not. public IReadOnlyList ChangedNests { get; set; } = Array.Empty(); }