Major refactor and cleanup.

This commit is contained in:
2025-11-13 04:05:35 +00:00
parent 1d67081792
commit 8f6d334af4
833 changed files with 86800 additions and 74355 deletions

View File

@@ -28,37 +28,39 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
namespace Marechai.Database.Models
namespace Marechai.Database.Models;
public class Gpu : BaseModel<int>
{
public class Gpu : BaseModel<int>
public Gpu()
{
public Gpu()
{
GpusByMachine = new HashSet<GpusByMachine>();
ResolutionsByGpu = new HashSet<ResolutionsByGpu>();
}
[Required, StringLength(128)]
public string Name { get; set; }
public int? CompanyId { get; set; }
[DisplayName("Model code"), StringLength(45)]
public string ModelCode { get; set; }
[DisplayFormat(DataFormatString = "{0:d}"), DataType(DataType.Date)]
public DateTime? Introduced { get; set; }
[StringLength(45)]
public string Package { get; set; }
[StringLength(45)]
public string Process { get; set; }
[DisplayName("Process (nm)")]
public float? ProcessNm { get; set; }
[DisplayName("Die size (mm²)")]
public float? DieSize { get; set; }
[Range(1, long.MaxValue)]
public long? Transistors { get; set; }
public virtual Company Company { get; set; }
public virtual ICollection<GpusByMachine> GpusByMachine { get; set; }
public virtual ICollection<ResolutionsByGpu> ResolutionsByGpu { get; set; }
public virtual ICollection<GpusBySoftwareVariant> Software { get; set; }
GpusByMachine = new HashSet<GpusByMachine>();
ResolutionsByGpu = new HashSet<ResolutionsByGpu>();
}
[Required]
[StringLength(128)]
public string Name { get; set; }
public int? CompanyId { get; set; }
[DisplayName("Model code")]
[StringLength(45)]
public string ModelCode { get; set; }
[DisplayFormat(DataFormatString = "{0:d}")]
[DataType(DataType.Date)]
public DateTime? Introduced { get; set; }
[StringLength(45)]
public string Package { get; set; }
[StringLength(45)]
public string Process { get; set; }
[DisplayName("Process (nm)")]
public float? ProcessNm { get; set; }
[DisplayName("Die size (mm²)")]
public float? DieSize { get; set; }
[Range(1, long.MaxValue)]
public long? Transistors { get; set; }
public virtual Company Company { get; set; }
public virtual ICollection<GpusByMachine> GpusByMachine { get; set; }
public virtual ICollection<ResolutionsByGpu> ResolutionsByGpu { get; set; }
public virtual ICollection<GpusBySoftwareVariant> Software { get; set; }
}