Code clean up

This commit is contained in:
retr0volkov
2025-07-10 09:19:06 +03:00 Unverified
parent 2a8f8d2714
commit 915c7a7c5e
36 changed files with 116 additions and 133 deletions
+3 -3
View File
@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Collections.Generic;
namespace GazpromApp.Models;
@@ -20,7 +20,7 @@ public class Equipment
// EF stuff
public Image? Image { get; set; }
public Models.Point? Point { get; set; }
public Point? Point { get; set; }
public List<Property> Properties { get; set; } = [];
public List<Inspection> Inspections { get; set; } = [];
}
-1
View File
@@ -1,5 +1,4 @@
using GazpromApp.Enums;
using GazpromApp.ViewModels;
namespace GazpromApp.Models;
+1 -2
View File
@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
+2 -1
View File
@@ -17,8 +17,9 @@ public class Inspection
public string PeriodType { get; set; } = string.Empty;
[Required]
public float PeriodValue { get; set; }
public int EquipmentId { get; set; }
// EF stuff
public Equipment? Equipment { get; set; }
public Equipment? Equipment { get; } = new();
}
+2 -2
View File
@@ -14,9 +14,9 @@ public class Point
[Required]
public string? Description { get; set; } = string.Empty;
[Required]
public double Latitude { get; set; } = 0;
public double Latitude { get; set; }
[Required]
public double Longitude { get; set; } = 0;
public double Longitude { get; set; }
// EF stuff
public List<Image> Images { get; set; } = [];
public List<Equipment> Equipment { get; set; } = [];
+2 -1
View File
@@ -1,6 +1,7 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace GazpromApp.Models;
public class Property
@@ -15,6 +16,6 @@ public class Property
// EF stuff
public Property? Parent { get; set; }
public List<Property> Properties{ get; set; } = [];
public List<Models.Point> Points { get; set; } = [];
public List<Point> Points { get; set; } = [];
public List<Equipment> Equipment { get; } = [];
}