Removed dialogs for editing equipment and points, and their related resources
This commit is contained in:
+22
-7
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text.Json.Serialization;
|
||||
@@ -7,28 +8,42 @@ namespace GazpromApp.Models;
|
||||
|
||||
public class Equipment
|
||||
{
|
||||
public Equipment()
|
||||
{
|
||||
LocalId = Id == Guid.Empty ? Guid.NewGuid() : Id;
|
||||
}
|
||||
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
[JsonIgnore]
|
||||
public int Id { get; set; }
|
||||
public Guid Id { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[NotMapped]
|
||||
public Guid LocalId { get; set; }
|
||||
|
||||
[Required]
|
||||
public string? Name { get; set; } = string.Empty;
|
||||
public string? Description { get; set; } = string.Empty;
|
||||
public DateTime CreationDate { get; set; }
|
||||
|
||||
// Foreign keys
|
||||
[Required]
|
||||
[JsonIgnore]
|
||||
public int PointId { get; set; }
|
||||
public Guid? PointId { get; set; }
|
||||
[JsonIgnore]
|
||||
public List<int> ImageIds { get; set; } = [];
|
||||
public List<Guid> ImageIds { get; set; } = [];
|
||||
[JsonIgnore]
|
||||
public List<int> InspectionIds { get; set; } = [];
|
||||
public List<Guid> InspectionIds { get; set; } = [];
|
||||
[JsonIgnore]
|
||||
public List<Guid> EquipmentIds { get; set; } = [];
|
||||
public Guid? ParentEquipmentId { get; set; }
|
||||
|
||||
// Navigation Properties
|
||||
public List<Image> Images { get; set; } = [];
|
||||
[JsonIgnore]
|
||||
public Point Point { get; set; } = null!;
|
||||
public Point? Point { get; set; } = null!;
|
||||
public List<Property> Properties { get; set; } = [];
|
||||
public List<Inspection> Inspections { get; set; } = [];
|
||||
public List<Equipment> Equipments { get; set; } = [];
|
||||
public Equipment? ParentEquipment { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user