Set defaults for booleans.

This commit is contained in:
2020-06-01 03:20:35 +01:00
parent 448c836d4d
commit e95ee921f6
19 changed files with 4148 additions and 90 deletions

View File

@@ -26,7 +26,6 @@
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Marechai.Database.Models
{
@@ -45,22 +44,6 @@ namespace Marechai.Database.Models
[Required]
public string Type { get; set; }
[NotMapped]
public long? Colors => EffectiveColors ?? NativeResolution.Colors;
[NotMapped]
public string Size
{
get
{
if(Width != null &&
Height != null)
return$"{Width}x{Height} mm";
return"Unknown";
}
}
public virtual ICollection<ResolutionsByScreen> Resolutions { get; set; }
public virtual ICollection<ScreensByMachine> ScreensByMachines { get; set; }
[Required]