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

@@ -27,29 +27,32 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
namespace Marechai.Database.Models
namespace Marechai.Database.Models;
public class Resolution : BaseModel<int>
{
public class Resolution : BaseModel<int>
{
public Resolution() => ResolutionsByGpu = new HashSet<ResolutionsByGpu>();
public Resolution() => ResolutionsByGpu = new HashSet<ResolutionsByGpu>();
[Required, Range(1, 131072)]
public int Width { get; set; }
[Required, Range(1, 131072)]
public int Height { get; set; }
[Range(2, 281474976710656)]
public long? Colors { get; set; }
[Range(2, 281474976710656)]
public long? Palette { get; set; }
[DisplayName("Character based"), DefaultValue(false)]
public bool Chars { get; set; }
[DisplayName("Grayscale"), DefaultValue(false)]
public bool Grayscale { get; set; }
[Required]
[Range(1, 131072)]
public int Width { get; set; }
[Required]
[Range(1, 131072)]
public int Height { get; set; }
[Range(2, 281474976710656)]
public long? Colors { get; set; }
[Range(2, 281474976710656)]
public long? Palette { get; set; }
[DisplayName("Character based")]
[DefaultValue(false)]
public bool Chars { get; set; }
[DisplayName("Grayscale")]
[DefaultValue(false)]
public bool Grayscale { get; set; }
public virtual ICollection<ResolutionsByGpu> ResolutionsByGpu { get; set; }
public virtual ICollection<ResolutionsByScreen> ResolutionsByScreen { get; set; }
public virtual ICollection<Screen> Screens { get; set; }
public virtual ICollection<ResolutionsByGpu> ResolutionsByGpu { get; set; }
public virtual ICollection<ResolutionsByScreen> ResolutionsByScreen { get; set; }
public virtual ICollection<Screen> Screens { get; set; }
public long? PaletteView => Palette ?? Colors;
}
public long? PaletteView => Palette ?? Colors;
}