Code clean up
This commit is contained in:
+3
-3
@@ -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,5 +1,4 @@
|
||||
using GazpromApp.Enums;
|
||||
using GazpromApp.ViewModels;
|
||||
|
||||
namespace GazpromApp.Models;
|
||||
|
||||
|
||||
+1
-2
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
|
||||
@@ -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
@@ -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
@@ -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; } = [];
|
||||
}
|
||||
Reference in New Issue
Block a user