DB integration added, multiple images for equipment

This commit is contained in:
retr0volkov
2025-07-15 11:14:28 +03:00 Unverified
parent 7a34fc2dbb
commit 8ddce4005f
38 changed files with 627 additions and 297 deletions
+9 -8
View File
@@ -11,23 +11,24 @@ public class Equipment
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[JsonIgnore]
public int Id { get; set; }
[Required]
public string? Name { get; set; } = string.Empty;
[Required]
public string? Description { get; set; } = string.Empty;
[Required]
// Foreign keys
[Required]
[JsonIgnore]
public int PointId { get; set; }
[JsonIgnore]
public int ImageId { get; set; }
[JsonIgnore]
public List<int> ImageIds { get; set; } = [];
[JsonIgnore]
public List<int> InspectionIds { get; set; } = [];
// EF stuff
public Image? Image { get; set; }
[JsonIgnore]
public Point? Point { get; set; }
// Navigation Properties
public List<Image> Images { get; set; } = [];
[JsonIgnore]
public Point Point { get; set; } = null!;
public List<Property> Properties { get; set; } = [];
public List<Inspection> Inspections { get; set; } = [];
}