Catalog
This commit is contained in:
parent
504f431937
commit
cdb9a26d2c
16 changed files with 301 additions and 59 deletions
32
src/isnd/Data/Catalog/Commit.cs
Normal file
32
src/isnd/Data/Catalog/Commit.cs
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace isnd.Data.Catalog
|
||||
{
|
||||
public enum PackageAction
|
||||
{
|
||||
DeletePackage,
|
||||
PublishPackage
|
||||
}
|
||||
|
||||
public class Commit : IObject
|
||||
{
|
||||
[Key][Required,DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id { get; set; }
|
||||
|
||||
[Required]
|
||||
public DateTime TimeStamp{ get; set; }
|
||||
|
||||
[Required]
|
||||
public PackageAction Action { get; set; }
|
||||
|
||||
[Required]
|
||||
public string PackageId { get; set; }
|
||||
[ForeignKey("PackageId")]
|
||||
|
||||
public virtual Package Package{ get; set; }
|
||||
public string CommitId { get => Id.ToString(); }
|
||||
public DateTime CommitTimeStamp { get => TimeStamp; }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue