Cache statistics and move its generation to importers.

This commit is contained in:
2020-09-11 00:42:24 +01:00
parent 05e7ed4783
commit 2c9814292a
9 changed files with 653 additions and 79 deletions

View File

@@ -40,8 +40,9 @@ namespace RomRepoMgr.Database.Models
[Required]
public string Filename { get; set; }
[Required, StringLength(96, MinimumLength = 96)]
public string Sha384 { get; set; }
public string Category { get; set; }
public string Sha384 { get; set; }
public string Category { get; set; }
public virtual RomSetStat Statistics { get; set; }
public virtual ICollection<Machine> Machines { get; set; }
}

View File

@@ -0,0 +1,17 @@
using System.ComponentModel.DataAnnotations;
namespace RomRepoMgr.Database.Models
{
public class RomSetStat
{
public long TotalMachines { get; set; }
public long CompleteMachines { get; set; }
public long IncompleteMachines { get; set; }
public long TotalRoms { get; set; }
public long HaveRoms { get; set; }
public long MissRoms { get; set; }
public virtual RomSet RomSet { get; set; }
[Key]
public long RomSetId { get; set; }
}
}