DD.WellWorkover.Cloud/AsbCloudDb/Model/WellOperationCategory.cs

253 lines
7.4 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text.Json.Serialization;
namespace AsbCloudDb.Model
{
[Table("t_well_operation_category"), Comment("Справочник операций на скважине")]
public class WellOperationCategory : IId
{
#region constants category operations ids
/// <summary>
/// БУРЕНИЕ
/// </summary>
public const int IdDrilling = 3000;
/// <summary>
/// СПО
/// </summary>
public const int IdSPOStage = 3001;
/// <summary>
/// КРЕПЛЕНИЕ
/// </summary>
public const int IdFastening = 3002;
/// <summary>
/// ГФР
/// </summary>
public const int IdGFR = 3003;
/// <summary>
/// Вспомогательные операции
/// </summary>
public const int IdAuxiliaryOperations = 3004;
/// <summary>
/// Непроизводительное время (НПВ)
/// </summary>
public const int IdNonProductiveTime = 3005;
/// <summary>
/// КНБК
/// </summary>
public const int IdKnbk = 4000;
/// <summary>
/// Механическое. бурение
/// </summary>
public const int IdMechanicalDrilling = 4001;
/// <summary>
/// Статический замер
/// </summary>
public const int IdMeasurementStat = 4002;
/// <summary>
/// Нормализация диаметра скважины
/// </summary>
public const int IdNormalizedWellDiameter = 4003;
/// <summary>
/// Наращивание
/// </summary>
public const int IdBuilding = 4004;
/// <summary>
/// СПО
/// </summary>
public const int IdSPO = 4005;
/// <summary>
/// Спуск обсадной колонны
/// </summary>
public const int IdCasingRunning = 4006;
/// <summary>
/// Цементирование
/// </summary>
public const int IdCementing = 4007;
/// <summary>
/// Вспомогательные работы при креплении
/// </summary>
public const int IdAuxiliaryWorkFastening = 4008;
/// <summary>
/// Сборка/разборка приборов ГИС
/// </summary>
public const int IdAssemblyOrDisassemblyGIS = 4009;
/// <summary>
/// СПО2
/// </summary>
public const int IdSPO2 = 4010;
/// <summary>
/// ГИС
/// </summary>
public const int IdGIS = 4011;
/// <summary>
/// Промывка, ОБР
/// </summary>
public const int IdFlushingOBR = 4012;
/// <summary>
/// Вспомогательные работы
/// </summary>
public const int IdAuxiliaryWork = 4013;
/// <summary>
/// Ремонт оборудования
/// </summary>
public const int IdEquipmentRepair = 4014;
/// <summary>
/// Аварийные работы
/// </summary>
public const int IdEmergencyWork = 4015;
/// <summary>
/// Осложнение
/// </summary>
public const int IdComplication = 4016;
/// <summary>
/// Незаложенные в ГГД операции
/// </summary>
public const int IdOperationsNotIncludedGGD = 4017;
/// <summary>
/// Разборка КНБК
/// </summary>
public const int IdBhaDisassembly = 5000;
/// <summary>
/// Сборка КНБК
/// </summary>
public const int IdBhaAssembly = 5001;
/// <summary>
/// Бурение слайдом
/// </summary>
public const int IdSlide = 5002;
/// <summary>
/// Бурение ротором
/// </summary>
public const int IdRotor = 5003;
/// <summary>
/// Замер ЗТС (запись MWD)
/// </summary>
public const int IdStaticSurveying = 5004;
/// <summary>
/// Промывка перед наращиванием
/// </summary>
public const int IdFlashingBeforeConnection = 5005;
/// <summary>
/// Проработка перед наращиванием
/// </summary>
public const int IdDevelopment = 5007;
/// <summary>
/// Шаблонировка во время бурения
/// </summary>
public const int IdTemplatingWhileDrilling = 5008;
/// <summary>
/// Шаблонировка перед наращиванием
/// </summary>
public const int IdTemplating = 5009;
/// <summary>
/// Удержание в клиньях
/// </summary>
public const int IdSlipsTime = 5011;
/// <summary>
/// Подъем КНБК
/// </summary>
public const int IdBhaUp = 5013;
/// <summary>
/// Спуск КНБК
/// </summary>
public const int IdBhaDown = 5015;
/// <summary>
/// Спуск ОК
/// </summary>
public const int IdCasingDown = 5017;
/// <summary>
/// Промывка
/// </summary>
public const int IdFlashing = 5036;
/// <summary>
/// Ремонт бурового оборудования
/// </summary>
public const int IdEquipmentDrillingRepair = 5058;
/// <summary>
/// Список всех категорий НПВ
/// </summary>
public static readonly int[] NonProductiveTimeSubIds = {
IdEquipmentDrillingRepair,
5059,
5060,
5061,
5062,
5063,
5064,
5065,
5066,
5067,
5068,
5069,
5070,
5071,
5072,
5073,
5074,
5075,
5076,
5077,
5078,
5079,
5101,
4014,
4015,
4016,
4017,
IdNonProductiveTime,
};
public static readonly int[] MechanicalDrillingSubIds = { IdRotor, IdSlide, IdMechanicalDrilling, };
#endregion
[Key]
[Column("id")]
public int Id { get; set; }
[Column("name"), Comment("Название категории операции")]
public string Name { get; set; } = null!;
[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!;
}
}