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
+19 -8
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;
using System.Text.Json.Serialization;
@@ -12,17 +11,29 @@ public class Property
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[JsonIgnore]
public int Id { get; set; }
[JsonIgnore]
public int ParentId { get; set; }
[Required]
public string Name { get; set; } = string.Empty;
public string Value { get; set; } = string.Empty;
// EF stuff
// For self-referencing hierarchy (Property of a Property)
[JsonIgnore]
public int? ParentPropertyId { get; set; }
[JsonIgnore]
public Property? Parent { get; set; }
public List<Property> Properties{ get; set; } = [];
// For a Property of a Point
[JsonIgnore]
public List<Point> Points { get; set; } = [];
public int? PointId { get; set; }
[JsonIgnore]
public List<Equipment> Equipment { get; } = [];
public Point? Point { get; set; }
// For a Property of an Equipment
[JsonIgnore]
public int? EquipmentId { get; set; }
[JsonIgnore]
public Equipment? Equipment { get; set; }
// Child properties in the hierarchy
public List<Property> Properties { get; set; } = [];
}