JSON export added
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace GazpromApp.Models;
|
||||
|
||||
@@ -8,6 +9,7 @@ public class Inspection
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
[JsonIgnore]
|
||||
public int Id { get; set; }
|
||||
[Required]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
@@ -18,8 +20,10 @@ public class Inspection
|
||||
[Required]
|
||||
public float PeriodValue { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public int EquipmentId { get; set; }
|
||||
|
||||
// EF stuff
|
||||
[JsonIgnore]
|
||||
public Equipment? Equipment { get; } = new();
|
||||
}
|
||||
Reference in New Issue
Block a user