Add TripTankLevel, WellDepth, State to TelemetryDataWellWorkoverDto and db

This commit is contained in:
ngfrolov 2025-01-21 13:07:16 +05:00
parent 97bd2baad2
commit ddb670fabc
Signed by: ng.frolov
GPG Key ID: E99907A0357B29A7
5 changed files with 12686 additions and 4 deletions

View File

@ -44,6 +44,11 @@ public class TelemetryDataWellWorkoverDto : ITelemetryData
/// </summary>
public float TripTankVolume { get; set; }
/// <summary>
/// Уровень доливной емкости (ДЕ), м"
/// </summary>
public float TripTankLevel { get; set; }
/// <summary>
/// Плотность жидкости в ДЕ, г/см3
/// </summary>
@ -59,6 +64,16 @@ public class TelemetryDataWellWorkoverDto : ITelemetryData
/// </summary>
public float WellLevel { get; set; }
/// <summary>
/// Глубина забоя, м"
/// </summary>
public float WellDepth { get; set; }
/// <summary>
/// текущее состояние
/// </summary>
public short State { get; set; }
/// <summary>
/// Температура жидкости в отводе крестовины ПВО, С
/// </summary>
@ -73,4 +88,6 @@ public class TelemetryDataWellWorkoverDto : ITelemetryData
/// Газопоказания (Н2S), %
/// </summary>
public float GasIndicationsH2S { get; set; }
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,62 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace AsbCloudDb.Migrations
{
/// <inheritdoc />
public partial class AddNewPropsToTelemetryDataWellWorkover : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterDatabase(
oldCollation: "Russian_Russia.1251")
.OldAnnotation("Npgsql:PostgresExtension:adminpack", ",,");
migrationBuilder.AddColumn<short>(
name: "state",
table: "t_telemetry_data_well_workover",
type: "smallint",
nullable: false,
defaultValue: (short)0,
comment: "текущее состояние");
migrationBuilder.AddColumn<float>(
name: "trip_tank_level",
table: "t_telemetry_data_well_workover",
type: "real",
nullable: false,
defaultValue: 0f,
comment: "Уровень доливной емкости (ДЕ), м");
migrationBuilder.AddColumn<float>(
name: "well_depth",
table: "t_telemetry_data_well_workover",
type: "real",
nullable: false,
defaultValue: 0f,
comment: "Глубина забоя, м");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "state",
table: "t_telemetry_data_well_workover");
migrationBuilder.DropColumn(
name: "trip_tank_level",
table: "t_telemetry_data_well_workover");
migrationBuilder.DropColumn(
name: "well_depth",
table: "t_telemetry_data_well_workover");
migrationBuilder.AlterDatabase(
collation: "Russian_Russia.1251")
.Annotation("Npgsql:PostgresExtension:adminpack", ",,");
}
}
}

View File

@ -18,11 +18,9 @@ namespace AsbCloudDb.Migrations
{
#pragma warning disable 612, 618
modelBuilder
.UseCollation("Russian_Russia.1251")
.HasAnnotation("ProductVersion", "8.0.8")
.HasAnnotation("ProductVersion", "8.0.4")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.HasPostgresExtension(modelBuilder, "adminpack");
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("AsbCloudDb.Model.Cluster", b =>
@ -7417,16 +7415,31 @@ namespace AsbCloudDb.Migrations
.HasColumnName("mud_temperature_in_blow_out_preventor")
.HasComment("Температура жидкости в отводе крестовины ПВО, С");
b.Property<short>("State")
.HasColumnType("smallint")
.HasColumnName("state")
.HasComment("текущее состояние");
b.Property<float>("TripInOutSpeed")
.HasColumnType("real")
.HasColumnName("trip_in_out_speed")
.HasComment("Скорость СПО, м/с");
b.Property<float>("TripTankLevel")
.HasColumnType("real")
.HasColumnName("trip_tank_level")
.HasComment("Уровень доливной емкости (ДЕ), м");
b.Property<float>("TripTankVolume")
.HasColumnType("real")
.HasColumnName("trip_tank_volume")
.HasComment("Объем доливной емкости (ДЕ), м3");
b.Property<float>("WellDepth")
.HasColumnType("real")
.HasColumnName("well_depth")
.HasComment("Глубина забоя, м");
b.Property<float>("WellLevel")
.HasColumnType("real")
.HasColumnName("well_level")

View File

@ -32,6 +32,9 @@ namespace AsbCloudDb.Model
[Column("trip_tank_volume"), Comment("Объем доливной емкости (ДЕ), м3")]
public float TripTankVolume { get; set; }
[Column("trip_tank_level"), Comment("Уровень доливной емкости (ДЕ), м")]
public float TripTankLevel { get; set; }
[Column("mud_density"), Comment("Плотность жидкости в ДЕ, г/см3")]
public float MudDensity { get; set; }
@ -41,6 +44,12 @@ namespace AsbCloudDb.Model
[Column("well_level"), Comment("Уровень в скважине (по эхолоту), м")]
public float WellLevel { get; set; }
[Column("well_depth"), Comment("Глубина забоя, м")]
public float WellDepth { get; set; }
[Column("state"), Comment("текущее состояние")]
public short State { get; set; }
[Column("mud_temperature_in_blow_out_preventor"), Comment("Температура жидкости в отводе крестовины ПВО, С")]
public float MudTemperatureInBlowOutPreventor { get; set; }
@ -49,7 +58,7 @@ namespace AsbCloudDb.Model
[Column("gas_indications_H2S"), Comment("Газопоказания (Н2S), %")]
public float GasIndicationsH2S { get; set; }
[JsonIgnore]
[ForeignKey(nameof(IdTelemetry))]
[InverseProperty(nameof(Model.Telemetry.DataWellWorkover))]