2021-05-16 14:07:14 +01:00
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
2021-06-21 23:38:05 +01:00
|
|
|
using Newtonsoft.Json;
|
2021-05-16 14:07:14 +01:00
|
|
|
|
2021-07-05 12:55:52 +01:00
|
|
|
namespace isn.Data
|
2021-05-16 14:07:14 +01:00
|
|
|
{
|
|
|
|
|
public class PackageVersion
|
|
|
|
|
{
|
|
|
|
|
[Required]
|
|
|
|
|
[ForeignKey("Package")]
|
|
|
|
|
public string PackageId { get; set; }
|
|
|
|
|
|
|
|
|
|
[Required]
|
|
|
|
|
public int Major { get; set; }
|
|
|
|
|
|
|
|
|
|
[Required]
|
|
|
|
|
public int Minor { get; set; }
|
|
|
|
|
|
|
|
|
|
[Required]
|
|
|
|
|
public int Patch { get; set; }
|
|
|
|
|
|
2021-05-22 22:49:57 +01:00
|
|
|
[StringLength(256)]
|
|
|
|
|
[Required]
|
2021-05-16 14:07:14 +01:00
|
|
|
public string FullString { get; set; }
|
|
|
|
|
public bool IsPrerelease { get; set; }
|
|
|
|
|
|
2021-06-21 23:38:05 +01:00
|
|
|
[StringLength(256)]
|
|
|
|
|
public string Type { get; set; }
|
2021-05-16 14:07:14 +01:00
|
|
|
|
2021-06-21 23:38:05 +01:00
|
|
|
[JsonIgnore]
|
|
|
|
|
public virtual Package Package { get; set; }
|
2021-05-16 14:07:14 +01:00
|
|
|
|
2021-08-12 00:38:16 +01:00
|
|
|
public string NugetLink => $"/package/{PackageId}/{FullString}/{PackageId}.{FullString}.nupkg";
|
|
|
|
|
public string NuspecLink => $"/package/{PackageId}/{FullString}/{PackageId}.{FullString}.nuspec";
|
2021-07-05 21:24:37 +01:00
|
|
|
|
2021-05-16 14:07:14 +01:00
|
|
|
}
|
|
|
|
|
}
|