34 lines
977 B
C#
34 lines
977 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;
|
|
public string? Description { get; set; } = string.Empty;
|
|
|
|
// Foreign keys
|
|
[Required]
|
|
[JsonIgnore]
|
|
public int PointId { get; set; }
|
|
[JsonIgnore]
|
|
public List<int> ImageIds { get; set; } = [];
|
|
[JsonIgnore]
|
|
public List<int> InspectionIds { 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; } = [];
|
|
} |