DB integration added, multiple images for equipment
This commit is contained in:
+12
-5
@@ -1,5 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
@@ -11,11 +10,19 @@ public class Image
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
[JsonIgnore]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte[] Bytes { get; set; } = [];
|
||||
// EF stuff
|
||||
|
||||
// Foreign keys
|
||||
[JsonIgnore]
|
||||
public List<Point> Points { get; set; } = [];
|
||||
public int? PointId { get; set; }
|
||||
[JsonIgnore]
|
||||
public List<Equipment> Equipment { get; set; } = [];
|
||||
public int? EquipmentId { get; set; }
|
||||
|
||||
// Navigation Properties
|
||||
[JsonIgnore]
|
||||
public Point? Point { get; set; }
|
||||
[JsonIgnore]
|
||||
public Equipment? Equipment { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user