2021-07-21 15:22:58 +05:00
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
2021-04-02 17:28:07 +05:00
|
|
|
|
using System.Collections.Generic;
|
2022-05-06 10:58:52 +05:00
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
2021-04-02 17:28:07 +05:00
|
|
|
|
|
|
|
|
|
namespace AsbCloudDb.Model
|
|
|
|
|
{
|
|
|
|
|
public partial class AsbCloudDbContext : DbContext, IAsbCloudDbContext
|
|
|
|
|
{
|
2022-05-06 10:58:52 +05:00
|
|
|
|
public virtual DbSet<Cluster> Clusters => Set<Cluster>();
|
|
|
|
|
public virtual DbSet<Company> Companies => Set<Company>();
|
|
|
|
|
public virtual DbSet<CompanyType> CompaniesTypes => Set<CompanyType>();
|
|
|
|
|
public virtual DbSet<DailyReport> DailyReports => Set<DailyReport>();
|
|
|
|
|
public virtual DbSet<Deposit> Deposits => Set<Deposit>();
|
|
|
|
|
public virtual DbSet<DetectedOperation> DetectedOperations => Set<DetectedOperation>();
|
|
|
|
|
public virtual DbSet<DrillFlowChart> DrillFlowChart => Set<DrillFlowChart>();
|
|
|
|
|
public virtual DbSet<DrillingProgramPart> DrillingProgramParts => Set<DrillingProgramPart>();
|
|
|
|
|
public virtual DbSet<DrillParams> DrillParams => Set<DrillParams>();
|
|
|
|
|
public virtual DbSet<FileCategory> FileCategories => Set<FileCategory>();
|
|
|
|
|
public virtual DbSet<FileInfo> Files => Set<FileInfo>();
|
|
|
|
|
public virtual DbSet<FileMark> FileMarks => Set<FileMark>();
|
|
|
|
|
public virtual DbSet<Measure> Measures => Set<Measure>();
|
|
|
|
|
public virtual DbSet<MeasureCategory> MeasureCategories => Set<MeasureCategory>();
|
|
|
|
|
public virtual DbSet<Permission> Permissions => Set<Permission>();
|
|
|
|
|
public virtual DbSet<RelationCompanyWell> RelationCompaniesWells => Set<RelationCompanyWell>();
|
|
|
|
|
public virtual DbSet<RelationUserDrillingProgramPart> RelationDrillingProgramPartUsers => Set<RelationUserDrillingProgramPart>();
|
|
|
|
|
public virtual DbSet<RelationUserRolePermission> RelationUserRolePermissions => Set<RelationUserRolePermission>();
|
|
|
|
|
public virtual DbSet<RelationUserRoleUserRole> RelationUserRoleUserRoles => Set<RelationUserRoleUserRole>();
|
|
|
|
|
public virtual DbSet<RelationUserUserRole> RelationUserUserRoles => Set<RelationUserUserRole>();
|
|
|
|
|
public virtual DbSet<ReportProperty> ReportProperties => Set<ReportProperty>();
|
|
|
|
|
public virtual DbSet<SetpointsRequest> SetpointsRequests => Set<SetpointsRequest>();
|
|
|
|
|
public virtual DbSet<Telemetry> Telemetries => Set<Telemetry>();
|
|
|
|
|
public virtual DbSet<TelemetryDataSaub> TelemetryDataSaub => Set<TelemetryDataSaub>();
|
|
|
|
|
public virtual DbSet<TelemetryDataSaubStat> TelemetryDataSaubStats => Set<TelemetryDataSaubStat>();
|
|
|
|
|
public virtual DbSet<TelemetryDataSpin> TelemetryDataSpin => Set<TelemetryDataSpin>();
|
|
|
|
|
public virtual DbSet<TelemetryEvent> TelemetryEvents => Set<TelemetryEvent>();
|
|
|
|
|
public virtual DbSet<TelemetryMessage> TelemetryMessages => Set<TelemetryMessage>();
|
|
|
|
|
public virtual DbSet<TelemetryUser> TelemetryUsers => Set<TelemetryUser>();
|
|
|
|
|
public virtual DbSet<User> Users => Set<User>();
|
|
|
|
|
public virtual DbSet<UserRole> UserRoles => Set<UserRole>();
|
|
|
|
|
public virtual DbSet<Well> Wells => Set<Well>();
|
|
|
|
|
public virtual DbSet<WellComposite> WellComposites => Set<WellComposite>();
|
|
|
|
|
public virtual DbSet<WellOperation> WellOperations => Set<WellOperation>();
|
|
|
|
|
public virtual DbSet<WellOperationCategory> WellOperationCategories => Set<WellOperationCategory>();
|
|
|
|
|
public virtual DbSet<WellSectionType> WellSectionTypes => Set<WellSectionType>();
|
|
|
|
|
public virtual DbSet<WellType> WellTypes => Set<WellType>();
|
2022-05-22 21:18:43 +05:00
|
|
|
|
public virtual DbSet<Driller> Drillers => Set<Driller>();
|
2022-05-26 13:28:16 +05:00
|
|
|
|
public virtual DbSet<Schedule> Schedule => Set<Schedule>();
|
2021-04-02 17:28:07 +05:00
|
|
|
|
|
2022-04-01 17:55:44 +05:00
|
|
|
|
// WITS
|
2022-05-06 10:58:52 +05:00
|
|
|
|
public DbSet<WITS.Record1> Record1 => Set<WITS.Record1>();
|
|
|
|
|
public DbSet<WITS.Record7> Record7 => Set<WITS.Record7>();
|
|
|
|
|
public DbSet<WITS.Record8> Record8 => Set<WITS.Record8>();
|
|
|
|
|
public DbSet<WITS.Record50> Record50 => Set<WITS.Record50>();
|
|
|
|
|
public DbSet<WITS.Record60> Record60 => Set<WITS.Record60>();
|
|
|
|
|
public DbSet<WITS.Record61> Record61 => Set<WITS.Record61>();
|
2021-04-02 17:28:07 +05:00
|
|
|
|
|
2021-09-07 14:04:30 +05:00
|
|
|
|
public AsbCloudDbContext() : base()
|
2022-04-11 18:00:34 +05:00
|
|
|
|
{
|
2021-09-10 11:28:57 +05:00
|
|
|
|
}
|
2021-09-07 14:04:30 +05:00
|
|
|
|
|
2021-04-02 17:28:07 +05:00
|
|
|
|
public AsbCloudDbContext(DbContextOptions<AsbCloudDbContext> options)
|
|
|
|
|
: base(options)
|
2021-10-31 18:01:32 +05:00
|
|
|
|
{
|
2021-09-10 11:28:57 +05:00
|
|
|
|
}
|
2021-09-07 14:04:30 +05:00
|
|
|
|
|
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
2021-04-02 17:28:07 +05:00
|
|
|
|
{
|
2021-09-07 14:04:30 +05:00
|
|
|
|
if (!optionsBuilder.IsConfigured)
|
|
|
|
|
optionsBuilder.UseNpgsql("Host=localhost;Database=postgres;Username=postgres;Password=q;Persist Security Info=True");
|
2021-04-02 17:28:07 +05:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
|
|
|
{
|
|
|
|
|
modelBuilder.HasPostgresExtension("adminpack")
|
|
|
|
|
.HasAnnotation("Relational:Collation", "Russian_Russia.1251");
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity<Cluster>(entity =>
|
|
|
|
|
{
|
|
|
|
|
entity.HasOne(d => d.Deposit)
|
|
|
|
|
.WithMany(p => p.Clusters)
|
|
|
|
|
.HasForeignKey(d => d.IdDeposit)
|
|
|
|
|
.HasConstraintName("t_cluster_t_deposit_id_fk");
|
|
|
|
|
});
|
|
|
|
|
|
2021-10-12 10:39:42 +05:00
|
|
|
|
modelBuilder.Entity<WellComposite>(entity =>
|
|
|
|
|
{
|
|
|
|
|
entity.HasKey(
|
|
|
|
|
nameof(WellComposite.IdWell),
|
|
|
|
|
nameof(WellComposite.IdWellSrc),
|
|
|
|
|
nameof(WellComposite.IdWellSectionType));
|
|
|
|
|
|
|
|
|
|
entity.HasOne(d => d.Well)
|
|
|
|
|
.WithMany(p => p.WellComposites)
|
|
|
|
|
.HasForeignKey(d => d.IdWell)
|
|
|
|
|
.HasConstraintName("t_well_сomposite_t_well_id_fk");
|
|
|
|
|
|
|
|
|
|
entity.HasOne(d => d.WellSrc)
|
|
|
|
|
.WithMany(p => p.WellCompositeSrcs)
|
|
|
|
|
.HasForeignKey(d => d.IdWellSrc)
|
|
|
|
|
.HasConstraintName("t_well_сomposite_src_t_well_id_fk");
|
|
|
|
|
|
|
|
|
|
entity.HasOne(d => d.WellSectionType)
|
|
|
|
|
.WithMany(p => p.WellComposites)
|
2021-10-14 14:46:20 +05:00
|
|
|
|
.HasForeignKey(d => d.IdWellSectionType)
|
2021-10-12 10:39:42 +05:00
|
|
|
|
.HasConstraintName("t_well_сomposite_t_well_section_type_id_fk");
|
|
|
|
|
});
|
|
|
|
|
|
2021-09-14 17:17:33 +05:00
|
|
|
|
modelBuilder.Entity<TelemetryDataSaub>(entity =>
|
2021-04-02 17:28:07 +05:00
|
|
|
|
{
|
|
|
|
|
entity.HasOne(d => d.Telemetry)
|
2021-09-14 17:17:33 +05:00
|
|
|
|
.WithMany(p => p.DataSaub)
|
2021-04-02 17:28:07 +05:00
|
|
|
|
.HasForeignKey(d => d.IdTelemetry)
|
2021-10-01 17:37:44 +05:00
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
2021-09-14 17:17:33 +05:00
|
|
|
|
.HasConstraintName("t_telemetry_data_saub_t_telemetry_id_fk");
|
2021-11-13 18:47:11 +05:00
|
|
|
|
|
2022-04-01 17:55:44 +05:00
|
|
|
|
entity.HasKey(nameof(ITelemetryData.IdTelemetry), nameof(ITelemetryData.DateTime));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity<WITS.RecordBase>(entity =>
|
|
|
|
|
{
|
|
|
|
|
entity.HasKey(nameof(ITelemetryData.IdTelemetry), nameof(ITelemetryData.DateTime));
|
2021-09-14 17:17:33 +05:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity<TelemetryDataSpin>(entity =>
|
|
|
|
|
{
|
|
|
|
|
entity.HasOne(d => d.Telemetry)
|
|
|
|
|
.WithMany(p => p.DataSpin)
|
|
|
|
|
.HasForeignKey(d => d.IdTelemetry)
|
2021-10-01 17:37:44 +05:00
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
2021-09-14 17:17:33 +05:00
|
|
|
|
.HasConstraintName("t_telemetry_data_spin_t_telemetry_id_fk");
|
2021-11-13 18:47:11 +05:00
|
|
|
|
|
2022-04-01 17:55:44 +05:00
|
|
|
|
entity.HasKey(nameof(ITelemetryData.IdTelemetry), nameof(ITelemetryData.DateTime));
|
2021-04-02 17:28:07 +05:00
|
|
|
|
});
|
|
|
|
|
|
2021-08-10 15:53:11 +05:00
|
|
|
|
modelBuilder.Entity<TelemetryMessage>(entity =>
|
2021-04-02 17:28:07 +05:00
|
|
|
|
{
|
|
|
|
|
entity.HasOne(d => d.Telemetry)
|
|
|
|
|
.WithMany(p => p.Messages)
|
|
|
|
|
.HasForeignKey(d => d.IdTelemetry)
|
2021-10-01 17:37:44 +05:00
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
2021-04-02 17:28:07 +05:00
|
|
|
|
.HasConstraintName("t_messages_t_telemetry_id_fk");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity<TelemetryUser>(entity =>
|
|
|
|
|
{
|
2021-04-23 10:21:25 +05:00
|
|
|
|
entity.HasKey(nameof(TelemetryUser.IdTelemetry), nameof(TelemetryUser.IdUser));
|
2021-04-02 17:28:07 +05:00
|
|
|
|
entity.HasOne(d => d.Telemetry)
|
2021-04-23 10:21:25 +05:00
|
|
|
|
.WithMany(p => p.Users)
|
2021-04-02 17:28:07 +05:00
|
|
|
|
.HasForeignKey(d => d.IdTelemetry)
|
2021-10-01 17:37:44 +05:00
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
2021-04-02 17:28:07 +05:00
|
|
|
|
.HasConstraintName("t_telemetry_user_t_telemetry_id_fk");
|
|
|
|
|
});
|
|
|
|
|
|
2021-08-10 15:53:11 +05:00
|
|
|
|
modelBuilder.Entity<TelemetryEvent>(entity =>
|
2021-04-23 10:21:25 +05:00
|
|
|
|
{
|
2021-08-10 15:53:11 +05:00
|
|
|
|
entity.HasKey(nameof(TelemetryEvent.IdTelemetry), nameof(TelemetryEvent.IdEvent));
|
2021-04-23 10:21:25 +05:00
|
|
|
|
entity.HasOne(d => d.Telemetry)
|
|
|
|
|
.WithMany(p => p.Events)
|
|
|
|
|
.HasForeignKey(d => d.IdTelemetry)
|
2021-10-01 17:37:44 +05:00
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
2021-04-23 10:21:25 +05:00
|
|
|
|
.HasConstraintName("t_event_t_telemetry_id_fk");
|
|
|
|
|
});
|
|
|
|
|
|
2021-04-02 17:28:07 +05:00
|
|
|
|
modelBuilder.Entity<User>(entity =>
|
|
|
|
|
{
|
2021-07-21 12:30:51 +05:00
|
|
|
|
entity.HasOne(d => d.Company)
|
2021-04-02 17:28:07 +05:00
|
|
|
|
.WithMany(p => p.Users)
|
2021-07-21 12:30:51 +05:00
|
|
|
|
.HasForeignKey(d => d.IdCompany)
|
2021-10-01 17:37:44 +05:00
|
|
|
|
.OnDelete(DeleteBehavior.SetNull)
|
2021-07-21 15:22:58 +05:00
|
|
|
|
.HasConstraintName("t_user_t_company_id_fk");
|
2021-04-02 17:28:07 +05:00
|
|
|
|
|
|
|
|
|
entity.HasIndex(d => d.Login)
|
|
|
|
|
.IsUnique();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity<Well>(entity =>
|
|
|
|
|
{
|
|
|
|
|
entity.HasOne(d => d.Cluster)
|
|
|
|
|
.WithMany(p => p.Wells)
|
|
|
|
|
.HasForeignKey(d => d.IdCluster)
|
|
|
|
|
.HasConstraintName("t_well_t_cluster_id_fk");
|
|
|
|
|
|
|
|
|
|
entity.HasOne(d => d.Telemetry)
|
|
|
|
|
.WithOne(p => p.Well)
|
|
|
|
|
.HasForeignKey<Well>(d => d.IdTelemetry)
|
2021-10-01 17:37:44 +05:00
|
|
|
|
.OnDelete(DeleteBehavior.SetNull)
|
2021-04-02 17:28:07 +05:00
|
|
|
|
.HasConstraintName("t_well_t_telemetry_id_fk");
|
|
|
|
|
});
|
|
|
|
|
|
2021-08-09 15:41:42 +05:00
|
|
|
|
modelBuilder.Entity<RelationCompanyWell>(entity =>
|
|
|
|
|
{
|
2021-07-21 16:30:57 +05:00
|
|
|
|
entity.HasKey(nameof(RelationCompanyWell.IdCompany), nameof(RelationCompanyWell.IdWell));
|
|
|
|
|
|
|
|
|
|
entity.HasOne(r => r.Well)
|
|
|
|
|
.WithMany(w => w.RelationCompaniesWells)
|
|
|
|
|
.HasForeignKey(r => r.IdWell)
|
|
|
|
|
.HasConstraintName("t_relation_company_well_t_well_id_fk");
|
|
|
|
|
|
|
|
|
|
entity.HasOne(r => r.Company)
|
|
|
|
|
.WithMany(w => w.RelationCompaniesWells)
|
|
|
|
|
.HasForeignKey(r => r.IdCompany)
|
|
|
|
|
.HasConstraintName("t_relation_company_well_t_company_id_fk");
|
|
|
|
|
});
|
|
|
|
|
|
2022-04-11 18:00:34 +05:00
|
|
|
|
modelBuilder.Entity<RelationUserRoleUserRole>(entity =>
|
|
|
|
|
{
|
2022-01-12 16:33:53 +05:00
|
|
|
|
entity.HasKey(x => new { x.Id, x.IdInclude })
|
|
|
|
|
.HasName("t_relation_user_role_user_role_pk");
|
|
|
|
|
});
|
|
|
|
|
|
2022-04-11 18:00:34 +05:00
|
|
|
|
modelBuilder.Entity<RelationUserDrillingProgramPart>(entity =>
|
|
|
|
|
{
|
2022-02-09 14:25:22 +05:00
|
|
|
|
entity.HasKey(x => new { x.IdUser, x.IdDrillingProgramPart })
|
|
|
|
|
.HasName("t_relation_user_drilling_program_part_pk");
|
|
|
|
|
});
|
|
|
|
|
|
2021-08-13 17:25:06 +05:00
|
|
|
|
modelBuilder.Entity<WellOperation>(entity =>
|
2021-08-13 15:37:33 +05:00
|
|
|
|
{
|
2021-10-08 11:30:06 +05:00
|
|
|
|
entity.HasIndex(d => d.DepthEnd);
|
|
|
|
|
entity.HasIndex(d => d.DateStart);
|
2021-08-13 15:37:33 +05:00
|
|
|
|
});
|
|
|
|
|
|
2021-10-11 15:21:26 +05:00
|
|
|
|
modelBuilder.Entity<DrillParams>(entity =>
|
|
|
|
|
{
|
|
|
|
|
entity.HasOne(r => r.WellSectionType)
|
|
|
|
|
.WithMany(w => w.DrillParamsCollection)
|
|
|
|
|
.HasForeignKey(r => r.IdWellSectionType)
|
|
|
|
|
.HasConstraintName("t_drill_params_t_well_section_type_id_fk");
|
|
|
|
|
});
|
2022-04-11 18:00:34 +05:00
|
|
|
|
|
2021-10-14 17:02:20 +05:00
|
|
|
|
modelBuilder.Entity<DrillFlowChart>(entity =>
|
|
|
|
|
{
|
|
|
|
|
entity.HasIndex(d => d.IdWellOperationCategory);
|
|
|
|
|
});
|
2022-02-12 11:28:16 +05:00
|
|
|
|
|
2022-04-11 18:00:34 +05:00
|
|
|
|
modelBuilder.Entity<DrillingProgramPart>(entity =>
|
|
|
|
|
{
|
|
|
|
|
entity.HasIndex(x => new { x.IdWell, x.IdFileCategory })
|
2022-02-12 11:28:16 +05:00
|
|
|
|
.IsUnique();
|
|
|
|
|
});
|
|
|
|
|
|
2021-11-01 16:41:25 +05:00
|
|
|
|
modelBuilder.Entity<FileMark>(entity =>
|
|
|
|
|
{
|
2021-11-09 17:24:30 +05:00
|
|
|
|
entity.HasOne(d => d.User)
|
2021-11-01 16:41:25 +05:00
|
|
|
|
.WithMany(p => p.FileMarks)
|
|
|
|
|
.HasForeignKey(d => d.IdUser)
|
2022-04-11 18:00:34 +05:00
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
2021-11-01 16:41:25 +05:00
|
|
|
|
.HasConstraintName("t_user_t_file_mark_fk");
|
|
|
|
|
|
|
|
|
|
entity.HasOne(d => d.FileInfo)
|
|
|
|
|
.WithMany(p => p.FileMarks)
|
|
|
|
|
.HasForeignKey(d => d.IdFile)
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.HasConstraintName("t_file_mark_t_file_info_fk");
|
|
|
|
|
});
|
2022-04-11 18:00:34 +05:00
|
|
|
|
|
2021-11-29 17:34:53 +05:00
|
|
|
|
modelBuilder.Entity<RelationUserUserRole>(entity =>
|
|
|
|
|
{
|
|
|
|
|
entity.HasKey(e => new { e.IdUser, e.IdUserRole });
|
|
|
|
|
});
|
2022-04-11 18:00:34 +05:00
|
|
|
|
|
2021-12-15 16:21:52 +05:00
|
|
|
|
modelBuilder.Entity<RelationUserRolePermission>(entity =>
|
2021-11-29 17:34:53 +05:00
|
|
|
|
{
|
2021-12-15 16:21:52 +05:00
|
|
|
|
entity.HasKey(e => new { e.IdUserRole, e.IdPermission });
|
2021-12-20 15:16:21 +05:00
|
|
|
|
|
|
|
|
|
entity.HasOne(r => r.Permission)
|
|
|
|
|
.WithMany(p => p.RelationUserRolePermissions)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
entity.HasOne(r => r.UserRole)
|
|
|
|
|
.WithMany(r => r.RelationUserRolePermissions)
|
|
|
|
|
.IsRequired();
|
2021-11-29 17:34:53 +05:00
|
|
|
|
});
|
2021-10-10 13:35:43 +05:00
|
|
|
|
|
2022-04-20 18:03:38 +05:00
|
|
|
|
modelBuilder.Entity<DailyReport>(entity =>
|
|
|
|
|
{
|
|
|
|
|
entity.HasKey(e => new { e.IdWell, e.StartDate })
|
|
|
|
|
.HasName("t_id_well_date_start_pk");
|
|
|
|
|
});
|
|
|
|
|
|
2022-05-06 10:58:52 +05:00
|
|
|
|
modelBuilder.Entity<TelemetryDataSaubStat>(entity =>
|
|
|
|
|
{
|
|
|
|
|
entity.HasNoKey()
|
|
|
|
|
.ToView("mw_telemetry_datas_saub_stat");
|
|
|
|
|
});
|
|
|
|
|
|
2022-05-26 13:28:16 +05:00
|
|
|
|
modelBuilder.Entity<Schedule>(entity =>
|
2022-05-25 20:19:08 +05:00
|
|
|
|
{
|
|
|
|
|
entity.HasOne(d => d.Driller)
|
|
|
|
|
.WithMany(p => p.Schedule)
|
|
|
|
|
.HasForeignKey(d => d.IdDriller)
|
|
|
|
|
.HasConstraintName("t_schedule_t_driller_id_driller");
|
|
|
|
|
});
|
|
|
|
|
|
2021-04-09 17:59:07 +05:00
|
|
|
|
FillData(modelBuilder);
|
2021-04-02 17:28:07 +05:00
|
|
|
|
}
|
|
|
|
|
|
2022-05-11 09:04:32 +05:00
|
|
|
|
public Task<int> RefreshMaterializedViewAsync<TEntity>(CancellationToken token = default)
|
2022-05-06 10:58:52 +05:00
|
|
|
|
where TEntity : class
|
|
|
|
|
{
|
2022-05-11 09:04:32 +05:00
|
|
|
|
var materializedViewName = Set<TEntity>().EntityType.GetViewName();
|
|
|
|
|
return RefreshMaterializedViewAsync(materializedViewName!, token);
|
|
|
|
|
}
|
2022-05-06 10:58:52 +05:00
|
|
|
|
|
2022-05-11 09:04:32 +05:00
|
|
|
|
public Task<int> RefreshMaterializedViewAsync(string materializedViewName, CancellationToken token = default)
|
|
|
|
|
{
|
|
|
|
|
var sql = $"REFRESH MATERIALIZED VIEW {materializedViewName};";
|
2022-05-06 10:58:52 +05:00
|
|
|
|
return Database.ExecuteSqlRawAsync(sql, token);
|
|
|
|
|
}
|
|
|
|
|
|
2021-05-19 15:21:19 +05:00
|
|
|
|
private static void FillData(ModelBuilder modelBuilder)
|
2021-04-09 17:59:07 +05:00
|
|
|
|
{
|
2021-07-21 17:59:18 +05:00
|
|
|
|
modelBuilder.Entity<UserRole>(entity =>
|
|
|
|
|
{
|
|
|
|
|
entity.HasData(new List<UserRole>{
|
2022-02-03 09:58:42 +05:00
|
|
|
|
new UserRole{ Id = 1, Caption = "root", IdType = 1},
|
2022-02-01 15:07:06 +05:00
|
|
|
|
new UserRole{ Id = 1100, Caption = "admin_cluster.view", IdType = 1},
|
|
|
|
|
new UserRole{ Id = 1101, Caption = "admin_cluster.edit", IdType = 1},
|
|
|
|
|
new UserRole{ Id = 1102, Caption = "admin_company.view", IdType = 1},
|
|
|
|
|
new UserRole{ Id = 1103, Caption = "admin_company.edit", IdType = 1},
|
|
|
|
|
new UserRole{ Id = 1104, Caption = "admin_company_type.view", IdType = 1},
|
|
|
|
|
new UserRole{ Id = 1105, Caption = "admin_company_type.edit", IdType = 1},
|
|
|
|
|
new UserRole{ Id = 1106, Caption = "admin_deposit.view", IdType = 1},
|
|
|
|
|
new UserRole{ Id = 1107, Caption = "admin_deposit.edit", IdType = 1},
|
|
|
|
|
new UserRole{ Id = 1108, Caption = "admin_permission.view", IdType = 1},
|
|
|
|
|
new UserRole{ Id = 1109, Caption = "admin_permission.edit", IdType = 1},
|
|
|
|
|
new UserRole{ Id = 1110, Caption = "admin_role.view", IdType = 1},
|
|
|
|
|
new UserRole{ Id = 1111, Caption = "admin_role.edit", IdType = 1},
|
|
|
|
|
new UserRole{ Id = 1112, Caption = "admin_telemetry.view", IdType = 1},
|
|
|
|
|
new UserRole{ Id = 1113, Caption = "admin_user.view", IdType = 1},
|
|
|
|
|
new UserRole{ Id = 1114, Caption = "admin_user.edit", IdType = 1},
|
|
|
|
|
new UserRole{ Id = 1115, Caption = "admin_visit_log.view", IdType = 1},
|
|
|
|
|
new UserRole{ Id = 1116, Caption = "admin_well.view", IdType = 1},
|
|
|
|
|
new UserRole{ Id = 1117, Caption = "admin_well.edit", IdType = 1},
|
|
|
|
|
new UserRole{ Id = 1200, Caption = "archive.view", IdType = 1},
|
|
|
|
|
new UserRole{ Id = 1201, Caption = "cluster.view", IdType = 1},
|
|
|
|
|
new UserRole{ Id = 1202, Caption = "composite.view", IdType = 1},
|
|
|
|
|
new UserRole{ Id = 1203, Caption = "composite.edit", IdType = 1},
|
|
|
|
|
new UserRole{ Id = 1204, Caption = "deposit.view", IdType = 1},
|
|
|
|
|
new UserRole{ Id = 1205, Caption = "document.view", IdType = 1},
|
|
|
|
|
new UserRole{ Id = 1206, Caption = "drillProcessFlow.view", IdType = 1},
|
|
|
|
|
new UserRole{ Id = 1207, Caption = "drillProcessFlow.edit", IdType = 1},
|
|
|
|
|
new UserRole{ Id = 1208, Caption = "measure.view", IdType = 1},
|
|
|
|
|
new UserRole{ Id = 1209, Caption = "measure.edit", IdType = 1},
|
|
|
|
|
new UserRole{ Id = 1210, Caption = "message.view", IdType = 1},
|
|
|
|
|
new UserRole{ Id = 1211, Caption = "operations.view", IdType = 1},
|
|
|
|
|
new UserRole{ Id = 1212, Caption = "operations.edit", IdType = 1},
|
|
|
|
|
new UserRole{ Id = 1213, Caption = "params.view", IdType = 1},
|
|
|
|
|
new UserRole{ Id = 1214, Caption = "params.edit", IdType = 1},
|
|
|
|
|
new UserRole{ Id = 1215, Caption = "report.view", IdType = 1},
|
|
|
|
|
new UserRole{ Id = 1216, Caption = "report.edit", IdType = 1},
|
|
|
|
|
new UserRole{ Id = 1217, Caption = "setpoints.view", IdType = 1},
|
|
|
|
|
new UserRole{ Id = 1218, Caption = "setpoints.edit", IdType = 1},
|
|
|
|
|
new UserRole{ Id = 1219, Caption = "telemetry.view", IdType = 1},
|
|
|
|
|
new UserRole{ Id = 1220, Caption = "telemetryAnalysis.view", IdType = 1},
|
|
|
|
|
new UserRole{ Id = 1221, Caption = "well.view", IdType = 1},
|
2022-02-03 09:58:42 +05:00
|
|
|
|
new UserRole{ Id = 1500, Caption = "Просмотр всего", IdType = 1},
|
|
|
|
|
new UserRole{ Id = 1501, Caption = "file.edit", IdType = 1},
|
|
|
|
|
new UserRole{ Id = 1502, Caption = "drillingProgram.edit", IdType = 1},
|
|
|
|
|
new UserRole{ Id = 2000, Caption = "Заказчик", IdType = 0},
|
|
|
|
|
new UserRole{ Id = 2001, Caption = "Супервайзер", IdType = 0},
|
|
|
|
|
new UserRole{ Id = 2002, Caption = "Буровой подрядчик", IdType = 0},
|
|
|
|
|
new UserRole{ Id = 2003, Caption = "Растворщик", IdType = 0},
|
|
|
|
|
new UserRole{ Id = 2004, Caption = "Телеметрист", IdType = 0},
|
|
|
|
|
new UserRole{ Id = 2005, Caption = "Долотный сервис", IdType = 0},
|
|
|
|
|
new UserRole{ Id = 2006, Caption = "ГТИ", IdType = 0},
|
|
|
|
|
new UserRole{ Id = 2007, Caption = "Цементирование", IdType = 0},
|
2022-02-01 14:31:26 +05:00
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity<RelationUserRoleUserRole>(entity =>
|
|
|
|
|
{
|
|
|
|
|
entity.HasData(new List<RelationUserRoleUserRole>
|
|
|
|
|
{
|
|
|
|
|
new RelationUserRoleUserRole{ Id = 1101, IdInclude = 1100 },
|
|
|
|
|
new RelationUserRoleUserRole{ Id = 1103, IdInclude = 1102 },
|
|
|
|
|
new RelationUserRoleUserRole{ Id = 1105, IdInclude = 1104 },
|
|
|
|
|
new RelationUserRoleUserRole{ Id = 1107, IdInclude = 1106 },
|
|
|
|
|
new RelationUserRoleUserRole{ Id = 1109, IdInclude = 1108 },
|
|
|
|
|
new RelationUserRoleUserRole{ Id = 1111, IdInclude = 1110 },
|
|
|
|
|
new RelationUserRoleUserRole{ Id = 1114, IdInclude = 1113 },
|
|
|
|
|
new RelationUserRoleUserRole{ Id = 1117, IdInclude = 1116 },
|
|
|
|
|
new RelationUserRoleUserRole{ Id = 1203, IdInclude = 1202 },
|
|
|
|
|
new RelationUserRoleUserRole{ Id = 1207, IdInclude = 1206 },
|
|
|
|
|
new RelationUserRoleUserRole{ Id = 1209, IdInclude = 1208 },
|
|
|
|
|
new RelationUserRoleUserRole{ Id = 1212, IdInclude = 1211 },
|
|
|
|
|
new RelationUserRoleUserRole{ Id = 1214, IdInclude = 1213 },
|
|
|
|
|
new RelationUserRoleUserRole{ Id = 1216, IdInclude = 1215 },
|
|
|
|
|
new RelationUserRoleUserRole{ Id = 1218, IdInclude = 1217 },
|
2022-02-03 09:58:42 +05:00
|
|
|
|
new RelationUserRoleUserRole{ Id = 2000, IdInclude = 1200}, new RelationUserRoleUserRole{ Id = 2000, IdInclude = 1201}, new RelationUserRoleUserRole{ Id = 2000, IdInclude = 1202}, new RelationUserRoleUserRole{ Id = 2000, IdInclude = 1204}, new RelationUserRoleUserRole{ Id = 2000, IdInclude = 1205}, new RelationUserRoleUserRole{ Id = 2000, IdInclude = 1206}, new RelationUserRoleUserRole{ Id = 2000, IdInclude = 1208}, new RelationUserRoleUserRole{ Id = 2000, IdInclude = 1210}, new RelationUserRoleUserRole{ Id = 2000, IdInclude = 1211}, new RelationUserRoleUserRole{ Id = 2000, IdInclude = 1213}, new RelationUserRoleUserRole{ Id = 2000, IdInclude = 1215}, new RelationUserRoleUserRole{ Id = 2000, IdInclude = 1217}, new RelationUserRoleUserRole{ Id = 2000, IdInclude = 1219}, new RelationUserRoleUserRole{ Id = 2000, IdInclude = 1220}, new RelationUserRoleUserRole{ Id = 2000, IdInclude = 1221},
|
|
|
|
|
new RelationUserRoleUserRole{ Id = 2000, IdInclude = 1500 },new RelationUserRoleUserRole{ Id = 2000, IdInclude = 1501 },new RelationUserRoleUserRole{ Id = 2000, IdInclude = 1502 },
|
|
|
|
|
new RelationUserRoleUserRole{ Id = 2001, IdInclude = 1500 },new RelationUserRoleUserRole{ Id = 2001, IdInclude = 1501 },new RelationUserRoleUserRole{ Id = 2001, IdInclude = 1502 },
|
|
|
|
|
new RelationUserRoleUserRole{ Id = 2002, IdInclude = 1500 },new RelationUserRoleUserRole{ Id = 2002, IdInclude = 1501 },new RelationUserRoleUserRole{ Id = 2002, IdInclude = 1502 },
|
|
|
|
|
new RelationUserRoleUserRole{ Id = 2003, IdInclude = 1500 },new RelationUserRoleUserRole{ Id = 2003, IdInclude = 1501 },new RelationUserRoleUserRole{ Id = 2003, IdInclude = 1502 },
|
|
|
|
|
new RelationUserRoleUserRole{ Id = 2004, IdInclude = 1500 },new RelationUserRoleUserRole{ Id = 2004, IdInclude = 1501 },new RelationUserRoleUserRole{ Id = 2004, IdInclude = 1502 },
|
|
|
|
|
new RelationUserRoleUserRole{ Id = 2005, IdInclude = 1500 },new RelationUserRoleUserRole{ Id = 2005, IdInclude = 1501 },new RelationUserRoleUserRole{ Id = 2005, IdInclude = 1502 },
|
|
|
|
|
new RelationUserRoleUserRole{ Id = 2006, IdInclude = 1500 },new RelationUserRoleUserRole{ Id = 2006, IdInclude = 1501 },new RelationUserRoleUserRole{ Id = 2006, IdInclude = 1502 },
|
|
|
|
|
new RelationUserRoleUserRole{ Id = 2007, IdInclude = 1500 },new RelationUserRoleUserRole{ Id = 2007, IdInclude = 1501 },new RelationUserRoleUserRole{ Id = 2007, IdInclude = 1502 },
|
2022-02-01 14:31:26 +05:00
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity<Permission>(entity =>
|
|
|
|
|
{
|
|
|
|
|
entity.HasData(new List<Permission>
|
|
|
|
|
{
|
|
|
|
|
new Permission{ Id = 100, Name="AdminCluster.delete", Description="Разрешение удалять админ. Кусты"},
|
|
|
|
|
new Permission{ Id = 101, Name="AdminCluster.edit", Description="Разрешение редактировать админ. Кусты"},
|
|
|
|
|
new Permission{ Id = 102, Name="AdminCluster.get", Description="Разрешение просматривать админ. Кусты"},
|
|
|
|
|
new Permission{ Id = 103, Name="AdminCompany.delete", Description="Разрешение удалять админ. Компании"},
|
|
|
|
|
new Permission{ Id = 104, Name="AdminCompany.edit", Description="Разрешение редактировать админ. Компании"},
|
|
|
|
|
new Permission{ Id = 105, Name="AdminCompany.get", Description="Разрешение просматривать админ. Компании"},
|
|
|
|
|
new Permission{ Id = 106, Name="AdminCompanyType.delete", Description="Разрешение удалять админ. Типы компаний"},
|
|
|
|
|
new Permission{ Id = 107, Name="AdminCompanyType.edit", Description="Разрешение редактировать админ. Типы компаний"},
|
|
|
|
|
new Permission{ Id = 108, Name="AdminCompanyType.get", Description="Разрешение просматривать админ. Типы компаний"},
|
|
|
|
|
new Permission{ Id = 109, Name="AdminDeposit.delete", Description="Разрешение удалять админ. Месторождения"},
|
|
|
|
|
new Permission{ Id = 110, Name="AdminDeposit.edit", Description="Разрешение редактировать админ. Месторождения"},
|
|
|
|
|
new Permission{ Id = 111, Name="AdminDeposit.get", Description="Разрешение просматривать админ. Месторождения"},
|
|
|
|
|
new Permission{ Id = 112, Name="AdminPermission.delete", Description="Разрешение удалять админ. Разрешения"},
|
|
|
|
|
new Permission{ Id = 113, Name="AdminPermission.edit", Description="Разрешение редактировать админ. Разрешения"},
|
|
|
|
|
new Permission{ Id = 114, Name="AdminPermission.get", Description="Разрешение просматривать админ. Разрешения"},
|
|
|
|
|
new Permission{ Id = 115, Name="AdminTelemetry.delete", Description="Разрешение удалять админ. Телеметрию"},
|
|
|
|
|
new Permission{ Id = 116, Name="AdminTelemetry.edit", Description="Разрешение редактировать админ. Телеметрию"},
|
|
|
|
|
new Permission{ Id = 117, Name="AdminTelemetry.get", Description="Разрешение просматривать админ. Телеметрию"},
|
|
|
|
|
new Permission{ Id = 118, Name="AdminUser.delete", Description="Разрешение удалять админ. Пользователей"},
|
|
|
|
|
new Permission{ Id = 119, Name="AdminUser.edit", Description="Разрешение редактировать админ. Пользователей"},
|
|
|
|
|
new Permission{ Id = 120, Name="AdminUser.get", Description="Разрешение просматривать админ. Пользователей"},
|
|
|
|
|
new Permission{ Id = 121, Name="AdminUserRole.delete", Description="Разрешение удалять админ. Роли пользователей"},
|
|
|
|
|
new Permission{ Id = 122, Name="AdminUserRole.edit", Description="Разрешение редактировать админ. Роли пользователей"},
|
|
|
|
|
new Permission{ Id = 123, Name="AdminUserRole.get", Description="Разрешение просматривать админ. Роли пользователей"},
|
|
|
|
|
new Permission{ Id = 124, Name="AdminWell.delete", Description="Разрешение удалять админ. Скважины"},
|
|
|
|
|
new Permission{ Id = 125, Name="AdminWell.edit", Description="Разрешение редактировать админ. Скважины"},
|
|
|
|
|
new Permission{ Id = 126, Name="AdminWell.get", Description="Разрешение просматривать админ. Скважины"},
|
|
|
|
|
new Permission{ Id = 200, Name="Auth.edit", Description="Разрешение редактировать 0"},
|
|
|
|
|
new Permission{ Id = 201, Name="Auth.get", Description="Разрешение просматривать 0"},
|
|
|
|
|
new Permission{ Id = 202, Name="Cluster.get", Description="Разрешение просматривать Кусты"},
|
|
|
|
|
new Permission{ Id = 203, Name="Deposit.get", Description="Разрешение просматривать Месторождения"},
|
|
|
|
|
new Permission{ Id = 204, Name="DrillFlowChart.delete", Description="Разрешение удалять РТК"},
|
|
|
|
|
new Permission{ Id = 205, Name="DrillFlowChart.edit", Description="Разрешение редактировать РТК"},
|
|
|
|
|
new Permission{ Id = 206, Name="DrillFlowChart.get", Description="Разрешение просматривать РТК"},
|
|
|
|
|
new Permission{ Id = 207, Name="DrillingProgram.delete", Description="Разрешение удалять Программу бурения"},
|
|
|
|
|
new Permission{ Id = 208, Name="DrillingProgram.edit", Description="Разрешение редактировать Программу бурения"},
|
|
|
|
|
new Permission{ Id = 209, Name="DrillingProgram.get", Description="Разрешение просматривать Программу бурения"},
|
|
|
|
|
new Permission{ Id = 210, Name="DrillParams.delete", Description="Разрешение удалять Режимы бурения"},
|
|
|
|
|
new Permission{ Id = 211, Name="DrillParams.edit", Description="Разрешение редактировать Режимы бурения"},
|
|
|
|
|
new Permission{ Id = 212, Name="DrillParams.get", Description="Разрешение просматривать Режимы бурения"},
|
|
|
|
|
new Permission{ Id = 213, Name="File.delete", Description="Разрешение удалять Файлы"},
|
|
|
|
|
new Permission{ Id = 214, Name="File.edit", Description="Разрешение редактировать Файлы"},
|
|
|
|
|
new Permission{ Id = 215, Name="File.get", Description="Разрешение просматривать Файлы"},
|
|
|
|
|
new Permission{ Id = 216, Name="Measure.delete", Description="Разрешение удалять Измерения"},
|
|
|
|
|
new Permission{ Id = 217, Name="Measure.edit", Description="Разрешение редактировать Измерения"},
|
|
|
|
|
new Permission{ Id = 218, Name="Measure.get", Description="Разрешение просматривать Измерения"},
|
|
|
|
|
new Permission{ Id = 219, Name="Message.get", Description="Разрешение просматривать Сообщения телеметрии"},
|
|
|
|
|
new Permission{ Id = 220, Name="OperationStat.get", Description="Разрешение просматривать Статистику по операциям"},
|
|
|
|
|
new Permission{ Id = 221, Name="Report.edit", Description="Разрешение редактировать Рапорта"},
|
|
|
|
|
new Permission{ Id = 222, Name="Report.get", Description="Разрешение просматривать Рапорта"},
|
2022-03-29 09:51:24 +05:00
|
|
|
|
new Permission{ Id = 223, Name="RequestTracker.get", Description="Разрешение просматривать админ. Системная статистика"},
|
2022-02-01 14:31:26 +05:00
|
|
|
|
new Permission{ Id = 224, Name="Setpoints.delete", Description="Разрешение удалять Рекомендации уставок"},
|
|
|
|
|
new Permission{ Id = 225, Name="Setpoints.edit", Description="Разрешение редактировать Рекомендации уставок"},
|
|
|
|
|
new Permission{ Id = 226, Name="Setpoints.get", Description="Разрешение просматривать Рекомендации уставок"},
|
|
|
|
|
new Permission{ Id = 227, Name="Telemetry.edit", Description="Разрешение редактировать Телеметрии"},
|
|
|
|
|
new Permission{ Id = 228, Name="TelemetryAnalytics.get", Description="Разрешение просматривать Анализ телеметрии"},
|
|
|
|
|
new Permission{ Id = 229, Name="TelemetryDataSaub.edit", Description="Разрешение редактировать Данные телеметрии по САУБ"},
|
|
|
|
|
new Permission{ Id = 230, Name="TelemetryDataSaub.get", Description="Разрешение просматривать Данные телеметрии по САУБ"},
|
|
|
|
|
new Permission{ Id = 231, Name="TelemetryDataSpin.edit", Description="Разрешение редактировать Данные телеметрии по SpinMaster"},
|
|
|
|
|
new Permission{ Id = 232, Name="TelemetryDataSpin.get", Description="Разрешение просматривать Данные телеметрии по SpinMaster"},
|
|
|
|
|
new Permission{ Id = 233, Name="Well.edit", Description="Разрешение редактировать Скважины"},
|
|
|
|
|
new Permission{ Id = 234, Name="Well.get", Description="Разрешение просматривать Скважины"},
|
|
|
|
|
new Permission{ Id = 235, Name="WellComposite.edit", Description="Разрешение редактировать Композитные скважины"},
|
|
|
|
|
new Permission{ Id = 236, Name="WellComposite.get", Description="Разрешение просматривать Композитные скважины"},
|
|
|
|
|
new Permission{ Id = 237, Name="WellOperation.delete", Description="Разрешение удалять Операции по скважинам"},
|
|
|
|
|
new Permission{ Id = 238, Name="WellOperation.edit", Description="Разрешение редактировать Операции по скважинам"},
|
|
|
|
|
new Permission{ Id = 239, Name="WellOperation.get", Description="Разрешение просматривать Операции по скважинам"},
|
2022-02-03 09:58:42 +05:00
|
|
|
|
new Permission{ Id = 240, Name="File.edit1", Description="Разрешение редактировать Файлы категории 1 (Растворный сервис)"},
|
|
|
|
|
new Permission{ Id = 241, Name="File.edit2", Description="Разрешение редактировать Файлы категории 2 (Цементирование)"},
|
|
|
|
|
new Permission{ Id = 242, Name="File.edit3", Description="Разрешение редактировать Файлы категории 3 (ННБ)"},
|
|
|
|
|
new Permission{ Id = 243, Name="File.edit4", Description="Разрешение редактировать Файлы категории 4 (ГТИ)"},
|
|
|
|
|
new Permission{ Id = 244, Name="File.edit5", Description="Разрешение редактировать Файлы категории 5 (Документы по скважине)"},
|
|
|
|
|
new Permission{ Id = 245, Name="File.edit6", Description="Разрешение редактировать Файлы категории 6 (Супервайзер)"},
|
|
|
|
|
new Permission{ Id = 246, Name="File.edit7", Description="Разрешение редактировать Файлы категории 7 (Мастер)"},
|
|
|
|
|
new Permission{ Id = 247, Name="File.edit8", Description="Разрешение редактировать Файлы категории 8 (Долотный сервис)"},
|
|
|
|
|
new Permission{ Id = 248, Name="File.edit9", Description="Разрешение редактировать Файлы категории 9 (Буровой подрядчик)"},
|
|
|
|
|
new Permission{ Id = 249, Name="File.edit10", Description="Разрешение редактировать Файлы категории 10 (Сервис по заканчиванию скважины)"},
|
|
|
|
|
new Permission{ Id = 250, Name="File.edit11", Description="Разрешение редактировать Файлы категории 11 (Рапорт)"},
|
|
|
|
|
new Permission{ Id = 251, Name="File.edit12", Description="Разрешение редактировать Файлы категории 12"},
|
|
|
|
|
new Permission{ Id = 252, Name="File.edit13", Description="Разрешение редактировать Файлы категории 12"},
|
|
|
|
|
new Permission{ Id = 253, Name="File.edit14", Description="Разрешение редактировать Файлы категории 13"},
|
|
|
|
|
new Permission{ Id = 254, Name="File.edit15", Description="Разрешение редактировать Файлы категории 14"},
|
|
|
|
|
new Permission{ Id = 255, Name="File.edit16", Description="Разрешение редактировать Файлы категории 15"},
|
|
|
|
|
new Permission{ Id = 256, Name="File.edit17", Description="Разрешение редактировать Файлы категории 16"},
|
|
|
|
|
new Permission{ Id = 257, Name="File.edit18", Description="Разрешение редактировать Файлы категории 17"},
|
|
|
|
|
new Permission{ Id = 258, Name="File.edit19", Description="Разрешение редактировать Файлы категории 18"},
|
|
|
|
|
new Permission{ Id = 259, Name="File.edit20", Description="Разрешение редактировать Файлы категории 19"},
|
|
|
|
|
new Permission{ Id = 260, Name="File.edit21", Description="Разрешение редактировать Файлы категории 20"},
|
|
|
|
|
new Permission{ Id = 261, Name="File.edit22", Description="Разрешение редактировать Файлы категории 21"},
|
|
|
|
|
new Permission{ Id = 262, Name="File.edit23", Description="Разрешение редактировать Файлы категории 22"},
|
|
|
|
|
new Permission{ Id = 263, Name="File.edit24", Description="Разрешение редактировать Файлы категории 23"},
|
|
|
|
|
new Permission{ Id = 264, Name="File.edit25", Description="Разрешение редактировать Файлы категории 24"},
|
|
|
|
|
new Permission{ Id = 265, Name="File.edit26", Description="Разрешение редактировать Файлы категории 25"},
|
|
|
|
|
new Permission{ Id = 266, Name="File.edit27", Description="Разрешение редактировать Файлы категории 26"},
|
|
|
|
|
new Permission{ Id = 267, Name="File.edit28", Description="Разрешение редактировать Файлы категории 27"},
|
|
|
|
|
new Permission{ Id = 268, Name="File.edit29", Description="Разрешение редактировать Файлы категории 28"},
|
|
|
|
|
new Permission{ Id = 269, Name="File.edit30", Description="Разрешение редактировать Файлы категории 29"},
|
2022-02-01 14:31:26 +05:00
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity<RelationUserRolePermission>(entity =>
|
|
|
|
|
{
|
|
|
|
|
entity.HasData(new List<RelationUserRolePermission>
|
|
|
|
|
{
|
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 1100, IdPermission = 102}, new RelationUserRolePermission{ IdUserRole = 1100, IdPermission = 111},
|
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 1101, IdPermission = 101}, new RelationUserRolePermission{ IdUserRole = 1101, IdPermission = 100},
|
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 1102, IdPermission = 105}, new RelationUserRolePermission{ IdUserRole = 1102, IdPermission = 108},
|
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 1103, IdPermission = 104}, new RelationUserRolePermission{ IdUserRole = 1103, IdPermission = 103},
|
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 1104, IdPermission = 108},
|
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 1105, IdPermission = 107}, new RelationUserRolePermission{ IdUserRole = 1105, IdPermission = 106},
|
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 1106, IdPermission = 111},
|
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 1107, IdPermission = 110}, new RelationUserRolePermission{ IdUserRole = 1107, IdPermission = 109},
|
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 1108, IdPermission = 114},
|
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 1109, IdPermission = 113}, new RelationUserRolePermission{ IdUserRole = 1109, IdPermission = 112},
|
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 1110, IdPermission = 123}, new RelationUserRolePermission{ IdUserRole = 1110, IdPermission = 114},
|
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 1111, IdPermission = 122}, new RelationUserRolePermission{ IdUserRole = 1111, IdPermission = 121},
|
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 1112, IdPermission = 117},
|
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 1113, IdPermission = 105}, new RelationUserRolePermission{ IdUserRole = 1113, IdPermission = 123}, new RelationUserRolePermission{ IdUserRole = 1113, IdPermission = 120},
|
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 1114, IdPermission = 119}, new RelationUserRolePermission{ IdUserRole = 1114, IdPermission = 118}, new RelationUserRolePermission{ IdUserRole = 1114, IdPermission = 200},
|
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 1115, IdPermission = 223},
|
2022-02-03 09:58:42 +05:00
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 1116, IdPermission = 105}, new RelationUserRolePermission{ IdUserRole = 1116, IdPermission = 102}, new RelationUserRolePermission{ IdUserRole = 1116, IdPermission = 117}, new RelationUserRolePermission{ IdUserRole = 1116, IdPermission = 126},
|
2022-02-01 14:31:26 +05:00
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 1117, IdPermission = 125}, new RelationUserRolePermission{ IdUserRole = 1117, IdPermission = 124},
|
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 1200, IdPermission = 203}, new RelationUserRolePermission{ IdUserRole = 1200, IdPermission = 230},
|
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 1201, IdPermission = 202}, new RelationUserRolePermission{ IdUserRole = 1201, IdPermission = 203}, new RelationUserRolePermission{ IdUserRole = 1201, IdPermission = 220},
|
2022-02-03 09:58:42 +05:00
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 1202, IdPermission = 203}, new RelationUserRolePermission{ IdUserRole = 1202, IdPermission = 220}, new RelationUserRolePermission{ IdUserRole = 1202, IdPermission = 236}, new RelationUserRolePermission{ IdUserRole = 1202, IdPermission = 212},
|
2022-02-01 14:31:26 +05:00
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 1203, IdPermission = 235},
|
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 1204, IdPermission = 202}, new RelationUserRolePermission{ IdUserRole = 1204, IdPermission = 203},
|
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 1205, IdPermission = 215},
|
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 1206, IdPermission = 203}, new RelationUserRolePermission{ IdUserRole = 1206, IdPermission = 206},
|
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 1207, IdPermission = 205},
|
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 1208, IdPermission = 218},
|
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 1209, IdPermission = 217},
|
2022-02-03 09:58:42 +05:00
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 1210, IdPermission = 203}, new RelationUserRolePermission{ IdUserRole = 1210, IdPermission = 230}, new RelationUserRolePermission{ IdUserRole = 1210, IdPermission = 219},
|
2022-02-01 14:31:26 +05:00
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 1211, IdPermission = 203}, new RelationUserRolePermission{ IdUserRole = 1211, IdPermission = 220}, new RelationUserRolePermission{ IdUserRole = 1211, IdPermission = 239},
|
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 1212, IdPermission = 238}, new RelationUserRolePermission{ IdUserRole = 1212, IdPermission = 237},
|
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 1213, IdPermission = 203}, new RelationUserRolePermission{ IdUserRole = 1213, IdPermission = 239}, new RelationUserRolePermission{ IdUserRole = 1213, IdPermission = 212},
|
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 1214, IdPermission = 211}, new RelationUserRolePermission{ IdUserRole = 1214, IdPermission = 210},
|
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 1215, IdPermission = 203}, new RelationUserRolePermission{ IdUserRole = 1215, IdPermission = 222},
|
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 1216, IdPermission = 221},
|
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 1217, IdPermission = 226},
|
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 1218, IdPermission = 225}, new RelationUserRolePermission{ IdUserRole = 1218, IdPermission = 224},
|
2022-02-03 09:58:42 +05:00
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 1219, IdPermission = 203}, new RelationUserRolePermission{ IdUserRole = 1219, IdPermission = 206}, new RelationUserRolePermission{ IdUserRole = 1219, IdPermission = 230}, new RelationUserRolePermission{ IdUserRole = 1219, IdPermission = 232},
|
2022-02-01 14:31:26 +05:00
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 1220, IdPermission = 203}, new RelationUserRolePermission{ IdUserRole = 1220, IdPermission = 228},
|
2022-02-03 09:58:42 +05:00
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 1221, IdPermission = 202}, new RelationUserRolePermission{ IdUserRole = 1221, IdPermission = 203}, new RelationUserRolePermission{ IdUserRole = 1221, IdPermission = 220}, new RelationUserRolePermission{ IdUserRole = 1221, IdPermission = 234},
|
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 1501, IdPermission = 214}, new RelationUserRolePermission{ IdUserRole = 1501, IdPermission = 213},
|
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 1502, IdPermission = 207}, new RelationUserRolePermission{ IdUserRole = 1502, IdPermission = 208},
|
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 2000, IdPermission = 205}, new RelationUserRolePermission{ IdUserRole = 2000, IdPermission = 204}, new RelationUserRolePermission{ IdUserRole = 2000, IdPermission = 245},
|
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 2001, IdPermission = 244}, new RelationUserRolePermission{ IdUserRole = 2001, IdPermission = 245},
|
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 2002, IdPermission = 244}, new RelationUserRolePermission{ IdUserRole = 2002, IdPermission = 246}, new RelationUserRolePermission{ IdUserRole = 2002, IdPermission = 237}, new RelationUserRolePermission{ IdUserRole = 2002, IdPermission = 238},
|
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 2003, IdPermission = 240}, new RelationUserRolePermission{ IdUserRole = 2003, IdPermission = 217}, new RelationUserRolePermission{ IdUserRole = 2003, IdPermission = 216},
|
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 2004, IdPermission = 242}, new RelationUserRolePermission{ IdUserRole = 2004, IdPermission = 217}, new RelationUserRolePermission{ IdUserRole = 2004, IdPermission = 216}, new RelationUserRolePermission{ IdUserRole = 2004, IdPermission = 205}, new RelationUserRolePermission{ IdUserRole = 2004, IdPermission = 204},
|
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 2005, IdPermission = 247}, new RelationUserRolePermission{ IdUserRole = 2005, IdPermission = 205}, new RelationUserRolePermission{ IdUserRole = 2005, IdPermission = 204},
|
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 2006, IdPermission = 243}, new RelationUserRolePermission{ IdUserRole = 2006, IdPermission = 205}, new RelationUserRolePermission{ IdUserRole = 2006, IdPermission = 204},
|
|
|
|
|
new RelationUserRolePermission{ IdUserRole = 2007, IdPermission = 241}, new RelationUserRolePermission{ IdUserRole = 2007, IdPermission = 205}, new RelationUserRolePermission{ IdUserRole = 2007, IdPermission = 204},
|
2021-07-21 17:59:18 +05:00
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity<User>(entity =>
|
|
|
|
|
{
|
|
|
|
|
entity.HasData(new List<User>{
|
|
|
|
|
new User{
|
|
|
|
|
Id = 1,
|
|
|
|
|
IdCompany = 1,
|
|
|
|
|
Login = "dev",
|
2021-12-30 10:45:06 +05:00
|
|
|
|
PasswordHash = "Vlcj|4fa529103dde7ff72cfe76185f344d4aa87931f8e1b2044e8a7739947c3d18923464eaad93843e4f809c5e126d013072",
|
2021-07-21 17:59:18 +05:00
|
|
|
|
Name = "Разработчик",
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
});
|
2022-04-11 18:00:34 +05:00
|
|
|
|
|
2021-11-29 17:34:53 +05:00
|
|
|
|
modelBuilder.Entity<RelationUserUserRole>(entity =>
|
|
|
|
|
{
|
|
|
|
|
entity.HasData(new List<RelationUserUserRole>{
|
2022-02-21 12:04:26 +05:00
|
|
|
|
new RelationUserUserRole { IdUser = 1, IdUserRole = 1, },
|
2021-11-29 17:34:53 +05:00
|
|
|
|
});
|
|
|
|
|
});
|
2021-07-21 17:59:18 +05:00
|
|
|
|
|
|
|
|
|
modelBuilder.Entity<Company>(entity =>
|
|
|
|
|
{
|
|
|
|
|
entity.HasData(new List<Company>{
|
2021-07-22 14:23:47 +05:00
|
|
|
|
new Company{ Id = 1, Caption = "ООО \"АСБ\"", IdCompanyType = 3},
|
2021-07-21 17:59:18 +05:00
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
2021-08-16 14:19:43 +05:00
|
|
|
|
modelBuilder.Entity<WellOperationCategory>(entity =>
|
|
|
|
|
{
|
|
|
|
|
entity.HasData(new List<WellOperationCategory> {
|
2021-12-30 10:45:06 +05:00
|
|
|
|
// Автоматически определяемые операции
|
2021-08-16 14:19:43 +05:00
|
|
|
|
new WellOperationCategory {Id = 1, Name = "Невозможно определить операцию", Code = 0},
|
|
|
|
|
new WellOperationCategory {Id = 2, Name = "Роторное бурение", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 3, Name = "Слайдирование", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 4, Name = "Подъем с проработкой", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 5, Name = "Спуск с проработкой", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 6, Name = "Подъем с промывкой", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 7, Name = "Спуск с промывкой", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 8, Name = "Спуск в скважину", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 9, Name = "Спуск с вращением", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 10, Name = "Подъем из скважины", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 11, Name = "Подъем с вращением", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 12, Name = "Промывка в покое", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 13, Name = "Промывка с вращением", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 14, Name = "Удержание в клиньях", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 15, Name = "Неподвижное состояние", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 16, Name = "Вращение без циркуляции", Code = 0 },
|
2021-08-18 16:26:06 +05:00
|
|
|
|
new WellOperationCategory {Id = 17, Name = "На поверхности", Code = 0 },
|
|
|
|
|
// Операции ручного ввода
|
2021-10-19 10:34:11 +05:00
|
|
|
|
new WellOperationCategory {Id = 1001, Name = "Бурение", Code = 0 },
|
2021-08-19 14:31:02 +05:00
|
|
|
|
new WellOperationCategory {Id = 1002, Name = "ГИС", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 1003, Name = "ГФР", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 1004, Name = "Монтаж ПВО", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 1005, Name = "Демонтаж ПВО", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 1006, Name = "Установка ФА", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 1007, Name = "Оборудование устья", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 1008, Name = "ОЗЦ", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 1011, Name = "Начало цикла строительства скважины", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 1012, Name = "Окончание цикла строительства скважины", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 1013, Name = "Опрессовка ПВО", Code = 0 },
|
2021-12-30 10:45:06 +05:00
|
|
|
|
new WellOperationCategory {Id = 1014, Name = "Опрессовка Ц.К.", Code = 0 },
|
2021-08-19 14:31:02 +05:00
|
|
|
|
new WellOperationCategory {Id = 1015, Name = "Опрессовка ВЗД", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 1016, Name = "Перевод скв на другой тип промывочной жидкости", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 1017, Name = "Перезапись каротажа", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 1018, Name = "Перетяжка талевого каната", Code = 0 },
|
2021-10-06 18:06:07 +05:00
|
|
|
|
new WellOperationCategory {Id = 1019, Name = "Наращивание, промывка", Code = 0 },
|
2021-08-19 14:31:02 +05:00
|
|
|
|
new WellOperationCategory {Id = 1020, Name = "Подъем инструмента", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 1021, Name = "Подъем инструмента с промывкой", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 1022, Name = "Обратная проработка", Code = 0 },
|
2021-12-08 15:38:38 +05:00
|
|
|
|
new WellOperationCategory {Id = 1023, Name = "Сборка инструмента с мостков", Code = 0 },
|
2021-08-19 14:31:02 +05:00
|
|
|
|
new WellOperationCategory {Id = 1024, Name = "Подготовительные работы", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 1025, Name = "Сборка КНБК", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 1026, Name = "Разборка КНБК", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 1027, Name = "Промывка", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 1028, Name = "Промежуточная промывка", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 1029, Name = "Прокачка пачек", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 1030, Name = "Разбуривание тех.оснастки", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 1031, Name = "Ремонт", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 1032, Name = "Спуск инструмента", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 1033, Name = "Спуск инструмента с промывкой", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 1034, Name = "Прямая проработка", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 1035, Name = "Принудительная проработка", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 1037, Name = "Тех СПО-подъем", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 1038, Name = "Тех СПО-спуск", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 1039, Name = "Техническое обслуживание", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 1040, Name = "Цементаж", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 1041, Name = "Шаблонировка ствола", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 1042, Name = "Геологическое осложнение", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 1043, Name = "НПВ", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 1044, Name = "ВМР", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 1045, Name = "Прочее", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 1046, Name = "Спуск КНБК", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 1047, Name = "Подъем КНБК", Code = 0 },
|
2021-09-13 09:39:11 +05:00
|
|
|
|
new WellOperationCategory {Id = 1048, Name = "Спуск ОК", Code = 0 },
|
2021-12-08 15:38:38 +05:00
|
|
|
|
new WellOperationCategory {Id = 1050, Name = "Промывка при спуске ОК", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 1051, Name = "Замер ТС", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 1052, Name = "Тех. отстой", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 1053, Name = "Циркуляция и Обработка БР", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 1054, Name = "Срезка ствола", Code = 0 },
|
|
|
|
|
new WellOperationCategory {Id = 1055, Name = "Вспомогательные работы", Code = 0 },
|
2021-07-21 17:59:18 +05:00
|
|
|
|
});
|
|
|
|
|
});
|
2021-07-23 17:40:31 +05:00
|
|
|
|
|
|
|
|
|
modelBuilder.Entity<FileCategory>(entity =>
|
|
|
|
|
{
|
|
|
|
|
entity.HasData(new List<FileCategory> {
|
2021-08-02 18:35:36 +05:00
|
|
|
|
new FileCategory {Id = 1, Name = "Растворный сервис", ShortName = "fluidService"},
|
|
|
|
|
new FileCategory {Id = 2, Name = "Цементирование", ShortName = "cement"},
|
|
|
|
|
new FileCategory {Id = 3, Name = "ННБ", ShortName = "nnb"},
|
|
|
|
|
new FileCategory {Id = 4, Name = "ГТИ", ShortName = "gti"},
|
|
|
|
|
new FileCategory {Id = 5, Name = "Документы по скважине", ShortName = "wellDocuments"},
|
|
|
|
|
new FileCategory {Id = 6, Name = "Супервайзер", ShortName = "supervisor"},
|
|
|
|
|
new FileCategory {Id = 7, Name = "Мастер", ShortName = "master"},
|
2021-12-17 15:44:18 +05:00
|
|
|
|
|
|
|
|
|
new FileCategory {Id = 8, Name = "Долотный сервис", ShortName = "toolService"},
|
|
|
|
|
new FileCategory {Id = 9, Name = "Буровой подрядчик", ShortName = "drillService"},
|
|
|
|
|
new FileCategory {Id = 10, Name = "Сервис по заканчиванию скважины", ShortName = "closingService"},
|
|
|
|
|
//new FileCategory {Id = 11, Name = "", ShortName = ""},
|
|
|
|
|
|
2021-08-29 17:25:16 +05:00
|
|
|
|
new FileCategory {Id = 12, Name = "Рапорт", ShortName = "report"},
|
2022-02-09 14:25:22 +05:00
|
|
|
|
|
|
|
|
|
new FileCategory {Id = 1000, Name = "Программа бурения"},
|
|
|
|
|
new FileCategory {Id = 1001, Name = "Задание от геологов"},
|
|
|
|
|
new FileCategory {Id = 1002, Name = "Профиль ствола скважины (ННБ)"},
|
|
|
|
|
new FileCategory {Id = 1003, Name = "Технологические расчеты (ННБ)"},
|
|
|
|
|
new FileCategory {Id = 1004, Name = "Долотная программа"},
|
|
|
|
|
new FileCategory {Id = 1005, Name = "Программа по растворам"},
|
|
|
|
|
new FileCategory {Id = 1006, Name = "Программа геофизических исследований"},
|
|
|
|
|
new FileCategory {Id = 1007, Name = "Планы спусков обсадных колонн"},
|
|
|
|
|
new FileCategory {Id = 1008, Name = "Программы цементирования обсадных колонн"},
|
2021-07-23 17:40:31 +05:00
|
|
|
|
});
|
|
|
|
|
});
|
2021-08-10 15:48:06 +05:00
|
|
|
|
|
2021-09-10 11:28:57 +05:00
|
|
|
|
modelBuilder.Entity<WellSectionType>(entity =>
|
|
|
|
|
{
|
2021-08-10 15:48:06 +05:00
|
|
|
|
entity.HasData(new List<WellSectionType>{
|
2021-12-30 10:45:06 +05:00
|
|
|
|
new WellSectionType{ Id = 1, Caption = "Пилотный ствол"},
|
|
|
|
|
new WellSectionType{ Id = 2, Caption = "Направление"},
|
|
|
|
|
new WellSectionType{ Id = 3, Caption = "Кондуктор"},
|
|
|
|
|
new WellSectionType{ Id = 4, Caption = "Эксплуатационная колонна"},
|
|
|
|
|
new WellSectionType{ Id = 5, Caption = "Транспортный ствол"},
|
|
|
|
|
new WellSectionType{ Id = 6, Caption = "Хвостовик"},
|
2021-12-22 19:18:09 +05:00
|
|
|
|
|
|
|
|
|
new WellSectionType{ Id = 7, Caption = "Пилотный ствол 2"},
|
|
|
|
|
new WellSectionType{ Id = 8, Caption = "Направление 2"},
|
|
|
|
|
new WellSectionType{ Id = 9, Caption = "Кондуктор 2"},
|
|
|
|
|
new WellSectionType{ Id = 10, Caption = "Эксплуатационная колонна 2"},
|
|
|
|
|
new WellSectionType{ Id = 11, Caption = "Транспортный ствол 2"},
|
|
|
|
|
new WellSectionType{ Id = 12, Caption = "Хвостовик 2"},
|
|
|
|
|
|
|
|
|
|
new WellSectionType{ Id = 13, Caption = "Пилотный ствол 3"},
|
|
|
|
|
new WellSectionType{ Id = 14, Caption = "Направление 3"},
|
|
|
|
|
new WellSectionType{ Id = 15, Caption = "Кондуктор 3"},
|
|
|
|
|
new WellSectionType{ Id = 16, Caption = "Эксплуатационная колонна 3"},
|
|
|
|
|
new WellSectionType{ Id = 17, Caption = "Транспортный ствол 3"},
|
|
|
|
|
new WellSectionType{ Id = 18, Caption = "Хвостовик 3"},
|
|
|
|
|
|
|
|
|
|
new WellSectionType{ Id = 19, Caption = "Пилотный ствол 4"},
|
|
|
|
|
new WellSectionType{ Id = 20, Caption = "Направление 4"},
|
|
|
|
|
new WellSectionType{ Id = 21, Caption = "Кондуктор 4"},
|
|
|
|
|
new WellSectionType{ Id = 22, Caption = "Эксплуатационная колонна 4"},
|
|
|
|
|
new WellSectionType{ Id = 23, Caption = "Транспортный ствол 4"},
|
|
|
|
|
new WellSectionType{ Id = 24, Caption = "Хвостовик 4"},
|
|
|
|
|
|
|
|
|
|
new WellSectionType{ Id = 25, Caption = "Пилотный ствол 5"},
|
|
|
|
|
new WellSectionType{ Id = 26, Caption = "Направление 5"},
|
|
|
|
|
new WellSectionType{ Id = 27, Caption = "Кондуктор 5"},
|
|
|
|
|
new WellSectionType{ Id = 28, Caption = "Эксплуатационная колонна 5"},
|
|
|
|
|
new WellSectionType{ Id = 29, Caption = "Транспортный ствол 5"},
|
|
|
|
|
new WellSectionType{ Id = 30, Caption = "Хвостовик 5"},
|
2021-08-10 15:48:06 +05:00
|
|
|
|
});
|
|
|
|
|
});
|
2021-08-25 17:58:35 +05:00
|
|
|
|
|
2021-09-10 11:28:57 +05:00
|
|
|
|
modelBuilder.Entity<WellType>(entity =>
|
|
|
|
|
{
|
|
|
|
|
entity.HasData(new List<WellType> {
|
2021-08-25 17:58:35 +05:00
|
|
|
|
new WellType{ Id = 1, Caption = "Наклонно-направленная"},
|
|
|
|
|
new WellType{ Id = 2, Caption = "Горизонтальная"},
|
|
|
|
|
});
|
|
|
|
|
});
|
2021-08-28 20:00:04 +05:00
|
|
|
|
|
2021-09-10 11:28:57 +05:00
|
|
|
|
modelBuilder.Entity<MeasureCategory>(entity =>
|
|
|
|
|
{
|
|
|
|
|
entity.HasData(new List<MeasureCategory> {
|
2021-08-28 20:00:04 +05:00
|
|
|
|
new MeasureCategory{ Id = 1, Name = "Показатели бурового раствора", ShortName = "Раствор"},
|
|
|
|
|
new MeasureCategory{ Id = 2, Name = "Шламограмма", ShortName = "Шламограмма"},
|
|
|
|
|
new MeasureCategory{ Id = 3, Name = "ННБ", ShortName = "ННБ"},
|
|
|
|
|
});
|
|
|
|
|
});
|
2021-07-21 17:59:18 +05:00
|
|
|
|
|
|
|
|
|
modelBuilder.Entity<CompanyType>(entity =>
|
|
|
|
|
{
|
|
|
|
|
entity.HasData(new List<CompanyType>{
|
|
|
|
|
new CompanyType{ Id = 1, Caption = "Недрапользователь", },
|
|
|
|
|
new CompanyType{ Id = 2, Caption = "Буровой подрядчик", },
|
|
|
|
|
new CompanyType{ Id = 3, Caption = "Сервис автоматизации бурения", },
|
|
|
|
|
});
|
|
|
|
|
});
|
2021-10-10 13:35:43 +05:00
|
|
|
|
|
2021-04-02 17:28:07 +05:00
|
|
|
|
}
|
2022-05-20 14:42:47 +05:00
|
|
|
|
|
|
|
|
|
public Task<int> RefreshMaterializedViewAsync<TEntity>(string? mwName = null, CancellationToken token = default) where TEntity : class
|
|
|
|
|
{
|
|
|
|
|
throw new System.NotImplementedException();
|
|
|
|
|
}
|
2021-04-02 17:28:07 +05:00
|
|
|
|
}
|
|
|
|
|
}
|