Sort processors in admin page.

This commit is contained in:
2019-05-19 00:59:40 +01:00
parent 86470c6bca
commit 0e6fc2e7f2
8 changed files with 244 additions and 329 deletions

View File

@@ -31,6 +31,8 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations.Schema;
namespace Cicm.Database.Models
{
@@ -42,36 +44,58 @@ namespace Cicm.Database.Models
ProcessorsByMachine = new HashSet<ProcessorsByMachine>();
}
public int Id { get; set; }
public string Name { get; set; }
public int? CompanyId { get; set; }
public string ModelCode { get; set; }
public DateTime? Introduced { get; set; }
public int? InstructionSetId { get; set; }
public double? Speed { get; set; }
public string Package { get; set; }
public int? Gprs { get; set; }
public int? GprSize { get; set; }
public int? Fprs { get; set; }
public int? FprSize { get; set; }
public int? Cores { get; set; }
public int? ThreadsPerCore { get; set; }
public string Process { get; set; }
public float? ProcessNm { get; set; }
public float? DieSize { get; set; }
public long? Transistors { get; set; }
public int? DataBus { get; set; }
public int? AddrBus { get; set; }
public int? SimdRegisters { get; set; }
public int? SimdSize { get; set; }
public float? L1Instruction { get; set; }
public float? L1Data { get; set; }
public float? L2 { get; set; }
public float? L3 { get; set; }
public int Id { get; set; }
public string Name { get; set; }
public int? CompanyId { get; set; }
[DisplayName("Model code")]
public string ModelCode { get; set; }
public DateTime? Introduced { get; set; }
[DisplayName("Instruction set")]
public int? InstructionSetId { get; set; }
[DisplayName("Nominal speed (MHz)")]
public double? Speed { get; set; }
public string Package { get; set; }
[DisplayName("General Purpose Registers")]
public int? Gprs { get; set; }
[DisplayName("General Purporse Register size")]
public int? GprSize { get; set; }
[DisplayName("Floating Point Registers")]
public int? Fprs { get; set; }
[DisplayName("Floating Point Register Size")]
public int? FprSize { get; set; }
public int? Cores { get; set; }
[DisplayName("Threads per core")]
public int? ThreadsPerCore { get; set; }
public string Process { get; set; }
[DisplayName("Process (nm)")]
public float? ProcessNm { get; set; }
[DisplayName("Die size (mm²)")]
public float? DieSize { get; set; }
public long? Transistors { get; set; }
[DisplayName("Data bus size")]
public int? DataBus { get; set; }
[DisplayName("Address bus size")]
public int? AddrBus { get; set; }
[DisplayName("SIMD registers")]
public int? SimdRegisters { get; set; }
[DisplayName("SIMD register size")]
public int? SimdSize { get; set; }
[DisplayName("L1 instruction cache (KiB)")]
public float? L1Instruction { get; set; }
[DisplayName("L1 data cache (KiB)")]
public float? L1Data { get; set; }
[DisplayName("L2 cache (KiB)")]
public float? L2 { get; set; }
[DisplayName("L3 cache (KiB)")]
public float? L3 { get; set; }
public virtual Company Company { get; set; }
public virtual InstructionSet InstructionSet { get; set; }
public virtual Company Company { get; set; }
[DisplayName("Instruction set")]
public virtual InstructionSet InstructionSet { get; set; }
public virtual ICollection<InstructionSetExtensionsByProcessor> InstructionSetExtensions { get; set; }
public virtual ICollection<ProcessorsByMachine> ProcessorsByMachine { get; set; }
[NotMapped]
public string IntroducedView => Introduced?.ToShortDateString() ?? "Unknown";
}
}