DD.WellWorkover.Cloud/AsbCloudDb/Model/WellOperationCategory.cs
2022-12-09 14:36:45 +05:00

80 lines
2.8 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
{
#nullable disable
[Table("t_well_operation_category"), Comment("Справочник операций на скважине")]
public class WellOperationCategory : IId
{
#region ids constants
/// <summary>
/// Проработка перед наращиванием
/// </summary>
public const int IdDevelopment = 5007;
/// <summary>
/// Промывка
/// </summary>
public const int IdFlashing = 5036;
/// <summary>
/// Промывка перед наращиванием
/// </summary>
public const int IdFlashingBeforeConnection = 5005;
/// <summary>
/// Ротором (РУС)
/// </summary>
public const int IdRotor = 5003;
/// <summary>
/// Направленно (СЛАЙД)
/// </summary>
public const int IdSlide = 5002;
/// <summary>
/// Удержание в клиньях
/// </summary>
public const int IdSlipsTime = 5011;
/// <summary>
/// Замер ЗТС (запись MWD)
/// </summary>
public const int IdStaticSurveying = 5004;
/// <summary>
/// Шаблонировка перед наращиванием
/// </summary>
public const int IdTemplating = 5009;
/// <summary>
/// Шаблонировка во время бурения
/// </summary>
public const int IdTemplatingWhileDrilling = 5008;
/// <summary>
/// Сборка КНБК
/// </summary>
public const int IdBhaAssembly = 5001;
/// <summary>
/// Разборка КНБК
/// </summary>
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!;
}
}