This commit is contained in:
Paul Schneider 2022-09-25 17:07:56 +01:00
commit 9aa3140a11
10 changed files with 28 additions and 17 deletions

View file

@ -25,6 +25,15 @@ namespace isnd.Data.Catalog
public RegistrationPageIndex(string id, IEnumerable<RegistrationLeaf> leaves) : this(id)
{
// leaves;
this.Items = new List<RegistrationPage>
(
)
{
};
}
[JsonProperty("count")]

View file

@ -54,7 +54,7 @@ namespace isnd.Data.Packages
public RegistrationLeaf ToLeave(string bid)
{
if (Versions.Count == 0) throw new Exception("NO VERSION");
var v = Versions.First();
var v = Versions.OrderBy(w => w.SystemVersion).First();
RegistrationLeaf leave = new RegistrationLeaf
{
Id = bid + Id + "/" + v.FullString + ".json",

View file

@ -1,3 +1,4 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using isn.abst;
@ -24,6 +25,8 @@ namespace isnd.Data
[Required]
public int Patch { get; set; }
public int Revision { get; set; }
[StringLength(256)]
[Required][Key]
public string FullString { get; set; }
@ -50,5 +53,7 @@ namespace isnd.Data
+ Constants.SpecFileEstension;
public string SementicVersionString { get => $"{Major}.{Minor}.{Patch}"; }
public Version SystemVersion { get => new Version(Major, Minor, Patch, Revision); }
}
}