Переработка модели

1. Поправлены сущности
        1. 1. Все типы РТК теперь имеют секцию скважины
        1. 2. Все тип РТК могут иметь комментарий
2. Добавлена новая миграция
3. Поправлены DTO
This commit is contained in:
Степанов Дмитрий 2023-10-12 14:51:57 +05:00
parent b36b1bdd3c
commit 888154dd31
11 changed files with 191 additions and 108 deletions

View File

@ -3,10 +3,8 @@ using System.ComponentModel.DataAnnotations;
namespace AsbCloudApp.Data.ProcessMaps;
/// <summary>
/// Базовая Dto для РТК
/// </summary>
public abstract class ProcessMapBaseDto : IId, IWellRelated
/// <inheritdoc/>
public abstract class ProcessMapPlanBaseDto : IId, IWellRelated
{
/// <inheritdoc/>
public int Id { get; set; }
@ -22,6 +20,12 @@ public abstract class ProcessMapBaseDto : IId, IWellRelated
/// </summary>
public int IdUser { get; set; }
/// <summary>
/// Тип секции
/// </summary>
[Range(1, int.MaxValue, ErrorMessage = "Id секции скважины не может быть меньше 1")]
public int IdWellSectionType { get; set; }
/// <summary>
/// Дата последнего изменения
/// </summary>
@ -44,4 +48,9 @@ public abstract class ProcessMapBaseDto : IId, IWellRelated
/// </summary>
[Range(0, 99999.9, ErrorMessage = "Глубина не может быть отрицательной")]
public double DepthEnd { get; set; }
/// <summary>
/// Комментарий
/// </summary>
public string? Comment { get; set; }
}

View File

@ -3,9 +3,9 @@
namespace AsbCloudApp.Data.ProcessMaps;
/// <summary>
/// РТК бурение скважины
/// РТК план бурение скважины
/// </summary>
public class WellDrillingProcessMapDto : ProcessMapBaseDto
public class ProcessMapPlanWellDrillingDto : ProcessMapPlanBaseDto
{
/// <summary>
/// Id режима 0-ручной, 1-ротор, 2 - слайд
@ -13,12 +13,6 @@ public class WellDrillingProcessMapDto : ProcessMapBaseDto
[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>

View File

@ -4,9 +4,9 @@ using System.ComponentModel.DataAnnotations;
namespace AsbCloudApp.Data.ProcessMaps;
/// <summary>
/// РТК проработка скважины
/// РТК план проработка скважины
/// </summary>
public class WellReamProcessMapDto : ProcessMapBaseDto
public class ProcessMapPlanWellReamDto : ProcessMapPlanBaseDto
{
/// <summary>
/// Количество повторений

View File

@ -13,15 +13,15 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
namespace AsbCloudDb.Migrations
{
[DbContext(typeof(AsbCloudDbContext))]
[Migration("20231009093808_Update_ProcessMaps")]
partial class Update_ProcessMaps
[Migration("20231012070239_Update_Process_Maps")]
partial class Update_Process_Maps
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.UseCollation("Russian_Russia.1251")
.HasAnnotation("ProductVersion", "6.0.22")
.HasAnnotation("ProductVersion", "6.0.23")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.HasPostgresExtension(modelBuilder, "adminpack");
@ -2337,7 +2337,7 @@ namespace AsbCloudDb.Migrations
b.HasComment("Загрузка плановой траектории");
});
modelBuilder.Entity("AsbCloudDb.Model.ProcessMaps.WellDrillingProcessMap", b =>
modelBuilder.Entity("AsbCloudDb.Model.ProcessMaps.ProcessMapWellDrilling", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -2356,6 +2356,11 @@ namespace AsbCloudDb.Migrations
.HasColumnName("axial_load_plan")
.HasComment("Нагрузка, план");
b.Property<string>("Comment")
.HasColumnType("text")
.HasColumnName("comment")
.HasComment("Комментарий");
b.Property<double>("DepthEnd")
.HasColumnType("double precision")
.HasColumnName("depth_end")
@ -2454,12 +2459,12 @@ namespace AsbCloudDb.Migrations
b.HasIndex("IdWellSectionType");
b.ToTable("t_well_drilling_process_map");
b.ToTable("t_process_map_well_drilling");
b.HasComment("РТК бурение скважины");
});
modelBuilder.Entity("AsbCloudDb.Model.ProcessMaps.WellReamProcessMap", b =>
modelBuilder.Entity("AsbCloudDb.Model.ProcessMaps.ProcessMapWellReam", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -2493,6 +2498,11 @@ namespace AsbCloudDb.Migrations
.HasColumnName("id_well")
.HasComment("Id скважины");
b.Property<int>("IdWellSectionType")
.HasColumnType("integer")
.HasColumnName("id_wellsection_type")
.HasComment("Тип секции");
b.Property<DateTimeOffset>("LastUpdate")
.HasColumnType("timestamp with time zone")
.HasColumnName("last_update")
@ -2549,7 +2559,9 @@ namespace AsbCloudDb.Migrations
b.HasIndex("IdWell");
b.ToTable("t_well_ream_process_map");
b.HasIndex("IdWellSectionType");
b.ToTable("t_process_map_well_ream");
b.HasComment("РТК проработка скважины");
});
@ -7970,7 +7982,7 @@ namespace AsbCloudDb.Migrations
b.Navigation("Well");
});
modelBuilder.Entity("AsbCloudDb.Model.ProcessMaps.WellDrillingProcessMap", b =>
modelBuilder.Entity("AsbCloudDb.Model.ProcessMaps.ProcessMapWellDrilling", b =>
{
b.HasOne("AsbCloudDb.Model.User", "User")
.WithMany()
@ -7997,7 +8009,7 @@ namespace AsbCloudDb.Migrations
b.Navigation("WellSectionType");
});
modelBuilder.Entity("AsbCloudDb.Model.ProcessMaps.WellReamProcessMap", b =>
modelBuilder.Entity("AsbCloudDb.Model.ProcessMaps.ProcessMapWellReam", b =>
{
b.HasOne("AsbCloudDb.Model.User", "User")
.WithMany()
@ -8011,9 +8023,17 @@ namespace AsbCloudDb.Migrations
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("AsbCloudDb.Model.WellSectionType", "WellSectionType")
.WithMany()
.HasForeignKey("IdWellSectionType")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("User");
b.Navigation("Well");
b.Navigation("WellSectionType");
});
modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b =>

View File

@ -4,7 +4,7 @@
namespace AsbCloudDb.Migrations
{
public partial class Update_ProcessMaps : Migration
public partial class Update_Process_Maps : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
@ -64,50 +64,50 @@ namespace AsbCloudDb.Migrations
migrationBuilder.RenameTable(
name: "t_process_map_wellbore_development",
newName: "t_well_ream_process_map");
newName: "t_process_map_well_ream");
migrationBuilder.RenameTable(
name: "t_process_map",
newName: "t_well_drilling_process_map");
newName: "t_process_map_well_drilling");
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");
table: "t_process_map_well_ream",
newName: "IX_t_process_map_well_ream_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");
table: "t_process_map_well_ream",
newName: "IX_t_process_map_well_ream_id_user");
migrationBuilder.RenameColumn(
name: "well_id",
table: "t_well_drilling_process_map",
table: "t_process_map_well_drilling",
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");
table: "t_process_map_well_drilling",
newName: "IX_t_process_map_well_drilling_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");
table: "t_process_map_well_drilling",
newName: "IX_t_process_map_well_drilling_id_wellsection_type");
migrationBuilder.AlterTable(
name: "t_well_ream_process_map",
name: "t_process_map_well_ream",
comment: "РТК проработка скважины",
oldComment: "РТК план проработка скважины");
migrationBuilder.AlterTable(
name: "t_well_drilling_process_map",
name: "t_process_map_well_drilling",
comment: "РТК бурение скважины",
oldComment: "Операции по скважине РТК");
migrationBuilder.AlterColumn<double>(
name: "depth_start",
table: "t_well_ream_process_map",
table: "t_process_map_well_ream",
type: "double precision",
nullable: false,
comment: "Глубина по стволу от, м",
@ -117,7 +117,7 @@ namespace AsbCloudDb.Migrations
migrationBuilder.AlterColumn<double>(
name: "depth_end",
table: "t_well_ream_process_map",
table: "t_process_map_well_ream",
type: "double precision",
nullable: false,
comment: "Глубина по стволу до, м",
@ -125,9 +125,17 @@ namespace AsbCloudDb.Migrations
oldType: "double precision",
oldComment: "Окончательная глубина, м");
migrationBuilder.AddColumn<int>(
name: "id_wellsection_type",
table: "t_process_map_well_ream",
type: "integer",
nullable: false,
defaultValue: 0,
comment: "Тип секции");
migrationBuilder.AlterColumn<double>(
name: "depth_start",
table: "t_well_drilling_process_map",
table: "t_process_map_well_drilling",
type: "double precision",
nullable: false,
comment: "Глубина по стволу от, м",
@ -137,7 +145,7 @@ namespace AsbCloudDb.Migrations
migrationBuilder.AlterColumn<double>(
name: "depth_end",
table: "t_well_drilling_process_map",
table: "t_process_map_well_drilling",
type: "double precision",
nullable: false,
comment: "Глубина по стволу до, м",
@ -145,111 +153,147 @@ namespace AsbCloudDb.Migrations
oldType: "double precision",
oldComment: "Глубина окончания интервала");
migrationBuilder.AddColumn<string>(
name: "comment",
table: "t_process_map_well_drilling",
type: "text",
nullable: true,
comment: "Комментарий");
migrationBuilder.AddPrimaryKey(
name: "PK_t_well_ream_process_map",
table: "t_well_ream_process_map",
name: "PK_t_process_map_well_ream",
table: "t_process_map_well_ream",
column: "id");
migrationBuilder.AddPrimaryKey(
name: "PK_t_well_drilling_process_map",
table: "t_well_drilling_process_map",
name: "PK_t_process_map_well_drilling",
table: "t_process_map_well_drilling",
column: "id");
migrationBuilder.CreateIndex(
name: "IX_t_well_drilling_process_map_id_user",
table: "t_well_drilling_process_map",
name: "IX_t_process_map_well_ream_id_wellsection_type",
table: "t_process_map_well_ream",
column: "id_wellsection_type");
migrationBuilder.CreateIndex(
name: "IX_t_process_map_well_drilling_id_user",
table: "t_process_map_well_drilling",
column: "id_user");
migrationBuilder.AddForeignKey(
name: "FK_t_well_drilling_process_map_t_user_id_user",
table: "t_well_drilling_process_map",
name: "FK_t_process_map_well_drilling_t_user_id_user",
table: "t_process_map_well_drilling",
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",
name: "FK_t_process_map_well_drilling_t_well_id_well",
table: "t_process_map_well_drilling",
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",
name: "FK_t_process_map_well_drilling_t_well_section_type_id_wellsect~",
table: "t_process_map_well_drilling",
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",
name: "FK_t_process_map_well_ream_t_user_id_user",
table: "t_process_map_well_ream",
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",
name: "FK_t_process_map_well_ream_t_well_id_well",
table: "t_process_map_well_ream",
column: "id_well",
principalTable: "t_well",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_t_process_map_well_ream_t_well_section_type_id_wellsection_~",
table: "t_process_map_well_ream",
column: "id_wellsection_type",
principalTable: "t_well_section_type",
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");
name: "FK_t_process_map_well_drilling_t_user_id_user",
table: "t_process_map_well_drilling");
migrationBuilder.DropForeignKey(
name: "FK_t_well_drilling_process_map_t_well_id_well",
table: "t_well_drilling_process_map");
name: "FK_t_process_map_well_drilling_t_well_id_well",
table: "t_process_map_well_drilling");
migrationBuilder.DropForeignKey(
name: "FK_t_well_drilling_process_map_t_well_section_type_id_wellsect~",
table: "t_well_drilling_process_map");
name: "FK_t_process_map_well_drilling_t_well_section_type_id_wellsect~",
table: "t_process_map_well_drilling");
migrationBuilder.DropForeignKey(
name: "FK_t_well_ream_process_map_t_user_id_user",
table: "t_well_ream_process_map");
name: "FK_t_process_map_well_ream_t_user_id_user",
table: "t_process_map_well_ream");
migrationBuilder.DropForeignKey(
name: "FK_t_well_ream_process_map_t_well_id_well",
table: "t_well_ream_process_map");
name: "FK_t_process_map_well_ream_t_well_id_well",
table: "t_process_map_well_ream");
migrationBuilder.DropForeignKey(
name: "FK_t_process_map_well_ream_t_well_section_type_id_wellsection_~",
table: "t_process_map_well_ream");
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");
name: "PK_t_process_map_well_ream",
table: "t_process_map_well_ream");
migrationBuilder.DropIndex(
name: "IX_t_well_drilling_process_map_id_user",
table: "t_well_drilling_process_map");
name: "IX_t_process_map_well_ream_id_wellsection_type",
table: "t_process_map_well_ream");
migrationBuilder.DropPrimaryKey(
name: "PK_t_process_map_well_drilling",
table: "t_process_map_well_drilling");
migrationBuilder.DropIndex(
name: "IX_t_process_map_well_drilling_id_user",
table: "t_process_map_well_drilling");
migrationBuilder.DropColumn(
name: "id_wellsection_type",
table: "t_process_map_well_ream");
migrationBuilder.DropColumn(
name: "comment",
table: "t_process_map_well_drilling");
migrationBuilder.RenameTable(
name: "t_well_ream_process_map",
name: "t_process_map_well_ream",
newName: "t_process_map_wellbore_development");
migrationBuilder.RenameTable(
name: "t_well_drilling_process_map",
name: "t_process_map_well_drilling",
newName: "t_process_map");
migrationBuilder.RenameIndex(
name: "IX_t_well_ream_process_map_id_well",
name: "IX_t_process_map_well_ream_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",
name: "IX_t_process_map_well_ream_id_user",
table: "t_process_map_wellbore_development",
newName: "IX_t_process_map_wellbore_development_id_user");
@ -259,12 +303,12 @@ namespace AsbCloudDb.Migrations
newName: "well_id");
migrationBuilder.RenameIndex(
name: "IX_t_well_drilling_process_map_id_wellsection_type",
name: "IX_t_process_map_well_drilling_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",
name: "IX_t_process_map_well_drilling_id_well",
table: "t_process_map",
newName: "IX_t_process_map_well_id");

View File

@ -2335,7 +2335,7 @@ namespace AsbCloudDb.Migrations
b.HasComment("Загрузка плановой траектории");
});
modelBuilder.Entity("AsbCloudDb.Model.ProcessMaps.WellDrillingProcessMap", b =>
modelBuilder.Entity("AsbCloudDb.Model.ProcessMaps.ProcessMapWellDrilling", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -2354,6 +2354,11 @@ namespace AsbCloudDb.Migrations
.HasColumnName("axial_load_plan")
.HasComment("Нагрузка, план");
b.Property<string>("Comment")
.HasColumnType("text")
.HasColumnName("comment")
.HasComment("Комментарий");
b.Property<double>("DepthEnd")
.HasColumnType("double precision")
.HasColumnName("depth_end")
@ -2452,12 +2457,12 @@ namespace AsbCloudDb.Migrations
b.HasIndex("IdWellSectionType");
b.ToTable("t_well_drilling_process_map");
b.ToTable("t_process_map_well_drilling");
b.HasComment("РТК бурение скважины");
});
modelBuilder.Entity("AsbCloudDb.Model.ProcessMaps.WellReamProcessMap", b =>
modelBuilder.Entity("AsbCloudDb.Model.ProcessMaps.ProcessMapWellReam", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -2491,6 +2496,11 @@ namespace AsbCloudDb.Migrations
.HasColumnName("id_well")
.HasComment("Id скважины");
b.Property<int>("IdWellSectionType")
.HasColumnType("integer")
.HasColumnName("id_wellsection_type")
.HasComment("Тип секции");
b.Property<DateTimeOffset>("LastUpdate")
.HasColumnType("timestamp with time zone")
.HasColumnName("last_update")
@ -2547,7 +2557,9 @@ namespace AsbCloudDb.Migrations
b.HasIndex("IdWell");
b.ToTable("t_well_ream_process_map");
b.HasIndex("IdWellSectionType");
b.ToTable("t_process_map_well_ream");
b.HasComment("РТК проработка скважины");
});
@ -7968,7 +7980,7 @@ namespace AsbCloudDb.Migrations
b.Navigation("Well");
});
modelBuilder.Entity("AsbCloudDb.Model.ProcessMaps.WellDrillingProcessMap", b =>
modelBuilder.Entity("AsbCloudDb.Model.ProcessMaps.ProcessMapWellDrilling", b =>
{
b.HasOne("AsbCloudDb.Model.User", "User")
.WithMany()
@ -7995,7 +8007,7 @@ namespace AsbCloudDb.Migrations
b.Navigation("WellSectionType");
});
modelBuilder.Entity("AsbCloudDb.Model.ProcessMaps.WellReamProcessMap", b =>
modelBuilder.Entity("AsbCloudDb.Model.ProcessMaps.ProcessMapWellReam", b =>
{
b.HasOne("AsbCloudDb.Model.User", "User")
.WithMany()
@ -8009,9 +8021,17 @@ namespace AsbCloudDb.Migrations
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("AsbCloudDb.Model.WellSectionType", "WellSectionType")
.WithMany()
.HasForeignKey("IdWellSectionType")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("User");
b.Navigation("Well");
b.Navigation("WellSectionType");
});
modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b =>

View File

@ -17,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<WellDrillingProcessMap> WellDrillingProcessMaps => Set<WellDrillingProcessMap>();
public virtual DbSet<WellReamProcessMap> WellReamProcessMaps => Set<WellReamProcessMap>();
public virtual DbSet<ProcessMapWellDrilling> ProcessMapWellDrillings => Set<ProcessMapWellDrilling>();
public virtual DbSet<ProcessMapWellReam> ProcessMapWellReams => Set<ProcessMapWellReam>();
public virtual DbSet<DrillingProgramPart> DrillingProgramParts => Set<DrillingProgramPart>();
public virtual DbSet<FileCategory> FileCategories => Set<FileCategory>();
public virtual DbSet<FileInfo> Files => Set<FileInfo>();

View File

@ -21,8 +21,8 @@ namespace AsbCloudDb.Model
DbSet<Deposit> Deposits { get; }
DbSet<DetectedOperation> DetectedOperations { get; }
DbSet<PlannedTrajectory> PlannedTrajectories { get; }
DbSet<WellDrillingProcessMap> WellDrillingProcessMaps { get; }
DbSet<WellReamProcessMap> WellReamProcessMaps { get; }
DbSet<ProcessMapWellDrilling> ProcessMapWellDrillings { get; }
DbSet<ProcessMapWellReam> ProcessMapWellReams { get; }
DbSet<DrillingProgramPart> DrillingProgramParts { get; }
DbSet<FileCategory> FileCategories { get; }
DbSet<FileInfo> Files { get; }

View File

@ -2,7 +2,6 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text.Json.Serialization;
namespace AsbCloudDb.Model.ProcessMaps;
@ -15,6 +14,9 @@ public abstract class ProcessMapBase : IId, IWellRelated
[Column("id_well"), Comment("Id скважины")]
public int IdWell { get; set; }
[Column("id_wellsection_type"), Comment("Тип секции")]
public int IdWellSectionType { get; set; }
[Column("id_user"), Comment("Id пользователя")]
public int IdUser { get; set; }
@ -27,10 +29,15 @@ public abstract class ProcessMapBase : IId, IWellRelated
[Column("depth_end"), Comment("Глубина по стволу до, м")]
public double DepthEnd { get; set; }
[JsonIgnore]
[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!;
[ForeignKey(nameof(IdWellSectionType))]
public virtual WellSectionType WellSectionType { get; set; } = null!;
}

View File

@ -1,18 +1,14 @@
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
[Table("t_process_map_well_drilling"), Comment("РТК бурение скважины")]
public class ProcessMapWellDrilling : 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; }
@ -51,8 +47,4 @@ public class WellDrillingProcessMap : ProcessMapBase
[Column("usage_spin"), Comment("Плановый процент использования spin master")]
public double UsageSpin { get; set; }
[JsonIgnore]
[ForeignKey(nameof(IdWellSectionType))]
public virtual WellSectionType WellSectionType { get; set; } = null!;
}

View File

@ -3,8 +3,8 @@ using Microsoft.EntityFrameworkCore;
namespace AsbCloudDb.Model.ProcessMaps;
[Table("t_well_ream_process_map"), Comment("РТК проработка скважины")]
public class WellReamProcessMap : ProcessMapBase
[Table("t_process_map_well_ream"), Comment("РТК проработка скважины")]
public class ProcessMapWellReam : ProcessMapBase
{
[Column("repeats"), Comment("Количество повторений")]
public double Repeats { get; set; }
@ -32,7 +32,4 @@ public class WellReamProcessMap : ProcessMapBase
[Column("torque"), Comment("Момент, кН*м")]
public double Torque { get; set; }
[Column("comment"), Comment("Комментарий")]
public string? Comment { get; set; }
}