31 lines
782 B
C#
31 lines
782 B
C#
using System;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace GazpromApp.Models;
|
|
|
|
public class Inspection
|
|
{
|
|
[Key]
|
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
|
[JsonIgnore]
|
|
public int Id { get; set; }
|
|
|
|
[Required]
|
|
public string Name { get; set; } = string.Empty;
|
|
[Required]
|
|
public DateTimeOffset InspectionDate { get; set; }
|
|
[Required]
|
|
public string PeriodType { get; set; } = string.Empty;
|
|
[Required]
|
|
public float PeriodValue { get; set; }
|
|
|
|
// Foreign keys
|
|
[JsonIgnore]
|
|
public int EquipmentId { get; set; }
|
|
|
|
// Navigation Properties
|
|
[JsonIgnore]
|
|
public Equipment? Equipment { get; } = new();
|
|
} |