mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Major refactor and cleanup.
This commit is contained in:
@@ -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; }
|
||||
}
|
||||
Reference in New Issue
Block a user