Add remote statistics.

This commit is contained in:
2019-12-07 18:50:53 +00:00
parent 1fa7cbbdf4
commit 9e21a460d2
9 changed files with 1698 additions and 14 deletions

View File

@@ -374,6 +374,8 @@
<e p="20191207175444_SyncWithServerChanges.cs" t="Include" /> <e p="20191207175444_SyncWithServerChanges.cs" t="Include" />
<e p="20191207183522_AddNameCountModel.Designer.cs" t="Include" /> <e p="20191207183522_AddNameCountModel.Designer.cs" t="Include" />
<e p="20191207183522_AddNameCountModel.cs" t="Include" /> <e p="20191207183522_AddNameCountModel.cs" t="Include" />
<e p="20191207184342_AddRemoteStats.Designer.cs" t="Include" />
<e p="20191207184342_AddRemoteStats.cs" t="Include" />
<e p="DicContextModelSnapshot.cs" t="Include" /> <e p="DicContextModelSnapshot.cs" t="Include" />
</e> </e>
<e p="Models" t="Include"> <e p="Models" t="Include">
@@ -390,6 +392,9 @@
<e p="NameCountModel.cs" t="Include" /> <e p="NameCountModel.cs" t="Include" />
<e p="OperatingSystem.cs" t="Include" /> <e p="OperatingSystem.cs" t="Include" />
<e p="Partition.cs" t="Include" /> <e p="Partition.cs" t="Include" />
<e p="RemoteApplication.cs" t="Include" />
<e p="RemoteArchitecture.cs" t="Include" />
<e p="RemoteOperatingSystem.cs" t="Include" />
<e p="Report.cs" t="Include" /> <e p="Report.cs" t="Include" />
<e p="UsbProduct.cs" t="Include" /> <e p="UsbProduct.cs" t="Include" />
<e p="UsbVendor.cs" t="Include" /> <e p="UsbVendor.cs" t="Include" />

View File

@@ -53,6 +53,9 @@ namespace DiscImageChef.Database
public DbSet<UsbVendor> UsbVendors { get; set; } public DbSet<UsbVendor> UsbVendors { get; set; }
public DbSet<UsbProduct> UsbProducts { get; set; } public DbSet<UsbProduct> UsbProducts { get; set; }
public DbSet<CdOffset> CdOffsets { get; set; } public DbSet<CdOffset> CdOffsets { get; set; }
public DbSet<RemoteApplication> RemoteApplications { get; set; }
public DbSet<RemoteArchitecture> RemoteArchitectures { get; set; }
public DbSet<RemoteOperatingSystem> RemoteOperatingSystems { get; set; }
// Note: If table does not appear check that last migration has been REALLY added to the project // Note: If table does not appear check that last migration has been REALLY added to the project

View File

@@ -105,6 +105,8 @@
<Compile Include="Migrations\20191207175444_SyncWithServerChanges.Designer.cs" /> <Compile Include="Migrations\20191207175444_SyncWithServerChanges.Designer.cs" />
<Compile Include="Migrations\20191207183522_AddNameCountModel.cs" /> <Compile Include="Migrations\20191207183522_AddNameCountModel.cs" />
<Compile Include="Migrations\20191207183522_AddNameCountModel.Designer.cs" /> <Compile Include="Migrations\20191207183522_AddNameCountModel.Designer.cs" />
<Compile Include="Migrations\20191207184342_AddRemoteStats.cs" />
<Compile Include="Migrations\20191207184342_AddRemoteStats.Designer.cs" />
<Compile Include="Migrations\DicContextModelSnapshot.cs" /> <Compile Include="Migrations\DicContextModelSnapshot.cs" />
<Compile Include="Models\BaseModel.cs" /> <Compile Include="Models\BaseModel.cs" />
<Compile Include="Models\BaseOperatingSystem.cs" /> <Compile Include="Models\BaseOperatingSystem.cs" />
@@ -119,6 +121,9 @@
<Compile Include="Models\NameCountModel.cs" /> <Compile Include="Models\NameCountModel.cs" />
<Compile Include="Models\OperatingSystem.cs" /> <Compile Include="Models\OperatingSystem.cs" />
<Compile Include="Models\Partition.cs" /> <Compile Include="Models\Partition.cs" />
<Compile Include="Models\RemoteApplication.cs" />
<Compile Include="Models\RemoteArchitecture.cs" />
<Compile Include="Models\RemoteOperatingSystem.cs" />
<Compile Include="Models\Report.cs" /> <Compile Include="Models\Report.cs" />
<Compile Include="Models\UsbProduct.cs" /> <Compile Include="Models\UsbProduct.cs" />
<Compile Include="Models\UsbVendor.cs" /> <Compile Include="Models\UsbVendor.cs" />

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,49 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace DiscImageChef.Database.Migrations
{
public partial class AddRemoteStats : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable("RemoteApplications", table => new
{
Id = table.Column<int>().Annotation("Sqlite:Autoincrement", true),
Name = table.Column<string>(nullable: true), Version = table.Column<string>(nullable: true),
Synchronized = table.Column<bool>(), Count = table.Column<ulong>()
}, constraints: table =>
{
table.PrimaryKey("PK_RemoteApplications", x => x.Id);
});
migrationBuilder.CreateTable("RemoteArchitectures", table => new
{
Id = table.Column<int>().Annotation("Sqlite:Autoincrement", true),
Name = table.Column<string>(nullable: true), Synchronized = table.Column<bool>(),
Count = table.Column<ulong>()
}, constraints: table =>
{
table.PrimaryKey("PK_RemoteArchitectures", x => x.Id);
});
migrationBuilder.CreateTable("RemoteOperatingSystems", table => new
{
Id = table.Column<int>().Annotation("Sqlite:Autoincrement", true),
Name = table.Column<string>(nullable: true), Version = table.Column<string>(nullable: true),
Synchronized = table.Column<bool>(), Count = table.Column<ulong>()
}, constraints: table =>
{
table.PrimaryKey("PK_RemoteOperatingSystems", x => x.Id);
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable("RemoteApplications");
migrationBuilder.DropTable("RemoteArchitectures");
migrationBuilder.DropTable("RemoteOperatingSystems");
}
}
}

View File

@@ -1174,6 +1174,55 @@ namespace DiscImageChef.Database.Migrations
b.ToTable("Partitions"); b.ToTable("Partitions");
}); });
modelBuilder.Entity("DiscImageChef.Database.Models.RemoteApplication", b =>
{
b.Property<int>("Id").ValueGeneratedOnAdd();
b.Property<ulong>("Count");
b.Property<string>("Name");
b.Property<bool>("Synchronized");
b.Property<string>("Version");
b.HasKey("Id");
b.ToTable("RemoteApplications");
});
modelBuilder.Entity("DiscImageChef.Database.Models.RemoteArchitecture", b =>
{
b.Property<int>("Id").ValueGeneratedOnAdd();
b.Property<ulong>("Count");
b.Property<string>("Name");
b.Property<bool>("Synchronized");
b.HasKey("Id");
b.ToTable("RemoteArchitectures");
});
modelBuilder.Entity("DiscImageChef.Database.Models.RemoteOperatingSystem", b =>
{
b.Property<int>("Id").ValueGeneratedOnAdd();
b.Property<ulong>("Count");
b.Property<string>("Name");
b.Property<bool>("Synchronized");
b.Property<string>("Version");
b.HasKey("Id");
b.ToTable("RemoteOperatingSystems");
});
modelBuilder.Entity("DiscImageChef.Database.Models.Report", b => modelBuilder.Entity("DiscImageChef.Database.Models.Report", b =>
{ {
b.Property<int>("Id").ValueGeneratedOnAdd(); b.Property<int>("Id").ValueGeneratedOnAdd();

View File

@@ -0,0 +1,4 @@
namespace DiscImageChef.Database.Models
{
public class RemoteApplication : BaseOperatingSystem { }
}

View File

@@ -0,0 +1,4 @@
namespace DiscImageChef.Database.Models
{
public class RemoteArchitecture : NameCountModel<int> { }
}

View File

@@ -0,0 +1,4 @@
namespace DiscImageChef.Database.Models
{
public class RemoteOperatingSystem : BaseOperatingSystem { }
}