WIP
This commit is contained in:
parent
7f9344d437
commit
9aa3140a11
10 changed files with 28 additions and 17 deletions
|
|
@ -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")]
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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); }
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue