forked from ddrilling/AsbCloudServer
Рефакторинг модели
1. Переименовал сущности РТК. Теперь они называются более корректно 2. Поправлены комментарии в сущности 3. Поправлены DTO 4. Добавлены новые миграции 5. Удалил лишние разрешения
This commit is contained in:
parent
771ba06a6f
commit
dbaa0ab754
@ -1,91 +0,0 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace AsbCloudApp.Data.ProcessMap
|
||||
{
|
||||
/// <summary>
|
||||
/// РТК
|
||||
/// </summary>
|
||||
public class ProcessMapPlanDto : IId, IWellRelated
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <inheritdoc/>
|
||||
[Range(1, int.MaxValue, ErrorMessage = "Id скважины не может быть меньше 1")]
|
||||
public int IdWell { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Id пользователя, поле заполнять не нужно, подставляется автоматически
|
||||
/// </summary>
|
||||
public int? IdUser { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Id режима 0-ручной, 1-ротор, 2 - слайд
|
||||
/// </summary>
|
||||
[Range(0, 2, ErrorMessage = "Id режима должен быть либо 0-ручной либо, 1-ротор либо 2-слайд")]
|
||||
public int IdMode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Тип секции
|
||||
/// </summary>
|
||||
public int IdWellSectionType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Дата последнего изменения
|
||||
/// </summary>
|
||||
public DateTimeOffset LastUpdate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Стартовая глубина
|
||||
/// </summary>
|
||||
[Range(0, 50000, ErrorMessage = "Глубина не может быть отрицательной")]
|
||||
public double DepthStart { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Глубина окончания интервала
|
||||
/// </summary>
|
||||
[Range(0, 50000, ErrorMessage = "Глубина не может быть отрицательной")]
|
||||
public double DepthEnd { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Нагрузка
|
||||
/// </summary>
|
||||
public PlanLimitDto AxialLoad { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Перепад давления
|
||||
/// </summary>
|
||||
public PlanLimitDto Pressure { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Момент на ВСП
|
||||
/// </summary>
|
||||
public PlanLimitDto TopDriveTorque { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Обороты на ВСП
|
||||
/// </summary>
|
||||
public PlanLimitDto TopDriveSpeed { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Расход
|
||||
/// </summary>
|
||||
public PlanLimitDto Flow { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Плановая механическая скорость, м/ч
|
||||
/// </summary>
|
||||
public double RopPlan { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Плановый процент использования АКБ
|
||||
/// </summary>
|
||||
public double UsageSaub { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Плановый процент использования spin master
|
||||
/// </summary>
|
||||
public double UsageSpin { get; set; }
|
||||
}
|
||||
}
|
@ -1,99 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace AsbCloudApp.Data.ProcessMap
|
||||
{
|
||||
/// <summary>
|
||||
/// Модель РТК
|
||||
/// </summary>
|
||||
public class ProcessMapReportDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Идентификатор скважины
|
||||
/// </summary>
|
||||
public int IdWell { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// название секции скважины
|
||||
/// </summary>
|
||||
public int IdWellSectionType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// название секции скважины
|
||||
/// </summary>
|
||||
public string WellSectionTypeName { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Глубина по стволу от, м
|
||||
/// <para>
|
||||
/// на начало интервала
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public double DepthStart { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Глубина по стволу до, м
|
||||
/// <para>
|
||||
/// на конец интервала
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public double DepthEnd { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Дата/ время
|
||||
/// <para>
|
||||
/// на начало интервала
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public DateTime DateStart { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Время мех бурения, ч
|
||||
/// </summary>
|
||||
public double MechDrillingHours { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Режим бурения (Ротор/слайд/ручной)
|
||||
/// </summary>
|
||||
public string DrillingMode { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Проходка, м
|
||||
/// </summary>
|
||||
public double? DeltaDepth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Перепад давления, атм
|
||||
/// </summary>
|
||||
public ProcessMapReportParamsDto PressureDiff { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Нагрузка, т
|
||||
/// </summary>
|
||||
public ProcessMapReportParamsDto AxialLoad { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Момент на ВСП, кНхМ
|
||||
/// </summary>
|
||||
public ProcessMapReportParamsDto TopDriveTorque { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Ограничение скорости, м/ч
|
||||
/// </summary>
|
||||
public ProcessMapReportParamsDto SpeedLimit { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Процент использования системы АПД план, %
|
||||
/// </summary>
|
||||
public double UsagePlan { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Процент использования системы АПД факт, %
|
||||
/// </summary>
|
||||
public double UsageFact { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Фактическая механическая скорость, м/ч
|
||||
/// </summary>
|
||||
public double? Rop { get; set; }
|
||||
}
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
namespace AsbCloudApp.Data.ProcessMap
|
||||
{
|
||||
/// <summary>
|
||||
/// Параметры РТК
|
||||
/// </summary>
|
||||
public class ProcessMapReportParamsDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Уставка план
|
||||
/// </summary>
|
||||
public double? SetpointPlan { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Уставка факт
|
||||
/// </summary>
|
||||
public double? SetpointFact { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Факт
|
||||
/// </summary>
|
||||
public double? Fact { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Ограничение
|
||||
/// </summary>
|
||||
public double? Limit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Процент бурения по уставке, %
|
||||
/// </summary>
|
||||
public double? SetpointUsage { get; set; }
|
||||
}
|
||||
}
|
@ -1,107 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace AsbCloudApp.Data.ProcessMap;
|
||||
|
||||
/// <summary>
|
||||
/// РТК план проработка скважины
|
||||
/// </summary>
|
||||
public class ProcessMapWellboreDevelopmentDto : IId, IWellRelated, IValidatableObject
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <inheritdoc/>
|
||||
public int IdWell { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Id пользователя
|
||||
/// </summary>
|
||||
public int IdUser { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Дата последнего изменения
|
||||
/// </summary>
|
||||
public DateTimeOffset LastUpdate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Стартовая глубина, м
|
||||
/// </summary>
|
||||
[Range(0, 99999.9, ErrorMessage = "Значение стартовой глубины должно быть в пределах от 0 до 99999.9")]
|
||||
public double DepthStart { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Окончательная глубина, м
|
||||
/// </summary>
|
||||
[Range(0, 99999.9, ErrorMessage = "Значение окончательной глубины должно быть в пределах от 0 до 99999.9")]
|
||||
public double DepthEnd { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Количество повторений
|
||||
/// </summary>
|
||||
[Range(0, 100, ErrorMessage = "Значение количества повторений должно быть в пределах от 0 до 100")]
|
||||
public double Repeats { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Вращение при движении вверх, об/мин
|
||||
/// </summary>
|
||||
[Range(0, 99999.9, ErrorMessage = "Значение количества вращений вверх должно быть в пределах от 0 до 99999.9")]
|
||||
public double SpinUpward { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Вращение при движении вниз, об/мин
|
||||
/// </summary>
|
||||
[Range(0, 99999.9, ErrorMessage = "Значение количества вращений вниз должно быть в пределах от 0 до 99999.9")]
|
||||
public double SpinDownward { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Скорость подъёма, м/ч
|
||||
/// </summary>
|
||||
[Range(0, 99999.9, ErrorMessage = "Значение скорости подъёма должно быть в пределах от 0 до 99999.9")]
|
||||
public double SpeedUpward { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Скорость спуска, м/ч
|
||||
/// </summary>
|
||||
[Range(0, 99999.9, ErrorMessage = "Значение скорости спуска должно быть в пределах от 0 до 99999.9")]
|
||||
public double SpeedDownward { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Уставка зятяжки, т
|
||||
/// </summary>
|
||||
[Range(0, 99999.9, ErrorMessage = "Значение затяжек уставки должно быть в пределах от 0 до 99999.9")]
|
||||
public double SetpointDrag { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Уставка посадки, т
|
||||
/// </summary>
|
||||
[Range(0, 99999.9, ErrorMessage = "Значение посадки уставки должно быть в пределах от 0 до 99999.9")]
|
||||
public double SetpointTight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Давление, атм
|
||||
/// </summary>
|
||||
[Range(0, 99999.9, ErrorMessage = "Значение давления должно быть в пределах от 0 до 99999.9")]
|
||||
public double Pressure { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Момент, кН*м
|
||||
/// </summary>
|
||||
[Range(0, 99999.9, ErrorMessage = "Значение крутящего момента должно быть в пределах от 0 до 99999.9")]
|
||||
public double Torque { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Комментарий
|
||||
/// </summary>
|
||||
public string? Comment { get; set; }
|
||||
|
||||
/// <inheritdoc/>
|
||||
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
if (DepthEnd < DepthStart)
|
||||
yield return new ValidationResult($"{nameof(DepthEnd)}:{DepthEnd:#0.0} меньше {nameof(DepthStart)}:{DepthStart:#0.0}", new[] { nameof(DepthEnd), nameof(DepthStart) });
|
||||
|
||||
yield break;
|
||||
}
|
||||
}
|
47
AsbCloudApp/Data/ProcessMaps/ProcessMapBaseDto.cs
Normal file
47
AsbCloudApp/Data/ProcessMaps/ProcessMapBaseDto.cs
Normal file
@ -0,0 +1,47 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace AsbCloudApp.Data.ProcessMaps;
|
||||
|
||||
/// <summary>
|
||||
/// Базовая Dto для РТК
|
||||
/// </summary>
|
||||
public abstract class ProcessMapBaseDto : IId, IWellRelated
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Id скважины
|
||||
/// </summary>
|
||||
[Range(1, int.MaxValue, ErrorMessage = "Id скважины не может быть меньше 1")]
|
||||
public int IdWell { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Id пользователя
|
||||
/// </summary>
|
||||
public int IdUser { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Дата последнего изменения
|
||||
/// </summary>
|
||||
public DateTimeOffset LastUpdate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Глубина по стволу от, м
|
||||
/// <para>
|
||||
/// на начало интервала
|
||||
/// </para>
|
||||
/// </summary>
|
||||
[Range(0, 99999.9, ErrorMessage = "Глубина не может быть отрицательной")]
|
||||
public double DepthStart { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Глубина по стволу до, м
|
||||
/// <para>
|
||||
/// на конец интервала
|
||||
/// </para>
|
||||
/// </summary>
|
||||
[Range(0, 99999.9, ErrorMessage = "Глубина не может быть отрицательной")]
|
||||
public double DepthEnd { get; set; }
|
||||
}
|
@ -0,0 +1,98 @@
|
||||
using System;
|
||||
|
||||
namespace AsbCloudApp.Data.ProcessMaps.Report;
|
||||
|
||||
/// <summary>
|
||||
/// Модель РТК
|
||||
/// </summary>
|
||||
public class WellDrillingProcessMapReportDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Идентификатор скважины
|
||||
/// </summary>
|
||||
public int IdWell { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Id секции скважины
|
||||
/// </summary>
|
||||
public int IdWellSectionType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Название секции скважины
|
||||
/// </summary>
|
||||
public string WellSectionTypeName { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Глубина по стволу от, м
|
||||
/// <para>
|
||||
/// на начало интервала
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public double DepthStart { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Глубина по стволу до, м
|
||||
/// <para>
|
||||
/// на конец интервала
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public double DepthEnd { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Дата/ время
|
||||
/// <para>
|
||||
/// на начало интервала
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public DateTime DateStart { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Время мех бурения, ч
|
||||
/// </summary>
|
||||
public double MechDrillingHours { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Режим бурения (Ротор/слайд/ручной)
|
||||
/// </summary>
|
||||
public string DrillingMode { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Проходка, м
|
||||
/// </summary>
|
||||
public double? DeltaDepth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Перепад давления, атм
|
||||
/// </summary>
|
||||
public WellDrillingProcessMapReportParamsDto PressureDiff { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Нагрузка, т
|
||||
/// </summary>
|
||||
public WellDrillingProcessMapReportParamsDto AxialLoad { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Момент на ВСП, кНхМ
|
||||
/// </summary>
|
||||
public WellDrillingProcessMapReportParamsDto TopDriveTorque { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Ограничение скорости, м/ч
|
||||
/// </summary>
|
||||
public WellDrillingProcessMapReportParamsDto SpeedLimit { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Процент использования системы АПД план, %
|
||||
/// </summary>
|
||||
public double UsagePlan { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Процент использования системы АПД факт, %
|
||||
/// </summary>
|
||||
public double UsageFact { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Фактическая механическая скорость, м/ч
|
||||
/// </summary>
|
||||
public double? Rop { get; set; }
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
namespace AsbCloudApp.Data.ProcessMaps.Report;
|
||||
|
||||
/// <summary>
|
||||
/// Параметры РТК
|
||||
/// </summary>
|
||||
public class WellDrillingProcessMapReportParamsDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Уставка план
|
||||
/// </summary>
|
||||
public double? SetpointPlan { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Уставка факт
|
||||
/// </summary>
|
||||
public double? SetpointFact { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Факт
|
||||
/// </summary>
|
||||
public double? Fact { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Ограничение
|
||||
/// </summary>
|
||||
public double? Limit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Процент бурения по уставке, %
|
||||
/// </summary>
|
||||
public double? SetpointUsage { get; set; }
|
||||
}
|
64
AsbCloudApp/Data/ProcessMaps/WellDrillingProcessMapDto.cs
Normal file
64
AsbCloudApp/Data/ProcessMaps/WellDrillingProcessMapDto.cs
Normal file
@ -0,0 +1,64 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace AsbCloudApp.Data.ProcessMaps;
|
||||
|
||||
/// <summary>
|
||||
/// РТК бурение скважины
|
||||
/// </summary>
|
||||
public class WellDrillingProcessMapDto : ProcessMapBaseDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Id режима 0-ручной, 1-ротор, 2 - слайд
|
||||
/// </summary>
|
||||
[Range(0, 2, ErrorMessage = "Id режима должен быть либо 0-ручной либо, 1-ротор либо 2-слайд")]
|
||||
public int IdMode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Тип секции
|
||||
/// </summary>
|
||||
[Range(1, int.MaxValue, ErrorMessage = "Id секции скважины не может быть меньше 1")]
|
||||
public int IdWellSectionType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Нагрузка
|
||||
/// </summary>
|
||||
public PlanLimitDto AxialLoad { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Перепад давления
|
||||
/// </summary>
|
||||
public PlanLimitDto Pressure { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Момент на ВСП
|
||||
/// </summary>
|
||||
public PlanLimitDto TopDriveTorque { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Обороты на ВСП
|
||||
/// </summary>
|
||||
public PlanLimitDto TopDriveSpeed { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Расход
|
||||
/// </summary>
|
||||
public PlanLimitDto Flow { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Плановая механическая скорость, м/ч
|
||||
/// </summary>
|
||||
[Range(1, 99999.9, ErrorMessage = "Плановая механическая скорость должно быть в пределах от 1 до 99999.9")]
|
||||
public double RopPlan { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Плановый процент использования АКБ
|
||||
/// </summary>
|
||||
[Range(0, 100, ErrorMessage = "Процент использования АКБ должен быть в пределах от 0 до 100")]
|
||||
public double UsageSaub { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Плановый процент использования spin master
|
||||
/// </summary>
|
||||
[Range(0, 100, ErrorMessage = "Процент использования spin master должен быть в пределах от 0 до 100")]
|
||||
public double UsageSpin { get; set; }
|
||||
}
|
78
AsbCloudApp/Data/ProcessMaps/WellReamProcessMapDto.cs
Normal file
78
AsbCloudApp/Data/ProcessMaps/WellReamProcessMapDto.cs
Normal file
@ -0,0 +1,78 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace AsbCloudApp.Data.ProcessMaps;
|
||||
|
||||
/// <summary>
|
||||
/// РТК проработка скважины
|
||||
/// </summary>
|
||||
public class WellReamProcessMapDto : ProcessMapBaseDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Количество повторений
|
||||
/// </summary>
|
||||
[Range(0, 100, ErrorMessage = "Количество повторений должно быть в пределах от 0 до 100")]
|
||||
public double Repeats { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Вращение при движении вверх, об/мин
|
||||
/// </summary>
|
||||
[Range(0, 99999.9, ErrorMessage = "Количество вращений вверх должно быть в пределах от 0 до 99999.9")]
|
||||
public double SpinUpward { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Вращение при движении вниз, об/мин
|
||||
/// </summary>
|
||||
[Range(0, 99999.9, ErrorMessage = "Количество вращений вниз должно быть в пределах от 0 до 99999.9")]
|
||||
public double SpinDownward { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Скорость подъёма, м/ч
|
||||
/// </summary>
|
||||
[Range(0, 99999.9, ErrorMessage = "Скорость подъёма должна быть в пределах от 0 до 99999.9")]
|
||||
public double SpeedUpward { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Скорость спуска, м/ч
|
||||
/// </summary>
|
||||
[Range(0, 99999.9, ErrorMessage = "Скорость спуска должна быть в пределах от 0 до 99999.9")]
|
||||
public double SpeedDownward { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Уставка зятяжки, т
|
||||
/// </summary>
|
||||
[Range(0, 99999.9, ErrorMessage = "Значение затяжек уставки должно быть в пределах от 0 до 99999.9")]
|
||||
public double SetpointDrag { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Уставка посадки, т
|
||||
/// </summary>
|
||||
[Range(0, 99999.9, ErrorMessage = "Значение посадки уставки должно быть в пределах от 0 до 99999.9")]
|
||||
public double SetpointTight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Давление, атм
|
||||
/// </summary>
|
||||
[Range(0, 99999.9, ErrorMessage = "Давление должно быть в пределах от 0 до 99999.9")]
|
||||
public double Pressure { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Момент, кН*м
|
||||
/// </summary>
|
||||
[Range(0, 99999.9, ErrorMessage = "Крутящий момент должен быть в пределах от 0 до 99999.9")]
|
||||
public double Torque { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Комментарий
|
||||
/// </summary>
|
||||
public string? Comment { get; set; }
|
||||
|
||||
/// <inheritdoc/>
|
||||
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
if (DepthEnd < DepthStart)
|
||||
yield return new ValidationResult(
|
||||
$"{nameof(DepthEnd)}:{DepthEnd:#0.0} меньше {nameof(DepthStart)}:{DepthStart:#0.0}",
|
||||
new[] { nameof(DepthEnd), nameof(DepthStart) });
|
||||
}
|
||||
}
|
8634
AsbCloudDb/Migrations/20231009093808_Update_ProcessMaps.Designer.cs
generated
Normal file
8634
AsbCloudDb/Migrations/20231009093808_Update_ProcessMaps.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
384
AsbCloudDb/Migrations/20231009093808_Update_ProcessMaps.cs
Normal file
384
AsbCloudDb/Migrations/20231009093808_Update_ProcessMaps.cs
Normal file
@ -0,0 +1,384 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace AsbCloudDb.Migrations
|
||||
{
|
||||
public partial class Update_ProcessMaps : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_t_process_map_t_well_section_type_id_wellsection_type",
|
||||
table: "t_process_map");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_t_process_map_t_well_well_id",
|
||||
table: "t_process_map");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_t_process_map_wellbore_development_t_user_id_user",
|
||||
table: "t_process_map_wellbore_development");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_t_process_map_wellbore_development_t_well_id_well",
|
||||
table: "t_process_map_wellbore_development");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_t_process_map_wellbore_development",
|
||||
table: "t_process_map_wellbore_development");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_t_process_map",
|
||||
table: "t_process_map");
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 513, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 514, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_relation_user_role_permission",
|
||||
keyColumns: new[] { "id_permission", "id_user_role" },
|
||||
keyValues: new object[] { 515, 1 });
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_permission",
|
||||
keyColumn: "id",
|
||||
keyValue: 513);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_permission",
|
||||
keyColumn: "id",
|
||||
keyValue: 514);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "t_permission",
|
||||
keyColumn: "id",
|
||||
keyValue: 515);
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "t_process_map_wellbore_development",
|
||||
newName: "t_well_ream_process_map");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "t_process_map",
|
||||
newName: "t_well_drilling_process_map");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_t_process_map_wellbore_development_id_well",
|
||||
table: "t_well_ream_process_map",
|
||||
newName: "IX_t_well_ream_process_map_id_well");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_t_process_map_wellbore_development_id_user",
|
||||
table: "t_well_ream_process_map",
|
||||
newName: "IX_t_well_ream_process_map_id_user");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "well_id",
|
||||
table: "t_well_drilling_process_map",
|
||||
newName: "id_well");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_t_process_map_well_id",
|
||||
table: "t_well_drilling_process_map",
|
||||
newName: "IX_t_well_drilling_process_map_id_well");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_t_process_map_id_wellsection_type",
|
||||
table: "t_well_drilling_process_map",
|
||||
newName: "IX_t_well_drilling_process_map_id_wellsection_type");
|
||||
|
||||
migrationBuilder.AlterTable(
|
||||
name: "t_well_ream_process_map",
|
||||
comment: "РТК проработка скважины",
|
||||
oldComment: "РТК план проработка скважины");
|
||||
|
||||
migrationBuilder.AlterTable(
|
||||
name: "t_well_drilling_process_map",
|
||||
comment: "РТК бурение скважины",
|
||||
oldComment: "Операции по скважине – РТК");
|
||||
|
||||
migrationBuilder.AlterColumn<double>(
|
||||
name: "depth_start",
|
||||
table: "t_well_ream_process_map",
|
||||
type: "double precision",
|
||||
nullable: false,
|
||||
comment: "Глубина по стволу от, м",
|
||||
oldClrType: typeof(double),
|
||||
oldType: "double precision",
|
||||
oldComment: "Стартовая глубина, м");
|
||||
|
||||
migrationBuilder.AlterColumn<double>(
|
||||
name: "depth_end",
|
||||
table: "t_well_ream_process_map",
|
||||
type: "double precision",
|
||||
nullable: false,
|
||||
comment: "Глубина по стволу до, м",
|
||||
oldClrType: typeof(double),
|
||||
oldType: "double precision",
|
||||
oldComment: "Окончательная глубина, м");
|
||||
|
||||
migrationBuilder.AlterColumn<double>(
|
||||
name: "depth_start",
|
||||
table: "t_well_drilling_process_map",
|
||||
type: "double precision",
|
||||
nullable: false,
|
||||
comment: "Глубина по стволу от, м",
|
||||
oldClrType: typeof(double),
|
||||
oldType: "double precision",
|
||||
oldComment: "Стартовая глубина");
|
||||
|
||||
migrationBuilder.AlterColumn<double>(
|
||||
name: "depth_end",
|
||||
table: "t_well_drilling_process_map",
|
||||
type: "double precision",
|
||||
nullable: false,
|
||||
comment: "Глубина по стволу до, м",
|
||||
oldClrType: typeof(double),
|
||||
oldType: "double precision",
|
||||
oldComment: "Глубина окончания интервала");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_t_well_ream_process_map",
|
||||
table: "t_well_ream_process_map",
|
||||
column: "id");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_t_well_drilling_process_map",
|
||||
table: "t_well_drilling_process_map",
|
||||
column: "id");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_t_well_drilling_process_map_id_user",
|
||||
table: "t_well_drilling_process_map",
|
||||
column: "id_user");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_t_well_drilling_process_map_t_user_id_user",
|
||||
table: "t_well_drilling_process_map",
|
||||
column: "id_user",
|
||||
principalTable: "t_user",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_t_well_drilling_process_map_t_well_id_well",
|
||||
table: "t_well_drilling_process_map",
|
||||
column: "id_well",
|
||||
principalTable: "t_well",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_t_well_drilling_process_map_t_well_section_type_id_wellsect~",
|
||||
table: "t_well_drilling_process_map",
|
||||
column: "id_wellsection_type",
|
||||
principalTable: "t_well_section_type",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_t_well_ream_process_map_t_user_id_user",
|
||||
table: "t_well_ream_process_map",
|
||||
column: "id_user",
|
||||
principalTable: "t_user",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_t_well_ream_process_map_t_well_id_well",
|
||||
table: "t_well_ream_process_map",
|
||||
column: "id_well",
|
||||
principalTable: "t_well",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_t_well_drilling_process_map_t_user_id_user",
|
||||
table: "t_well_drilling_process_map");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_t_well_drilling_process_map_t_well_id_well",
|
||||
table: "t_well_drilling_process_map");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_t_well_drilling_process_map_t_well_section_type_id_wellsect~",
|
||||
table: "t_well_drilling_process_map");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_t_well_ream_process_map_t_user_id_user",
|
||||
table: "t_well_ream_process_map");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_t_well_ream_process_map_t_well_id_well",
|
||||
table: "t_well_ream_process_map");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_t_well_ream_process_map",
|
||||
table: "t_well_ream_process_map");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_t_well_drilling_process_map",
|
||||
table: "t_well_drilling_process_map");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_t_well_drilling_process_map_id_user",
|
||||
table: "t_well_drilling_process_map");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "t_well_ream_process_map",
|
||||
newName: "t_process_map_wellbore_development");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "t_well_drilling_process_map",
|
||||
newName: "t_process_map");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_t_well_ream_process_map_id_well",
|
||||
table: "t_process_map_wellbore_development",
|
||||
newName: "IX_t_process_map_wellbore_development_id_well");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_t_well_ream_process_map_id_user",
|
||||
table: "t_process_map_wellbore_development",
|
||||
newName: "IX_t_process_map_wellbore_development_id_user");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "id_well",
|
||||
table: "t_process_map",
|
||||
newName: "well_id");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_t_well_drilling_process_map_id_wellsection_type",
|
||||
table: "t_process_map",
|
||||
newName: "IX_t_process_map_id_wellsection_type");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_t_well_drilling_process_map_id_well",
|
||||
table: "t_process_map",
|
||||
newName: "IX_t_process_map_well_id");
|
||||
|
||||
migrationBuilder.AlterTable(
|
||||
name: "t_process_map_wellbore_development",
|
||||
comment: "РТК план проработка скважины",
|
||||
oldComment: "РТК проработка скважины");
|
||||
|
||||
migrationBuilder.AlterTable(
|
||||
name: "t_process_map",
|
||||
comment: "Операции по скважине – РТК",
|
||||
oldComment: "РТК бурение скважины");
|
||||
|
||||
migrationBuilder.AlterColumn<double>(
|
||||
name: "depth_start",
|
||||
table: "t_process_map_wellbore_development",
|
||||
type: "double precision",
|
||||
nullable: false,
|
||||
comment: "Стартовая глубина, м",
|
||||
oldClrType: typeof(double),
|
||||
oldType: "double precision",
|
||||
oldComment: "Глубина по стволу от, м");
|
||||
|
||||
migrationBuilder.AlterColumn<double>(
|
||||
name: "depth_end",
|
||||
table: "t_process_map_wellbore_development",
|
||||
type: "double precision",
|
||||
nullable: false,
|
||||
comment: "Окончательная глубина, м",
|
||||
oldClrType: typeof(double),
|
||||
oldType: "double precision",
|
||||
oldComment: "Глубина по стволу до, м");
|
||||
|
||||
migrationBuilder.AlterColumn<double>(
|
||||
name: "depth_start",
|
||||
table: "t_process_map",
|
||||
type: "double precision",
|
||||
nullable: false,
|
||||
comment: "Стартовая глубина",
|
||||
oldClrType: typeof(double),
|
||||
oldType: "double precision",
|
||||
oldComment: "Глубина по стволу от, м");
|
||||
|
||||
migrationBuilder.AlterColumn<double>(
|
||||
name: "depth_end",
|
||||
table: "t_process_map",
|
||||
type: "double precision",
|
||||
nullable: false,
|
||||
comment: "Глубина окончания интервала",
|
||||
oldClrType: typeof(double),
|
||||
oldType: "double precision",
|
||||
oldComment: "Глубина по стволу до, м");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_t_process_map_wellbore_development",
|
||||
table: "t_process_map_wellbore_development",
|
||||
column: "id");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_t_process_map",
|
||||
table: "t_process_map",
|
||||
column: "id");
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "t_permission",
|
||||
columns: new[] { "id", "description", "name" },
|
||||
values: new object[,]
|
||||
{
|
||||
{ 513, "Разрешение просматривать РТК", "ProcessMap.get" },
|
||||
{ 514, "Разрешение редактировать РТК", "ProcessMap.edit" },
|
||||
{ 515, "Разрешение удалять РТК", "ProcessMap.delete" }
|
||||
});
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "t_relation_user_role_permission",
|
||||
columns: new[] { "id_permission", "id_user_role" },
|
||||
values: new object[,]
|
||||
{
|
||||
{ 513, 1 },
|
||||
{ 514, 1 },
|
||||
{ 515, 1 }
|
||||
});
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_t_process_map_t_well_section_type_id_wellsection_type",
|
||||
table: "t_process_map",
|
||||
column: "id_wellsection_type",
|
||||
principalTable: "t_well_section_type",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_t_process_map_t_well_well_id",
|
||||
table: "t_process_map",
|
||||
column: "well_id",
|
||||
principalTable: "t_well",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_t_process_map_wellbore_development_t_user_id_user",
|
||||
table: "t_process_map_wellbore_development",
|
||||
column: "id_user",
|
||||
principalTable: "t_user",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_t_process_map_wellbore_development_t_well_id_well",
|
||||
table: "t_process_map_wellbore_development",
|
||||
column: "id_well",
|
||||
principalTable: "t_well",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
}
|
||||
}
|
@ -19,7 +19,7 @@ namespace AsbCloudDb.Migrations
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.UseCollation("Russian_Russia.1251")
|
||||
.HasAnnotation("ProductVersion", "6.0.7")
|
||||
.HasAnnotation("ProductVersion", "6.0.22")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.HasPostgresExtension(modelBuilder, "adminpack");
|
||||
@ -2192,24 +2192,6 @@ namespace AsbCloudDb.Migrations
|
||||
Name = "PlannedTrajectory.delete"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 513,
|
||||
Description = "Разрешение просматривать РТК",
|
||||
Name = "ProcessMap.get"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 514,
|
||||
Description = "Разрешение редактировать РТК",
|
||||
Name = "ProcessMap.edit"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 515,
|
||||
Description = "Разрешение удалять РТК",
|
||||
Name = "ProcessMap.delete"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 516,
|
||||
Description = "Разрешение просматривать статистику вопросов",
|
||||
@ -2353,7 +2335,7 @@ namespace AsbCloudDb.Migrations
|
||||
b.HasComment("Загрузка плановой траектории");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AsbCloudDb.Model.ProcessMap", b =>
|
||||
modelBuilder.Entity("AsbCloudDb.Model.ProcessMaps.WellDrillingProcessMap", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@ -2375,12 +2357,12 @@ namespace AsbCloudDb.Migrations
|
||||
b.Property<double>("DepthEnd")
|
||||
.HasColumnType("double precision")
|
||||
.HasColumnName("depth_end")
|
||||
.HasComment("Глубина окончания интервала");
|
||||
.HasComment("Глубина по стволу до, м");
|
||||
|
||||
b.Property<double>("DepthStart")
|
||||
.HasColumnType("double precision")
|
||||
.HasColumnName("depth_start")
|
||||
.HasComment("Стартовая глубина");
|
||||
.HasComment("Глубина по стволу от, м");
|
||||
|
||||
b.Property<double>("FlowLimitMax")
|
||||
.HasColumnType("double precision")
|
||||
@ -2404,7 +2386,7 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.Property<int>("IdWell")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("well_id")
|
||||
.HasColumnName("id_well")
|
||||
.HasComment("Id скважины");
|
||||
|
||||
b.Property<int>("IdWellSectionType")
|
||||
@ -2464,16 +2446,18 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("IdUser");
|
||||
|
||||
b.HasIndex("IdWell");
|
||||
|
||||
b.HasIndex("IdWellSectionType");
|
||||
|
||||
b.ToTable("t_process_map");
|
||||
b.ToTable("t_well_drilling_process_map");
|
||||
|
||||
b.HasComment("Операции по скважине – РТК");
|
||||
b.HasComment("РТК бурение скважины");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AsbCloudDb.Model.ProcessMapWellboreDevelopment", b =>
|
||||
modelBuilder.Entity("AsbCloudDb.Model.ProcessMaps.WellReamProcessMap", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@ -2490,12 +2474,12 @@ namespace AsbCloudDb.Migrations
|
||||
b.Property<double>("DepthEnd")
|
||||
.HasColumnType("double precision")
|
||||
.HasColumnName("depth_end")
|
||||
.HasComment("Окончательная глубина, м");
|
||||
.HasComment("Глубина по стволу до, м");
|
||||
|
||||
b.Property<double>("DepthStart")
|
||||
.HasColumnType("double precision")
|
||||
.HasColumnName("depth_start")
|
||||
.HasComment("Стартовая глубина, м");
|
||||
.HasComment("Глубина по стволу от, м");
|
||||
|
||||
b.Property<int>("IdUser")
|
||||
.HasColumnType("integer")
|
||||
@ -2563,9 +2547,9 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasIndex("IdWell");
|
||||
|
||||
b.ToTable("t_process_map_wellbore_development");
|
||||
b.ToTable("t_well_ream_process_map");
|
||||
|
||||
b.HasComment("РТК план проработка скважины");
|
||||
b.HasComment("РТК проработка скважины");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b =>
|
||||
@ -3869,21 +3853,6 @@ namespace AsbCloudDb.Migrations
|
||||
IdPermission = 512
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 513
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 514
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 515
|
||||
},
|
||||
new
|
||||
{
|
||||
IdUserRole = 1,
|
||||
IdPermission = 516
|
||||
@ -7999,10 +7968,16 @@ namespace AsbCloudDb.Migrations
|
||||
b.Navigation("Well");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AsbCloudDb.Model.ProcessMap", b =>
|
||||
modelBuilder.Entity("AsbCloudDb.Model.ProcessMaps.WellDrillingProcessMap", b =>
|
||||
{
|
||||
b.HasOne("AsbCloudDb.Model.User", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("IdUser")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("AsbCloudDb.Model.Well", "Well")
|
||||
.WithMany("ProcessMaps")
|
||||
.WithMany()
|
||||
.HasForeignKey("IdWell")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
@ -8013,12 +7988,14 @@ namespace AsbCloudDb.Migrations
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("User");
|
||||
|
||||
b.Navigation("Well");
|
||||
|
||||
b.Navigation("WellSectionType");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AsbCloudDb.Model.ProcessMapWellboreDevelopment", b =>
|
||||
modelBuilder.Entity("AsbCloudDb.Model.ProcessMaps.WellReamProcessMap", b =>
|
||||
{
|
||||
b.HasOne("AsbCloudDb.Model.User", "User")
|
||||
.WithMany()
|
||||
@ -8629,8 +8606,6 @@ namespace AsbCloudDb.Migrations
|
||||
{
|
||||
b.Navigation("DrillingProgramParts");
|
||||
|
||||
b.Navigation("ProcessMaps");
|
||||
|
||||
b.Navigation("RelationCompaniesWells");
|
||||
|
||||
b.Navigation("WellCompositeSrcs");
|
||||
|
@ -4,6 +4,7 @@ using Microsoft.EntityFrameworkCore;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using AsbCloudDb.Model.Manuals;
|
||||
using AsbCloudDb.Model.ProcessMaps;
|
||||
|
||||
namespace AsbCloudDb.Model
|
||||
{
|
||||
@ -16,8 +17,8 @@ namespace AsbCloudDb.Model
|
||||
public virtual DbSet<Deposit> Deposits => Set<Deposit>();
|
||||
public virtual DbSet<DetectedOperation> DetectedOperations => Set<DetectedOperation>();
|
||||
public virtual DbSet<PlannedTrajectory> PlannedTrajectories => Set<PlannedTrajectory>();
|
||||
public virtual DbSet<ProcessMap> ProcessMap => Set<ProcessMap>();
|
||||
public virtual DbSet<ProcessMapWellboreDevelopment> ProcessMapWellboreDevelopments => Set<ProcessMapWellboreDevelopment>();
|
||||
public virtual DbSet<WellDrillingProcessMap> WellDrillingProcessMaps => Set<WellDrillingProcessMap>();
|
||||
public virtual DbSet<WellReamProcessMap> WellReamProcessMaps => Set<WellReamProcessMap>();
|
||||
public virtual DbSet<DrillingProgramPart> DrillingProgramParts => Set<DrillingProgramPart>();
|
||||
public virtual DbSet<FileCategory> FileCategories => Set<FileCategory>();
|
||||
public virtual DbSet<FileInfo> Files => Set<FileInfo>();
|
||||
|
@ -142,10 +142,6 @@
|
||||
new (){ Id = 511, Name="PlannedTrajectory.edit", Description="Разрешение редактировать плановая траектория"},
|
||||
new (){ Id = 512, Name="PlannedTrajectory.delete", Description="Разрешение удалять плановая траектория"},
|
||||
|
||||
new (){ Id = 513, Name="ProcessMap.get", Description="Разрешение просматривать РТК"},
|
||||
new (){ Id = 514, Name="ProcessMap.edit", Description="Разрешение редактировать РТК"},
|
||||
new (){ Id = 515, Name="ProcessMap.delete", Description="Разрешение удалять РТК"},
|
||||
|
||||
new (){ Id = 516, Name="FaqStatistics.get", Description="Разрешение просматривать статистику вопросов"},
|
||||
new (){ Id = 517, Name="FaqStatistics.edit", Description="Разрешение редактировать вопрос"},
|
||||
new (){ Id = 518, Name="FaqStatistics.delete", Description="Разрешение удалять вопрос"},
|
||||
|
@ -8,6 +8,7 @@ using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using AsbCloudDb.Model.Manuals;
|
||||
using AsbCloudDb.Model.ProcessMaps;
|
||||
|
||||
namespace AsbCloudDb.Model
|
||||
{
|
||||
@ -20,8 +21,8 @@ namespace AsbCloudDb.Model
|
||||
DbSet<Deposit> Deposits { get; }
|
||||
DbSet<DetectedOperation> DetectedOperations { get; }
|
||||
DbSet<PlannedTrajectory> PlannedTrajectories { get; }
|
||||
DbSet<ProcessMap> ProcessMap { get; }
|
||||
DbSet<ProcessMapWellboreDevelopment> ProcessMapWellboreDevelopments { get; }
|
||||
DbSet<WellDrillingProcessMap> WellDrillingProcessMaps { get; }
|
||||
DbSet<WellReamProcessMap> WellReamProcessMaps { get; }
|
||||
DbSet<DrillingProgramPart> DrillingProgramParts { get; }
|
||||
DbSet<FileCategory> FileCategories { get; }
|
||||
DbSet<FileInfo> Files { get; }
|
||||
|
@ -1,84 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace AsbCloudDb.Model
|
||||
{
|
||||
[Table("t_process_map"), Comment("Операции по скважине – РТК")]
|
||||
public class ProcessMap : IId, IWellRelated
|
||||
{
|
||||
[Key]
|
||||
[Column("id")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column("well_id"), Comment("Id скважины")]
|
||||
public int IdWell { get; set; }
|
||||
|
||||
[Column("id_user"), Comment("Id пользователя")]
|
||||
public int IdUser { get; set; }
|
||||
|
||||
[Column("id_mode"), Comment("Id режима (1- ротор, 2 слайд)")]
|
||||
public int IdMode { get; set; }
|
||||
|
||||
[Column("id_wellsection_type"), Comment("Тип секции")]
|
||||
public int IdWellSectionType { get; set; }
|
||||
|
||||
[Column("last_update", TypeName = "timestamp with time zone"), Comment("Дата последнего изменения")]
|
||||
public DateTimeOffset LastUpdate { get; set; }
|
||||
|
||||
[Column("depth_start"), Comment("Стартовая глубина")]
|
||||
public double DepthStart { get; set; }
|
||||
|
||||
[Column("depth_end"), Comment("Глубина окончания интервала")]
|
||||
public double DepthEnd { get; set; }
|
||||
|
||||
[Column("axial_load_plan"), Comment("Нагрузка, план")]
|
||||
public double AxialLoadPlan { get; set; }
|
||||
|
||||
[Column("axial_load_limit_max"), Comment("Нагрузка, допустимый максимум")]
|
||||
public double AxialLoadLimitMax { get; set; }
|
||||
|
||||
[Column("pressure_plan"), Comment("Перепад давления, план")]
|
||||
public double PressurePlan { get; set; }
|
||||
|
||||
[Column("pressure_limit_max"), Comment("Перепад давления, допустимый максимум")]
|
||||
public double PressureLimitMax { get; set; }
|
||||
|
||||
[Column("top_drive_torque_plan"), Comment("Момент на ВСП, план")]
|
||||
public double TopDriveTorquePlan { get; set; }
|
||||
|
||||
[Column("top_drive_torque_limit_max"), Comment("Момент на ВСП, допустимый максимум")]
|
||||
public double TopDriveTorqueLimitMax { get; set; }
|
||||
|
||||
[Column("top_drive_speed_plan"), Comment("Обороты на ВСП, план")]
|
||||
public double TopDriveSpeedPlan { get; set; }
|
||||
|
||||
[Column("top_drive_speed_limit_max"), Comment("Обороты на ВСП, допустимый максимум")]
|
||||
public double TopDriveSpeedLimitMax { get; set; }
|
||||
|
||||
[Column("flow_plan"), Comment("Расход, план")]
|
||||
public double FlowPlan { get; set; }
|
||||
|
||||
[Column("flow_limit_max"), Comment("Расход, допустимый максимум")]
|
||||
public double FlowLimitMax { get; set; }
|
||||
|
||||
[Column("rop_plan"), Comment("Плановая механическая скорость, м/ч")]
|
||||
public double RopPlan { get; set; }
|
||||
|
||||
[Column("usage_saub"), Comment("Плановый процент использования АКБ")]
|
||||
public double UsageSaub { get; set; }
|
||||
|
||||
[Column("usage_spin"), Comment("Плановый процент использования spin master")]
|
||||
public double UsageSpin { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[ForeignKey(nameof(IdWell))]
|
||||
public virtual Well Well { get; set; } = null!;
|
||||
|
||||
[JsonIgnore]
|
||||
[ForeignKey(nameof(IdWellSectionType))]
|
||||
public virtual WellSectionType WellSectionType { get; set; } = null!;
|
||||
}
|
||||
}
|
@ -1,65 +0,0 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace AsbCloudDb.Model;
|
||||
|
||||
[Table("t_process_map_wellbore_development"), Comment("РТК план проработка скважины")]
|
||||
public class ProcessMapWellboreDevelopment : IId, IWellRelated
|
||||
{
|
||||
[Key]
|
||||
[Column("id")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column("id_well"), Comment("Id скважины")]
|
||||
public int IdWell { get; set; }
|
||||
|
||||
[Column("id_user"), Comment("Id пользователя")]
|
||||
public int IdUser { get; set; }
|
||||
|
||||
[Column("last_update", TypeName = "timestamp with time zone"), Comment("Дата последнего изменения")]
|
||||
public DateTimeOffset LastUpdate { get; set; }
|
||||
|
||||
[Column("depth_start"), Comment("Стартовая глубина, м")]
|
||||
public double DepthStart { get; set; }
|
||||
|
||||
[Column("depth_end"), Comment("Окончательная глубина, м")]
|
||||
public double DepthEnd { get; set; }
|
||||
|
||||
[Column("repeats"), Comment("Количество повторений")]
|
||||
public double Repeats { get; set; }
|
||||
|
||||
[Column("spin_upward"), Comment("Вращение при движении вверх, об/мин")]
|
||||
public double SpinUpward { get; set; }
|
||||
|
||||
[Column("spin_downward"), Comment("Вращение при движении вниз, об/мин")]
|
||||
public double SpinDownward { get; set; }
|
||||
|
||||
[Column("speed_upward"), Comment("Скорость подъёма, м/ч")]
|
||||
public double SpeedUpward { get; set; }
|
||||
|
||||
[Column("speed_downward"), Comment("Скорость спуска, м/ч")]
|
||||
public double SpeedDownward { get; set; }
|
||||
|
||||
[Column("setpoint_drag"), Comment("Уставка зятяжки, т")]
|
||||
public double SetpointDrag { get; set; }
|
||||
|
||||
[Column("setpoint_tight"), Comment("Уставка посадки, т")]
|
||||
public double SetpointTight { get; set; }
|
||||
|
||||
[Column("pressure"), Comment("Давление, атм")]
|
||||
public double Pressure { get; set; }
|
||||
|
||||
[Column("torque"), Comment("Момент, кН*м")]
|
||||
public double Torque { get; set; }
|
||||
|
||||
[Column("comment"), Comment("Комментарий")]
|
||||
public string? Comment { get; set; }
|
||||
|
||||
[ForeignKey(nameof(IdWell))]
|
||||
public virtual Well Well { get; set; } = null!;
|
||||
|
||||
[ForeignKey(nameof(IdUser))]
|
||||
public virtual User User { get; set; } = null!;
|
||||
}
|
36
AsbCloudDb/Model/ProcessMaps/ProcessMapBase.cs
Normal file
36
AsbCloudDb/Model/ProcessMaps/ProcessMapBase.cs
Normal file
@ -0,0 +1,36 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace AsbCloudDb.Model.ProcessMaps;
|
||||
|
||||
public abstract class ProcessMapBase : IId, IWellRelated
|
||||
{
|
||||
[Key]
|
||||
[Column("id")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column("id_well"), Comment("Id скважины")]
|
||||
public int IdWell { get; set; }
|
||||
|
||||
[Column("id_user"), Comment("Id пользователя")]
|
||||
public int IdUser { get; set; }
|
||||
|
||||
[Column("last_update", TypeName = "timestamp with time zone"), Comment("Дата последнего изменения")]
|
||||
public DateTimeOffset LastUpdate { get; set; }
|
||||
|
||||
[Column("depth_start"), Comment("Глубина по стволу от, м")]
|
||||
public double DepthStart { get; set; }
|
||||
|
||||
[Column("depth_end"), Comment("Глубина по стволу до, м")]
|
||||
public double DepthEnd { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[ForeignKey(nameof(IdWell))]
|
||||
public virtual Well Well { get; set; } = null!;
|
||||
|
||||
[ForeignKey(nameof(IdUser))]
|
||||
public virtual User User { get; set; } = null!;
|
||||
}
|
58
AsbCloudDb/Model/ProcessMaps/WellDrillingProcessMap.cs
Normal file
58
AsbCloudDb/Model/ProcessMaps/WellDrillingProcessMap.cs
Normal file
@ -0,0 +1,58 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace AsbCloudDb.Model.ProcessMaps;
|
||||
|
||||
[Table("t_well_drilling_process_map"), Comment("РТК бурение скважины")]
|
||||
public class WellDrillingProcessMap : ProcessMapBase
|
||||
{
|
||||
[Column("id_mode"), Comment("Id режима (1- ротор, 2 слайд)")]
|
||||
public int IdMode { get; set; }
|
||||
|
||||
[Column("id_wellsection_type"), Comment("Тип секции")]
|
||||
public int IdWellSectionType { get; set; }
|
||||
|
||||
[Column("axial_load_plan"), Comment("Нагрузка, план")]
|
||||
public double AxialLoadPlan { get; set; }
|
||||
|
||||
[Column("axial_load_limit_max"), Comment("Нагрузка, допустимый максимум")]
|
||||
public double AxialLoadLimitMax { get; set; }
|
||||
|
||||
[Column("pressure_plan"), Comment("Перепад давления, план")]
|
||||
public double PressurePlan { get; set; }
|
||||
|
||||
[Column("pressure_limit_max"), Comment("Перепад давления, допустимый максимум")]
|
||||
public double PressureLimitMax { get; set; }
|
||||
|
||||
[Column("top_drive_torque_plan"), Comment("Момент на ВСП, план")]
|
||||
public double TopDriveTorquePlan { get; set; }
|
||||
|
||||
[Column("top_drive_torque_limit_max"), Comment("Момент на ВСП, допустимый максимум")]
|
||||
public double TopDriveTorqueLimitMax { get; set; }
|
||||
|
||||
[Column("top_drive_speed_plan"), Comment("Обороты на ВСП, план")]
|
||||
public double TopDriveSpeedPlan { get; set; }
|
||||
|
||||
[Column("top_drive_speed_limit_max"), Comment("Обороты на ВСП, допустимый максимум")]
|
||||
public double TopDriveSpeedLimitMax { get; set; }
|
||||
|
||||
[Column("flow_plan"), Comment("Расход, план")]
|
||||
public double FlowPlan { get; set; }
|
||||
|
||||
[Column("flow_limit_max"), Comment("Расход, допустимый максимум")]
|
||||
public double FlowLimitMax { get; set; }
|
||||
|
||||
[Column("rop_plan"), Comment("Плановая механическая скорость, м/ч")]
|
||||
public double RopPlan { get; set; }
|
||||
|
||||
[Column("usage_saub"), Comment("Плановый процент использования АКБ")]
|
||||
public double UsageSaub { get; set; }
|
||||
|
||||
[Column("usage_spin"), Comment("Плановый процент использования spin master")]
|
||||
public double UsageSpin { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[ForeignKey(nameof(IdWellSectionType))]
|
||||
public virtual WellSectionType WellSectionType { get; set; } = null!;
|
||||
}
|
38
AsbCloudDb/Model/ProcessMaps/WellReamProcessMap.cs
Normal file
38
AsbCloudDb/Model/ProcessMaps/WellReamProcessMap.cs
Normal file
@ -0,0 +1,38 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace AsbCloudDb.Model.ProcessMaps;
|
||||
|
||||
[Table("t_well_ream_process_map"), Comment("РТК проработка скважины")]
|
||||
public class WellReamProcessMap : ProcessMapBase
|
||||
{
|
||||
[Column("repeats"), Comment("Количество повторений")]
|
||||
public double Repeats { get; set; }
|
||||
|
||||
[Column("spin_upward"), Comment("Вращение при движении вверх, об/мин")]
|
||||
public double SpinUpward { get; set; }
|
||||
|
||||
[Column("spin_downward"), Comment("Вращение при движении вниз, об/мин")]
|
||||
public double SpinDownward { get; set; }
|
||||
|
||||
[Column("speed_upward"), Comment("Скорость подъёма, м/ч")]
|
||||
public double SpeedUpward { get; set; }
|
||||
|
||||
[Column("speed_downward"), Comment("Скорость спуска, м/ч")]
|
||||
public double SpeedDownward { get; set; }
|
||||
|
||||
[Column("setpoint_drag"), Comment("Уставка зятяжки, т")]
|
||||
public double SetpointDrag { get; set; }
|
||||
|
||||
[Column("setpoint_tight"), Comment("Уставка посадки, т")]
|
||||
public double SetpointTight { get; set; }
|
||||
|
||||
[Column("pressure"), Comment("Давление, атм")]
|
||||
public double Pressure { get; set; }
|
||||
|
||||
[Column("torque"), Comment("Момент, кН*м")]
|
||||
public double Torque { get; set; }
|
||||
|
||||
[Column("comment"), Comment("Комментарий")]
|
||||
public string? Comment { get; set; }
|
||||
}
|
@ -65,8 +65,5 @@ namespace AsbCloudDb.Model
|
||||
|
||||
[InverseProperty(nameof(DrillingProgramPart.Well))]
|
||||
public virtual ICollection<DrillingProgramPart> DrillingProgramParts { get; set; } = null!;
|
||||
|
||||
[InverseProperty(nameof(ProcessMap.Well))]
|
||||
public virtual ICollection<ProcessMap> ProcessMaps { get; set; } = null!;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user