DB integration added, multiple images for equipment
This commit is contained in:
+9
-8
@@ -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; } = [];
|
||||
}
|
||||
Reference in New Issue
Block a user