28 lines
803 B
C#
28 lines
803 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace GazpromApp.Models;
|
|
|
|
public class Property
|
|
{
|
|
[Key]
|
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
|
[JsonIgnore]
|
|
public int Id { get; set; }
|
|
[JsonIgnore]
|
|
public int ParentId { get; set; }
|
|
[Required]
|
|
public string Name { get; set; } = string.Empty;
|
|
public string Value { get; set; } = string.Empty;
|
|
// EF stuff
|
|
[JsonIgnore]
|
|
public Property? Parent { get; set; }
|
|
public List<Property> Properties{ get; set; } = [];
|
|
[JsonIgnore]
|
|
public List<Point> Points { get; set; } = [];
|
|
[JsonIgnore]
|
|
public List<Equipment> Equipment { get; } = [];
|
|
} |