isn/src/isnd/Data/Catalog/PackageRef.cs

51 lines
1.2 KiB
C#
Raw Normal View History

2021-08-23 03:21:08 +01:00
using System;
2021-08-28 18:41:22 +01:00
using System.ComponentModel.DataAnnotations.Schema;
2021-08-23 03:21:08 +01:00
using Newtonsoft.Json;
namespace isnd.Data.Catalog
{
/// <summary>
/// An presence of package in a catalog,
/// for availability, or deletion,
///
/// </summary>
public class PackageRef : IObject
{
[JsonProperty("@id")]
public string RefId { get; set; }
/// <summary>
/// Reference type :
/// nuget:PackageDetails vs nuget:PackageDelete
/// </summary>
/// <value></value>
[JsonProperty("@type")]
public string RefType { get; set; }
2021-08-27 21:22:34 +01:00
/// <summary>
/// The NuGet Id
/// </summary>
/// <value></value>
2021-08-23 03:21:08 +01:00
[JsonProperty("nuget:id")]
public string Id { get; set; }
2021-08-27 21:22:34 +01:00
/// <summary>
/// The NuGet version
/// </summary>
/// <value></value>
2021-08-23 03:21:08 +01:00
[JsonProperty("nuget:version")]
public string Version { get; set; }
2021-08-29 00:08:34 +01:00
[JsonProperty("commitId")]
2021-08-23 03:21:08 +01:00
public string CommitId { get; set; }
2021-08-28 18:41:22 +01:00
2021-08-29 00:08:34 +01:00
[ForeignKey("CommitId"), JsonIgnore]
2021-08-28 18:41:22 +01:00
public virtual Commit LastCommit { get; set; }
2021-08-29 00:08:34 +01:00
[JsonProperty("commitTimeStamp")]
2021-08-23 03:21:08 +01:00
public DateTime CommitTimeStamp { get; set; }
}
}