Files
GazpromApp/Models/Equipment.cs
T
2025-07-10 10:57:42 +03:00

33 lines
918 B
C#

using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text.Json.Serialization;
namespace GazpromApp.Models;
public class Equipment
{
[Key]
[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]
[JsonIgnore]
public int PointId { get; set; }
[JsonIgnore]
public int ImageId { get; set; }
[JsonIgnore]
public List<int> InspectionIds { get; set; } = [];
// EF stuff
public Image? Image { get; set; }
[JsonIgnore]
public Point? Point { get; set; }
public List<Property> Properties { get; set; } = [];
public List<Inspection> Inspections { get; set; } = [];
}