using Microsoft.EntityFrameworkCore; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Text.Json.Serialization; namespace AsbCloudDb.Model { #nullable disable [Table("t_well_operation_category"), Comment("Справочник операций на скважине")] public class WellOperationCategory : IId { #region ids constants /// /// Проработка перед наращиванием /// public const int IdDevelopment = 5007; /// /// Промывка /// public const int IdFlashing = 5036; /// /// Промывка перед наращиванием /// public const int IdFlashingBeforeConnection = 5005; /// /// Ротором (РУС) /// public const int IdRotor = 5003; /// /// Направленно (СЛАЙД) /// public const int IdSlide = 5002; /// /// Удержание в клиньях /// public const int IdSlipsTime = 5011; /// /// Замер ЗТС (запись MWD) /// public const int IdStaticSurveying = 5004; /// /// Шаблонировка перед наращиванием /// public const int IdTemplating = 5009; /// /// Шаблонировка во время бурения /// public const int IdTemplatingWhileDrilling = 5008; /// /// Сборка КНБК /// public const int IdBhaAssembly = 5001; /// /// Разборка КНБК /// public const int IdBhaDisassembly = 5000; #endregion [Key] [Column("id")] public int Id { get; set; } [Column("name"), Comment("Название категории операции")] public string Name { get; set; } [Column("id_parent"), Comment("id родительской категории")] public int? IdParent { get; set; } [Column("key_value_name"), Comment("Название ключевого показателя операции"), StringLength(32)] public string KeyValueName { get; set; } [Column("key_value_units"), Comment("Единицы измерения ключевого показателя операции"), StringLength(16)] public string KeyValueUnits { get; set; } [JsonIgnore] [ForeignKey(nameof(IdParent))] public virtual WellOperationCategory Parent { get; set; } = null!; } }