From 0334d5f42e2bdf3d21acff8667cd4aa83e4487f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D1=82=D0=B5=D0=BF=D0=B0=D0=BD=D0=BE=D0=B2=20=D0=94?= =?UTF-8?q?=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9?= Date: Mon, 5 Feb 2024 14:27:45 +0200 Subject: [PATCH 01/12] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=20=D1=80=D0=B5?= =?UTF-8?q?=D0=BF=D0=BE=D0=B7=D0=B8=D1=82=D0=BE=D1=80=D0=B8=D1=8F=20=D0=B8?= =?UTF-8?q?=20=D0=BC=D0=B5=D1=82=D0=BE=D0=B4=D0=B0=20=D1=80=D0=B0=D1=81?= =?UTF-8?q?=D1=88=D0=B8=D1=80=D0=B5=D0=BD=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AsbCloudInfrastructure/Repository/WellOperationRepository.cs | 2 +- AsbCloudInfrastructure/XLExtentions.cs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/AsbCloudInfrastructure/Repository/WellOperationRepository.cs b/AsbCloudInfrastructure/Repository/WellOperationRepository.cs index c9d3c7fc..5e13827e 100644 --- a/AsbCloudInfrastructure/Repository/WellOperationRepository.cs +++ b/AsbCloudInfrastructure/Repository/WellOperationRepository.cs @@ -528,7 +528,7 @@ public class WellOperationRepository : IWellOperationRepository .Min(subOp => subOp.DateStart)) .TotalDays, IdUser = o.IdUser, - LastUpdateDate = DateTime.SpecifyKind(o.LastUpdateDate.UtcDateTime + timeZoneOffset, DateTimeKind.Unspecified) + LastUpdateDate = o.LastUpdateDate.ToOffset(TimeSpan.FromHours(timezone.Hours)) }); if (request.SortFields?.Any() == true) diff --git a/AsbCloudInfrastructure/XLExtentions.cs b/AsbCloudInfrastructure/XLExtentions.cs index 3a583bf9..09a5c40b 100644 --- a/AsbCloudInfrastructure/XLExtentions.cs +++ b/AsbCloudInfrastructure/XLExtentions.cs @@ -2,7 +2,6 @@ using System; using System.Globalization; using System.IO; -using AsbCloudInfrastructure.Services.DailyReport; namespace AsbCloudInfrastructure; @@ -197,7 +196,7 @@ internal static class XLExtentions return (T)Convert.ChangeType(cell.GetFormattedString(), typeof(T), CultureInfo.InvariantCulture); if (cell.Value is DateTime dateTime) - return (T)(object)dateTime; + return (T)(object)DateTime.SpecifyKind(dateTime, DateTimeKind.Unspecified); return (T)(object)DateTime.FromOADate((double)cell.Value); } From 20172a886bdc67d566f38a86b63137ab2fa36405 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D1=82=D0=B5=D0=BF=D0=B0=D0=BD=D0=BE=D0=B2=20=D0=94?= =?UTF-8?q?=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9?= Date: Tue, 6 Feb 2024 11:41:51 +0500 Subject: [PATCH 02/12] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=20=D1=87=D0=B0?= =?UTF-8?q?=D1=81=D0=BE=D0=B2=D1=8B=D1=85=20=D0=BF=D0=BE=D1=8F=D1=81=D0=BE?= =?UTF-8?q?=D0=B2=20+=20=D0=BF=D0=BE=D0=BA=D1=80=D1=8B=D1=82=D0=B8=D0=B5?= =?UTF-8?q?=20=D1=8D=D1=82=D0=BE=D0=B3=D0=BE=20=D0=B1=D0=B0=D0=B3=D0=B0=20?= =?UTF-8?q?=D1=82=D0=B5=D1=81=D1=82=D0=B0=D0=BC=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WellOperationImportService.cs | 29 ++++++++++---- .../AsbCloudWebApi.IntegrationTests.csproj | 8 ++++ .../Clients/IWellOperationClient.cs | 16 +++++--- .../WellOperationControllerTest.cs | 37 ++++++++++++++++++ .../WellOperationsPlan.xlsx | Bin 0 -> 96239 bytes 5 files changed, 77 insertions(+), 13 deletions(-) create mode 100644 AsbCloudWebApi.IntegrationTests/WellOperationsPlan.xlsx diff --git a/AsbCloudInfrastructure/Services/WellOperationImport/WellOperationImportService.cs b/AsbCloudInfrastructure/Services/WellOperationImport/WellOperationImportService.cs index b8042275..3ed21dc2 100644 --- a/AsbCloudInfrastructure/Services/WellOperationImport/WellOperationImportService.cs +++ b/AsbCloudInfrastructure/Services/WellOperationImport/WellOperationImportService.cs @@ -5,20 +5,24 @@ using System.Linq; using AsbCloudApp.Data; using AsbCloudApp.Data.WellOperationImport; using AsbCloudApp.Repositories; +using AsbCloudApp.Services; using AsbCloudApp.Services.WellOperationImport; namespace AsbCloudInfrastructure.Services.WellOperationImport; public class WellOperationImportService : IWellOperationImportService { + private readonly IWellService wellService; private readonly IWellOperationRepository wellOperationRepository; private static readonly DateTime dateLimitMin = new(2001, 1, 1, 0, 0, 0); private static readonly DateTime dateLimitMax = new(2099, 1, 1, 0, 0, 0); private static readonly TimeSpan drillingDurationLimitMax = TimeSpan.FromDays(366); - public WellOperationImportService(IWellOperationRepository wellOperationRepository) + public WellOperationImportService(IWellService wellService, + IWellOperationRepository wellOperationRepository) { + this.wellService = wellService; this.wellOperationRepository = wellOperationRepository; } @@ -30,8 +34,12 @@ public class WellOperationImportService : IWellOperationImportService var categories = wellOperationRepository.GetCategories(false); var wellOperations = new List(); - - foreach (var row in sheet.Rows) + + var rows = sheet.Rows.OrderBy(r => r.Date); + + var prevRow = new RowDto(); + + foreach (var row in rows) { try { @@ -58,15 +66,16 @@ public class WellOperationImportService : IWellOperationImportService if (row.Date < dateLimitMin && row.Date > dateLimitMax) throw new FileFormatException( $"Лист '{sheet.Name}'. Строка '{row.Number}' неправильно получена дата начала операции"); - - if (wellOperations.LastOrDefault()?.DateStart > row.Date) + + if (prevRow.Date > row.Date) throw new FileFormatException( $"Лист '{sheet.Name}' строка '{row.Number}' дата позднее даты предыдущей операции"); if (row.Duration is not (>= 0d and <= 240d)) throw new FileFormatException($"Лист '{sheet.Name}'. Строка '{row.Number}' некорректная длительность операции"); - wellOperations.Add(new WellOperationDto + var timezone = wellService.GetTimezone(idWell); + var wellOperation = new WellOperationDto { IdWell = idWell, IdUser = idUser, @@ -76,10 +85,14 @@ public class WellOperationImportService : IWellOperationImportService CategoryInfo = row.CategoryInfo, DepthStart = row.DepthStart, DepthEnd = row.DepthEnd, - DateStart = row.Date, + DateStart = row.Date.ToUtcDateTimeOffset(timezone.Hours).ToRemoteDateTime(timezone.Hours), DurationHours = row.Duration, Comment = row.Comment - }); + }; + + wellOperations.Add(wellOperation); + + prevRow = row; } catch (FileFormatException ex) { diff --git a/AsbCloudWebApi.IntegrationTests/AsbCloudWebApi.IntegrationTests.csproj b/AsbCloudWebApi.IntegrationTests/AsbCloudWebApi.IntegrationTests.csproj index f20fc316..dcf078a9 100644 --- a/AsbCloudWebApi.IntegrationTests/AsbCloudWebApi.IntegrationTests.csproj +++ b/AsbCloudWebApi.IntegrationTests/AsbCloudWebApi.IntegrationTests.csproj @@ -18,6 +18,14 @@ + + + + + + + + diff --git a/AsbCloudWebApi.IntegrationTests/Clients/IWellOperationClient.cs b/AsbCloudWebApi.IntegrationTests/Clients/IWellOperationClient.cs index 07754ed1..8e2db98f 100644 --- a/AsbCloudWebApi.IntegrationTests/Clients/IWellOperationClient.cs +++ b/AsbCloudWebApi.IntegrationTests/Clients/IWellOperationClient.cs @@ -6,16 +6,22 @@ namespace AsbCloudWebApi.IntegrationTests.Clients; public interface IWellOperationClient { - private const string BaseRoute = "/api/well/{idWell}/wellOperations"; + private const string BaseRoute = "/api/well/{idWell}/wellOperations"; - [Post(BaseRoute + "/{idType}/{deleteBeforeInsert}")] - Task> InsertRangeAsync(int idWell, int idType, bool deleteBeforeInsert, [Body] IEnumerable dtos); + [Post(BaseRoute + "/{idType}/{deleteBeforeInsert}")] + Task> InsertRangeAsync(int idWell, int idType, bool deleteBeforeInsert, [Body] IEnumerable dtos); - [Put(BaseRoute + "/{idOperation}")] - Task> UpdateAsync(int idWell, int idOperation, [Body] WellOperationDto value, CancellationToken token); + [Put(BaseRoute + "/{idOperation}")] + Task> UpdateAsync(int idWell, int idOperation, [Body] WellOperationDto value, CancellationToken token); [Get(BaseRoute + "/plan")] Task>> GetPageOperationsPlanAsync(int idWell, [Query] WellOperationRequestBase request, CancellationToken token); + + [Multipart] + [Post(BaseRoute + "/import/plan/default")] + Task>> ImportPlanDefaultExcelFileAsync(int idWell, + [AliasAs("files")] IEnumerable streams, + CancellationToken token); } \ No newline at end of file diff --git a/AsbCloudWebApi.IntegrationTests/Controllers/WellOperationControllerTest.cs b/AsbCloudWebApi.IntegrationTests/Controllers/WellOperationControllerTest.cs index a5e0064a..51f6ab0e 100644 --- a/AsbCloudWebApi.IntegrationTests/Controllers/WellOperationControllerTest.cs +++ b/AsbCloudWebApi.IntegrationTests/Controllers/WellOperationControllerTest.cs @@ -2,7 +2,9 @@ using AsbCloudApp.Data; using AsbCloudDb.Model; using AsbCloudWebApi.IntegrationTests.Clients; using System.Net; +using System.Reflection; using AsbCloudApp.Requests; +using Refit; using Xunit; namespace AsbCloudWebApi.IntegrationTests.Controllers; @@ -211,4 +213,39 @@ public class WellOperationControllerTest : BaseIntegrationTest var excludeProps = new[] { nameof(WellOperationDto.Id) }; MatchHelper.Match(dto, wellOperation, excludeProps); } + + [Fact] + public async Task ImportPlanDefaultExcelFileAsync_returns_success() + { + //arrange + const int timeZoneUtc = 5; + + //TODO: вынести в метод расширения. Сделать когда доберёмся до рефакторинга операций по скважине + var resourceName = Assembly.GetExecutingAssembly() + .GetManifestResourceNames() + .FirstOrDefault(n => n.EndsWith("WellOperationsPlan.xlsx")); + + if (string.IsNullOrWhiteSpace(resourceName)) + throw new ArgumentNullException(nameof(resourceName)); + + var stream = Assembly.GetExecutingAssembly() + .GetManifestResourceStream(resourceName); + + if (stream is null) + throw new ArgumentNullException(nameof(stream)); + + var memoryStream = new MemoryStream(); + stream.CopyTo(memoryStream); + memoryStream.Position = 0; + + //act + var streamPart = new StreamPart(memoryStream, "WellOperations.xlsx", "application/octet-stream"); + + var response = await client.ImportPlanDefaultExcelFileAsync(idWell, new[] { streamPart }, CancellationToken.None); + + //assert + Assert.NotNull(response.Content); + Assert.Equal(4, response.Content.Count()); + Assert.True(response.Content.All(w => Math.Abs(w.DateStart.Offset.Hours - timeZoneUtc) < 0.1)); + } } \ No newline at end of file diff --git a/AsbCloudWebApi.IntegrationTests/WellOperationsPlan.xlsx b/AsbCloudWebApi.IntegrationTests/WellOperationsPlan.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..dd1a2781387a286728051bedb711d8379efc3a62 GIT binary patch literal 96239 zcmeEtg@?kAnW0nh*cfBp|!pjEBe<_G)L zN{vNPu`2cYM`_vF7b(gqbZF=CzPM6f543i>K;SbTsHLj*An1_=TOhH=7$-^f=7pSW zS=iNI{IP-ZL)Y;KM$C=OqIW2&OQ^)(q~@xp!NUT1l5T9;+PY7b;K_a;dO=S>b4*J& zi>peYGFQ9a(&I0EP4r##CR1Y0%_bY`U{)3XthO38Tmt=dBQ>UGN7Vt^aHv~<) z!3)w`-mX`1m(g5jic&wOF)v%_nNHHH%Df>ce&><-gEN^-Dt9h(y}Nd`kb`uc+UzxP z>?a$&G~Jv2&z}pA6>ia}hh6goF#`Loox% z#mWtz$L*gddsvZ#Wm%shchuu9RE$6X*W{+hs@#k?|9cD>?J~$pZ)NqvC3Y`+2RUe zn)y1gB@&c7nf#WO?)dc$CrS06ZyuKEn)7Q$+TYOLlqSli(~X>=d^dhev5os@`?HHe z4(F0Zb}Du&c=_ZC%u(*P&1v_T!_vjt!?bq72A?c$@Fc5$O{1;-=H0UJzGa`r=o}S; z_F>{Y+OktwS%S_#=3M;j?lM1aaYd@Q1BuT_w1npzdj%&^hNcZ$b25gb@S#z=Mh72p z`&iK)u)_ZgnKAss`%uXAfPlJn=HgjbE4GuUaj~_xd|_*A31z&$5p))$J@D-R?SCpF zIxOngFE^n5D*ZaW?80qKJ_}X`KQ7S0oS|2m{8i5j+h(v8jd)uAsG0RExgYI;m*}sI z!`~U`d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JjQ z@yE{jdwVYF0Cl4FF2-8!j^<#)A5>OT{1xDdQHMD!6krv~eUxA1+o2(;v9tM0Fe}TC z=kJ0mkM5uT5S)R&M)Zr|DO4Az2mhC>n}f5hse^;vKOvcl7@y`g^tRcZ6ThM?d8OfMRPH!0)G}-=%+#D}TyYzWi(a|4o$nJLs>$ y%1=lDpwj*yD*X&yeh2u~-TV`P+3BAEe>)#FMFc3re=H6Rz*p#E+W|wl3ivM)- Date: Wed, 7 Feb 2024 07:21:03 +0300 Subject: [PATCH 03/12] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=20=D0=B1=D0=B0?= =?UTF-8?q?=D0=B3=D0=B0=20=D1=81=20=D0=B2=D1=80=D0=B5=D0=BC=D0=B5=D0=BD?= =?UTF-8?q?=D0=BD=D1=8B=D0=BC=D0=B8=20=D0=B4=D0=B8=D0=B0=D0=BF=D0=B0=D0=B7?= =?UTF-8?q?=D0=BE=D0=BD=D0=B0=D0=BC=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Фикс репозитория + небольшой рефакторинг 2. Фикс сервиса импорта 3. Фикс тестов --- .../Repository/WellOperationRepository.cs | 92 +++++++++++-------- .../WellOperationImportService.cs | 4 +- .../WellOperationControllerTest.cs | 9 +- .../WellOperationExportServiceTest.cs | 2 +- .../Controllers/WellOperationController.cs | 2 - 5 files changed, 63 insertions(+), 46 deletions(-) diff --git a/AsbCloudInfrastructure/Repository/WellOperationRepository.cs b/AsbCloudInfrastructure/Repository/WellOperationRepository.cs index 5e13827e..bbe3a30e 100644 --- a/AsbCloudInfrastructure/Repository/WellOperationRepository.cs +++ b/AsbCloudInfrastructure/Repository/WellOperationRepository.cs @@ -75,16 +75,15 @@ public class WellOperationRepository : IWellOperationRepository OperationType = WellOperation.IdOperationTypePlan, }; - var entities = await BuildQuery(request) + var dtos = await BuildQuery(request) .AsNoTracking() - .ToArrayAsync(token) - .ConfigureAwait(false); + .ToArrayAsync(token); var dateLastAssosiatedPlanOperation = await GetDateLastAssosiatedPlanOperationAsync(idWell, currentDate, timezone.Hours, token); - + var result = new WellOperationPlanDto() { - WellOperationsPlan = entities, + WellOperationsPlan = dtos.Select(Convert), DateLastAssosiatedPlanOperation = dateLastAssosiatedPlanOperation }; @@ -226,7 +225,7 @@ public class WellOperationRepository : IWellOperationRepository var dtos = await query.ToArrayAsync(token); - return dtos; + return dtos.Select(Convert); } /// @@ -234,21 +233,19 @@ public class WellOperationRepository : IWellOperationRepository WellOperationRequest request, CancellationToken token) { - var query = BuildQuery(request) - .AsNoTracking(); - + var query = BuildQuery(request); + var result = new PaginationContainer { Skip = request.Skip ?? 0, Take = request.Take ?? 32, - Count = await query.CountAsync(token).ConfigureAwait(false), + Count = await query.CountAsync(token), }; - query = query - .Skip(result.Skip) - .Take(result.Take); + var dtos = await query.ToArrayAsync(token); + + result.Items = dtos.Select(Convert); - result.Items = await query.ToArrayAsync(token); return result; } @@ -350,11 +347,13 @@ public class WellOperationRepository : IWellOperationRepository OperationType = firstOperation.IdType, }; - var entities = await BuildQuery(request) + var dtos = await BuildQuery(request) .AsNoTracking() .ToArrayAsync(token); - var wellOperationsUnion = entities.Union(wellOperationDtos).OrderBy(o => o.DateStart); + var dtosWithRemoteDateTime = dtos.Select(Convert); + + var wellOperationsUnion = dtosWithRemoteDateTime.Union(dtos).OrderBy(o => o.DateStart); var results = Validate(wellOperationsUnion); return results; @@ -368,16 +367,17 @@ public class WellOperationRepository : IWellOperationRepository if (!enumerator.MoveNext()) yield break; + var timezone = wellService.GetTimezone(wellOperationDtos.First().IdWell); + var timezoneOffset = timezone.Hours; + var previous = enumerator.Current; while(enumerator.MoveNext()) { var current = enumerator.Current; - var previousDateStart = previous.DateStart.ToUniversalTime(); - var currentDateStart = current.DateStart.ToUniversalTime(); - - var previousDateEnd = previous.DateStart.AddHours(previous.DurationHours).ToUniversalTime(); - + var previousDateStart = previous.DateStart.DateTime.ToUtcDateTimeOffset(timezoneOffset); + var currentDateStart = current.DateStart.DateTime.ToUtcDateTimeOffset(timezoneOffset); + if (previousDateStart.AddDays(Gap) < currentDateStart) { yield return new ValidationResult( @@ -452,12 +452,13 @@ public class WellOperationRepository : IWellOperationRepository /// В результате попрежнему требуется конвертировать дату /// /// + /// /// private IQueryable BuildQuery(WellOperationRequest request) { var timezone = wellService.GetTimezone(request.IdWell); - var timeZoneOffset = TimeSpan.FromHours(timezone.Hours); - + var timeZoneOffset = timezone.Hours; + var query = db.WellOperations .Include(s => s.WellSectionType) .Include(s => s.OperationCategory) @@ -481,20 +482,20 @@ public class WellOperationRepository : IWellOperationRepository if (request.GeDate.HasValue) { - var geDateOffset = request.GeDate.Value.ToUtcDateTimeOffset(timezone.Hours); + var geDateOffset = request.GeDate.Value.ToUtcDateTimeOffset(timeZoneOffset); query = query.Where(e => e.DateStart >= geDateOffset); } if (request.LtDate.HasValue) { - var ltDateOffset = request.LtDate.Value.ToUtcDateTimeOffset(timezone.Hours); + var ltDateOffset = request.LtDate.Value.ToUtcDateTimeOffset(timeZoneOffset); query = query.Where(e => e.DateStart < ltDateOffset); } var currentWellOperations = db.WellOperations .Where(subOp => subOp.IdWell == request.IdWell); - var wellOperationsWithCategoryNPT = currentWellOperations + var wellOperationsWithCategoryNpt = currentWellOperations .Where(subOp => subOp.IdType == 1) .Where(subOp => WellOperationCategory.NonProductiveTimeSubIds.Contains(subOp.IdCategory)); @@ -510,14 +511,14 @@ public class WellOperationRepository : IWellOperationRepository CategoryName = o.OperationCategory.Name, WellSectionTypeName = o.WellSectionType.Caption, - DateStart = DateTime.SpecifyKind(o.DateStart.UtcDateTime + timeZoneOffset, DateTimeKind.Unspecified), + DateStart = o.DateStart, DepthStart = o.DepthStart, DepthEnd = o.DepthEnd, DurationHours = o.DurationHours, CategoryInfo = o.CategoryInfo, Comment = o.Comment, - NptHours = wellOperationsWithCategoryNPT + NptHours = wellOperationsWithCategoryNpt .Where(subOp => subOp.DateStart <= o.DateStart) .Select(subOp => subOp.DurationHours) .Sum(), @@ -528,21 +529,38 @@ public class WellOperationRepository : IWellOperationRepository .Min(subOp => subOp.DateStart)) .TotalDays, IdUser = o.IdUser, - LastUpdateDate = o.LastUpdateDate.ToOffset(TimeSpan.FromHours(timezone.Hours)) + LastUpdateDate = o.LastUpdateDate, }); if (request.SortFields?.Any() == true) { dtos = dtos.SortBy(request.SortFields); } - else - { - dtos = dtos - .OrderBy(e => e.DateStart) - .ThenBy(e => e.DepthEnd) - .ThenBy(e => e.Id); - } - return dtos; + dtos = dtos + .OrderBy(e => e.DateStart) + .ThenBy(e => e.DepthEnd) + .ThenBy(e => e.Id); + + if (request.Skip.HasValue) + dtos = dtos.Skip(request.Skip.Value); + + if (request.Take.HasValue) + dtos = dtos.Take(request.Take.Value); + + return dtos.AsNoTracking(); + } + + private WellOperationDto Convert(WellOperationDto dto) + { + var timezone = wellService.GetTimezone(dto.IdWell); + var timezoneOffset = TimeSpan.FromHours(timezone.Hours); + + var dtoWithRemoteDateTime = dto.Adapt(); + + dtoWithRemoteDateTime.DateStart = dto.DateStart.ToOffset(TimeSpan.FromHours(timezoneOffset.Hours)); + dtoWithRemoteDateTime.LastUpdateDate = dto.LastUpdateDate?.ToOffset(TimeSpan.FromHours(timezoneOffset.Hours)); + + return dtoWithRemoteDateTime; } } diff --git a/AsbCloudInfrastructure/Services/WellOperationImport/WellOperationImportService.cs b/AsbCloudInfrastructure/Services/WellOperationImport/WellOperationImportService.cs index 3ed21dc2..800979e5 100644 --- a/AsbCloudInfrastructure/Services/WellOperationImport/WellOperationImportService.cs +++ b/AsbCloudInfrastructure/Services/WellOperationImport/WellOperationImportService.cs @@ -75,6 +75,8 @@ public class WellOperationImportService : IWellOperationImportService throw new FileFormatException($"Лист '{sheet.Name}'. Строка '{row.Number}' некорректная длительность операции"); var timezone = wellService.GetTimezone(idWell); + var timezoneOffset = TimeSpan.FromHours(timezone.Hours); + var wellOperation = new WellOperationDto { IdWell = idWell, @@ -85,7 +87,7 @@ public class WellOperationImportService : IWellOperationImportService CategoryInfo = row.CategoryInfo, DepthStart = row.DepthStart, DepthEnd = row.DepthEnd, - DateStart = row.Date.ToUtcDateTimeOffset(timezone.Hours).ToRemoteDateTime(timezone.Hours), + DateStart = new DateTimeOffset(row.Date, timezoneOffset), DurationHours = row.Duration, Comment = row.Comment }; diff --git a/AsbCloudWebApi.IntegrationTests/Controllers/WellOperationControllerTest.cs b/AsbCloudWebApi.IntegrationTests/Controllers/WellOperationControllerTest.cs index 51f6ab0e..5a924a70 100644 --- a/AsbCloudWebApi.IntegrationTests/Controllers/WellOperationControllerTest.cs +++ b/AsbCloudWebApi.IntegrationTests/Controllers/WellOperationControllerTest.cs @@ -4,6 +4,7 @@ using AsbCloudWebApi.IntegrationTests.Clients; using System.Net; using System.Reflection; using AsbCloudApp.Requests; +using AsbCloudWebApi.IntegrationTests.Data; using Refit; using Xunit; @@ -30,7 +31,7 @@ public class WellOperationControllerTest : BaseIntegrationTest DepthEnd = 20.0, Day = 0.0, NptHours = 0.0, - DateStart = new DateTimeOffset(new DateTime(2023, 02, 03, 1, 0, 0, DateTimeKind.Unspecified)), + DateStart = new DateTimeOffset(new DateTime(2023, 1, 10), TimeSpan.FromHours(Defaults.Wells[0].Timezone.Hours)), DurationHours = 1.0, Comment = "1", IdUser = 1, @@ -58,7 +59,7 @@ public class WellOperationControllerTest : BaseIntegrationTest IdPlan = null, IdUser = 1, IdWellSectionType = 1, - LastUpdateDate = DateTimeOffset.Now, + LastUpdateDate = null, NptHours = 1, WellSectionTypeName = null, UserName = null @@ -218,8 +219,6 @@ public class WellOperationControllerTest : BaseIntegrationTest public async Task ImportPlanDefaultExcelFileAsync_returns_success() { //arrange - const int timeZoneUtc = 5; - //TODO: вынести в метод расширения. Сделать когда доберёмся до рефакторинга операций по скважине var resourceName = Assembly.GetExecutingAssembly() .GetManifestResourceNames() @@ -246,6 +245,6 @@ public class WellOperationControllerTest : BaseIntegrationTest //assert Assert.NotNull(response.Content); Assert.Equal(4, response.Content.Count()); - Assert.True(response.Content.All(w => Math.Abs(w.DateStart.Offset.Hours - timeZoneUtc) < 0.1)); + Assert.True(response.Content.All(w => Math.Abs(w.DateStart.Offset.Hours - Defaults.Wells[0].Timezone.Hours) < 0.1)); } } \ No newline at end of file diff --git a/AsbCloudWebApi.Tests/Services/WellOperationExport/WellOperationExportServiceTest.cs b/AsbCloudWebApi.Tests/Services/WellOperationExport/WellOperationExportServiceTest.cs index 2590df26..3d66aab9 100644 --- a/AsbCloudWebApi.Tests/Services/WellOperationExport/WellOperationExportServiceTest.cs +++ b/AsbCloudWebApi.Tests/Services/WellOperationExport/WellOperationExportServiceTest.cs @@ -117,7 +117,7 @@ namespace AsbCloudWebApi.Tests.Services.WellOperationExport wellOperationImportTemplateService = new WellOperationImportTemplateService(); wellOperationExportService = new WellOperationExportService(wellOperationRepository, wellService, wellOperationImportTemplateService); - wellOperationImportService = new WellOperationImportService(wellOperationRepository); + wellOperationImportService = new WellOperationImportService(wellService, wellOperationRepository); wellOperationDefaultExcelParser = new WellOperationDefaultExcelParser(); this.output = output; } diff --git a/AsbCloudWebApi/Controllers/WellOperationController.cs b/AsbCloudWebApi/Controllers/WellOperationController.cs index 27827a62..3ac7e42c 100644 --- a/AsbCloudWebApi/Controllers/WellOperationController.cs +++ b/AsbCloudWebApi/Controllers/WellOperationController.cs @@ -285,7 +285,6 @@ namespace AsbCloudWebApi.Controllers foreach (var wellOperation in wellOperations) { wellOperation.IdWell = idWell; - wellOperation.LastUpdateDate = DateTimeOffset.UtcNow; wellOperation.IdUser = User.GetUserId(); wellOperation.IdType = idType; } @@ -338,7 +337,6 @@ namespace AsbCloudWebApi.Controllers value.IdWell = idWell; value.Id = idOperation; - value.LastUpdateDate = DateTimeOffset.UtcNow; value.IdUser = User.GetUserId(); var validationResult = await operationRepository.ValidateWithDbAsync(new[] { value }, token); From 847846948d215224cee9c8a4555e22a3dc8d8c9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D1=82=D0=B5=D0=BF=D0=B0=D0=BD=D0=BE=D0=B2=20=D0=94?= =?UTF-8?q?=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9?= Date: Tue, 20 Feb 2024 11:13:35 +0300 Subject: [PATCH 04/12] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=BC=D0=BE=D0=B4=D0=B5=D0=BB=D0=B8=20?= =?UTF-8?q?=D0=B4=D0=B0=D0=BD=D0=BD=D1=8B=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Из сущности DetectedOperation удалён атрибут IdUsersAtStart --- ...tectedOperateion_Remove_IdUser.Designer.cs | 9453 +++++++++++++++++ ...090713_DetectedOperateion_Remove_IdUser.cs | 27 + .../AsbCloudDbContextModelSnapshot.cs | 5 - AsbCloudDb/Model/DetectedOperation.cs | 5 +- 4 files changed, 9481 insertions(+), 9 deletions(-) create mode 100644 AsbCloudDb/Migrations/20240219090713_DetectedOperateion_Remove_IdUser.Designer.cs create mode 100644 AsbCloudDb/Migrations/20240219090713_DetectedOperateion_Remove_IdUser.cs diff --git a/AsbCloudDb/Migrations/20240219090713_DetectedOperateion_Remove_IdUser.Designer.cs b/AsbCloudDb/Migrations/20240219090713_DetectedOperateion_Remove_IdUser.Designer.cs new file mode 100644 index 00000000..7b109f9b --- /dev/null +++ b/AsbCloudDb/Migrations/20240219090713_DetectedOperateion_Remove_IdUser.Designer.cs @@ -0,0 +1,9453 @@ +// +using System; +using System.Text.Json; +using AsbCloudDb.Model; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace AsbCloudDb.Migrations +{ + [DbContext(typeof(AsbCloudDbContext))] + [Migration("20240219090713_DetectedOperateion_Remove_IdUser")] + partial class DetectedOperateion_Remove_IdUser + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .UseCollation("Russian_Russia.1251") + .HasAnnotation("ProductVersion", "6.0.22") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.HasPostgresExtension(modelBuilder, "adminpack"); + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("AsbCloudDb.Model.Cluster", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Caption") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("caption") + .HasComment("Название"); + + b.Property("IdDeposit") + .HasColumnType("integer") + .HasColumnName("id_deposit"); + + b.Property("Latitude") + .HasColumnType("double precision") + .HasColumnName("latitude"); + + b.Property("Longitude") + .HasColumnType("double precision") + .HasColumnName("longitude"); + + b.Property("Timezone") + .IsRequired() + .HasColumnType("jsonb") + .HasColumnName("timezone") + .HasComment("Смещение часового пояса от UTC"); + + b.HasKey("Id"); + + b.HasIndex("IdDeposit"); + + b.ToTable("t_cluster"); + + b.HasComment("Кусты"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.Company", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Caption") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("caption"); + + b.Property("IdCompanyType") + .HasMaxLength(255) + .HasColumnType("integer") + .HasColumnName("id_company_type") + .HasComment("вид деятельности"); + + b.HasKey("Id"); + + b.HasIndex("IdCompanyType"); + + b.ToTable("t_company"); + + b.HasData( + new + { + Id = 1, + Caption = "ООО \"АСБ\"", + IdCompanyType = 3 + }); + }); + + modelBuilder.Entity("AsbCloudDb.Model.CompanyType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Caption") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("caption"); + + b.Property("IsContact") + .HasColumnType("boolean") + .HasColumnName("is_contact"); + + b.Property("Order") + .HasColumnType("integer") + .HasColumnName("order"); + + b.HasKey("Id"); + + b.ToTable("t_company_type"); + + b.HasData( + new + { + Id = 1, + Caption = "Недропользователь", + IsContact = true, + Order = 3 + }, + new + { + Id = 2, + Caption = "Буровой подрядчик", + IsContact = true, + Order = 2 + }, + new + { + Id = 3, + Caption = "Сервис автоматизации бурения", + IsContact = true, + Order = 0 + }, + new + { + Id = 4, + Caption = "Сервис по ГТИ", + IsContact = true, + Order = 6 + }, + new + { + Id = 5, + Caption = "Растворный сервис", + IsContact = true, + Order = 4 + }, + new + { + Id = 6, + Caption = "Сервис по ННБ", + IsContact = true, + Order = 5 + }, + new + { + Id = 7, + Caption = "Служба супервайзинга", + IsContact = false, + Order = 1 + }, + new + { + Id = 9, + Caption = "Сервис по цементированию", + IsContact = true, + Order = 7 + }, + new + { + Id = 11, + Caption = "Дизельный сервис", + IsContact = false, + Order = 9 + }, + new + { + Id = 12, + Caption = "Сервис по обслуживанию верхних силовых приводов", + IsContact = true, + Order = 8 + }); + }); + + modelBuilder.Entity("AsbCloudDb.Model.Contact", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Company") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("company") + .HasComment("компания"); + + b.Property("Email") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("email") + .HasComment("email"); + + b.Property("FullName") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("full_name") + .HasComment("ФИО"); + + b.Property("IdCompanyType") + .HasMaxLength(255) + .HasColumnType("integer") + .HasColumnName("id_company_type") + .HasComment("вид деятельности"); + + b.Property("IdWell") + .HasMaxLength(255) + .HasColumnType("integer") + .HasColumnName("id_well") + .HasComment("ключ скважины"); + + b.Property("Phone") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("phone") + .HasComment("номер телефона"); + + b.Property("Position") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("position") + .HasComment("должность"); + + b.HasKey("Id"); + + b.HasIndex("IdCompanyType"); + + b.HasIndex("IdWell"); + + b.ToTable("t_contact"); + + b.HasComment("Контакты"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.DailyReports.DailyReport", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Date") + .HasColumnType("date") + .HasColumnName("date") + .HasComment("Дата формирования отчёта"); + + b.Property("DateLastUpdate") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_last_update") + .HasComment("Дата последнего обновления"); + + b.Property("IdWell") + .HasColumnType("integer") + .HasColumnName("id_well") + .HasComment("ID скважины"); + + b.Property("SignBlock") + .HasColumnType("jsonb") + .HasColumnName("sign_block") + .HasComment("Подпись"); + + b.Property("SubsystemBlock") + .HasColumnType("jsonb") + .HasColumnName("subsystem_block") + .HasComment("Наработкой подсистем"); + + b.Property("TimeBalanceBlock") + .HasColumnType("jsonb") + .HasColumnName("time_balance_block") + .HasComment("Баланс времени"); + + b.HasKey("Id"); + + b.HasIndex("IdWell", "Date") + .IsUnique(); + + b.ToTable("t_daily_report"); + + b.HasComment("Ежедневные отчёты"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.DataSaubStat", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("AxialLoad") + .HasColumnType("double precision") + .HasColumnName("axial_load") + .HasComment("Фактическая нагрузка"); + + b.Property("AxialLoadLimitMax") + .HasColumnType("double precision") + .HasColumnName("axial_load_limit_max") + .HasComment("Максимально допустимая нагрузка"); + + b.Property("AxialLoadSp") + .HasColumnType("double precision") + .HasColumnName("axial_load_sp") + .HasComment("Ограничение факт. нагрузки"); + + b.Property("BlockSpeedSp") + .HasColumnType("double precision") + .HasColumnName("block_speed_sp") + .HasComment("Ограничение скорости блока"); + + b.Property("DateEnd") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_end") + .HasComment("Дата и время окончания"); + + b.Property("DateStart") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_start") + .HasComment("Дата и время начала"); + + b.Property("DepthEnd") + .HasColumnType("double precision") + .HasColumnName("depth_end") + .HasComment("Глубина забоя по стволу конечная"); + + b.Property("DepthStart") + .HasColumnType("double precision") + .HasColumnName("depth_start") + .HasComment("Глубина забоя по стволу начальная"); + + b.Property("EnabledSubsystems") + .HasColumnType("integer") + .HasColumnName("enabled_subsystems") + .HasComment("Флаги подсистем"); + + b.Property("Flow") + .HasColumnType("double precision") + .HasColumnName("flow") + .HasComment("Фактический расход"); + + b.Property("HasOscillation") + .HasColumnType("boolean") + .HasColumnName("has_oscillation") + .HasComment("Наличие или отсутствие осцилляции"); + + b.Property("IdCategory") + .HasColumnType("integer") + .HasColumnName("id_category") + .HasComment("Название автоопределённой операции"); + + b.Property("IdFeedRegulator") + .HasColumnType("smallint") + .HasColumnName("id_feed_regulator") + .HasComment("Работа при достижении ограничения"); + + b.Property("IdTelemetry") + .HasColumnType("integer") + .HasColumnName("id_telemetry") + .HasComment("Ключ телеметрии"); + + b.Property("Pressure") + .HasColumnType("double precision") + .HasColumnName("pressure") + .HasComment("Давление"); + + b.Property("PressureIdle") + .HasColumnType("double precision") + .HasColumnName("pressure_idle") + .HasComment("Давление холостого хода"); + + b.Property("PressureSp") + .HasColumnType("double precision") + .HasColumnName("pressure_sp") + .HasComment("Ограничение фактического давления"); + + b.Property("RotorSpeed") + .HasColumnType("double precision") + .HasColumnName("rotor_speed") + .HasComment("Фактическая скорость оборотов ВСП"); + + b.Property("RotorTorque") + .HasColumnType("double precision") + .HasColumnName("rotor_torque") + .HasComment("Фактический момент"); + + b.Property("RotorTorqueLimitMax") + .HasColumnType("double precision") + .HasColumnName("rotor_torque_limit_max") + .HasComment("Максимально допустимый момент"); + + b.Property("RotorTorqueSp") + .HasColumnType("double precision") + .HasColumnName("rotor_torque_sp") + .HasComment("Ограничение факт. момента"); + + b.Property("Speed") + .HasColumnType("double precision") + .HasColumnName("speed") + .HasComment("Скорость бурения"); + + b.HasKey("Id"); + + b.HasIndex("IdCategory"); + + b.HasIndex("IdTelemetry"); + + b.ToTable("t_data_saub_stat"); + + b.HasComment("Кеш-таблица для хранения данных для РТК-отчета"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.Deposit", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Caption") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("caption"); + + b.Property("Latitude") + .HasColumnType("double precision") + .HasColumnName("latitude"); + + b.Property("Longitude") + .HasColumnType("double precision") + .HasColumnName("longitude"); + + b.Property("Timezone") + .IsRequired() + .HasColumnType("jsonb") + .HasColumnName("timezone") + .HasComment("Смещение часового пояса от UTC"); + + b.HasKey("Id"); + + b.ToTable("t_deposit"); + + b.HasComment("Месторождение"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.DetectedOperation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DateEnd") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_end") + .HasComment("Дата начала операции"); + + b.Property("DateStart") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_start") + .HasComment("Дата начала операции"); + + b.Property("DepthEnd") + .HasColumnType("double precision") + .HasColumnName("depth_end") + .HasComment("Глубина после завершения операции, м"); + + b.Property("DepthStart") + .HasColumnType("double precision") + .HasColumnName("depth_start") + .HasComment("Глубина на начало операции, м"); + + b.Property("EnabledSubsystems") + .HasColumnType("integer") + .HasColumnName("enabled_subsystems") + .HasComment("флаги включенных подсистем"); + + b.Property("ExtraData") + .IsRequired() + .HasColumnType("jsonb") + .HasColumnName("extra_data") + .HasComment("доп. инфо по операции"); + + b.Property("IdCategory") + .HasColumnType("integer") + .HasColumnName("id_category") + .HasComment("Id категории операции"); + + b.Property("IdTelemetry") + .HasColumnType("integer") + .HasColumnName("id_telemetry"); + + b.Property("Value") + .HasColumnType("double precision") + .HasColumnName("value") + .HasComment("Ключевой показатель операции"); + + b.HasKey("Id"); + + b.HasIndex("IdCategory"); + + b.HasIndex("IdTelemetry"); + + b.ToTable("t_detected_operation"); + + b.HasComment("автоматически определенные операции по телеметрии"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.Driller", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id") + .HasComment("Идентификатор"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("name") + .HasComment("Имя"); + + b.Property("Patronymic") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("patronymic") + .HasComment("Отчество"); + + b.Property("Surname") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("surname") + .HasComment("Фамилия"); + + b.HasKey("Id"); + + b.ToTable("t_driller"); + + b.HasComment("Бурильщик"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.DrillingProgramPart", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("IdFileCategory") + .HasColumnType("integer") + .HasColumnName("id_file_category"); + + b.Property("IdWell") + .HasColumnType("integer") + .HasColumnName("id_well"); + + b.HasKey("Id"); + + b.HasIndex("IdFileCategory"); + + b.HasIndex("IdWell", "IdFileCategory") + .IsUnique(); + + b.ToTable("t_drilling_program_part"); + + b.HasComment("части программ бурения"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.DrillTest", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id") + .HasComment("Идентификатор"); + + b.Property("IdTelemetry") + .HasColumnType("integer") + .HasColumnName("id_telemetry") + .HasComment("Идентификатор телеметрии"); + + b.Property("DepthStart") + .HasColumnType("real") + .HasColumnName("depthStart") + .HasComment("Глубина начала"); + + b.Property("Params") + .IsRequired() + .HasColumnType("jsonb") + .HasColumnName("t_drill_test_params") + .HasComment("Параметры записи drill test"); + + b.Property("TimeStampStart") + .HasColumnType("timestamp with time zone") + .HasColumnName("timestamp_start") + .HasComment("Время начала"); + + b.HasKey("Id", "IdTelemetry"); + + b.HasIndex("IdTelemetry"); + + b.ToTable("t_drill_test"); + + b.HasComment("Drill_test"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.Faq", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id") + .HasComment("Идентификатор"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Answer") + .HasColumnType("text") + .HasColumnName("answer") + .HasComment("Текст ответа"); + + b.Property("CounterQuestion") + .HasColumnType("integer") + .HasColumnName("counter_question") + .HasComment("Счетчик повторений вопроса"); + + b.Property("DateAnswer") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_answer") + .HasComment("Дата ответа"); + + b.Property("DateCreatedQuestion") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_created_question") + .HasComment("Дата создания вопроса"); + + b.Property("DateLastEditedQuestion") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_last_edited_question") + .HasComment("Дата последнего редактирования вопроса"); + + b.Property("IdAuthorAnswer") + .HasColumnType("integer") + .HasColumnName("id_author_answer") + .HasComment("id автора ответа"); + + b.Property("IdAuthorQuestion") + .HasColumnType("integer") + .HasColumnName("id_author_question") + .HasComment("id автора вопроса"); + + b.Property("IdReplacementQuestion") + .HasColumnType("integer") + .HasColumnName("id_replacement_question") + .HasComment("Ключ заменяющего вопроса"); + + b.Property("IsFrequently") + .HasColumnType("boolean") + .HasColumnName("is_frequently") + .HasComment("Частый вопрос"); + + b.Property("Question") + .IsRequired() + .HasColumnType("text") + .HasColumnName("question") + .HasComment("Текст вопроса"); + + b.Property("State") + .HasColumnType("integer") + .HasColumnName("state") + .HasComment("Статус вопроса"); + + b.HasKey("Id"); + + b.HasIndex("IdAuthorAnswer"); + + b.HasIndex("IdAuthorQuestion"); + + b.ToTable("t_faq"); + + b.HasComment("вопросы пользователей"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.FileCategory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Name") + .IsRequired() + .HasColumnType("text") + .HasColumnName("name") + .HasComment("Название категории"); + + b.Property("ShortName") + .HasColumnType("text") + .HasColumnName("short_name") + .HasComment("Короткое название категории"); + + b.HasKey("Id"); + + b.ToTable("t_file_category"); + + b.HasComment("Категории файлов"); + + b.HasData( + new + { + Id = 1, + Name = "Растворный сервис", + ShortName = "fluidService" + }, + new + { + Id = 2, + Name = "Цементирование", + ShortName = "cement" + }, + new + { + Id = 3, + Name = "ННБ", + ShortName = "nnb" + }, + new + { + Id = 4, + Name = "ГТИ", + ShortName = "gti" + }, + new + { + Id = 5, + Name = "Документы по скважине", + ShortName = "wellDocuments" + }, + new + { + Id = 6, + Name = "Супервайзер", + ShortName = "supervisor" + }, + new + { + Id = 7, + Name = "Мастер", + ShortName = "master" + }, + new + { + Id = 8, + Name = "Долотный сервис", + ShortName = "toolService" + }, + new + { + Id = 9, + Name = "Буровой подрядчик", + ShortName = "drillService" + }, + new + { + Id = 10, + Name = "Сервис по заканчиванию скважины", + ShortName = "closingService" + }, + new + { + Id = 12, + Name = "Рапорт", + ShortName = "report" + }, + new + { + Id = 1000, + Name = "Программа бурения" + }, + new + { + Id = 1001, + Name = "Задание от геологов" + }, + new + { + Id = 1002, + Name = "Профиль ствола скважины (ННБ)" + }, + new + { + Id = 1003, + Name = "Технологические расчеты (ННБ)" + }, + new + { + Id = 1004, + Name = "Долотная программа" + }, + new + { + Id = 1005, + Name = "Программа по растворам" + }, + new + { + Id = 1006, + Name = "Программа геофизических исследований" + }, + new + { + Id = 1007, + Name = "Планы спусков обсадных колонн" + }, + new + { + Id = 1008, + Name = "Программы цементирования обсадных колонн" + }, + new + { + Id = 10000, + Name = "Проект на бурение транспортного и горизонтального участков скважины" + }, + new + { + Id = 10001, + Name = "Программа на бурение транспортного и горизонтального участков скважины" + }, + new + { + Id = 10002, + Name = "Акт о начале бурения" + }, + new + { + Id = 10003, + Name = "План работ спуска и цементирования направления" + }, + new + { + Id = 10004, + Name = "Программа цементирования направления" + }, + new + { + Id = 10005, + Name = "Мера обсадных труб (направление)" + }, + new + { + Id = 10006, + Name = "Акт на выполненные работы по цементированию направления" + }, + new + { + Id = 10007, + Name = "Отчет по цементированию направления (график)" + }, + new + { + Id = 10008, + Name = "План работ спуска и цементирования кондуктора" + }, + new + { + Id = 10009, + Name = "Программа цементирования (кондуктор)" + }, + new + { + Id = 10010, + Name = "Мера обсадных труб (кондуктор)" + }, + new + { + Id = 10011, + Name = "Карта крепления кондуктора" + }, + new + { + Id = 10012, + Name = "Акт на выполненные работы по цементированию кондуктора" + }, + new + { + Id = 10013, + Name = "Отчет по цементированию кондуктора (график)" + }, + new + { + Id = 10014, + Name = "Акт о замере расстояния от стола ротора до муфты кондуктора" + }, + new + { + Id = 10015, + Name = "Акт опресовки цементного кольца за кондуктором" + }, + new + { + Id = 10016, + Name = "Акт опресовки ППГ с глухими плашками совместно с кондуктором" + }, + new + { + Id = 10017, + Name = "Акт опресовки ПУГ, ППГ с трубными плашками совместно с кондуктором" + }, + new + { + Id = 10018, + Name = "План работ на крепление обсадной колонны (эк. колонна)" + }, + new + { + Id = 10019, + Name = "Программа цементирования (эк. колонна)" + }, + new + { + Id = 10020, + Name = "Мера труб эксплуатационной колонны" + }, + new + { + Id = 10021, + Name = "Карта по креплению скважины (эк. колонна)" + }, + new + { + Id = 10022, + Name = "Акт на установку пружинных центраторов" + }, + new + { + Id = 10023, + Name = "Отчет по цементированию эксплуатационной колонны (график)" + }, + new + { + Id = 10024, + Name = "Акт на выполненные работы по цементированию эксплуатационной колонны" + }, + new + { + Id = 10025, + Name = "Акт об испытании эк. колонны на герметичность (СТОП)" + }, + new + { + Id = 10026, + Name = "Акт опресовки ППГ с глухими плашками совместно с э/колонной" + }, + new + { + Id = 10027, + Name = "Акт опресовки ПУГ, ППГ с трубными плашками совместно с э/колонной" + }, + new + { + Id = 10028, + Name = "Акт на вскрытие продуктивного пласта" + }, + new + { + Id = 10029, + Name = "Акт замера параметров раствора при бурении горизонтального участка" + }, + new + { + Id = 10030, + Name = "Разрешение на спуск «хвостовика» (телефонограмма)" + }, + new + { + Id = 10031, + Name = "План работ на спуск «хвостовика»" + }, + new + { + Id = 10032, + Name = "Акт готовности бурового и энергетического оборудования к спуску «хвостовика»" + }, + new + { + Id = 10033, + Name = "Акт шаблонировки ствола скважины перед спуском «хвостовика»" + }, + new + { + Id = 10034, + Name = "Мера обсадных труб (хвостовик)" + }, + new + { + Id = 10035, + Name = "Акт выполненных работ по спуску хвостовика с закачкой (нефти, солевого раствора" + }, + new + { + Id = 10036, + Name = "Акт о переводе скважины на тех. воду" + }, + new + { + Id = 10037, + Name = "Акт об окончании бурения" + }, + new + { + Id = 10038, + Name = "Акт на передачу скважины в освоение (КРС)" + }, + new + { + Id = 10039, + Name = "Акт на опресовку межколонного пространства с КРС" + }, + new + { + Id = 10040, + Name = "Акт на сдачу скважины в ЦДНГ" + }, + new + { + Id = 10041, + Name = "Паспорт ОУС (заполняется геологами)" + }, + new + { + Id = 10042, + Name = "Паспорт скважины (заполняется геологами)" + }, + new + { + Id = 10043, + Name = "Фактические данные бурения (вставляются в паспорт скважины)" + }, + new + { + Id = 20000, + Name = "Справки по страницам" + }, + new + { + Id = 30000, + Name = "Инструкции" + }); + }); + + modelBuilder.Entity("AsbCloudDb.Model.FileInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("IdAuthor") + .HasColumnType("integer") + .HasColumnName("id_author") + .HasComment("Id пользователя, загрузившего файл"); + + b.Property("IdCategory") + .HasColumnType("integer") + .HasColumnName("id_category") + .HasComment("id категории файла"); + + b.Property("IdWell") + .HasColumnType("integer") + .HasColumnName("id_well") + .HasComment("id скважины"); + + b.Property("IsDeleted") + .HasColumnType("boolean") + .HasColumnName("is_deleted") + .HasComment("Удален ли файл"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text") + .HasColumnName("name") + .HasComment("Название файла"); + + b.Property("Size") + .HasColumnType("bigint") + .HasColumnName("file_size") + .HasComment("Размер файла"); + + b.Property("UploadDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("date"); + + b.HasKey("Id"); + + b.HasIndex("IdAuthor"); + + b.HasIndex("IdCategory"); + + b.HasIndex("IdWell"); + + b.ToTable("t_file_info"); + + b.HasComment("Файлы всех категорий"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.FileMark", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Comment") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("comment") + .HasComment("Комментарий"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_created") + .HasComment("Дата совершенного действия"); + + b.Property("IdFile") + .HasColumnType("integer") + .HasColumnName("id_file") + .HasComment("id файла"); + + b.Property("IdMarkType") + .HasColumnType("integer") + .HasColumnName("id_mark_type") + .HasComment("0 - отклонен, 1 - согласован"); + + b.Property("IdUser") + .HasColumnType("integer") + .HasColumnName("id_user") + .HasComment("id пользователя"); + + b.Property("IsDeleted") + .HasColumnType("boolean") + .HasColumnName("is_deleted") + .HasComment("Помечен ли файл как удаленный"); + + b.HasKey("Id"); + + b.HasIndex("IdFile"); + + b.HasIndex("IdUser"); + + b.ToTable("t_file_mark"); + + b.HasComment("Действия с файлами."); + }); + + modelBuilder.Entity("AsbCloudDb.Model.GTR.WitsItemFloat", b => + { + b.Property("IdTelemetry") + .HasColumnType("integer") + .HasColumnName("id_telemetry"); + + b.Property("IdRecord") + .HasColumnType("integer") + .HasColumnName("id_record"); + + b.Property("IdItem") + .HasColumnType("integer") + .HasColumnName("id_item"); + + b.Property("DateTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("date"); + + b.Property("Value") + .HasColumnType("real") + .HasColumnName("value"); + + b.HasKey("IdTelemetry", "IdRecord", "IdItem", "DateTime"); + + b.ToTable("t_wits_float"); + + b.HasComment("таблица данных ГТИ с типом значения float"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.GTR.WitsItemInt", b => + { + b.Property("IdTelemetry") + .HasColumnType("integer") + .HasColumnName("id_telemetry"); + + b.Property("IdRecord") + .HasColumnType("integer") + .HasColumnName("id_record"); + + b.Property("IdItem") + .HasColumnType("integer") + .HasColumnName("id_item"); + + b.Property("DateTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("date"); + + b.Property("Value") + .HasColumnType("integer") + .HasColumnName("value"); + + b.HasKey("IdTelemetry", "IdRecord", "IdItem", "DateTime"); + + b.ToTable("t_wits_int"); + + b.HasComment("таблица данных ГТИ с типом значения int"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.GTR.WitsItemString", b => + { + b.Property("IdTelemetry") + .HasColumnType("integer") + .HasColumnName("id_telemetry"); + + b.Property("IdRecord") + .HasColumnType("integer") + .HasColumnName("id_record"); + + b.Property("IdItem") + .HasColumnType("integer") + .HasColumnName("id_item"); + + b.Property("DateTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("date"); + + b.Property("Value") + .IsRequired() + .HasColumnType("text") + .HasColumnName("value"); + + b.HasKey("IdTelemetry", "IdRecord", "IdItem", "DateTime"); + + b.ToTable("t_wits_string"); + + b.HasComment("таблица данных ГТИ с типом значения string"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.HelpPage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("IdCategory") + .HasColumnType("integer") + .HasColumnName("id_category") + .HasComment("Id категории файла"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text") + .HasColumnName("name") + .HasComment("Название файла"); + + b.Property("Size") + .HasColumnType("bigint") + .HasColumnName("file_size") + .HasComment("Размер файла"); + + b.Property("UrlPage") + .IsRequired() + .HasColumnType("text") + .HasColumnName("url_page") + .HasComment("Url страницы"); + + b.HasKey("Id"); + + b.HasIndex("IdCategory"); + + b.ToTable("t_help_page"); + + b.HasComment("Справки"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.LimitingParameter", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DateEnd") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_end"); + + b.Property("DateStart") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_start"); + + b.Property("DepthEnd") + .HasColumnType("real") + .HasColumnName("depth_end"); + + b.Property("DepthStart") + .HasColumnType("real") + .HasColumnName("depth_start"); + + b.Property("IdFeedRegulator") + .HasColumnType("smallint") + .HasColumnName("id_feed_regulator"); + + b.Property("IdTelemetry") + .HasColumnType("integer") + .HasColumnName("id_telemetry"); + + b.HasKey("Id"); + + b.HasIndex("IdTelemetry"); + + b.ToTable("t_limiting_parameter"); + + b.HasComment("Ограничения по параметрам телеметрии"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.Manuals.Manual", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DateDownload") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_download") + .HasComment("Дата загрузки"); + + b.Property("IdAuthor") + .HasColumnType("integer") + .HasColumnName("id_author") + .HasComment("Id автора"); + + b.Property("IdCategory") + .HasColumnType("integer") + .HasColumnName("id_category") + .HasComment("Id категории файла"); + + b.Property("IdDirectory") + .HasColumnType("integer") + .HasColumnName("id_directory") + .HasComment("Id директории"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text") + .HasColumnName("name") + .HasComment("Название"); + + b.HasKey("Id"); + + b.HasIndex("IdAuthor"); + + b.HasIndex("IdCategory"); + + b.HasIndex("IdDirectory"); + + b.ToTable("t_manual"); + + b.HasComment("Инструкции"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.Manuals.ManualDirectory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("IdParent") + .HasColumnType("integer") + .HasColumnName("id_parent") + .HasComment("Id родительской директории"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text") + .HasColumnName("name") + .HasComment("Название"); + + b.HasKey("Id"); + + b.HasIndex("IdParent"); + + b.ToTable("t_manual_directory"); + + b.HasComment("Директория для инструкций"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.Measure", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Data") + .IsRequired() + .HasColumnType("jsonb") + .HasColumnName("data") + .HasComment("Данные таблицы последних данных"); + + b.Property("IdCategory") + .HasColumnType("integer") + .HasColumnName("id_category") + .HasComment("id категории"); + + b.Property("IdWell") + .HasColumnType("integer") + .HasColumnName("id_well") + .HasComment("id скважины"); + + b.Property("IsDeleted") + .HasColumnType("boolean") + .HasColumnName("is_deleted") + .HasComment("Пометка удаленным"); + + b.Property("Timestamp") + .HasColumnType("timestamp with time zone") + .HasColumnName("timestamp") + .HasComment("время добавления"); + + b.HasKey("Id"); + + b.HasIndex("IdCategory"); + + b.HasIndex("IdWell"); + + b.ToTable("t_measure"); + + b.HasComment("Таблица c данными для вкладки 'Последние данные'"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.MeasureCategory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Name") + .IsRequired() + .HasColumnType("text") + .HasColumnName("name") + .HasComment("Название категории"); + + b.Property("ShortName") + .HasColumnType("text") + .HasColumnName("short_name") + .HasComment("Короткое название категории"); + + b.HasKey("Id"); + + b.ToTable("t_measure_category"); + + b.HasComment("Категория последних данных"); + + b.HasData( + new + { + Id = 1, + Name = "Показатели бурового раствора", + ShortName = "Раствор" + }, + new + { + Id = 2, + Name = "Шламограмма", + ShortName = "Шламограмма" + }, + new + { + Id = 3, + Name = "ННБ", + ShortName = "ННБ" + }); + }); + + modelBuilder.Entity("AsbCloudDb.Model.Notification", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("IdNotificationCategory") + .HasColumnType("integer") + .HasColumnName("id_notification_category") + .HasComment("Id категории уведомления"); + + b.Property("IdTransportType") + .HasColumnType("integer") + .HasColumnName("id_transport_type") + .HasComment("Id типа доставки уведомления"); + + b.Property("IdUser") + .HasColumnType("integer") + .HasColumnName("id_user") + .HasComment("Id получателя"); + + b.Property("Message") + .IsRequired() + .HasColumnType("text") + .HasColumnName("message") + .HasComment("Сообщение уведомления"); + + b.Property("ReadDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("read_date") + .HasComment("Дата прочтения уведомления"); + + b.Property("RegistrationDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("registration_date") + .HasComment("Дата регистрации уведомления"); + + b.Property("SentDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("sent_date") + .HasComment("Дата отправки уведомления"); + + b.Property("Title") + .IsRequired() + .HasColumnType("text") + .HasColumnName("title") + .HasComment("Заголовок уведомления"); + + b.HasKey("Id"); + + b.HasIndex("IdNotificationCategory"); + + b.HasIndex("IdUser"); + + b.ToTable("t_notification"); + + b.HasComment("Уведомления"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.NotificationCategory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Name") + .IsRequired() + .HasColumnType("text") + .HasColumnName("name"); + + b.HasKey("Id"); + + b.ToTable("t_notification_category"); + + b.HasComment("Категории уведомлений"); + + b.HasData( + new + { + Id = 1, + Name = "Системные уведомления" + }); + }); + + modelBuilder.Entity("AsbCloudDb.Model.OperationValue", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id") + .HasComment("Идентификатор"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DepthEnd") + .HasColumnType("double precision") + .HasColumnName("depth_end") + .HasComment("Конечная глубина"); + + b.Property("DepthStart") + .HasColumnType("double precision") + .HasColumnName("depth_start") + .HasComment("Старотовая глубина"); + + b.Property("IdOperationCategory") + .HasColumnType("integer") + .HasColumnName("id_operation_category") + .HasComment("Ид категории операции"); + + b.Property("IdWell") + .HasColumnType("integer") + .HasColumnName("id_well") + .HasComment("Ид скважины"); + + b.Property("StandardValue") + .HasColumnType("double precision") + .HasColumnName("standard_value") + .HasComment("Нормативный показатель"); + + b.Property("TargetValue") + .HasColumnType("double precision") + .HasColumnName("target_value") + .HasComment("Целевой показатель"); + + b.HasKey("Id"); + + b.HasIndex("IdOperationCategory"); + + b.HasIndex("IdWell"); + + b.ToTable("t_operationvalue"); + + b.HasComment("Целевые/нормативные показатели операции"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.Permission", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Description") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("description") + .HasComment("Краткое описание"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("name") + .HasComment("Название"); + + b.HasKey("Id"); + + b.ToTable("t_permission"); + + b.HasComment("Разрешения на доступ к данным"); + + b.HasData( + new + { + Id = 100, + Description = "Разрешение удалять админ. Кусты", + Name = "AdminCluster.delete" + }, + new + { + Id = 101, + Description = "Разрешение редактировать админ. Кусты", + Name = "AdminCluster.edit" + }, + new + { + Id = 102, + Description = "Разрешение просматривать админ. Кусты", + Name = "AdminCluster.get" + }, + new + { + Id = 103, + Description = "Разрешение удалять админ. Компании", + Name = "AdminCompany.delete" + }, + new + { + Id = 104, + Description = "Разрешение редактировать админ. Компании", + Name = "AdminCompany.edit" + }, + new + { + Id = 105, + Description = "Разрешение просматривать админ. Компании", + Name = "AdminCompany.get" + }, + new + { + Id = 106, + Description = "Разрешение удалять админ. Типы компаний", + Name = "AdminCompanyType.delete" + }, + new + { + Id = 107, + Description = "Разрешение редактировать админ. Типы компаний", + Name = "AdminCompanyType.edit" + }, + new + { + Id = 108, + Description = "Разрешение просматривать админ. Типы компаний", + Name = "AdminCompanyType.get" + }, + new + { + Id = 109, + Description = "Разрешение удалять админ. Месторождения", + Name = "AdminDeposit.delete" + }, + new + { + Id = 110, + Description = "Разрешение редактировать админ. Месторождения", + Name = "AdminDeposit.edit" + }, + new + { + Id = 111, + Description = "Разрешение просматривать админ. Месторождения", + Name = "AdminDeposit.get" + }, + new + { + Id = 112, + Description = "Разрешение удалять админ. Разрешения", + Name = "AdminPermission.delete" + }, + new + { + Id = 113, + Description = "Разрешение редактировать админ. Разрешения", + Name = "AdminPermission.edit" + }, + new + { + Id = 114, + Description = "Разрешение просматривать админ. Разрешения", + Name = "AdminPermission.get" + }, + new + { + Id = 115, + Description = "Разрешение удалять админ. Телеметрию", + Name = "AdminTelemetry.delete" + }, + new + { + Id = 116, + Description = "Разрешение редактировать админ. Телеметрию", + Name = "AdminTelemetry.edit" + }, + new + { + Id = 117, + Description = "Разрешение просматривать админ. Телеметрию", + Name = "AdminTelemetry.get" + }, + new + { + Id = 118, + Description = "Разрешение удалять админ. Пользователей", + Name = "AdminUser.delete" + }, + new + { + Id = 119, + Description = "Разрешение редактировать админ. Пользователей", + Name = "AdminUser.edit" + }, + new + { + Id = 120, + Description = "Разрешение просматривать админ. Пользователей", + Name = "AdminUser.get" + }, + new + { + Id = 121, + Description = "Разрешение удалять админ. Роли пользователей", + Name = "AdminUserRole.delete" + }, + new + { + Id = 122, + Description = "Разрешение редактировать админ. Роли пользователей", + Name = "AdminUserRole.edit" + }, + new + { + Id = 123, + Description = "Разрешение просматривать админ. Роли пользователей", + Name = "AdminUserRole.get" + }, + new + { + Id = 124, + Description = "Разрешение удалять админ. Скважины", + Name = "AdminWell.delete" + }, + new + { + Id = 125, + Description = "Разрешение редактировать админ. Скважины", + Name = "AdminWell.edit" + }, + new + { + Id = 126, + Description = "Разрешение просматривать админ. Скважины", + Name = "AdminWell.get" + }, + new + { + Id = 127, + Description = "Разрешение удалять админ. Подсистемы", + Name = "AdminSubsytem.delete" + }, + new + { + Id = 128, + Description = "Разрешение редактировать админ. Подсистемы", + Name = "AdminSubsytem.edit" + }, + new + { + Id = 129, + Description = "Разрешение просматривать админ. Подсистемы", + Name = "AdminSubsytem.get" + }, + new + { + Id = 200, + Description = "Разрешение редактировать 0", + Name = "Auth.edit" + }, + new + { + Id = 201, + Description = "Разрешение просматривать 0", + Name = "Auth.get" + }, + new + { + Id = 202, + Description = "Разрешение просматривать Кусты", + Name = "Cluster.get" + }, + new + { + Id = 203, + Description = "Разрешение просматривать Месторождения", + Name = "Deposit.get" + }, + new + { + Id = 204, + Description = "Разрешение удалять РТК", + Name = "DrillFlowChart.delete" + }, + new + { + Id = 205, + Description = "Разрешение редактировать РТК", + Name = "DrillFlowChart.edit" + }, + new + { + Id = 206, + Description = "Разрешение просматривать РТК", + Name = "DrillFlowChart.get" + }, + new + { + Id = 207, + Description = "Разрешение удалять Программу бурения", + Name = "DrillingProgram.delete" + }, + new + { + Id = 208, + Description = "Разрешение редактировать Программу бурения", + Name = "DrillingProgram.edit" + }, + new + { + Id = 209, + Description = "Разрешение просматривать Программу бурения", + Name = "DrillingProgram.get" + }, + new + { + Id = 210, + Description = "Разрешение удалять Режимы бурения", + Name = "DrillParams.delete" + }, + new + { + Id = 211, + Description = "Разрешение редактировать Режимы бурения", + Name = "DrillParams.edit" + }, + new + { + Id = 212, + Description = "Разрешение просматривать Режимы бурения", + Name = "DrillParams.get" + }, + new + { + Id = 213, + Description = "Разрешение удалять Файлы", + Name = "File.delete" + }, + new + { + Id = 214, + Description = "Разрешение редактировать Файлы", + Name = "File.edit" + }, + new + { + Id = 215, + Description = "Разрешение просматривать Файлы", + Name = "File.get" + }, + new + { + Id = 216, + Description = "Разрешение удалять Измерения", + Name = "Measure.delete" + }, + new + { + Id = 217, + Description = "Разрешение редактировать Измерения", + Name = "Measure.edit" + }, + new + { + Id = 218, + Description = "Разрешение просматривать Измерения", + Name = "Measure.get" + }, + new + { + Id = 219, + Description = "Разрешение просматривать Сообщения телеметрии", + Name = "Message.get" + }, + new + { + Id = 220, + Description = "Разрешение просматривать Статистику по операциям", + Name = "OperationStat.get" + }, + new + { + Id = 221, + Description = "Разрешение редактировать Рапорта", + Name = "Report.edit" + }, + new + { + Id = 222, + Description = "Разрешение просматривать Рапорта", + Name = "Report.get" + }, + new + { + Id = 223, + Description = "Разрешение просматривать админ. Системная статистика", + Name = "RequestTracker.get" + }, + new + { + Id = 224, + Description = "Разрешение удалять Рекомендации уставок", + Name = "Setpoints.delete" + }, + new + { + Id = 225, + Description = "Разрешение редактировать Рекомендации уставок", + Name = "Setpoints.edit" + }, + new + { + Id = 226, + Description = "Разрешение просматривать Рекомендации уставок", + Name = "Setpoints.get" + }, + new + { + Id = 227, + Description = "Разрешение редактировать Телеметрии", + Name = "Telemetry.edit" + }, + new + { + Id = 228, + Description = "Разрешение просматривать Анализ телеметрии", + Name = "TelemetryAnalytics.get" + }, + new + { + Id = 229, + Description = "Разрешение редактировать Данные телеметрии по САУБ", + Name = "TelemetryDataSaub.edit" + }, + new + { + Id = 230, + Description = "Разрешение просматривать Данные телеметрии по САУБ", + Name = "TelemetryDataSaub.get" + }, + new + { + Id = 231, + Description = "Разрешение редактировать Данные телеметрии по SpinMaster", + Name = "TelemetryDataSpin.edit" + }, + new + { + Id = 232, + Description = "Разрешение просматривать Данные телеметрии по SpinMaster", + Name = "TelemetryDataSpin.get" + }, + new + { + Id = 233, + Description = "Разрешение редактировать Скважины", + Name = "Well.edit" + }, + new + { + Id = 234, + Description = "Разрешение просматривать Скважины", + Name = "Well.get" + }, + new + { + Id = 235, + Description = "Разрешение редактировать Композитные скважины", + Name = "WellComposite.edit" + }, + new + { + Id = 236, + Description = "Разрешение просматривать Композитные скважины", + Name = "WellComposite.get" + }, + new + { + Id = 237, + Description = "Разрешение удалять Операции по скважинам", + Name = "WellOperation.delete" + }, + new + { + Id = 238, + Description = "Разрешение редактировать Операции по скважинам", + Name = "WellOperation.edit" + }, + new + { + Id = 239, + Description = "Разрешение просматривать Операции по скважинам", + Name = "WellOperation.get" + }, + new + { + Id = 240, + Description = "Разрешение редактировать Файлы категории 1 (Растворный сервис)", + Name = "File.edit1" + }, + new + { + Id = 241, + Description = "Разрешение редактировать Файлы категории 2 (Цементирование)", + Name = "File.edit2" + }, + new + { + Id = 242, + Description = "Разрешение редактировать Файлы категории 3 (ННБ)", + Name = "File.edit3" + }, + new + { + Id = 243, + Description = "Разрешение редактировать Файлы категории 4 (ГТИ)", + Name = "File.edit4" + }, + new + { + Id = 244, + Description = "Разрешение редактировать Файлы категории 5 (Документы по скважине)", + Name = "File.edit5" + }, + new + { + Id = 245, + Description = "Разрешение редактировать Файлы категории 6 (Супервайзер)", + Name = "File.edit6" + }, + new + { + Id = 246, + Description = "Разрешение редактировать Файлы категории 7 (Мастер)", + Name = "File.edit7" + }, + new + { + Id = 247, + Description = "Разрешение редактировать Файлы категории 8 (Долотный сервис)", + Name = "File.edit8" + }, + new + { + Id = 248, + Description = "Разрешение редактировать Файлы категории 9 (Буровой подрядчик)", + Name = "File.edit9" + }, + new + { + Id = 249, + Description = "Разрешение редактировать Файлы категории 10 (Сервис по заканчиванию скважины)", + Name = "File.edit10" + }, + new + { + Id = 250, + Description = "Разрешение редактировать Файлы категории 11 (Рапорт)", + Name = "File.edit11" + }, + new + { + Id = 251, + Description = "Разрешение редактировать Файлы категории 12", + Name = "File.edit12" + }, + new + { + Id = 252, + Description = "Разрешение редактировать Файлы категории 12", + Name = "File.edit13" + }, + new + { + Id = 253, + Description = "Разрешение редактировать Файлы категории 13", + Name = "File.edit14" + }, + new + { + Id = 254, + Description = "Разрешение редактировать Файлы категории 14", + Name = "File.edit15" + }, + new + { + Id = 255, + Description = "Разрешение редактировать Файлы категории 15", + Name = "File.edit16" + }, + new + { + Id = 256, + Description = "Разрешение редактировать Файлы категории 16", + Name = "File.edit17" + }, + new + { + Id = 257, + Description = "Разрешение редактировать Файлы категории 17", + Name = "File.edit18" + }, + new + { + Id = 258, + Description = "Разрешение редактировать Файлы категории 18", + Name = "File.edit19" + }, + new + { + Id = 259, + Description = "Разрешение редактировать Файлы категории 19", + Name = "File.edit20" + }, + new + { + Id = 260, + Description = "Разрешение редактировать Файлы категории 20", + Name = "File.edit21" + }, + new + { + Id = 261, + Description = "Разрешение редактировать Файлы категории 21", + Name = "File.edit22" + }, + new + { + Id = 262, + Description = "Разрешение редактировать Файлы категории 22", + Name = "File.edit23" + }, + new + { + Id = 263, + Description = "Разрешение редактировать Файлы категории 23", + Name = "File.edit24" + }, + new + { + Id = 264, + Description = "Разрешение редактировать Файлы категории 24", + Name = "File.edit25" + }, + new + { + Id = 265, + Description = "Разрешение редактировать Файлы категории 25", + Name = "File.edit26" + }, + new + { + Id = 266, + Description = "Разрешение редактировать Файлы категории 26", + Name = "File.edit27" + }, + new + { + Id = 267, + Description = "Разрешение редактировать Файлы категории 27", + Name = "File.edit28" + }, + new + { + Id = 268, + Description = "Разрешение редактировать Файлы категории 28", + Name = "File.edit29" + }, + new + { + Id = 269, + Description = "Разрешение редактировать Файлы категории 29", + Name = "File.edit30" + }, + new + { + Id = 380, + Description = "Разрешение просматривать список бурильщиков", + Name = "Driller.get" + }, + new + { + Id = 381, + Description = "Разрешение редактировать бурильщика", + Name = "Driller.edit" + }, + new + { + Id = 382, + Description = "Разрешение удалять бурильщик", + Name = "Driller.delete" + }, + new + { + Id = 383, + Description = "Разрешение просматривать графики бурильщиков", + Name = "Schedule.get" + }, + new + { + Id = 384, + Description = "Разрешение редактировать график бурильщика", + Name = "Schedule.edit" + }, + new + { + Id = 385, + Description = "Разрешение удалять график бурильщика", + Name = "Schedule.delete" + }, + new + { + Id = 386, + Description = "Разрешение просматривать суточный рапорт", + Name = "DailyReport.get" + }, + new + { + Id = 387, + Description = "Разрешение редактировать суточный рапорт", + Name = "DailyReport.edit" + }, + new + { + Id = 388, + Description = "Разрешение просматривать авто. определенные операции", + Name = "DetectedOperation.get" + }, + new + { + Id = 389, + Description = "Разрешение просматривать целевые значения", + Name = "OperationValue.get" + }, + new + { + Id = 390, + Description = "Разрешение редактировать целевые значения", + Name = "OperationValue.edit" + }, + new + { + Id = 391, + Description = "Разрешение удалять целевые значения", + Name = "OperationValue.delete" + }, + new + { + Id = 400, + Description = "Разрешение просматривать инфо по wits параметрам", + Name = "WitsInfo.get" + }, + new + { + Id = 401, + Description = "Разрешение просматривать WITS record 1", + Name = "WitsRecord1.get" + }, + new + { + Id = 407, + Description = "Разрешение просматривать WITS record 7", + Name = "WitsRecord7.get" + }, + new + { + Id = 408, + Description = "Разрешение просматривать WITS record 8", + Name = "WitsRecord8.get" + }, + new + { + Id = 450, + Description = "Разрешение просматривать WITS record 50", + Name = "WitsRecord50.get" + }, + new + { + Id = 460, + Description = "Разрешение просматривать WITS record 60", + Name = "WitsRecord60.get" + }, + new + { + Id = 461, + Description = "Разрешение просматривать WITS record 61", + Name = "WitsRecord61.get" + }, + new + { + Id = 500, + Description = "Разрешение удалять Категорий документов файлов", + Name = "FileCategory.delete" + }, + new + { + Id = 501, + Description = "Разрешение редактировать Категорий документов файлов", + Name = "FileCategory.edit" + }, + new + { + Id = 502, + Description = "Разрешение просматривать Категорий документов файлов", + Name = "FileCategory.get" + }, + new + { + Id = 503, + Description = "Разрешение удалять Дело скважины", + Name = "WellFinalDocuments.delete" + }, + new + { + Id = 504, + Description = "Разрешение редактировать Дело скважины", + Name = "WellFinalDocuments.edit" + }, + new + { + Id = 505, + Description = "Разрешение просматривать Дело скважины", + Name = "WellFinalDocuments.get" + }, + new + { + Id = 506, + Description = "Разрешение редактировать ответственных за загрузку файла Дело скважины", + Name = "WellFinalDocuments.editPublisher" + }, + new + { + Id = 507, + Description = "Разрешение просматривать наработка талевого каната", + Name = "TelemetryWirelineRunOut.get" + }, + new + { + Id = 510, + Description = "Разрешение просматривать плановая траектория", + Name = "PlannedTrajectory.get" + }, + new + { + Id = 511, + Description = "Разрешение редактировать плановая траектория", + Name = "PlannedTrajectory.edit" + }, + new + { + Id = 512, + Description = "Разрешение удалять плановая траектория", + Name = "PlannedTrajectory.delete" + }, + new + { + Id = 516, + Description = "Разрешение просматривать статистику вопросов", + Name = "FaqStatistics.get" + }, + new + { + Id = 517, + Description = "Разрешение редактировать вопрос", + Name = "FaqStatistics.edit" + }, + new + { + Id = 518, + Description = "Разрешение удалять вопрос", + Name = "FaqStatistics.delete" + }, + new + { + Id = 519, + Description = "Разрешение просматривать список контактов", + Name = "WellContact.get" + }, + new + { + Id = 520, + Description = "Разрешение редактировать список контактов", + Name = "WellContact.edit" + }, + new + { + Id = 521, + Description = "Разрешить создание справок по страницам", + Name = "HelpPage.edit" + }, + new + { + Id = 522, + Description = "Разрешить удаление всех настроек пользователя", + Name = "UserSettings.delete" + }, + new + { + Id = 523, + Description = "Разрешить редактирование инструкций", + Name = "Manual.edit" + }, + new + { + Id = 524, + Description = "Разрешить получение инструкций", + Name = "Manual.get" + }, + new + { + Id = 525, + Description = "Разрешение на редактирование РТК у завершенной скважины", + Name = "ProcessMap.editCompletedWell" + }, + new + { + Id = 526, + Description = "Разрешение на редактирование операций у завершенной скважины", + Name = "WellOperation.editCompletedWell" + }, + new + { + Id = 527, + Description = "Разрешение на удаление инструкций", + Name = "Manual.delete" + }, + new + { + Id = 528, + Description = "Разрешение на удаление контакта", + Name = "WellContact.delete" + }, + new + { + Id = 530, + Description = "Разрешение на редактирование плановой конструкции скважины", + Name = "WellSectionPlan.edit" + }, + new + { + Id = 531, + Description = "Разрешение на удаление плановой конструкции скважины", + Name = "WellSectionPlan.delete" + }); + }); + + modelBuilder.Entity("AsbCloudDb.Model.ProcessMaps.ProcessMapPlanDrilling", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id") + .HasComment("Идентификатор"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("AxialLoadLimitMax") + .HasColumnType("double precision") + .HasColumnName("axial_load_limit_max") + .HasComment("Осевая нагрузка, т, допустимый максимум"); + + b.Property("AxialLoadPlan") + .HasColumnType("double precision") + .HasColumnName("axial_load_plan") + .HasComment("Осевая нагрузка, т, план"); + + b.Property("Comment") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)") + .HasColumnName("comment") + .HasComment("Комментарий"); + + b.Property("Creation") + .HasColumnType("timestamp with time zone") + .HasColumnName("creation") + .HasComment("дата создания"); + + b.Property("DeltaPressureLimitMax") + .HasColumnType("double precision") + .HasColumnName("delta_pressure_limit_max") + .HasComment("Перепад давления, атм, допустимый максимум"); + + b.Property("DeltaPressurePlan") + .HasColumnType("double precision") + .HasColumnName("delta_pressure_plan") + .HasComment("Перепад давления, атм, план"); + + b.Property("DepthEnd") + .HasColumnType("double precision") + .HasColumnName("depth_end") + .HasComment("Глубина по стволу до, м"); + + b.Property("DepthStart") + .HasColumnType("double precision") + .HasColumnName("depth_start") + .HasComment("Глубина по стволу от, м"); + + b.Property("FlowLimitMax") + .HasColumnType("double precision") + .HasColumnName("flow_limit_max") + .HasComment("Расход, л/с, допустимый максимум"); + + b.Property("FlowPlan") + .HasColumnType("double precision") + .HasColumnName("flow_plan") + .HasComment("Расход, л/с, план"); + + b.Property("IdAuthor") + .HasColumnType("integer") + .HasColumnName("id_author") + .HasComment("Автор"); + + b.Property("IdEditor") + .HasColumnType("integer") + .HasColumnName("id_editor") + .HasComment("Редактор"); + + b.Property("IdMode") + .HasColumnType("integer") + .HasColumnName("id_mode") + .HasComment("Id режима (1- ротор, 2 слайд)"); + + b.Property("IdPrevious") + .HasColumnType("integer") + .HasColumnName("id_previous") + .HasComment("ИД состояния записи: \n0 - актуальная\n1 - замененная\n2 - удаленная"); + + b.Property("IdState") + .HasColumnType("integer") + .HasColumnName("id_state") + .HasComment("ИД состояния записи: \n0 - актуальная\n1 - замененная\n2 - удаленная"); + + b.Property("IdWell") + .HasColumnType("integer") + .HasColumnName("id_well") + .HasComment("Id скважины"); + + b.Property("IdWellSectionType") + .HasColumnType("integer") + .HasColumnName("id_wellsection_type") + .HasComment("Тип секции"); + + b.Property("Obsolete") + .HasColumnType("timestamp with time zone") + .HasColumnName("obsolete") + .HasComment("дата устаревания"); + + b.Property("RopPlan") + .HasColumnType("double precision") + .HasColumnName("rop_plan") + .HasComment("Плановая механическая скорость, м/ч"); + + b.Property("TopDriveSpeedLimitMax") + .HasColumnType("double precision") + .HasColumnName("top_drive_speed_limit_max") + .HasComment("Обороты на ВСП, допустимый максимум"); + + b.Property("TopDriveSpeedPlan") + .HasColumnType("double precision") + .HasColumnName("top_drive_speed_plan") + .HasComment("Обороты на ВСП, план"); + + b.Property("TopDriveTorqueLimitMax") + .HasColumnType("double precision") + .HasColumnName("top_drive_torque_limit_max") + .HasComment("Момент на ВСП, допустимый максимум"); + + b.Property("TopDriveTorquePlan") + .HasColumnType("double precision") + .HasColumnName("top_drive_torque_plan") + .HasComment("Момент на ВСП, план"); + + b.Property("UsageSaub") + .HasColumnType("double precision") + .HasColumnName("usage_saub") + .HasComment("Плановый процент использования АКБ"); + + b.Property("UsageSpin") + .HasColumnType("double precision") + .HasColumnName("usage_spin") + .HasComment("Плановый процент использования spin master"); + + b.HasKey("Id"); + + b.HasIndex("IdAuthor"); + + b.HasIndex("IdEditor"); + + b.HasIndex("IdPrevious"); + + b.HasIndex("IdWell"); + + b.HasIndex("IdWellSectionType"); + + b.ToTable("t_process_map_plan_drilling"); + + b.HasComment("РТК план бурение"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.ProcessMaps.ProcessMapWellDrilling", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("AxialLoadLimitMax") + .HasColumnType("double precision") + .HasColumnName("axial_load_limit_max") + .HasComment("Нагрузка, допустимый максимум"); + + b.Property("AxialLoadPlan") + .HasColumnType("double precision") + .HasColumnName("axial_load_plan") + .HasComment("Нагрузка, план"); + + b.Property("Comment") + .HasColumnType("text") + .HasColumnName("comment") + .HasComment("Комментарий"); + + b.Property("DepthEnd") + .HasColumnType("double precision") + .HasColumnName("depth_end") + .HasComment("Глубина по стволу до, м"); + + b.Property("DepthStart") + .HasColumnType("double precision") + .HasColumnName("depth_start") + .HasComment("Глубина по стволу от, м"); + + b.Property("FlowLimitMax") + .HasColumnType("double precision") + .HasColumnName("flow_limit_max") + .HasComment("Расход, допустимый максимум"); + + b.Property("FlowPlan") + .HasColumnType("double precision") + .HasColumnName("flow_plan") + .HasComment("Расход, план"); + + b.Property("IdMode") + .HasColumnType("integer") + .HasColumnName("id_mode") + .HasComment("Id режима (1- ротор, 2 слайд)"); + + b.Property("IdUser") + .HasColumnType("integer") + .HasColumnName("id_user") + .HasComment("Id пользователя"); + + b.Property("IdWell") + .HasColumnType("integer") + .HasColumnName("id_well") + .HasComment("Id скважины"); + + b.Property("IdWellSectionType") + .HasColumnType("integer") + .HasColumnName("id_wellsection_type") + .HasComment("Тип секции"); + + b.Property("LastUpdate") + .HasColumnType("timestamp with time zone") + .HasColumnName("last_update") + .HasComment("Дата последнего изменения"); + + b.Property("PressureLimitMax") + .HasColumnType("double precision") + .HasColumnName("pressure_limit_max") + .HasComment("Перепад давления, допустимый максимум"); + + b.Property("PressurePlan") + .HasColumnType("double precision") + .HasColumnName("pressure_plan") + .HasComment("Перепад давления, план"); + + b.Property("RopPlan") + .HasColumnType("double precision") + .HasColumnName("rop_plan") + .HasComment("Плановая механическая скорость, м/ч"); + + b.Property("TopDriveSpeedLimitMax") + .HasColumnType("double precision") + .HasColumnName("top_drive_speed_limit_max") + .HasComment("Обороты на ВСП, допустимый максимум"); + + b.Property("TopDriveSpeedPlan") + .HasColumnType("double precision") + .HasColumnName("top_drive_speed_plan") + .HasComment("Обороты на ВСП, план"); + + b.Property("TopDriveTorqueLimitMax") + .HasColumnType("double precision") + .HasColumnName("top_drive_torque_limit_max") + .HasComment("Момент на ВСП, допустимый максимум"); + + b.Property("TopDriveTorquePlan") + .HasColumnType("double precision") + .HasColumnName("top_drive_torque_plan") + .HasComment("Момент на ВСП, план"); + + b.Property("UsageSaub") + .HasColumnType("double precision") + .HasColumnName("usage_saub") + .HasComment("Плановый процент использования АКБ"); + + b.Property("UsageSpin") + .HasColumnType("double precision") + .HasColumnName("usage_spin") + .HasComment("Плановый процент использования spin master"); + + b.HasKey("Id"); + + b.HasIndex("IdUser"); + + b.HasIndex("IdWell"); + + b.HasIndex("IdWellSectionType"); + + b.ToTable("t_process_map_well_drilling"); + + b.HasComment("РТК бурение скважины"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.ProcessMaps.ProcessMapWellReam", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Comment") + .HasColumnType("text") + .HasColumnName("comment") + .HasComment("Комментарий"); + + b.Property("DepthEnd") + .HasColumnType("double precision") + .HasColumnName("depth_end") + .HasComment("Глубина по стволу до, м"); + + b.Property("DepthStart") + .HasColumnType("double precision") + .HasColumnName("depth_start") + .HasComment("Глубина по стволу от, м"); + + b.Property("IdUser") + .HasColumnType("integer") + .HasColumnName("id_user") + .HasComment("Id пользователя"); + + b.Property("IdWell") + .HasColumnType("integer") + .HasColumnName("id_well") + .HasComment("Id скважины"); + + b.Property("IdWellSectionType") + .HasColumnType("integer") + .HasColumnName("id_wellsection_type") + .HasComment("Тип секции"); + + b.Property("LastUpdate") + .HasColumnType("timestamp with time zone") + .HasColumnName("last_update") + .HasComment("Дата последнего изменения"); + + b.Property("Pressure") + .HasColumnType("double precision") + .HasColumnName("pressure") + .HasComment("Давление, атм"); + + b.Property("Repeats") + .HasColumnType("double precision") + .HasColumnName("repeats") + .HasComment("Количество повторений"); + + b.Property("SetpointDrag") + .HasColumnType("double precision") + .HasColumnName("setpoint_drag") + .HasComment("Уставка зятяжки, т"); + + b.Property("SetpointTight") + .HasColumnType("double precision") + .HasColumnName("setpoint_tight") + .HasComment("Уставка посадки, т"); + + b.Property("SpeedDownward") + .HasColumnType("double precision") + .HasColumnName("speed_downward") + .HasComment("Скорость спуска, м/ч"); + + b.Property("SpeedUpward") + .HasColumnType("double precision") + .HasColumnName("speed_upward") + .HasComment("Скорость подъёма, м/ч"); + + b.Property("SpinDownward") + .HasColumnType("double precision") + .HasColumnName("spin_downward") + .HasComment("Вращение при движении вниз, об/мин"); + + b.Property("SpinUpward") + .HasColumnType("double precision") + .HasColumnName("spin_upward") + .HasComment("Вращение при движении вверх, об/мин"); + + b.Property("Torque") + .HasColumnType("double precision") + .HasColumnName("torque") + .HasComment("Момент, кН*м"); + + b.HasKey("Id"); + + b.HasIndex("IdUser"); + + b.HasIndex("IdWell"); + + b.HasIndex("IdWellSectionType"); + + b.ToTable("t_process_map_well_ream"); + + b.HasComment("РТК проработка скважины"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => + { + b.Property("IdCompany") + .HasColumnType("integer") + .HasColumnName("id_company"); + + b.Property("IdWell") + .HasColumnType("integer") + .HasColumnName("id_well"); + + b.HasKey("IdCompany", "IdWell"); + + b.HasIndex("IdWell"); + + b.ToTable("t_relation_company_well"); + + b.HasComment("отношение скважин и компаний"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.RelationContactWell", b => + { + b.Property("IdWell") + .HasColumnType("integer") + .HasColumnName("id_well"); + + b.Property("IdUser") + .HasColumnType("integer") + .HasColumnName("id_user"); + + b.HasKey("IdWell", "IdUser"); + + b.HasIndex("IdUser"); + + b.ToTable("t_relation_contact_well"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.RelationUserDrillingProgramPart", b => + { + b.Property("IdUser") + .HasColumnType("integer") + .HasColumnName("id_user"); + + b.Property("IdDrillingProgramPart") + .HasColumnType("integer") + .HasColumnName("id_drilling_program_part"); + + b.Property("IdUserRole") + .HasColumnType("integer") + .HasColumnName("id_role") + .HasComment("1 - publisher, 2 - approver"); + + b.HasKey("IdUser", "IdDrillingProgramPart") + .HasName("t_relation_user_drilling_program_part_pk"); + + b.HasIndex("IdDrillingProgramPart"); + + b.ToTable("t_relation_user_drilling_program_part"); + + b.HasComment("Отношение пользователей и частей ПБ"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.RelationUserRolePermission", b => + { + b.Property("IdUserRole") + .HasColumnType("integer") + .HasColumnName("id_user_role"); + + b.Property("IdPermission") + .HasColumnType("integer") + .HasColumnName("id_permission"); + + b.HasKey("IdUserRole", "IdPermission"); + + b.HasIndex("IdPermission"); + + b.ToTable("t_relation_user_role_permission"); + + b.HasComment("Отношение ролей пользователей и разрешений доступа"); + + b.HasData( + new + { + IdUserRole = 1100, + IdPermission = 102 + }, + new + { + IdUserRole = 1100, + IdPermission = 111 + }, + new + { + IdUserRole = 1101, + IdPermission = 101 + }, + new + { + IdUserRole = 1101, + IdPermission = 100 + }, + new + { + IdUserRole = 1102, + IdPermission = 105 + }, + new + { + IdUserRole = 1102, + IdPermission = 108 + }, + new + { + IdUserRole = 1103, + IdPermission = 104 + }, + new + { + IdUserRole = 1103, + IdPermission = 103 + }, + new + { + IdUserRole = 1104, + IdPermission = 108 + }, + new + { + IdUserRole = 1105, + IdPermission = 107 + }, + new + { + IdUserRole = 1105, + IdPermission = 106 + }, + new + { + IdUserRole = 1106, + IdPermission = 111 + }, + new + { + IdUserRole = 1107, + IdPermission = 110 + }, + new + { + IdUserRole = 1107, + IdPermission = 109 + }, + new + { + IdUserRole = 1108, + IdPermission = 114 + }, + new + { + IdUserRole = 1109, + IdPermission = 113 + }, + new + { + IdUserRole = 1109, + IdPermission = 112 + }, + new + { + IdUserRole = 1110, + IdPermission = 123 + }, + new + { + IdUserRole = 1110, + IdPermission = 114 + }, + new + { + IdUserRole = 1111, + IdPermission = 122 + }, + new + { + IdUserRole = 1111, + IdPermission = 121 + }, + new + { + IdUserRole = 1112, + IdPermission = 117 + }, + new + { + IdUserRole = 1113, + IdPermission = 105 + }, + new + { + IdUserRole = 1113, + IdPermission = 123 + }, + new + { + IdUserRole = 1113, + IdPermission = 120 + }, + new + { + IdUserRole = 1114, + IdPermission = 119 + }, + new + { + IdUserRole = 1114, + IdPermission = 118 + }, + new + { + IdUserRole = 1114, + IdPermission = 200 + }, + new + { + IdUserRole = 1115, + IdPermission = 223 + }, + new + { + IdUserRole = 1116, + IdPermission = 105 + }, + new + { + IdUserRole = 1116, + IdPermission = 102 + }, + new + { + IdUserRole = 1116, + IdPermission = 117 + }, + new + { + IdUserRole = 1116, + IdPermission = 126 + }, + new + { + IdUserRole = 1117, + IdPermission = 125 + }, + new + { + IdUserRole = 1117, + IdPermission = 124 + }, + new + { + IdUserRole = 1200, + IdPermission = 203 + }, + new + { + IdUserRole = 1200, + IdPermission = 230 + }, + new + { + IdUserRole = 1201, + IdPermission = 202 + }, + new + { + IdUserRole = 1201, + IdPermission = 203 + }, + new + { + IdUserRole = 1201, + IdPermission = 220 + }, + new + { + IdUserRole = 1202, + IdPermission = 203 + }, + new + { + IdUserRole = 1202, + IdPermission = 220 + }, + new + { + IdUserRole = 1202, + IdPermission = 236 + }, + new + { + IdUserRole = 1202, + IdPermission = 212 + }, + new + { + IdUserRole = 1203, + IdPermission = 235 + }, + new + { + IdUserRole = 1204, + IdPermission = 202 + }, + new + { + IdUserRole = 1204, + IdPermission = 203 + }, + new + { + IdUserRole = 1205, + IdPermission = 215 + }, + new + { + IdUserRole = 1206, + IdPermission = 203 + }, + new + { + IdUserRole = 1206, + IdPermission = 206 + }, + new + { + IdUserRole = 1207, + IdPermission = 205 + }, + new + { + IdUserRole = 1208, + IdPermission = 218 + }, + new + { + IdUserRole = 1209, + IdPermission = 217 + }, + new + { + IdUserRole = 1210, + IdPermission = 203 + }, + new + { + IdUserRole = 1210, + IdPermission = 230 + }, + new + { + IdUserRole = 1210, + IdPermission = 219 + }, + new + { + IdUserRole = 1211, + IdPermission = 203 + }, + new + { + IdUserRole = 1211, + IdPermission = 220 + }, + new + { + IdUserRole = 1211, + IdPermission = 239 + }, + new + { + IdUserRole = 1212, + IdPermission = 238 + }, + new + { + IdUserRole = 1212, + IdPermission = 237 + }, + new + { + IdUserRole = 1213, + IdPermission = 203 + }, + new + { + IdUserRole = 1213, + IdPermission = 239 + }, + new + { + IdUserRole = 1213, + IdPermission = 212 + }, + new + { + IdUserRole = 1214, + IdPermission = 211 + }, + new + { + IdUserRole = 1214, + IdPermission = 210 + }, + new + { + IdUserRole = 1215, + IdPermission = 203 + }, + new + { + IdUserRole = 1215, + IdPermission = 222 + }, + new + { + IdUserRole = 1216, + IdPermission = 221 + }, + new + { + IdUserRole = 1217, + IdPermission = 226 + }, + new + { + IdUserRole = 1218, + IdPermission = 225 + }, + new + { + IdUserRole = 1218, + IdPermission = 224 + }, + new + { + IdUserRole = 1219, + IdPermission = 203 + }, + new + { + IdUserRole = 1219, + IdPermission = 206 + }, + new + { + IdUserRole = 1219, + IdPermission = 230 + }, + new + { + IdUserRole = 1219, + IdPermission = 232 + }, + new + { + IdUserRole = 1220, + IdPermission = 203 + }, + new + { + IdUserRole = 1220, + IdPermission = 228 + }, + new + { + IdUserRole = 1221, + IdPermission = 202 + }, + new + { + IdUserRole = 1221, + IdPermission = 203 + }, + new + { + IdUserRole = 1221, + IdPermission = 220 + }, + new + { + IdUserRole = 1221, + IdPermission = 234 + }, + new + { + IdUserRole = 1500, + IdPermission = 507 + }, + new + { + IdUserRole = 1500, + IdPermission = 510 + }, + new + { + IdUserRole = 1501, + IdPermission = 214 + }, + new + { + IdUserRole = 1501, + IdPermission = 213 + }, + new + { + IdUserRole = 1502, + IdPermission = 207 + }, + new + { + IdUserRole = 1502, + IdPermission = 208 + }, + new + { + IdUserRole = 2000, + IdPermission = 205 + }, + new + { + IdUserRole = 2000, + IdPermission = 204 + }, + new + { + IdUserRole = 2000, + IdPermission = 245 + }, + new + { + IdUserRole = 2001, + IdPermission = 244 + }, + new + { + IdUserRole = 2001, + IdPermission = 245 + }, + new + { + IdUserRole = 2002, + IdPermission = 244 + }, + new + { + IdUserRole = 2002, + IdPermission = 246 + }, + new + { + IdUserRole = 2002, + IdPermission = 237 + }, + new + { + IdUserRole = 2002, + IdPermission = 238 + }, + new + { + IdUserRole = 2003, + IdPermission = 240 + }, + new + { + IdUserRole = 2003, + IdPermission = 217 + }, + new + { + IdUserRole = 2003, + IdPermission = 216 + }, + new + { + IdUserRole = 2004, + IdPermission = 242 + }, + new + { + IdUserRole = 2004, + IdPermission = 217 + }, + new + { + IdUserRole = 2004, + IdPermission = 216 + }, + new + { + IdUserRole = 2004, + IdPermission = 205 + }, + new + { + IdUserRole = 2004, + IdPermission = 204 + }, + new + { + IdUserRole = 2005, + IdPermission = 247 + }, + new + { + IdUserRole = 2005, + IdPermission = 205 + }, + new + { + IdUserRole = 2005, + IdPermission = 204 + }, + new + { + IdUserRole = 2006, + IdPermission = 243 + }, + new + { + IdUserRole = 2006, + IdPermission = 205 + }, + new + { + IdUserRole = 2006, + IdPermission = 204 + }, + new + { + IdUserRole = 2007, + IdPermission = 241 + }, + new + { + IdUserRole = 2007, + IdPermission = 205 + }, + new + { + IdUserRole = 2007, + IdPermission = 204 + }, + new + { + IdUserRole = 1, + IdPermission = 100 + }, + new + { + IdUserRole = 1, + IdPermission = 101 + }, + new + { + IdUserRole = 1, + IdPermission = 102 + }, + new + { + IdUserRole = 1, + IdPermission = 103 + }, + new + { + IdUserRole = 1, + IdPermission = 104 + }, + new + { + IdUserRole = 1, + IdPermission = 105 + }, + new + { + IdUserRole = 1, + IdPermission = 106 + }, + new + { + IdUserRole = 1, + IdPermission = 107 + }, + new + { + IdUserRole = 1, + IdPermission = 108 + }, + new + { + IdUserRole = 1, + IdPermission = 109 + }, + new + { + IdUserRole = 1, + IdPermission = 110 + }, + new + { + IdUserRole = 1, + IdPermission = 111 + }, + new + { + IdUserRole = 1, + IdPermission = 112 + }, + new + { + IdUserRole = 1, + IdPermission = 113 + }, + new + { + IdUserRole = 1, + IdPermission = 114 + }, + new + { + IdUserRole = 1, + IdPermission = 115 + }, + new + { + IdUserRole = 1, + IdPermission = 116 + }, + new + { + IdUserRole = 1, + IdPermission = 117 + }, + new + { + IdUserRole = 1, + IdPermission = 118 + }, + new + { + IdUserRole = 1, + IdPermission = 119 + }, + new + { + IdUserRole = 1, + IdPermission = 120 + }, + new + { + IdUserRole = 1, + IdPermission = 121 + }, + new + { + IdUserRole = 1, + IdPermission = 122 + }, + new + { + IdUserRole = 1, + IdPermission = 123 + }, + new + { + IdUserRole = 1, + IdPermission = 124 + }, + new + { + IdUserRole = 1, + IdPermission = 125 + }, + new + { + IdUserRole = 1, + IdPermission = 126 + }, + new + { + IdUserRole = 1, + IdPermission = 127 + }, + new + { + IdUserRole = 1, + IdPermission = 128 + }, + new + { + IdUserRole = 1, + IdPermission = 129 + }, + new + { + IdUserRole = 1, + IdPermission = 200 + }, + new + { + IdUserRole = 1, + IdPermission = 201 + }, + new + { + IdUserRole = 1, + IdPermission = 202 + }, + new + { + IdUserRole = 1, + IdPermission = 203 + }, + new + { + IdUserRole = 1, + IdPermission = 204 + }, + new + { + IdUserRole = 1, + IdPermission = 205 + }, + new + { + IdUserRole = 1, + IdPermission = 206 + }, + new + { + IdUserRole = 1, + IdPermission = 207 + }, + new + { + IdUserRole = 1, + IdPermission = 208 + }, + new + { + IdUserRole = 1, + IdPermission = 209 + }, + new + { + IdUserRole = 1, + IdPermission = 210 + }, + new + { + IdUserRole = 1, + IdPermission = 211 + }, + new + { + IdUserRole = 1, + IdPermission = 212 + }, + new + { + IdUserRole = 1, + IdPermission = 213 + }, + new + { + IdUserRole = 1, + IdPermission = 214 + }, + new + { + IdUserRole = 1, + IdPermission = 215 + }, + new + { + IdUserRole = 1, + IdPermission = 216 + }, + new + { + IdUserRole = 1, + IdPermission = 217 + }, + new + { + IdUserRole = 1, + IdPermission = 218 + }, + new + { + IdUserRole = 1, + IdPermission = 219 + }, + new + { + IdUserRole = 1, + IdPermission = 220 + }, + new + { + IdUserRole = 1, + IdPermission = 221 + }, + new + { + IdUserRole = 1, + IdPermission = 222 + }, + new + { + IdUserRole = 1, + IdPermission = 223 + }, + new + { + IdUserRole = 1, + IdPermission = 224 + }, + new + { + IdUserRole = 1, + IdPermission = 225 + }, + new + { + IdUserRole = 1, + IdPermission = 226 + }, + new + { + IdUserRole = 1, + IdPermission = 227 + }, + new + { + IdUserRole = 1, + IdPermission = 228 + }, + new + { + IdUserRole = 1, + IdPermission = 229 + }, + new + { + IdUserRole = 1, + IdPermission = 230 + }, + new + { + IdUserRole = 1, + IdPermission = 231 + }, + new + { + IdUserRole = 1, + IdPermission = 232 + }, + new + { + IdUserRole = 1, + IdPermission = 233 + }, + new + { + IdUserRole = 1, + IdPermission = 234 + }, + new + { + IdUserRole = 1, + IdPermission = 235 + }, + new + { + IdUserRole = 1, + IdPermission = 236 + }, + new + { + IdUserRole = 1, + IdPermission = 237 + }, + new + { + IdUserRole = 1, + IdPermission = 238 + }, + new + { + IdUserRole = 1, + IdPermission = 239 + }, + new + { + IdUserRole = 1, + IdPermission = 240 + }, + new + { + IdUserRole = 1, + IdPermission = 241 + }, + new + { + IdUserRole = 1, + IdPermission = 242 + }, + new + { + IdUserRole = 1, + IdPermission = 243 + }, + new + { + IdUserRole = 1, + IdPermission = 244 + }, + new + { + IdUserRole = 1, + IdPermission = 245 + }, + new + { + IdUserRole = 1, + IdPermission = 246 + }, + new + { + IdUserRole = 1, + IdPermission = 247 + }, + new + { + IdUserRole = 1, + IdPermission = 248 + }, + new + { + IdUserRole = 1, + IdPermission = 249 + }, + new + { + IdUserRole = 1, + IdPermission = 250 + }, + new + { + IdUserRole = 1, + IdPermission = 251 + }, + new + { + IdUserRole = 1, + IdPermission = 252 + }, + new + { + IdUserRole = 1, + IdPermission = 253 + }, + new + { + IdUserRole = 1, + IdPermission = 254 + }, + new + { + IdUserRole = 1, + IdPermission = 255 + }, + new + { + IdUserRole = 1, + IdPermission = 256 + }, + new + { + IdUserRole = 1, + IdPermission = 257 + }, + new + { + IdUserRole = 1, + IdPermission = 258 + }, + new + { + IdUserRole = 1, + IdPermission = 259 + }, + new + { + IdUserRole = 1, + IdPermission = 260 + }, + new + { + IdUserRole = 1, + IdPermission = 261 + }, + new + { + IdUserRole = 1, + IdPermission = 262 + }, + new + { + IdUserRole = 1, + IdPermission = 263 + }, + new + { + IdUserRole = 1, + IdPermission = 264 + }, + new + { + IdUserRole = 1, + IdPermission = 265 + }, + new + { + IdUserRole = 1, + IdPermission = 266 + }, + new + { + IdUserRole = 1, + IdPermission = 267 + }, + new + { + IdUserRole = 1, + IdPermission = 268 + }, + new + { + IdUserRole = 1, + IdPermission = 269 + }, + new + { + IdUserRole = 1, + IdPermission = 380 + }, + new + { + IdUserRole = 1, + IdPermission = 381 + }, + new + { + IdUserRole = 1, + IdPermission = 382 + }, + new + { + IdUserRole = 1, + IdPermission = 383 + }, + new + { + IdUserRole = 1, + IdPermission = 384 + }, + new + { + IdUserRole = 1, + IdPermission = 385 + }, + new + { + IdUserRole = 1, + IdPermission = 386 + }, + new + { + IdUserRole = 1, + IdPermission = 387 + }, + new + { + IdUserRole = 1, + IdPermission = 388 + }, + new + { + IdUserRole = 1, + IdPermission = 389 + }, + new + { + IdUserRole = 1, + IdPermission = 390 + }, + new + { + IdUserRole = 1, + IdPermission = 391 + }, + new + { + IdUserRole = 1, + IdPermission = 400 + }, + new + { + IdUserRole = 1, + IdPermission = 401 + }, + new + { + IdUserRole = 1, + IdPermission = 407 + }, + new + { + IdUserRole = 1, + IdPermission = 408 + }, + new + { + IdUserRole = 1, + IdPermission = 450 + }, + new + { + IdUserRole = 1, + IdPermission = 460 + }, + new + { + IdUserRole = 1, + IdPermission = 461 + }, + new + { + IdUserRole = 1, + IdPermission = 500 + }, + new + { + IdUserRole = 1, + IdPermission = 501 + }, + new + { + IdUserRole = 1, + IdPermission = 502 + }, + new + { + IdUserRole = 1, + IdPermission = 503 + }, + new + { + IdUserRole = 1, + IdPermission = 504 + }, + new + { + IdUserRole = 1, + IdPermission = 505 + }, + new + { + IdUserRole = 1, + IdPermission = 506 + }, + new + { + IdUserRole = 1, + IdPermission = 507 + }, + new + { + IdUserRole = 1, + IdPermission = 510 + }, + new + { + IdUserRole = 1, + IdPermission = 511 + }, + new + { + IdUserRole = 1, + IdPermission = 512 + }, + new + { + IdUserRole = 1, + IdPermission = 516 + }, + new + { + IdUserRole = 1, + IdPermission = 517 + }, + new + { + IdUserRole = 1, + IdPermission = 518 + }, + new + { + IdUserRole = 1, + IdPermission = 519 + }, + new + { + IdUserRole = 1, + IdPermission = 520 + }, + new + { + IdUserRole = 1, + IdPermission = 521 + }, + new + { + IdUserRole = 1, + IdPermission = 522 + }, + new + { + IdUserRole = 1, + IdPermission = 523 + }, + new + { + IdUserRole = 1, + IdPermission = 524 + }, + new + { + IdUserRole = 1, + IdPermission = 525 + }, + new + { + IdUserRole = 1, + IdPermission = 526 + }, + new + { + IdUserRole = 1, + IdPermission = 527 + }, + new + { + IdUserRole = 1, + IdPermission = 528 + }, + new + { + IdUserRole = 1, + IdPermission = 530 + }, + new + { + IdUserRole = 1, + IdPermission = 531 + }); + }); + + modelBuilder.Entity("AsbCloudDb.Model.RelationUserRoleUserRole", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id_user_role"); + + b.Property("IdInclude") + .HasColumnType("integer") + .HasColumnName("id_include_user_role"); + + b.HasKey("Id", "IdInclude") + .HasName("t_relation_user_role_user_role_pk"); + + b.HasIndex("IdInclude"); + + b.ToTable("t_relation_user_role_user_role"); + + b.HasComment("Отношение ролей к ролям"); + + b.HasData( + new + { + Id = 1101, + IdInclude = 1100 + }, + new + { + Id = 1103, + IdInclude = 1102 + }, + new + { + Id = 1105, + IdInclude = 1104 + }, + new + { + Id = 1107, + IdInclude = 1106 + }, + new + { + Id = 1109, + IdInclude = 1108 + }, + new + { + Id = 1111, + IdInclude = 1110 + }, + new + { + Id = 1114, + IdInclude = 1113 + }, + new + { + Id = 1117, + IdInclude = 1116 + }, + new + { + Id = 1203, + IdInclude = 1202 + }, + new + { + Id = 1207, + IdInclude = 1206 + }, + new + { + Id = 1209, + IdInclude = 1208 + }, + new + { + Id = 1212, + IdInclude = 1211 + }, + new + { + Id = 1214, + IdInclude = 1213 + }, + new + { + Id = 1216, + IdInclude = 1215 + }, + new + { + Id = 1218, + IdInclude = 1217 + }, + new + { + Id = 2000, + IdInclude = 1200 + }, + new + { + Id = 2000, + IdInclude = 1201 + }, + new + { + Id = 2000, + IdInclude = 1202 + }, + new + { + Id = 2000, + IdInclude = 1204 + }, + new + { + Id = 2000, + IdInclude = 1205 + }, + new + { + Id = 2000, + IdInclude = 1206 + }, + new + { + Id = 2000, + IdInclude = 1208 + }, + new + { + Id = 2000, + IdInclude = 1210 + }, + new + { + Id = 2000, + IdInclude = 1211 + }, + new + { + Id = 2000, + IdInclude = 1213 + }, + new + { + Id = 2000, + IdInclude = 1215 + }, + new + { + Id = 2000, + IdInclude = 1217 + }, + new + { + Id = 2000, + IdInclude = 1219 + }, + new + { + Id = 2000, + IdInclude = 1220 + }, + new + { + Id = 2000, + IdInclude = 1221 + }, + new + { + Id = 2000, + IdInclude = 1500 + }, + new + { + Id = 2000, + IdInclude = 1501 + }, + new + { + Id = 2000, + IdInclude = 1502 + }, + new + { + Id = 2001, + IdInclude = 1500 + }, + new + { + Id = 2001, + IdInclude = 1501 + }, + new + { + Id = 2001, + IdInclude = 1502 + }, + new + { + Id = 2002, + IdInclude = 1500 + }, + new + { + Id = 2002, + IdInclude = 1501 + }, + new + { + Id = 2002, + IdInclude = 1502 + }, + new + { + Id = 2003, + IdInclude = 1500 + }, + new + { + Id = 2003, + IdInclude = 1501 + }, + new + { + Id = 2003, + IdInclude = 1502 + }, + new + { + Id = 2004, + IdInclude = 1500 + }, + new + { + Id = 2004, + IdInclude = 1501 + }, + new + { + Id = 2004, + IdInclude = 1502 + }, + new + { + Id = 2005, + IdInclude = 1500 + }, + new + { + Id = 2005, + IdInclude = 1501 + }, + new + { + Id = 2005, + IdInclude = 1502 + }, + new + { + Id = 2006, + IdInclude = 1500 + }, + new + { + Id = 2006, + IdInclude = 1501 + }, + new + { + Id = 2006, + IdInclude = 1502 + }, + new + { + Id = 2007, + IdInclude = 1500 + }, + new + { + Id = 2007, + IdInclude = 1501 + }, + new + { + Id = 2007, + IdInclude = 1502 + }); + }); + + modelBuilder.Entity("AsbCloudDb.Model.RelationUserUserRole", b => + { + b.Property("IdUser") + .HasColumnType("integer") + .HasColumnName("id_user"); + + b.Property("IdUserRole") + .HasColumnType("integer") + .HasColumnName("id_user_role"); + + b.HasKey("IdUser", "IdUserRole"); + + b.HasIndex("IdUserRole"); + + b.ToTable("t_relation_user_user_role"); + + b.HasComment("Отношение пользователей и ролей"); + + b.HasData( + new + { + IdUser = 1, + IdUserRole = 1 + }); + }); + + modelBuilder.Entity("AsbCloudDb.Model.ReportProperty", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Begin") + .HasColumnType("timestamp with time zone") + .HasColumnName("begin"); + + b.Property("End") + .HasColumnType("timestamp with time zone") + .HasColumnName("end") + .HasComment("timestamp with time zone"); + + b.Property("Format") + .HasColumnType("integer") + .HasColumnName("format") + .HasComment("Формат отчета"); + + b.Property("IdFile") + .HasColumnType("integer") + .HasColumnName("id_file") + .HasComment("id файла-родителя"); + + b.Property("IdWell") + .HasColumnType("integer") + .HasColumnName("id_well") + .HasComment("id скважины"); + + b.Property("Step") + .HasColumnType("integer") + .HasColumnName("step") + .HasComment("размер шага в секундах"); + + b.HasKey("Id"); + + b.HasIndex("IdFile"); + + b.HasIndex("IdWell"); + + b.ToTable("t_report_property"); + + b.HasComment("Отчеты с данными по буровым"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.Schedule", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id") + .HasComment("Идентификатор"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DrillEnd") + .HasColumnType("timestamp with time zone") + .HasColumnName("drill_end") + .HasComment("Конец вахты"); + + b.Property("DrillStart") + .HasColumnType("timestamp with time zone") + .HasColumnName("drill_start") + .HasComment("Начало вахты"); + + b.Property("IdDriller") + .HasColumnType("integer") + .HasColumnName("id_driller") + .HasComment("Идентификатор бурильщика"); + + b.Property("IdWell") + .HasColumnType("integer") + .HasColumnName("id_well") + .HasComment("Идентификатор скважины"); + + b.Property("ShiftEnd") + .HasColumnType("time without time zone") + .HasColumnName("shift_end") + .HasComment("Конец смены"); + + b.Property("ShiftStart") + .HasColumnType("time without time zone") + .HasColumnName("shift_start") + .HasComment("Начало смены"); + + b.HasKey("Id"); + + b.HasIndex("IdDriller"); + + b.HasIndex("IdWell"); + + b.ToTable("t_schedule"); + + b.HasComment("График работы бурильщика"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.SetpointsRequest", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Comment") + .HasColumnType("text") + .HasColumnName("comment") + .HasComment("комментарий для оператора"); + + b.Property("IdAuthor") + .HasColumnType("integer") + .HasColumnName("id_author") + .HasComment("Id пользователя, загрузившего файл"); + + b.Property("IdState") + .HasColumnType("integer") + .HasColumnName("id_state") + .HasComment("0: неизвестно, 1:ожидает отправки, 2: отправлено, 3: принято оператором, 4: отклонено оператором, 5: устарело"); + + b.Property("IdWell") + .HasColumnType("integer") + .HasColumnName("id_well") + .HasComment("id скважины"); + + b.Property("ObsolescenceSec") + .HasColumnType("integer") + .HasColumnName("obsolescence") + .HasComment("сек. до устаревания"); + + b.Property("Setpoints") + .IsRequired() + .HasColumnType("jsonb") + .HasColumnName("setpoint_set") + .HasComment("Набор уставок"); + + b.Property("UploadDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("date"); + + b.HasKey("Id"); + + b.HasIndex("IdAuthor"); + + b.HasIndex("IdWell"); + + b.ToTable("t_setpoints_rquest"); + + b.HasComment("Запросы на изменение уставок панели оператора"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.Subsystem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Description") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("description"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("name"); + + b.HasKey("Id"); + + b.ToTable("t_subsystem"); + + b.HasComment("Описание подсистем"); + + b.HasData( + new + { + Id = 1, + Description = "Совместная работа режимов \"Бурение в роторе\" и \"Бурение в слайде\"", + Name = "АПД" + }, + new + { + Id = 11, + Description = "Режим работы \"Бурение в роторе\"", + Name = "АПД ротор" + }, + new + { + Id = 12, + Description = "Режим работы \"Бурение в слайде\"", + Name = "АПД слайд" + }, + new + { + Id = 65536, + Description = "Осцилляция", + Name = "Осцилляция" + }, + new + { + Id = 65537, + Description = "Демпфер", + Name = "Демпфер" + }); + }); + + modelBuilder.Entity("AsbCloudDb.Model.Telemetry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Info") + .IsRequired() + .HasColumnType("jsonb") + .HasColumnName("info") + .HasComment("Информация с панели о скважине"); + + b.Property("RemoteUid") + .IsRequired() + .HasColumnType("text") + .HasColumnName("remote_uid") + .HasComment("Идентификатор передающего устройства. Может повторяться в списке, так как комплекты оборудования переезжают от скв. к скв."); + + b.Property("TimeZone") + .IsRequired() + .HasColumnType("jsonb") + .HasColumnName("timezone") + .HasComment("Смещение часового пояса от UTC"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "RemoteUid" }, "t_telemetry_remote_uid_index"); + + b.ToTable("t_telemetry"); + + b.HasComment("таблица привязки телеметрии от комплектов к конкретной скважине."); + }); + + modelBuilder.Entity("AsbCloudDb.Model.TelemetryDataSaub", b => + { + b.Property("IdTelemetry") + .HasColumnType("integer") + .HasColumnName("id_telemetry"); + + b.Property("DateTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("date") + .HasComment("'2021-10-19 18:23:54+05'"); + + b.Property("AxialLoad") + .HasColumnType("real") + .HasColumnName("axial_load") + .HasComment("Осевая нагрузка"); + + b.Property("AxialLoadLimitMax") + .HasColumnType("real") + .HasColumnName("axial_load_limit_max") + .HasComment("Осевая нагрузка. Аварийная макс."); + + b.Property("AxialLoadSp") + .HasColumnType("real") + .HasColumnName("axial_load_sp") + .HasComment("Осевая нагрузка. Задание"); + + b.Property("BitDepth") + .HasColumnType("real") + .HasColumnName("bit_depth") + .HasComment("Положение инструмента"); + + b.Property("BlockPosition") + .HasColumnType("real") + .HasColumnName("block_position") + .HasComment("Высота талевого блока"); + + b.Property("BlockPositionMax") + .HasColumnType("real") + .HasColumnName("block_position_max") + .HasComment("Талевый блок. Макс положение"); + + b.Property("BlockPositionMin") + .HasColumnType("real") + .HasColumnName("block_position_min") + .HasComment("Талевый блок. Мин положение"); + + b.Property("BlockSpeed") + .HasColumnType("real") + .HasColumnName("block_speed") + .HasComment("Скорость талевого блока"); + + b.Property("BlockSpeedSp") + .HasColumnType("real") + .HasColumnName("block_speed_sp") + .HasComment("Скорости талевого блока. Задание"); + + b.Property("BlockSpeedSpDevelop") + .HasColumnType("real") + .HasColumnName("block_speed_sp_develop") + .HasComment("Талевый блок. Задание скорости для проработки"); + + b.Property("BlockSpeedSpRotor") + .HasColumnType("real") + .HasColumnName("block_speed_sp_rotor") + .HasComment("Талевый блок. Задание скорости для роторного бурения"); + + b.Property("BlockSpeedSpSlide") + .HasColumnType("real") + .HasColumnName("block_speed_sp_slide") + .HasComment("Талевый блок. Задание скорости для режима слайда"); + + b.Property("Flow") + .HasColumnType("real") + .HasColumnName("flow") + .HasComment("Расход"); + + b.Property("FlowDeltaLimitMax") + .HasColumnType("real") + .HasColumnName("flow_delta_limit_max") + .HasComment("Расход. Аварийный макс."); + + b.Property("FlowIdle") + .HasColumnType("real") + .HasColumnName("flow_idle") + .HasComment("Расход. Холостой ход"); + + b.Property("HookWeight") + .HasColumnType("real") + .HasColumnName("hook_weight") + .HasComment("Вес на крюке"); + + b.Property("HookWeightIdle") + .HasColumnType("real") + .HasColumnName("hook_weight_idle") + .HasComment("Вес на крюке. Холостой ход"); + + b.Property("HookWeightLimitMax") + .HasColumnType("real") + .HasColumnName("hook_weight_limit_max") + .HasComment("Вес на крюке. Затяжка"); + + b.Property("HookWeightLimitMin") + .HasColumnType("real") + .HasColumnName("hook_weight_limit_min") + .HasComment("Вес на крюке. Посадка"); + + b.Property("IdFeedRegulator") + .HasColumnType("smallint") + .HasColumnName("id_feed_regulator") + .HasComment("Текущий критерий бурения"); + + b.Property("IdUser") + .HasColumnType("integer") + .HasColumnName("id_user") + .HasComment("Пользователь САУБ"); + + b.Property("Mode") + .HasColumnType("smallint") + .HasColumnName("mode") + .HasComment("Режим САУБ"); + + b.Property("Mse") + .HasColumnType("real") + .HasColumnName("mse") + .HasComment("MSE"); + + b.Property("MseState") + .HasColumnType("smallint") + .HasColumnName("mse_state") + .HasComment("Текущее состояние работы MSE"); + + b.Property("Pressure") + .HasColumnType("real") + .HasColumnName("pressure") + .HasComment("Давление"); + + b.Property("PressureDeltaLimitMax") + .HasColumnType("real") + .HasColumnName("pressure_delta_limit_max") + .HasComment("Давление дифф. Аварийное макс."); + + b.Property("PressureIdle") + .HasColumnType("real") + .HasColumnName("pressure_idle") + .HasComment("Давление. Холостой ход"); + + b.Property("PressureSp") + .HasColumnType("real") + .HasColumnName("pressure_sp") + .HasComment("Давление. Задание"); + + b.Property("PressureSpDevelop") + .HasColumnType("real") + .HasColumnName("pressure_sp_develop") + .HasComment("Давление. Задание для проработки"); + + b.Property("PressureSpRotor") + .HasColumnType("real") + .HasColumnName("pressure_sp_rotor") + .HasComment("Давление. Задание для роторного бурения"); + + b.Property("PressureSpSlide") + .HasColumnType("real") + .HasColumnName("pressure_sp_slide") + .HasComment("Давление. Задание для режима слайда"); + + b.Property("Pump0Flow") + .HasColumnType("real") + .HasColumnName("pump0_flow") + .HasComment("Расход. Буровой насос 1"); + + b.Property("Pump1Flow") + .HasColumnType("real") + .HasColumnName("pump1_flow") + .HasComment("Расход. Буровой насос 2"); + + b.Property("Pump2Flow") + .HasColumnType("real") + .HasColumnName("pump2_flow") + .HasComment("Расход. Буровой насос 3"); + + b.Property("RotorSpeed") + .HasColumnType("real") + .HasColumnName("rotor_speed") + .HasComment("Обороты ротора"); + + b.Property("RotorTorque") + .HasColumnType("real") + .HasColumnName("rotor_torque") + .HasComment("Момент на роторе"); + + b.Property("RotorTorqueIdle") + .HasColumnType("real") + .HasColumnName("rotor_torque_idle") + .HasComment("Момент на роторе. Холостой ход"); + + b.Property("RotorTorqueLimitMax") + .HasColumnType("real") + .HasColumnName("rotor_torque_limit_max") + .HasComment("Момент на роторе. Аварийный макс."); + + b.Property("RotorTorqueSp") + .HasColumnType("real") + .HasColumnName("rotor_torque_sp") + .HasComment("Момент на роторе. Задание"); + + b.Property("WellDepth") + .HasColumnType("real") + .HasColumnName("well_depth") + .HasComment("Глубина забоя"); + + b.HasKey("IdTelemetry", "DateTime"); + + b.ToTable("t_telemetry_data_saub"); + + b.HasComment("набор основных данных по SAUB"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.TelemetryDataSaubStat", b => + { + b.Property("Count") + .HasColumnType("bigint") + .HasColumnName("count_items"); + + b.Property("DateMax") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_max"); + + b.Property("DateMin") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_min"); + + b.Property("DepthMax") + .HasColumnType("real") + .HasColumnName("depth_max"); + + b.Property("DepthMin") + .HasColumnType("real") + .HasColumnName("depth_min"); + + b.Property("IdTelemetry") + .HasColumnType("integer") + .HasColumnName("id_telemetry"); + + b.ToView("mw_telemetry_datas_saub_stat"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.TelemetryDataSpin", b => + { + b.Property("IdTelemetry") + .HasColumnType("integer") + .HasColumnName("id_telemetry"); + + b.Property("DateTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("date") + .HasComment("'2021-10-19 18:23:54+05'"); + + b.Property("Mode") + .HasColumnType("smallint") + .HasColumnName("mode") + .HasComment("Выбранный режим управления"); + + b.Property("PositionRight") + .HasColumnType("real") + .HasColumnName("position_right") + .HasComment("Крайний правый угол осцилляции"); + + b.Property("PositionZero") + .HasColumnType("real") + .HasColumnName("position_zero") + .HasComment("Нулевая позиция осцилляции"); + + b.Property("RevolsLeftLimit") + .HasColumnType("real") + .HasColumnName("revols_left_limit") + .HasComment("Ограничение числа оборотов влево"); + + b.Property("RevolsLeftTotal") + .HasColumnType("real") + .HasColumnName("revols_left_total") + .HasComment("Суммарное количество оборотов влево"); + + b.Property("RevolsRightLimit") + .HasColumnType("real") + .HasColumnName("revols_right_limit") + .HasComment("Ограничение числа оборотов вправо"); + + b.Property("RevolsRightTotal") + .HasColumnType("real") + .HasColumnName("revols_right_total") + .HasComment("Суммарное количество оборотов вправо"); + + b.Property("SpeedLeftSp") + .HasColumnType("real") + .HasColumnName("speed_left_sp") + .HasComment("Заданная скорость вращения влево"); + + b.Property("SpeedRightSp") + .HasColumnType("real") + .HasColumnName("speed_right_sp") + .HasComment("Заданная скорость вращения вправо"); + + b.Property("State") + .HasColumnType("smallint") + .HasColumnName("state") + .HasComment("Переменная этапа"); + + b.HasKey("IdTelemetry", "DateTime"); + + b.ToTable("t_telemetry_data_spin"); + + b.HasComment("набор основных данных по SpinMaster"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.TelemetryEvent", b => + { + b.Property("IdTelemetry") + .HasColumnType("integer") + .HasColumnName("id_telemetry"); + + b.Property("IdEvent") + .HasColumnType("integer") + .HasColumnName("id_event"); + + b.Property("IdCategory") + .HasColumnType("integer") + .HasColumnName("id_category"); + + b.Property("MessageTemplate") + .IsRequired() + .HasColumnType("text") + .HasColumnName("message_template"); + + b.HasKey("IdTelemetry", "IdEvent"); + + b.ToTable("t_telemetry_event"); + + b.HasComment("Справочник событий. События формируют сообщения. Разделено по версиям посылок от телеметрии."); + }); + + modelBuilder.Entity("AsbCloudDb.Model.TelemetryMessage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Arg0") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("arg0") + .HasComment("Аргумент №0 для вставки в шаблон сообщения"); + + b.Property("Arg1") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("arg1"); + + b.Property("Arg2") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("arg2"); + + b.Property("Arg3") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("arg3"); + + b.Property("DateTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("date"); + + b.Property("IdEvent") + .HasColumnType("integer") + .HasColumnName("id_event"); + + b.Property("IdTelemetry") + .HasColumnType("integer") + .HasColumnName("id_telemetry"); + + b.Property("IdTelemetryUser") + .HasColumnType("integer") + .HasColumnName("id_telemetry_user") + .HasComment("Пользователь панели отправляющей телеметрию. не пользователь облака."); + + b.Property("WellDepth") + .HasColumnType("double precision") + .HasColumnName("well_depth"); + + b.HasKey("Id"); + + b.HasIndex("IdTelemetry"); + + b.ToTable("t_telemetry_message"); + + b.HasComment("Сообщения на буровых"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.TelemetryUser", b => + { + b.Property("IdTelemetry") + .HasColumnType("integer") + .HasColumnName("id_telemetry"); + + b.Property("IdUser") + .HasColumnType("integer") + .HasColumnName("id_user"); + + b.Property("Level") + .HasColumnType("integer") + .HasColumnName("level"); + + b.Property("Name") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("name"); + + b.Property("Patronymic") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("patronymic"); + + b.Property("Surname") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("surname"); + + b.HasKey("IdTelemetry", "IdUser"); + + b.ToTable("t_telemetry_user"); + + b.HasComment("Пользователи панели САУБ. Для сообщений."); + }); + + modelBuilder.Entity("AsbCloudDb.Model.TelemetryWirelineRunOut", b => + { + b.Property("IdTelemetry") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id_telemetry") + .HasComment("Идентификатор телеметрии"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("IdTelemetry")); + + b.Property("DateTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_time") + .HasComment("Отметка времени"); + + b.Property("Hauling") + .HasColumnType("real") + .HasColumnName("hauling") + .HasComment("Наработка талевого каната с момента перетяжки каната, т*км"); + + b.Property("HaulingWarnSp") + .HasColumnType("real") + .HasColumnName("hauling_warn_sp") + .HasComment("Наработка талевого каната до сигнализации о необходимости перетяжки, т*км"); + + b.Property("Replace") + .HasColumnType("real") + .HasColumnName("replace") + .HasComment("Наработка талевого каната с момента замены каната, т*км"); + + b.Property("ReplaceWarnSp") + .HasColumnType("real") + .HasColumnName("replace_warn_sp") + .HasComment("Наработка талевого каната до сигнализации о необходимости замены, т*км"); + + b.HasKey("IdTelemetry"); + + b.ToTable("t_telemetry_wireline_run_out"); + + b.HasComment("Наработка талевого каната"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.Trajectory.TrajectoryFact", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("AzimuthGeo") + .HasColumnType("double precision") + .HasColumnName("azimuth_geo") + .HasComment("Азимут Географ."); + + b.Property("AzimuthMagnetic") + .HasColumnType("double precision") + .HasColumnName("azimuth_magnetic") + .HasComment("Азимут Магнитный"); + + b.Property("Comment") + .HasColumnType("text") + .HasColumnName("comment") + .HasComment("Комментарии"); + + b.Property("IdUser") + .HasColumnType("integer") + .HasColumnName("id_user") + .HasComment("ID пользователя который внес/изменил запись"); + + b.Property("IdWell") + .HasColumnType("integer") + .HasColumnName("id_well") + .HasComment("ID скважины"); + + b.Property("UpdateDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("update_date") + .HasComment("Дата загрузки траектории"); + + b.Property("VerticalDepth") + .HasColumnType("double precision") + .HasColumnName("vertical_depth") + .HasComment("Глубина вертикальная"); + + b.Property("WellboreDepth") + .HasColumnType("double precision") + .HasColumnName("wellbore_depth") + .HasComment("Глубина по стволу"); + + b.Property("ZenithAngle") + .HasColumnType("double precision") + .HasColumnName("zenith_angle") + .HasComment("Угол зенитный"); + + b.HasKey("Id"); + + b.HasIndex("IdUser"); + + b.HasIndex("IdWell"); + + b.ToTable("t_trajectory_fact"); + + b.HasComment("Загрузка фактической траектории"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.Trajectory.TrajectoryPlan", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("AzimuthGeo") + .HasColumnType("double precision") + .HasColumnName("azimuth_geo") + .HasComment("Азимут Географ."); + + b.Property("AzimuthMagnetic") + .HasColumnType("double precision") + .HasColumnName("azimuth_magnetic") + .HasComment("Азимут Магнитный"); + + b.Property("Comment") + .HasColumnType("text") + .HasColumnName("comment") + .HasComment("Комментарии"); + + b.Property("IdUser") + .HasColumnType("integer") + .HasColumnName("id_user") + .HasComment("ID пользователя который внес/изменил запись"); + + b.Property("IdWell") + .HasColumnType("integer") + .HasColumnName("id_well") + .HasComment("ID скважины"); + + b.Property("Radius") + .HasColumnType("double precision") + .HasColumnName("radius") + .HasComment("Радиус цели"); + + b.Property("UpdateDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("update_date") + .HasComment("Дата загрузки траектории"); + + b.Property("VerticalDepth") + .HasColumnType("double precision") + .HasColumnName("vertical_depth") + .HasComment("Глубина вертикальная"); + + b.Property("WellboreDepth") + .HasColumnType("double precision") + .HasColumnName("wellbore_depth") + .HasComment("Глубина по стволу"); + + b.Property("ZenithAngle") + .HasColumnType("double precision") + .HasColumnName("zenith_angle") + .HasComment("Угол зенитный"); + + b.HasKey("Id"); + + b.HasIndex("IdUser"); + + b.HasIndex("IdWell"); + + b.ToTable("t_trajectory_plan"); + + b.HasComment("Загрузка плановой траектории"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.User", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Email") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("email") + .HasComment("должность"); + + b.Property("IdCompany") + .HasColumnType("integer") + .HasColumnName("id_company"); + + b.Property("IdState") + .HasColumnType("smallint") + .HasColumnName("state") + .HasComment("состояние:\n0 - не активен, \n1 - активен, \n2 - заблокирован"); + + b.Property("Login") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("login"); + + b.Property("Name") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("name") + .HasComment("имя"); + + b.Property("PasswordHash") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("password_hash") + .HasComment("соленый хэш пароля.\nпервые 5 символов - соль"); + + b.Property("Patronymic") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("patronymic") + .HasComment("отчество"); + + b.Property("Phone") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("phone") + .HasComment("номер телефона"); + + b.Property("Position") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("position") + .HasComment("email"); + + b.Property("Surname") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("surname") + .HasComment("фамилия"); + + b.HasKey("Id"); + + b.HasIndex("IdCompany"); + + b.HasIndex("Login") + .IsUnique(); + + b.ToTable("t_user"); + + b.HasComment("Пользователи облака"); + + b.HasData( + new + { + Id = 1, + Email = "", + IdCompany = 1, + IdState = (short)1, + Login = "dev", + Name = "Разработчик", + PasswordHash = "Vlcj|4fa529103dde7ff72cfe76185f344d4aa87931f8e1b2044e8a7739947c3d18923464eaad93843e4f809c5e126d013072" + }); + }); + + modelBuilder.Entity("AsbCloudDb.Model.UserRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Caption") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("caption") + .HasComment("Название"); + + b.Property("IdType") + .HasColumnType("integer") + .HasColumnName("id_type") + .HasComment("0-роль из стандартной матрицы, \n1-специальная роль для какого-либо пользователя"); + + b.HasKey("Id"); + + b.ToTable("t_user_role"); + + b.HasComment("Роли пользователей в системе"); + + b.HasData( + new + { + Id = 1, + Caption = "root", + IdType = 1 + }, + new + { + Id = 1100, + Caption = "admin_cluster.view", + IdType = 1 + }, + new + { + Id = 1101, + Caption = "admin_cluster.edit", + IdType = 1 + }, + new + { + Id = 1102, + Caption = "admin_company.view", + IdType = 1 + }, + new + { + Id = 1103, + Caption = "admin_company.edit", + IdType = 1 + }, + new + { + Id = 1104, + Caption = "admin_company_type.view", + IdType = 1 + }, + new + { + Id = 1105, + Caption = "admin_company_type.edit", + IdType = 1 + }, + new + { + Id = 1106, + Caption = "admin_deposit.view", + IdType = 1 + }, + new + { + Id = 1107, + Caption = "admin_deposit.edit", + IdType = 1 + }, + new + { + Id = 1108, + Caption = "admin_permission.view", + IdType = 1 + }, + new + { + Id = 1109, + Caption = "admin_permission.edit", + IdType = 1 + }, + new + { + Id = 1110, + Caption = "admin_role.view", + IdType = 1 + }, + new + { + Id = 1111, + Caption = "admin_role.edit", + IdType = 1 + }, + new + { + Id = 1112, + Caption = "admin_telemetry.view", + IdType = 1 + }, + new + { + Id = 1113, + Caption = "admin_user.view", + IdType = 1 + }, + new + { + Id = 1114, + Caption = "admin_user.edit", + IdType = 1 + }, + new + { + Id = 1115, + Caption = "admin_visit_log.view", + IdType = 1 + }, + new + { + Id = 1116, + Caption = "admin_well.view", + IdType = 1 + }, + new + { + Id = 1117, + Caption = "admin_well.edit", + IdType = 1 + }, + new + { + Id = 1200, + Caption = "archive.view", + IdType = 1 + }, + new + { + Id = 1201, + Caption = "cluster.view", + IdType = 1 + }, + new + { + Id = 1202, + Caption = "composite.view", + IdType = 1 + }, + new + { + Id = 1203, + Caption = "composite.edit", + IdType = 1 + }, + new + { + Id = 1204, + Caption = "deposit.view", + IdType = 1 + }, + new + { + Id = 1205, + Caption = "document.view", + IdType = 1 + }, + new + { + Id = 1206, + Caption = "drillProcessFlow.view", + IdType = 1 + }, + new + { + Id = 1207, + Caption = "drillProcessFlow.edit", + IdType = 1 + }, + new + { + Id = 1208, + Caption = "measure.view", + IdType = 1 + }, + new + { + Id = 1209, + Caption = "measure.edit", + IdType = 1 + }, + new + { + Id = 1210, + Caption = "message.view", + IdType = 1 + }, + new + { + Id = 1211, + Caption = "operations.view", + IdType = 1 + }, + new + { + Id = 1212, + Caption = "operations.edit", + IdType = 1 + }, + new + { + Id = 1213, + Caption = "params.view", + IdType = 1 + }, + new + { + Id = 1214, + Caption = "params.edit", + IdType = 1 + }, + new + { + Id = 1215, + Caption = "report.view", + IdType = 1 + }, + new + { + Id = 1216, + Caption = "report.edit", + IdType = 1 + }, + new + { + Id = 1217, + Caption = "setpoints.view", + IdType = 1 + }, + new + { + Id = 1218, + Caption = "setpoints.edit", + IdType = 1 + }, + new + { + Id = 1219, + Caption = "telemetry.view", + IdType = 1 + }, + new + { + Id = 1220, + Caption = "telemetryAnalysis.view", + IdType = 1 + }, + new + { + Id = 1221, + Caption = "well.view", + IdType = 1 + }, + new + { + Id = 1500, + Caption = "Просмотр всего", + IdType = 1 + }, + new + { + Id = 1501, + Caption = "file.edit", + IdType = 1 + }, + new + { + Id = 1502, + Caption = "drillingProgram.edit", + IdType = 1 + }, + new + { + Id = 2000, + Caption = "Заказчик", + IdType = 0 + }, + new + { + Id = 2001, + Caption = "Супервайзер", + IdType = 0 + }, + new + { + Id = 2002, + Caption = "Буровой подрядчик", + IdType = 0 + }, + new + { + Id = 2003, + Caption = "Растворщик", + IdType = 0 + }, + new + { + Id = 2004, + Caption = "Телеметрист", + IdType = 0 + }, + new + { + Id = 2005, + Caption = "Долотный сервис", + IdType = 0 + }, + new + { + Id = 2006, + Caption = "ГТИ", + IdType = 0 + }, + new + { + Id = 2007, + Caption = "Цементирование", + IdType = 0 + }); + }); + + modelBuilder.Entity("AsbCloudDb.Model.UserSetting", b => + { + b.Property("IdUser") + .HasColumnType("integer") + .HasColumnName("id_user"); + + b.Property("Key") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("key") + .HasComment("Ключ настроек пользователя"); + + b.Property("Value") + .HasColumnType("jsonb") + .HasColumnName("setting_value") + .HasComment("Значение настроек пользователя"); + + b.HasKey("IdUser", "Key"); + + b.ToTable("t_user_settings"); + + b.HasComment("настройки интерфейса пользователя"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.Well", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Caption") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("caption"); + + b.Property("IdCluster") + .HasColumnType("integer") + .HasColumnName("id_cluster"); + + b.Property("IdState") + .HasColumnType("integer") + .HasColumnName("state") + .HasComment("0 - неизвестно, 1 - в работе, 2 - завершена"); + + b.Property("IdTelemetry") + .HasColumnType("integer") + .HasColumnName("id_telemetry"); + + b.Property("IdWellType") + .HasColumnType("integer") + .HasColumnName("id_well_type"); + + b.Property("Latitude") + .HasColumnType("double precision") + .HasColumnName("latitude"); + + b.Property("Longitude") + .HasColumnType("double precision") + .HasColumnName("longitude"); + + b.Property("Timezone") + .IsRequired() + .HasColumnType("jsonb") + .HasColumnName("timezone") + .HasComment("Смещение часового пояса от UTC"); + + b.HasKey("Id"); + + b.HasIndex("IdCluster"); + + b.HasIndex("IdTelemetry") + .IsUnique(); + + b.HasIndex("IdWellType"); + + b.ToTable("t_well"); + + b.HasComment("скважины"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.WellComposite", b => + { + b.Property("IdWell") + .HasColumnType("integer") + .HasColumnName("id_well") + .HasComment("Id скважины получателя"); + + b.Property("IdWellSrc") + .HasColumnType("integer") + .HasColumnName("id_well_src") + .HasComment("Id скважины композита"); + + b.Property("IdWellSectionType") + .HasColumnType("integer") + .HasColumnName("id_well_section_type") + .HasComment("Id тип секции композита"); + + b.HasKey("IdWell", "IdWellSrc", "IdWellSectionType"); + + b.HasIndex("IdWellSectionType"); + + b.HasIndex("IdWellSrc"); + + b.ToTable("t_well_composite"); + + b.HasComment("Композитная скважина"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.WellFinalDocument", b => + { + b.Property("IdWell") + .HasColumnType("integer") + .HasColumnName("id_well"); + + b.Property("IdUser") + .HasColumnType("integer") + .HasColumnName("id_user"); + + b.Property("IdCategory") + .HasColumnType("integer") + .HasColumnName("id_category"); + + b.HasKey("IdWell", "IdUser", "IdCategory") + .HasName("t_well_final_documents_pk"); + + b.HasIndex("IdCategory"); + + b.HasIndex("IdUser"); + + b.ToTable("t_well_final_documents"); + + b.HasComment("Дело скважины"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.WellOperation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("CategoryInfo") + .HasColumnType("text") + .HasColumnName("category_info") + .HasComment("Доп. информация к выбраной категории"); + + b.Property("Comment") + .HasColumnType("text") + .HasColumnName("comment") + .HasComment("Комментарий"); + + b.Property("DateStart") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_start") + .HasComment("Дата начала операции"); + + b.Property("DepthEnd") + .HasColumnType("double precision") + .HasColumnName("depth_end") + .HasComment("Глубина после завершения операции, м"); + + b.Property("DepthStart") + .HasColumnType("double precision") + .HasColumnName("depth_start") + .HasComment("Глубина на начало операции, м"); + + b.Property("DurationHours") + .HasColumnType("double precision") + .HasColumnName("duration_hours") + .HasComment("Продолжительность, часы"); + + b.Property("IdCategory") + .HasColumnType("integer") + .HasColumnName("id_category") + .HasComment("Id категории операции"); + + b.Property("IdPlan") + .HasColumnType("integer") + .HasColumnName("id_plan") + .HasComment("Id плановой операции"); + + b.Property("IdType") + .HasColumnType("integer") + .HasColumnName("id_type") + .HasComment("0 = План или 1 = Факт"); + + b.Property("IdUser") + .HasColumnType("integer"); + + b.Property("IdWell") + .HasColumnType("integer") + .HasColumnName("id_well") + .HasComment("Id скважины"); + + b.Property("IdWellSectionType") + .HasColumnType("integer") + .HasColumnName("id_well_section_type") + .HasComment("Id тип секции скважины"); + + b.Property("LastUpdateDate") + .HasColumnType("timestamp with time zone"); + + b.HasKey("Id"); + + b.HasIndex("DateStart"); + + b.HasIndex("DepthEnd"); + + b.HasIndex("IdCategory"); + + b.HasIndex("IdPlan"); + + b.HasIndex("IdWell"); + + b.HasIndex("IdWellSectionType"); + + b.ToTable("t_well_operation"); + + b.HasComment("Данные по операциям на скважине"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.WellOperationCategory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("IdParent") + .HasColumnType("integer") + .HasColumnName("id_parent") + .HasComment("id родительской категории"); + + b.Property("KeyValueName") + .HasMaxLength(32) + .HasColumnType("character varying(32)") + .HasColumnName("key_value_name") + .HasComment("Название ключевого показателя операции"); + + b.Property("KeyValueUnits") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("key_value_units") + .HasComment("Единицы измерения ключевого показателя операции"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text") + .HasColumnName("name") + .HasComment("Название категории операции"); + + b.HasKey("Id"); + + b.HasIndex("IdParent"); + + b.ToTable("t_well_operation_category"); + + b.HasComment("Справочник операций на скважине"); + + b.HasData( + new + { + Id = 3000, + KeyValueName = "dT", + KeyValueUnits = "м/ч", + Name = "БУРЕНИЕ" + }, + new + { + Id = 3001, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "СПО" + }, + new + { + Id = 3002, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "КРЕПЛЕНИЕ" + }, + new + { + Id = 3003, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "ГФР" + }, + new + { + Id = 3004, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Вспомогательные операции" + }, + new + { + Id = 3005, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Непроизводительное время (НПВ)" + }, + new + { + Id = 4000, + IdParent = 3000, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "КНБК" + }, + new + { + Id = 4001, + IdParent = 3000, + KeyValueName = "dT", + KeyValueUnits = "м/ч", + Name = "Механическое. бурение" + }, + new + { + Id = 4002, + IdParent = 3000, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Статический замер" + }, + new + { + Id = 4003, + IdParent = 3000, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Нормализация диаметра скважины" + }, + new + { + Id = 4004, + IdParent = 3000, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Наращивание" + }, + new + { + Id = 4005, + IdParent = 3001, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "СПО" + }, + new + { + Id = 4006, + IdParent = 3002, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Спуск обсадной колонны" + }, + new + { + Id = 4018, + IdParent = 3002, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Крепление" + }, + new + { + Id = 4007, + IdParent = 3002, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Цементирование" + }, + new + { + Id = 4008, + IdParent = 3002, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Вспомогательные работы при креплении" + }, + new + { + Id = 4009, + IdParent = 3003, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Сборка/разборка приборов ГИС" + }, + new + { + Id = 4010, + IdParent = 3003, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "СПО" + }, + new + { + Id = 4011, + IdParent = 3003, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "ГИС" + }, + new + { + Id = 4012, + IdParent = 3004, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Промывка, ОБР" + }, + new + { + Id = 4013, + IdParent = 3004, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Вспомогательные работы" + }, + new + { + Id = 4014, + IdParent = 3005, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Ремонт оборудования" + }, + new + { + Id = 4015, + IdParent = 3005, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Аварийные работы" + }, + new + { + Id = 4016, + IdParent = 3005, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Осложнение" + }, + new + { + Id = 4017, + IdParent = 3005, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Незаложенные в ГГД операции" + }, + new + { + Id = 5000, + IdParent = 4000, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Разборка КНБК" + }, + new + { + Id = 5001, + IdParent = 4000, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Сборка КНБК" + }, + new + { + Id = 5002, + IdParent = 4001, + KeyValueName = "МСП", + KeyValueUnits = "м/ч", + Name = "Бурение слайдом" + }, + new + { + Id = 5003, + IdParent = 4001, + KeyValueName = "МСП", + KeyValueUnits = "м/ч", + Name = "Бурение ротором" + }, + new + { + Id = 5004, + IdParent = 4002, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Замер ЗТС (запись MWD)" + }, + new + { + Id = 5005, + IdParent = 4003, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Промывка перед наращиванием" + }, + new + { + Id = 5006, + IdParent = 4003, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Проработка во время бурения" + }, + new + { + Id = 5007, + IdParent = 4003, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Проработка перед наращиванием" + }, + new + { + Id = 5008, + IdParent = 4003, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Шаблонировка во время бурения" + }, + new + { + Id = 5009, + IdParent = 4003, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Шаблонировка перед наращиванием" + }, + new + { + Id = 5010, + IdParent = 4004, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Наращивание" + }, + new + { + Id = 5011, + IdParent = 4004, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Удержание в клиньях" + }, + new + { + Id = 5012, + IdParent = 4005, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Подъем инструмента" + }, + new + { + Id = 5013, + IdParent = 4005, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Подъем КНБК" + }, + new + { + Id = 5014, + IdParent = 4005, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Спуск инструмента" + }, + new + { + Id = 5015, + IdParent = 4005, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Спуск КНБК" + }, + new + { + Id = 5016, + IdParent = 4006, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Промывка при спуске ОК" + }, + new + { + Id = 5017, + IdParent = 4006, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Спуск ОК" + }, + new + { + Id = 5018, + IdParent = 4007, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "ОЗЦ" + }, + new + { + Id = 5019, + IdParent = 4007, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Цементирование" + }, + new + { + Id = 5020, + IdParent = 4008, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Опрессовка БИ" + }, + new + { + Id = 5021, + IdParent = 4008, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Опрессовка ОК" + }, + new + { + Id = 5022, + IdParent = 4008, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "ПЗР при спуске ОК" + }, + new + { + Id = 5023, + IdParent = 4008, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "ПЗР при цементировании" + }, + new + { + Id = 5024, + IdParent = 4009, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Разборка комплекса приборов ГИС" + }, + new + { + Id = 5025, + IdParent = 4009, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Сборка комплекса приборов ГИС" + }, + new + { + Id = 5026, + IdParent = 4010, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Подъем приборов ГИС (на трубах)" + }, + new + { + Id = 5027, + IdParent = 4010, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Спуск приборов ГИС (на трубах)" + }, + new + { + Id = 5028, + IdParent = 4011, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Комплекс ГИС на жестком кабеле" + }, + new + { + Id = 5029, + IdParent = 4011, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Комплекс ГИС на кабеле" + }, + new + { + Id = 5030, + IdParent = 4011, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Комплекс ГИС на трубах" + }, + new + { + Id = 5031, + IdParent = 4012, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Закачка/прокачка пачки" + }, + new + { + Id = 5032, + IdParent = 4012, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Обработка БР" + }, + new + { + Id = 5033, + IdParent = 4012, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Ориентирование ТС при бурении" + }, + new + { + Id = 5034, + IdParent = 4012, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Перезапись гаммы-каротажа" + }, + new + { + Id = 5035, + IdParent = 4012, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Приготовление БР" + }, + new + { + Id = 5036, + IdParent = 4012, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Промывка" + }, + new + { + Id = 5037, + IdParent = 4012, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Разбуривание тех.оснастки" + }, + new + { + Id = 5038, + IdParent = 4012, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Спуск инструмента с проработкой" + }, + new + { + Id = 5039, + IdParent = 4013, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "ВМР" + }, + new + { + Id = 5040, + IdParent = 4013, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Демонтаж ПВО" + }, + new + { + Id = 5041, + IdParent = 4013, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Долив затруба при подъёме" + }, + new + { + Id = 5042, + IdParent = 4013, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Монтаж ПВО" + }, + new + { + Id = 5043, + IdParent = 4013, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Наработка жёлоба" + }, + new + { + Id = 5044, + IdParent = 4013, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Обвязка устья с циркуляционной системой" + }, + new + { + Id = 5045, + IdParent = 4013, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Оборудование устья" + }, + new + { + Id = 5046, + IdParent = 4013, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Опрессовка ПВО" + }, + new + { + Id = 5047, + IdParent = 4013, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Перемонтаж ПВО " + }, + new + { + Id = 5048, + IdParent = 4013, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Перетяжка талевого каната" + }, + new + { + Id = 5049, + IdParent = 4013, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "ПЗР при сборке КНБК" + }, + new + { + Id = 5050, + IdParent = 4013, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Полная замена талевого каната" + }, + new + { + Id = 5051, + IdParent = 4013, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "ПР перед забуркой направления" + }, + new + { + Id = 5052, + IdParent = 4013, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Продувка манифольда" + }, + new + { + Id = 5053, + IdParent = 4013, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Срезка" + }, + new + { + Id = 5054, + IdParent = 4013, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Тайм-дриллинг" + }, + new + { + Id = 5055, + IdParent = 4013, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Тех.отстой" + }, + new + { + Id = 5056, + IdParent = 4013, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Учебная тревога \"Выброс\"" + }, + new + { + Id = 5057, + IdParent = 4013, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Чистка ЦСГО/емкостного блока" + }, + new + { + Id = 5058, + IdParent = 4014, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Ремонт бурового оборудования" + }, + new + { + Id = 5059, + IdParent = 4015, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Ловильные работы" + }, + new + { + Id = 5060, + IdParent = 4015, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Ожидание" + }, + new + { + Id = 5061, + IdParent = 4015, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Определение места прихвата и ЛМ" + }, + new + { + Id = 5062, + IdParent = 4015, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Работа яссом" + }, + new + { + Id = 5063, + IdParent = 4015, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Расхаживание" + }, + new + { + Id = 5064, + IdParent = 4015, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "СПО - колокол" + }, + new + { + Id = 5065, + IdParent = 4015, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "СПО - метчик" + }, + new + { + Id = 5066, + IdParent = 4015, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "СПО - овершот" + }, + new + { + Id = 5067, + IdParent = 4015, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "СПО - труболовка" + }, + new + { + Id = 5068, + IdParent = 4015, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Торпедирование (встряхивание)" + }, + new + { + Id = 5069, + IdParent = 4015, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Торпедирование (отстрел)" + }, + new + { + Id = 5070, + IdParent = 4015, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Установка ванн" + }, + new + { + Id = 5071, + IdParent = 4015, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Фрезеровка" + }, + new + { + Id = 5072, + IdParent = 4016, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Контролируемое ГНВП" + }, + new + { + Id = 5073, + IdParent = 4016, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Поглощение" + }, + new + { + Id = 5074, + IdParent = 4016, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Сальникообразование" + }, + new + { + Id = 5075, + IdParent = 4016, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Утяжеление БР" + }, + new + { + Id = 5076, + IdParent = 4017, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "НПВ / прочее" + }, + new + { + Id = 5077, + IdParent = 4017, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Обработка раствора (несоответствие параметров)" + }, + new + { + Id = 5078, + IdParent = 4017, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "подъем ОК" + }, + new + { + Id = 5079, + IdParent = 4017, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Ревизия КНБК/инструмента/ЗТС" + }, + new + { + Id = 5082, + IdParent = 4000, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Сборка устройства ориентирования КО" + }, + new + { + Id = 5083, + IdParent = 4003, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Проработка принудительная" + }, + new + { + Id = 5084, + IdParent = 4005, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Шаблонировка подъем БИ, продувка" + }, + new + { + Id = 5085, + IdParent = 4005, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Спуск бурильного инструмента со сборкой с мостков" + }, + new + { + Id = 5086, + IdParent = 4005, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Подъем БИ с выбросом на мостки" + }, + new + { + Id = 5087, + IdParent = 4005, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Спуск БИ со сборкой с мостков" + }, + new + { + Id = 5088, + IdParent = 4005, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Сборка и спуск ТБТ" + }, + new + { + Id = 5089, + IdParent = 4005, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Спуск КО на транспотрной колонне" + }, + new + { + Id = 5090, + IdParent = 4008, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Отворот допускной трубы" + }, + new + { + Id = 5091, + IdParent = 4008, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Активация подвески, опрессовка" + }, + new + { + Id = 5092, + IdParent = 4008, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Монтаж, опрессовка ФА" + }, + new + { + Id = 5093, + IdParent = 4008, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Сборка хвостовика 114мм (согласно схеме)" + }, + new + { + Id = 5094, + IdParent = 4008, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "ПЗР к спуску УЭЦН" + }, + new + { + Id = 5095, + IdParent = 4008, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Активация подвески (потайной колонны, хвостовика)" + }, + new + { + Id = 5096, + IdParent = 4008, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Шаблонирование перед спуском" + }, + new + { + Id = 5097, + IdParent = 4012, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Промывка - перевод скважины на новый раствор" + }, + new + { + Id = 5098, + IdParent = 4013, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Сборка БИ с мостков на подсвечник" + }, + new + { + Id = 5099, + IdParent = 4013, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Подготовка ствола скважины. Перезапись ГК в интервале установки КО." + }, + new + { + Id = 5100, + IdParent = 4013, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Смена рабочего переводника ВСП" + }, + new + { + Id = 5101, + IdParent = 4014, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Ремонт" + }, + new + { + Id = 5102, + IdParent = 4018, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Спуск пакера" + }, + new + { + Id = 5103, + IdParent = 4011, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Запись гамма-каратожа" + }, + new + { + Id = 5104, + IdParent = 4013, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Шаблонирование спуск БИ" + }, + new + { + Id = 5105, + IdParent = 4018, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Сборка клин-отклонителя" + }, + new + { + Id = 5106, + IdParent = 4018, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Ориентирование и посадка клина-отклонителя" + }, + new + { + Id = 5107, + IdParent = 4018, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Протяжка подъемного патрубка подвески" + }, + new + { + Id = 5108, + IdParent = 4018, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Подъем клина-отклонителя" + }, + new + { + Id = 5109, + IdParent = 4018, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Стыковка стингера с хвостовиком основного ствола" + }, + new + { + Id = 5110, + IdParent = 4018, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Ориентирование и установка стыковочного узла хвостовика" + }, + new + { + Id = 5111, + IdParent = 4001, + KeyValueName = "МСП", + KeyValueUnits = "м/ч", + Name = "Бурение с отбором керна" + }, + new + { + Id = 5112, + IdParent = 4018, + KeyValueName = "dT", + KeyValueUnits = "мин", + Name = "Работа пакером в обсадной колонне" + }); + }); + + modelBuilder.Entity("AsbCloudDb.Model.WellSections.WellSectionPlan", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DepthEnd") + .HasColumnType("double precision") + .HasColumnName("depth_end") + .HasComment("Конечная глубина бурения, м"); + + b.Property("DepthStart") + .HasColumnType("double precision") + .HasColumnName("depth_start") + .HasComment("Начальная глубина бурения, м"); + + b.Property("IdSectionType") + .HasColumnType("integer") + .HasColumnName("id_section_type") + .HasComment("Тип секции"); + + b.Property("IdUser") + .HasColumnType("integer") + .HasColumnName("id_user") + .HasComment("Id пользователя"); + + b.Property("IdWell") + .HasColumnType("integer") + .HasColumnName("id_well") + .HasComment("Id скважины"); + + b.Property("InnerDiameter") + .HasColumnType("double precision") + .HasColumnName("inner_diameter") + .HasComment("Внутренний диаметр"); + + b.Property("LastUpdateDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("date_last_update") + .HasComment("Дата последнего обновления"); + + b.Property("OuterDiameter") + .HasColumnType("double precision") + .HasColumnName("outer_diameter") + .HasComment("Внешний диаметр"); + + b.HasKey("Id"); + + b.HasIndex("IdSectionType"); + + b.HasIndex("IdWell", "IdSectionType") + .IsUnique(); + + b.ToTable("t_well_section_plan"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.WellSectionType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Caption") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("caption") + .HasComment("Название"); + + b.Property("Order") + .HasColumnType("real") + .HasColumnName("order") + .HasComment("Порядок"); + + b.HasKey("Id"); + + b.ToTable("t_well_section_type"); + + b.HasComment("конструкция секции скважины"); + + b.HasData( + new + { + Id = 1, + Caption = "Пилотный ствол", + Order = 4f + }, + new + { + Id = 2, + Caption = "Направление", + Order = 0f + }, + new + { + Id = 3, + Caption = "Кондуктор", + Order = 1f + }, + new + { + Id = 4, + Caption = "Эксплуатационная колонна", + Order = 3f + }, + new + { + Id = 5, + Caption = "Транспортный ствол", + Order = 5f + }, + new + { + Id = 6, + Caption = "Хвостовик", + Order = 6f + }, + new + { + Id = 7, + Caption = "Пилотный ствол 2", + Order = 4.1f + }, + new + { + Id = 8, + Caption = "Направление 2", + Order = 0.1f + }, + new + { + Id = 9, + Caption = "Кондуктор 2", + Order = 1.1f + }, + new + { + Id = 10, + Caption = "Эксплуатационная колонна 2", + Order = 3.1f + }, + new + { + Id = 11, + Caption = "Транспортный ствол 2", + Order = 5.1f + }, + new + { + Id = 12, + Caption = "Хвостовик 2", + Order = 6.1f + }, + new + { + Id = 13, + Caption = "Пилотный ствол 3", + Order = 4.2f + }, + new + { + Id = 14, + Caption = "Направление 3", + Order = 0.2f + }, + new + { + Id = 15, + Caption = "Кондуктор 3", + Order = 1.2f + }, + new + { + Id = 16, + Caption = "Эксплуатационная колонна 3", + Order = 3.2f + }, + new + { + Id = 17, + Caption = "Транспортный ствол 3", + Order = 5.2f + }, + new + { + Id = 18, + Caption = "Хвостовик 3", + Order = 6.2f + }, + new + { + Id = 19, + Caption = "Пилотный ствол 4", + Order = 4.3f + }, + new + { + Id = 20, + Caption = "Направление 4", + Order = 0.3f + }, + new + { + Id = 21, + Caption = "Кондуктор 4", + Order = 1.3f + }, + new + { + Id = 22, + Caption = "Эксплуатационная колонна 4", + Order = 3.3f + }, + new + { + Id = 23, + Caption = "Транспортный ствол 4", + Order = 5.3f + }, + new + { + Id = 24, + Caption = "Хвостовик 4", + Order = 6.3f + }, + new + { + Id = 25, + Caption = "Пилотный ствол 5", + Order = 4.4f + }, + new + { + Id = 26, + Caption = "Направление 5", + Order = 0.4f + }, + new + { + Id = 27, + Caption = "Кондуктор 5", + Order = 1.4f + }, + new + { + Id = 28, + Caption = "Эксплуатационная колонна 5", + Order = 3.4f + }, + new + { + Id = 29, + Caption = "Транспортный ствол 5", + Order = 5.4f + }, + new + { + Id = 30, + Caption = "Хвостовик 5", + Order = 6.4f + }, + new + { + Id = 31, + Caption = "Техническая колонна", + Order = 2f + }, + new + { + Id = 32, + Caption = "Техническая колонна 2", + Order = 2.1f + }, + new + { + Id = 33, + Caption = "Техническая колонна 3", + Order = 2.2f + }, + new + { + Id = 34, + Caption = "Хвостовик 6", + Order = 6.5f + }, + new + { + Id = 35, + Caption = "Хвостовик 7", + Order = 6.6f + }, + new + { + Id = 36, + Caption = "Хвостовик 8", + Order = 6.7f + }, + new + { + Id = 37, + Caption = "Хвостовик 9", + Order = 6.8f + }, + new + { + Id = 38, + Caption = "Хвостовик 10", + Order = 6.9f + }); + }); + + modelBuilder.Entity("AsbCloudDb.Model.WellType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Caption") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("caption") + .HasComment("Название"); + + b.HasKey("Id"); + + b.ToTable("t_well_type"); + + b.HasComment("конструкция скважины"); + + b.HasData( + new + { + Id = 1, + Caption = "Наклонно-направленная" + }, + new + { + Id = 2, + Caption = "Горизонтальная" + }); + }); + + modelBuilder.Entity("AsbCloudDb.Model.WITS.RecordBase", b => + { + b.Property("IdTelemetry") + .HasColumnType("integer") + .HasColumnName("id_telemetry"); + + b.Property("DateTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("date"); + + b.Property("Actcod") + .HasColumnType("smallint") + .HasColumnName("ACTCOD"); + + b.Property("Date") + .HasColumnType("integer") + .HasColumnName("DATE"); + + b.Property("Recid") + .HasColumnType("smallint") + .HasColumnName("RECID"); + + b.Property("Seqid") + .HasColumnType("integer") + .HasColumnName("SEQID"); + + b.Property("Stknum") + .HasColumnType("smallint") + .HasColumnName("STKNUM"); + + b.Property("Time") + .HasColumnType("integer") + .HasColumnName("TIME"); + + b.Property("Wellid") + .HasColumnType("text") + .HasColumnName("WELLID"); + + b.HasKey("IdTelemetry", "DateTime"); + + b.ToTable("t_telemetry_wits_base"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.WITS.Record1", b => + { + b.HasBaseType("AsbCloudDb.Model.WITS.RecordBase"); + + b.Property("Blkpos") + .HasColumnType("real") + .HasColumnName("BLKPOS"); + + b.Property("Chkp") + .HasColumnType("real") + .HasColumnName("CHKP"); + + b.Property("Deptbitm") + .HasColumnType("real") + .HasColumnName("DEPTBITM"); + + b.Property("Deptbitv") + .HasColumnType("real") + .HasColumnName("DEPTBITV"); + + b.Property("Deptmeas") + .HasColumnType("real") + .HasColumnName("DEPTMEAS"); + + b.Property("Deptretm") + .HasColumnType("real") + .HasColumnName("DEPTRETM"); + + b.Property("Deptvert") + .HasColumnType("real") + .HasColumnName("DEPTVERT"); + + b.Property("Gasa") + .HasColumnType("real") + .HasColumnName("GASA"); + + b.Property("Hkla") + .HasColumnType("real") + .HasColumnName("HKLA"); + + b.Property("Hklx") + .HasColumnType("real") + .HasColumnName("HKLX"); + + b.Property("Lagstks") + .HasColumnType("smallint") + .HasColumnName("LAGSTKS"); + + b.Property("Mcia") + .HasColumnType("real") + .HasColumnName("MCIA"); + + b.Property("Mcoa") + .HasColumnType("real") + .HasColumnName("MCOA"); + + b.Property("Mdia") + .HasColumnType("real") + .HasColumnName("MDIA"); + + b.Property("Mdoa") + .HasColumnType("real") + .HasColumnName("MDOA"); + + b.Property("Mfia") + .HasColumnType("real") + .HasColumnName("MFIA"); + + b.Property("Mfoa") + .HasColumnType("real") + .HasColumnName("MFOA"); + + b.Property("Mfop") + .HasColumnType("smallint") + .HasColumnName("MFOP"); + + b.Property("Mtia") + .HasColumnType("real") + .HasColumnName("MTIA"); + + b.Property("Mtoa") + .HasColumnType("real") + .HasColumnName("MTOA"); + + b.Property("Ropa") + .HasColumnType("real") + .HasColumnName("ROPA"); + + b.Property("Rpma") + .HasColumnType("smallint") + .HasColumnName("RPMA"); + + b.Property("Spare1") + .HasColumnType("real") + .HasColumnName("SPARE1"); + + b.Property("Spare2") + .HasColumnType("real") + .HasColumnName("SPARE2"); + + b.Property("Spare3") + .HasColumnType("real") + .HasColumnName("SPARE3"); + + b.Property("Spare4") + .HasColumnType("real") + .HasColumnName("SPARE4"); + + b.Property("Spare5") + .HasColumnType("real") + .HasColumnName("SPARE5"); + + b.Property("Spm1") + .HasColumnType("smallint") + .HasColumnName("SPM1"); + + b.Property("Spm2") + .HasColumnType("smallint") + .HasColumnName("SPM2"); + + b.Property("Spm3") + .HasColumnType("smallint") + .HasColumnName("SPM3"); + + b.Property("Sppa") + .HasColumnType("real") + .HasColumnName("SPPA"); + + b.Property("Stkc") + .HasColumnType("integer") + .HasColumnName("STKC"); + + b.Property("TelemetryId") + .HasColumnType("integer"); + + b.Property("Torqa") + .HasColumnType("real") + .HasColumnName("TORQA"); + + b.Property("Torqx") + .HasColumnType("real") + .HasColumnName("TORQX"); + + b.Property("Tvolact") + .HasColumnType("real") + .HasColumnName("TVOLACT"); + + b.Property("Tvolcact") + .HasColumnType("real") + .HasColumnName("TVOLCACT"); + + b.Property("Woba") + .HasColumnType("real") + .HasColumnName("WOBA"); + + b.Property("Wobx") + .HasColumnType("real") + .HasColumnName("WOBX"); + + b.HasIndex("TelemetryId"); + + b.ToTable("t_telemetry_wits_1"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.WITS.Record50", b => + { + b.HasBaseType("AsbCloudDb.Model.WITS.RecordBase"); + + b.Property("Deptbitm") + .HasColumnType("real") + .HasColumnName("DEPTBITM"); + + b.Property("DeptmeasGdpMc") + .HasColumnType("real") + .HasColumnName("DEPTMEAS_GDP_mc"); + + b.Property("DeptmeasMcrstat") + .HasColumnType("real") + .HasColumnName("DEPTMEAS_MCRSTAT"); + + b.Property("DeptmeasRa33Mc") + .HasColumnType("real") + .HasColumnName("DEPTMEAS_RA33_mc"); + + b.Property("DeptmeasRa33f2Mc") + .HasColumnType("real") + .HasColumnName("DEPTMEAS_RA33F2_mc"); + + b.Property("DeptmeasRa33f4Mc") + .HasColumnType("real") + .HasColumnName("DEPTMEAS_RA33F4_mc"); + + b.Property("DeptmeasRp33Mc") + .HasColumnType("real") + .HasColumnName("DEPTMEAS_RP33_mc"); + + b.Property("DeptmeasRp33f2Mc") + .HasColumnType("real") + .HasColumnName("DEPTMEAS_RP33F2_mc"); + + b.Property("DeptmeasRp33f4Mc") + .HasColumnType("real") + .HasColumnName("DEPTMEAS_RP33F4_mc"); + + b.Property("DeptmeasSlvlMc") + .HasColumnType("real") + .HasColumnName("DEPTMEAS_SLVL_mc"); + + b.Property("GdpMc") + .HasColumnType("real") + .HasColumnName("GDP_mc"); + + b.Property("Mcrstat") + .HasColumnType("real") + .HasColumnName("MCRSTAT"); + + b.Property("Ra33Mc") + .HasColumnType("real") + .HasColumnName("RA33_mc"); + + b.Property("Ra33f2Mc") + .HasColumnType("real") + .HasColumnName("RA33F2_mc"); + + b.Property("Ra33f4Mc") + .HasColumnType("real") + .HasColumnName("RA33F4_mc"); + + b.Property("Rp33Mc") + .HasColumnType("real") + .HasColumnName("RP33_mc"); + + b.Property("Rp33f2Mc") + .HasColumnType("real") + .HasColumnName("RP33F2_mc"); + + b.Property("Rp33f4Mc") + .HasColumnType("real") + .HasColumnName("RP33F4_mc"); + + b.Property("SlvlMc") + .HasColumnType("real") + .HasColumnName("SLVL_mc"); + + b.Property("TelemetryId") + .HasColumnType("integer"); + + b.HasIndex("TelemetryId"); + + b.ToTable("t_telemetry_wits_50"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.WITS.Record60", b => + { + b.HasBaseType("AsbCloudDb.Model.WITS.RecordBase"); + + b.Property("Btot") + .HasColumnType("real") + .HasColumnName("Btot"); + + b.Property("Bx") + .HasColumnType("real") + .HasColumnName("Bx"); + + b.Property("By") + .HasColumnType("real") + .HasColumnName("By"); + + b.Property("Bz") + .HasColumnType("real") + .HasColumnName("Bz"); + + b.Property("Deptbitm") + .HasColumnType("real") + .HasColumnName("DEPTBITM"); + + b.Property("Deptmeas") + .HasColumnType("real") + .HasColumnName("DEPTMEAS"); + + b.Property("Gtot") + .HasColumnType("real") + .HasColumnName("Gtot"); + + b.Property("Gx") + .HasColumnType("real") + .HasColumnName("Gx"); + + b.Property("Gy") + .HasColumnType("real") + .HasColumnName("Gy"); + + b.Property("Gz") + .HasColumnType("real") + .HasColumnName("Gz"); + + b.Property("TelemetryId") + .HasColumnType("integer"); + + b.HasIndex("TelemetryId"); + + b.ToTable("t_telemetry_wits_60"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.WITS.Record61", b => + { + b.HasBaseType("AsbCloudDb.Model.WITS.RecordBase"); + + b.Property("Att06h") + .HasColumnType("real") + .HasColumnName("ATT06H"); + + b.Property("Att06l") + .HasColumnType("real") + .HasColumnName("ATT06L"); + + b.Property("Att10h") + .HasColumnType("real") + .HasColumnName("ATT10H"); + + b.Property("Att10l") + .HasColumnType("real") + .HasColumnName("ATT10L"); + + b.Property("Deptbitm") + .HasColumnType("real") + .HasColumnName("DEPTBITM"); + + b.Property("Deptmeas") + .HasColumnType("real") + .HasColumnName("DEPTMEAS"); + + b.Property("Phl1f1") + .HasColumnType("real") + .HasColumnName("PHL1F1"); + + b.Property("Phl1f2") + .HasColumnType("real") + .HasColumnName("PHL1F2"); + + b.Property("Phl2f1") + .HasColumnType("real") + .HasColumnName("PHL2F1"); + + b.Property("Phl2f2") + .HasColumnType("real") + .HasColumnName("PHL2F2"); + + b.Property("Status") + .HasColumnType("real") + .HasColumnName("Status"); + + b.Property("TelemetryId") + .HasColumnType("integer"); + + b.HasIndex("TelemetryId"); + + b.ToTable("t_telemetry_wits_61"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.WITS.Record7", b => + { + b.HasBaseType("AsbCloudDb.Model.WITS.RecordBase"); + + b.Property("Deptmeas") + .HasColumnType("real") + .HasColumnName("DEPTMEAS"); + + b.Property("Deptsvym") + .HasColumnType("real") + .HasColumnName("DEPTSVYM"); + + b.Property("Deptsvyv") + .HasColumnType("real") + .HasColumnName("DEPTSVYV"); + + b.Property("Passnum") + .HasColumnType("smallint") + .HasColumnName("PASSNUM"); + + b.Property("Spare1") + .HasColumnType("real") + .HasColumnName("SPARE1"); + + b.Property("Spare2") + .HasColumnType("real") + .HasColumnName("SPARE2"); + + b.Property("Spare3") + .HasColumnType("real") + .HasColumnName("SPARE3"); + + b.Property("Spare4") + .HasColumnType("real") + .HasColumnName("SPARE4"); + + b.Property("Spare5") + .HasColumnType("real") + .HasColumnName("SPARE5"); + + b.Property("Svyazc") + .HasColumnType("real") + .HasColumnName("SVYAZC"); + + b.Property("Svyazu") + .HasColumnType("real") + .HasColumnName("SVYAZU"); + + b.Property("Svydls") + .HasColumnType("real") + .HasColumnName("SVYDLS"); + + b.Property("Svyew") + .HasColumnType("real") + .HasColumnName("SVYEW"); + + b.Property("Svygtf") + .HasColumnType("real") + .HasColumnName("SVYGTF"); + + b.Property("Svyinc") + .HasColumnType("real") + .HasColumnName("SVYINC"); + + b.Property("Svymtf") + .HasColumnType("real") + .HasColumnName("SVYMTF"); + + b.Property("Svyns") + .HasColumnType("real") + .HasColumnName("SVYNS"); + + b.Property("Svytype") + .HasColumnType("text") + .HasColumnName("SVYTYPE"); + + b.Property("Svywalk") + .HasColumnType("real") + .HasColumnName("SVYWALK"); + + b.Property("TelemetryId") + .HasColumnType("integer"); + + b.HasIndex("TelemetryId"); + + b.ToTable("t_telemetry_wits_7"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.WITS.Record8", b => + { + b.HasBaseType("AsbCloudDb.Model.WITS.RecordBase"); + + b.Property("Deptbitm") + .HasColumnType("real") + .HasColumnName("DEPTBITM"); + + b.Property("Deptbitv") + .HasColumnType("real") + .HasColumnName("DEPTBITV"); + + b.Property("Deptcalm") + .HasColumnType("real") + .HasColumnName("DEPTCALM"); + + b.Property("Deptcalv") + .HasColumnType("real") + .HasColumnName("DEPTCALV"); + + b.Property("Deptfdm") + .HasColumnType("real") + .HasColumnName("DEPTFDM"); + + b.Property("Deptfdv") + .HasColumnType("real") + .HasColumnName("DEPTFDV"); + + b.Property("Deptgr1m") + .HasColumnType("real") + .HasColumnName("DEPTGR1M"); + + b.Property("Deptgr1v") + .HasColumnType("real") + .HasColumnName("DEPTGR1V"); + + b.Property("Deptgr2m") + .HasColumnType("real") + .HasColumnName("DEPTGR2M"); + + b.Property("Deptgr2v") + .HasColumnType("real") + .HasColumnName("DEPTGR2V"); + + b.Property("Deptmeas") + .HasColumnType("real") + .HasColumnName("DEPTMEAS"); + + b.Property("Deptp1m") + .HasColumnType("real") + .HasColumnName("DEPTP1M"); + + b.Property("Deptp1v") + .HasColumnType("real") + .HasColumnName("DEPTP1V"); + + b.Property("Deptp2m") + .HasColumnType("real") + .HasColumnName("DEPTP2M"); + + b.Property("Deptp2v") + .HasColumnType("real") + .HasColumnName("DEPTP2V"); + + b.Property("Deptrs1m") + .HasColumnType("real") + .HasColumnName("DEPTRS1M"); + + b.Property("Deptrs1v") + .HasColumnType("real") + .HasColumnName("DEPTRS1V"); + + b.Property("Deptrs2m") + .HasColumnType("real") + .HasColumnName("DEPTRS2M"); + + b.Property("Deptrs2v") + .HasColumnType("real") + .HasColumnName("DEPTRS2V"); + + b.Property("Deptvert") + .HasColumnType("real") + .HasColumnName("DEPTVERT"); + + b.Property("Mclp") + .HasColumnType("real") + .HasColumnName("MCLP"); + + b.Property("Mfd") + .HasColumnType("real") + .HasColumnName("MFD"); + + b.Property("Mffp") + .HasColumnType("real") + .HasColumnName("MFFP"); + + b.Property("Mfpp") + .HasColumnType("real") + .HasColumnName("MFPP"); + + b.Property("Mfrann") + .HasColumnType("real") + .HasColumnName("MFRANN"); + + b.Property("Mfrpipe") + .HasColumnType("real") + .HasColumnName("MFRPIPE"); + + b.Property("Mftann") + .HasColumnType("real") + .HasColumnName("MFTANN"); + + b.Property("Mftpipe") + .HasColumnType("real") + .HasColumnName("MFTPIPE"); + + b.Property("Mg1") + .HasColumnType("real") + .HasColumnName("MG1"); + + b.Property("Mg1c") + .HasColumnType("real") + .HasColumnName("MG1C"); + + b.Property("Mg2") + .HasColumnType("real") + .HasColumnName("MG2"); + + b.Property("Mg2c") + .HasColumnType("real") + .HasColumnName("MG2C"); + + b.Property("Mpo1") + .HasColumnType("real") + .HasColumnName("MPO1"); + + b.Property("Mpo2") + .HasColumnType("real") + .HasColumnName("MPO2"); + + b.Property("Mr1") + .HasColumnType("real") + .HasColumnName("MR1"); + + b.Property("Mr1c") + .HasColumnType("real") + .HasColumnName("MR1C"); + + b.Property("Mr2") + .HasColumnType("real") + .HasColumnName("MR2"); + + b.Property("Mr2c") + .HasColumnType("real") + .HasColumnName("MR2C"); + + b.Property("Passnum") + .HasColumnType("smallint") + .HasColumnName("PASSNUM"); + + b.Property("Spare1") + .HasColumnType("real") + .HasColumnName("SPARE1"); + + b.Property("Spare2") + .HasColumnType("real") + .HasColumnName("SPARE2"); + + b.Property("Spare3") + .HasColumnType("real") + .HasColumnName("SPARE3"); + + b.Property("Spare4") + .HasColumnType("real") + .HasColumnName("SPARE4"); + + b.Property("Spare5") + .HasColumnType("real") + .HasColumnName("SPARE5"); + + b.Property("Spare6") + .HasColumnType("real") + .HasColumnName("SPARE6"); + + b.Property("Spare7") + .HasColumnType("real") + .HasColumnName("SPARE7"); + + b.Property("Spare8") + .HasColumnType("real") + .HasColumnName("SPARE8"); + + b.Property("Spare9") + .HasColumnType("real") + .HasColumnName("SPARE9"); + + b.Property("TelemetryId") + .HasColumnType("integer"); + + b.HasIndex("TelemetryId"); + + b.ToTable("t_telemetry_wits_8"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.Cluster", b => + { + b.HasOne("AsbCloudDb.Model.Deposit", "Deposit") + .WithMany("Clusters") + .HasForeignKey("IdDeposit") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("t_cluster_t_deposit_id_fk"); + + b.Navigation("Deposit"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.Company", b => + { + b.HasOne("AsbCloudDb.Model.CompanyType", "CompanyType") + .WithMany("Companies") + .HasForeignKey("IdCompanyType") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CompanyType"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.Contact", b => + { + b.HasOne("AsbCloudDb.Model.CompanyType", "CompanyType") + .WithMany("Contacts") + .HasForeignKey("IdCompanyType") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("AsbCloudDb.Model.Well", "Well") + .WithMany("Contacts") + .HasForeignKey("IdWell") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CompanyType"); + + b.Navigation("Well"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.DailyReports.DailyReport", b => + { + b.HasOne("AsbCloudDb.Model.Well", "Well") + .WithMany() + .HasForeignKey("IdWell") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Well"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.DataSaubStat", b => + { + b.HasOne("AsbCloudDb.Model.WellOperationCategory", "OperationCategory") + .WithMany() + .HasForeignKey("IdCategory") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("AsbCloudDb.Model.Telemetry", "Telemetry") + .WithMany() + .HasForeignKey("IdTelemetry") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("OperationCategory"); + + b.Navigation("Telemetry"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.DetectedOperation", b => + { + b.HasOne("AsbCloudDb.Model.WellOperationCategory", "OperationCategory") + .WithMany() + .HasForeignKey("IdCategory") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("AsbCloudDb.Model.Telemetry", "Telemetry") + .WithMany() + .HasForeignKey("IdTelemetry") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("OperationCategory"); + + b.Navigation("Telemetry"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.DrillingProgramPart", b => + { + b.HasOne("AsbCloudDb.Model.FileCategory", "FileCategory") + .WithMany() + .HasForeignKey("IdFileCategory") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("AsbCloudDb.Model.Well", "Well") + .WithMany("DrillingProgramParts") + .HasForeignKey("IdWell") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("FileCategory"); + + b.Navigation("Well"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.DrillTest", b => + { + b.HasOne("AsbCloudDb.Model.Telemetry", "Telemetry") + .WithMany() + .HasForeignKey("IdTelemetry") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Telemetry"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.Faq", b => + { + b.HasOne("AsbCloudDb.Model.User", "AuthorAnswer") + .WithMany() + .HasForeignKey("IdAuthorAnswer"); + + b.HasOne("AsbCloudDb.Model.User", "AuthorQuestion") + .WithMany() + .HasForeignKey("IdAuthorQuestion") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AuthorAnswer"); + + b.Navigation("AuthorQuestion"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.FileInfo", b => + { + b.HasOne("AsbCloudDb.Model.User", "Author") + .WithMany("Files") + .HasForeignKey("IdAuthor"); + + b.HasOne("AsbCloudDb.Model.FileCategory", "FileCategory") + .WithMany() + .HasForeignKey("IdCategory") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("AsbCloudDb.Model.Well", "Well") + .WithMany() + .HasForeignKey("IdWell") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Author"); + + b.Navigation("FileCategory"); + + b.Navigation("Well"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.FileMark", b => + { + b.HasOne("AsbCloudDb.Model.FileInfo", "FileInfo") + .WithMany("FileMarks") + .HasForeignKey("IdFile") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("t_file_mark_t_file_info_fk"); + + b.HasOne("AsbCloudDb.Model.User", "User") + .WithMany("FileMarks") + .HasForeignKey("IdUser") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("t_user_t_file_mark_fk"); + + b.Navigation("FileInfo"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.GTR.WitsItemFloat", b => + { + b.HasOne("AsbCloudDb.Model.Telemetry", "Telemetry") + .WithMany() + .HasForeignKey("IdTelemetry") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Telemetry"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.GTR.WitsItemInt", b => + { + b.HasOne("AsbCloudDb.Model.Telemetry", "Telemetry") + .WithMany() + .HasForeignKey("IdTelemetry") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Telemetry"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.GTR.WitsItemString", b => + { + b.HasOne("AsbCloudDb.Model.Telemetry", "Telemetry") + .WithMany() + .HasForeignKey("IdTelemetry") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Telemetry"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.HelpPage", b => + { + b.HasOne("AsbCloudDb.Model.FileCategory", "FileCategory") + .WithMany() + .HasForeignKey("IdCategory") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("FileCategory"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.LimitingParameter", b => + { + b.HasOne("AsbCloudDb.Model.Telemetry", "Telemetry") + .WithMany() + .HasForeignKey("IdTelemetry") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Telemetry"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.Manuals.Manual", b => + { + b.HasOne("AsbCloudDb.Model.User", "Author") + .WithMany() + .HasForeignKey("IdAuthor") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("AsbCloudDb.Model.FileCategory", "Category") + .WithMany() + .HasForeignKey("IdCategory") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("AsbCloudDb.Model.Manuals.ManualDirectory", "Directory") + .WithMany("Manuals") + .HasForeignKey("IdDirectory") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Author"); + + b.Navigation("Category"); + + b.Navigation("Directory"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.Manuals.ManualDirectory", b => + { + b.HasOne("AsbCloudDb.Model.Manuals.ManualDirectory", "Parent") + .WithMany("Children") + .HasForeignKey("IdParent") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.Measure", b => + { + b.HasOne("AsbCloudDb.Model.MeasureCategory", "Category") + .WithMany("Measures") + .HasForeignKey("IdCategory") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("AsbCloudDb.Model.Well", "Well") + .WithMany() + .HasForeignKey("IdWell") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Category"); + + b.Navigation("Well"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.Notification", b => + { + b.HasOne("AsbCloudDb.Model.NotificationCategory", "NotificationCategory") + .WithMany("Notifications") + .HasForeignKey("IdNotificationCategory") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("AsbCloudDb.Model.User", "User") + .WithMany() + .HasForeignKey("IdUser") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("NotificationCategory"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.OperationValue", b => + { + b.HasOne("AsbCloudDb.Model.WellOperationCategory", "OperationCategory") + .WithMany() + .HasForeignKey("IdOperationCategory") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("AsbCloudDb.Model.Well", "Well") + .WithMany() + .HasForeignKey("IdWell") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("OperationCategory"); + + b.Navigation("Well"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.ProcessMaps.ProcessMapPlanDrilling", b => + { + b.HasOne("AsbCloudDb.Model.User", "Author") + .WithMany() + .HasForeignKey("IdAuthor") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("AsbCloudDb.Model.User", "Editor") + .WithMany() + .HasForeignKey("IdEditor") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("AsbCloudDb.Model.ProcessMaps.ProcessMapPlanDrilling", "Previous") + .WithMany() + .HasForeignKey("IdPrevious"); + + b.HasOne("AsbCloudDb.Model.Well", "Well") + .WithMany() + .HasForeignKey("IdWell") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("AsbCloudDb.Model.WellSectionType", "WellSectionType") + .WithMany() + .HasForeignKey("IdWellSectionType") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Author"); + + b.Navigation("Editor"); + + b.Navigation("Previous"); + + b.Navigation("Well"); + + b.Navigation("WellSectionType"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.ProcessMaps.ProcessMapWellDrilling", b => + { + b.HasOne("AsbCloudDb.Model.User", "User") + .WithMany() + .HasForeignKey("IdUser") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("AsbCloudDb.Model.Well", "Well") + .WithMany() + .HasForeignKey("IdWell") + .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.ProcessMaps.ProcessMapWellReam", b => + { + b.HasOne("AsbCloudDb.Model.User", "User") + .WithMany() + .HasForeignKey("IdUser") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("AsbCloudDb.Model.Well", "Well") + .WithMany() + .HasForeignKey("IdWell") + .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 => + { + b.HasOne("AsbCloudDb.Model.Company", "Company") + .WithMany("RelationCompaniesWells") + .HasForeignKey("IdCompany") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("t_relation_company_well_t_company_id_fk"); + + b.HasOne("AsbCloudDb.Model.Well", "Well") + .WithMany("RelationCompaniesWells") + .HasForeignKey("IdWell") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("t_relation_company_well_t_well_id_fk"); + + b.Navigation("Company"); + + b.Navigation("Well"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.RelationContactWell", b => + { + b.HasOne("AsbCloudDb.Model.User", "User") + .WithMany("RelationContactsWells") + .HasForeignKey("IdUser") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("AsbCloudDb.Model.Well", "Well") + .WithMany() + .HasForeignKey("IdWell") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + + b.Navigation("Well"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.RelationUserDrillingProgramPart", b => + { + b.HasOne("AsbCloudDb.Model.DrillingProgramPart", "DrillingProgramPart") + .WithMany("RelatedUsers") + .HasForeignKey("IdDrillingProgramPart") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("AsbCloudDb.Model.User", "User") + .WithMany() + .HasForeignKey("IdUser") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DrillingProgramPart"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.RelationUserRolePermission", b => + { + b.HasOne("AsbCloudDb.Model.Permission", "Permission") + .WithMany("RelationUserRolePermissions") + .HasForeignKey("IdPermission") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("AsbCloudDb.Model.UserRole", "UserRole") + .WithMany("RelationUserRolePermissions") + .HasForeignKey("IdUserRole") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Permission"); + + b.Navigation("UserRole"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.RelationUserRoleUserRole", b => + { + b.HasOne("AsbCloudDb.Model.UserRole", "Role") + .WithMany("RelationUserRoleUserRoles") + .HasForeignKey("Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("AsbCloudDb.Model.UserRole", "IncludeRole") + .WithMany() + .HasForeignKey("IdInclude") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("IncludeRole"); + + b.Navigation("Role"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.RelationUserUserRole", b => + { + b.HasOne("AsbCloudDb.Model.User", "User") + .WithMany("RelationUsersUserRoles") + .HasForeignKey("IdUser") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("AsbCloudDb.Model.UserRole", "UserRole") + .WithMany("RelationUsersUserRoles") + .HasForeignKey("IdUserRole") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + + b.Navigation("UserRole"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.ReportProperty", b => + { + b.HasOne("AsbCloudDb.Model.FileInfo", "File") + .WithMany() + .HasForeignKey("IdFile") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("AsbCloudDb.Model.Well", "Well") + .WithMany() + .HasForeignKey("IdWell") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("File"); + + b.Navigation("Well"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.Schedule", b => + { + b.HasOne("AsbCloudDb.Model.Driller", "Driller") + .WithMany("Schedule") + .HasForeignKey("IdDriller") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("t_schedule_t_driller_id_driller"); + + b.HasOne("AsbCloudDb.Model.Well", "Well") + .WithMany() + .HasForeignKey("IdWell") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Driller"); + + b.Navigation("Well"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.SetpointsRequest", b => + { + b.HasOne("AsbCloudDb.Model.User", "Author") + .WithMany() + .HasForeignKey("IdAuthor") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("AsbCloudDb.Model.Well", "Well") + .WithMany() + .HasForeignKey("IdWell") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Author"); + + b.Navigation("Well"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.TelemetryDataSaub", b => + { + b.HasOne("AsbCloudDb.Model.Telemetry", "Telemetry") + .WithMany("DataSaub") + .HasForeignKey("IdTelemetry") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("t_telemetry_data_saub_t_telemetry_id_fk"); + + b.Navigation("Telemetry"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.TelemetryDataSpin", b => + { + b.HasOne("AsbCloudDb.Model.Telemetry", "Telemetry") + .WithMany("DataSpin") + .HasForeignKey("IdTelemetry") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("t_telemetry_data_spin_t_telemetry_id_fk"); + + b.Navigation("Telemetry"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.TelemetryEvent", b => + { + b.HasOne("AsbCloudDb.Model.Telemetry", "Telemetry") + .WithMany("Events") + .HasForeignKey("IdTelemetry") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("t_event_t_telemetry_id_fk"); + + b.Navigation("Telemetry"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.TelemetryMessage", b => + { + b.HasOne("AsbCloudDb.Model.Telemetry", "Telemetry") + .WithMany("Messages") + .HasForeignKey("IdTelemetry") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("t_messages_t_telemetry_id_fk"); + + b.Navigation("Telemetry"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.TelemetryUser", b => + { + b.HasOne("AsbCloudDb.Model.Telemetry", "Telemetry") + .WithMany("Users") + .HasForeignKey("IdTelemetry") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("t_telemetry_user_t_telemetry_id_fk"); + + b.Navigation("Telemetry"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.Trajectory.TrajectoryFact", b => + { + b.HasOne("AsbCloudDb.Model.User", "User") + .WithMany() + .HasForeignKey("IdUser") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("AsbCloudDb.Model.Well", "Well") + .WithMany() + .HasForeignKey("IdWell") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + + b.Navigation("Well"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.Trajectory.TrajectoryPlan", b => + { + b.HasOne("AsbCloudDb.Model.User", "User") + .WithMany() + .HasForeignKey("IdUser") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("AsbCloudDb.Model.Well", "Well") + .WithMany() + .HasForeignKey("IdWell") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + + b.Navigation("Well"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.User", b => + { + b.HasOne("AsbCloudDb.Model.Company", "Company") + .WithMany("Users") + .HasForeignKey("IdCompany") + .OnDelete(DeleteBehavior.SetNull) + .IsRequired() + .HasConstraintName("t_user_t_company_id_fk"); + + b.Navigation("Company"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.UserSetting", b => + { + b.HasOne("AsbCloudDb.Model.User", "User") + .WithMany() + .HasForeignKey("IdUser") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.Well", b => + { + b.HasOne("AsbCloudDb.Model.Cluster", "Cluster") + .WithMany("Wells") + .HasForeignKey("IdCluster") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("t_well_t_cluster_id_fk"); + + b.HasOne("AsbCloudDb.Model.Telemetry", "Telemetry") + .WithOne("Well") + .HasForeignKey("AsbCloudDb.Model.Well", "IdTelemetry") + .OnDelete(DeleteBehavior.SetNull) + .HasConstraintName("t_well_t_telemetry_id_fk"); + + b.HasOne("AsbCloudDb.Model.WellType", "WellType") + .WithMany("Wells") + .HasForeignKey("IdWellType") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Cluster"); + + b.Navigation("Telemetry"); + + b.Navigation("WellType"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.WellComposite", b => + { + b.HasOne("AsbCloudDb.Model.Well", "Well") + .WithMany("WellComposites") + .HasForeignKey("IdWell") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("t_well_сomposite_t_well_id_fk"); + + b.HasOne("AsbCloudDb.Model.WellSectionType", "WellSectionType") + .WithMany("WellComposites") + .HasForeignKey("IdWellSectionType") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("t_well_сomposite_t_well_section_type_id_fk"); + + b.HasOne("AsbCloudDb.Model.Well", "WellSrc") + .WithMany("WellCompositeSrcs") + .HasForeignKey("IdWellSrc") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("t_well_сomposite_src_t_well_id_fk"); + + b.Navigation("Well"); + + b.Navigation("WellSectionType"); + + b.Navigation("WellSrc"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.WellFinalDocument", b => + { + b.HasOne("AsbCloudDb.Model.FileCategory", "Category") + .WithMany() + .HasForeignKey("IdCategory") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("AsbCloudDb.Model.User", "User") + .WithMany() + .HasForeignKey("IdUser") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("AsbCloudDb.Model.Well", "Well") + .WithMany() + .HasForeignKey("IdWell") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Category"); + + b.Navigation("User"); + + b.Navigation("Well"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.WellOperation", b => + { + b.HasOne("AsbCloudDb.Model.WellOperationCategory", "OperationCategory") + .WithMany() + .HasForeignKey("IdCategory") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("AsbCloudDb.Model.WellOperation", "OperationPlan") + .WithMany() + .HasForeignKey("IdPlan") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("AsbCloudDb.Model.Well", "Well") + .WithMany("WellOperations") + .HasForeignKey("IdWell") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("AsbCloudDb.Model.WellSectionType", "WellSectionType") + .WithMany("WellOperations") + .HasForeignKey("IdWellSectionType") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("OperationCategory"); + + b.Navigation("OperationPlan"); + + b.Navigation("Well"); + + b.Navigation("WellSectionType"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.WellOperationCategory", b => + { + b.HasOne("AsbCloudDb.Model.WellOperationCategory", "Parent") + .WithMany() + .HasForeignKey("IdParent"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.WellSections.WellSectionPlan", b => + { + b.HasOne("AsbCloudDb.Model.WellSectionType", "SectionType") + .WithMany() + .HasForeignKey("IdSectionType") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("AsbCloudDb.Model.Well", "Well") + .WithMany() + .HasForeignKey("IdWell") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SectionType"); + + b.Navigation("Well"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.WITS.Record1", b => + { + b.HasOne("AsbCloudDb.Model.Telemetry", "Telemetry") + .WithMany() + .HasForeignKey("TelemetryId"); + + b.HasOne("AsbCloudDb.Model.WITS.RecordBase", null) + .WithOne() + .HasForeignKey("AsbCloudDb.Model.WITS.Record1", "IdTelemetry", "DateTime") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Telemetry"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.WITS.Record50", b => + { + b.HasOne("AsbCloudDb.Model.Telemetry", "Telemetry") + .WithMany() + .HasForeignKey("TelemetryId"); + + b.HasOne("AsbCloudDb.Model.WITS.RecordBase", null) + .WithOne() + .HasForeignKey("AsbCloudDb.Model.WITS.Record50", "IdTelemetry", "DateTime") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Telemetry"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.WITS.Record60", b => + { + b.HasOne("AsbCloudDb.Model.Telemetry", "Telemetry") + .WithMany() + .HasForeignKey("TelemetryId"); + + b.HasOne("AsbCloudDb.Model.WITS.RecordBase", null) + .WithOne() + .HasForeignKey("AsbCloudDb.Model.WITS.Record60", "IdTelemetry", "DateTime") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Telemetry"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.WITS.Record61", b => + { + b.HasOne("AsbCloudDb.Model.Telemetry", "Telemetry") + .WithMany() + .HasForeignKey("TelemetryId"); + + b.HasOne("AsbCloudDb.Model.WITS.RecordBase", null) + .WithOne() + .HasForeignKey("AsbCloudDb.Model.WITS.Record61", "IdTelemetry", "DateTime") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Telemetry"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.WITS.Record7", b => + { + b.HasOne("AsbCloudDb.Model.Telemetry", "Telemetry") + .WithMany() + .HasForeignKey("TelemetryId"); + + b.HasOne("AsbCloudDb.Model.WITS.RecordBase", null) + .WithOne() + .HasForeignKey("AsbCloudDb.Model.WITS.Record7", "IdTelemetry", "DateTime") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Telemetry"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.WITS.Record8", b => + { + b.HasOne("AsbCloudDb.Model.Telemetry", "Telemetry") + .WithMany() + .HasForeignKey("TelemetryId"); + + b.HasOne("AsbCloudDb.Model.WITS.RecordBase", null) + .WithOne() + .HasForeignKey("AsbCloudDb.Model.WITS.Record8", "IdTelemetry", "DateTime") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Telemetry"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.Cluster", b => + { + b.Navigation("Wells"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.Company", b => + { + b.Navigation("RelationCompaniesWells"); + + b.Navigation("Users"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.CompanyType", b => + { + b.Navigation("Companies"); + + b.Navigation("Contacts"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.Deposit", b => + { + b.Navigation("Clusters"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.Driller", b => + { + b.Navigation("Schedule"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.DrillingProgramPart", b => + { + b.Navigation("RelatedUsers"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.FileInfo", b => + { + b.Navigation("FileMarks"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.Manuals.ManualDirectory", b => + { + b.Navigation("Children"); + + b.Navigation("Manuals"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.MeasureCategory", b => + { + b.Navigation("Measures"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.NotificationCategory", b => + { + b.Navigation("Notifications"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.Permission", b => + { + b.Navigation("RelationUserRolePermissions"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.Telemetry", b => + { + b.Navigation("DataSaub"); + + b.Navigation("DataSpin"); + + b.Navigation("Events"); + + b.Navigation("Messages"); + + b.Navigation("Users"); + + b.Navigation("Well"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.User", b => + { + b.Navigation("FileMarks"); + + b.Navigation("Files"); + + b.Navigation("RelationContactsWells"); + + b.Navigation("RelationUsersUserRoles"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.UserRole", b => + { + b.Navigation("RelationUserRolePermissions"); + + b.Navigation("RelationUserRoleUserRoles"); + + b.Navigation("RelationUsersUserRoles"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.Well", b => + { + b.Navigation("Contacts"); + + b.Navigation("DrillingProgramParts"); + + b.Navigation("RelationCompaniesWells"); + + b.Navigation("WellCompositeSrcs"); + + b.Navigation("WellComposites"); + + b.Navigation("WellOperations"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.WellSectionType", b => + { + b.Navigation("WellComposites"); + + b.Navigation("WellOperations"); + }); + + modelBuilder.Entity("AsbCloudDb.Model.WellType", b => + { + b.Navigation("Wells"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/AsbCloudDb/Migrations/20240219090713_DetectedOperateion_Remove_IdUser.cs b/AsbCloudDb/Migrations/20240219090713_DetectedOperateion_Remove_IdUser.cs new file mode 100644 index 00000000..a52d5861 --- /dev/null +++ b/AsbCloudDb/Migrations/20240219090713_DetectedOperateion_Remove_IdUser.cs @@ -0,0 +1,27 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace AsbCloudDb.Migrations +{ + public partial class DetectedOperateion_Remove_IdUser : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "id_user", + table: "t_detected_operation"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "id_user", + table: "t_detected_operation", + type: "integer", + nullable: false, + defaultValue: 0, + comment: "Id пользователя по телеметрии на момент начала операции"); + } + } +} diff --git a/AsbCloudDb/Migrations/AsbCloudDbContextModelSnapshot.cs b/AsbCloudDb/Migrations/AsbCloudDbContextModelSnapshot.cs index eeb9ad9b..0d9d2b4b 100644 --- a/AsbCloudDb/Migrations/AsbCloudDbContextModelSnapshot.cs +++ b/AsbCloudDb/Migrations/AsbCloudDbContextModelSnapshot.cs @@ -532,11 +532,6 @@ namespace AsbCloudDb.Migrations .HasColumnType("integer") .HasColumnName("id_telemetry"); - b.Property("IdUsersAtStart") - .HasColumnType("integer") - .HasColumnName("id_user") - .HasComment("Id пользователя по телеметрии на момент начала операции"); - b.Property("Value") .HasColumnType("double precision") .HasColumnName("value") diff --git a/AsbCloudDb/Model/DetectedOperation.cs b/AsbCloudDb/Model/DetectedOperation.cs index c1f66c79..ac6de087 100644 --- a/AsbCloudDb/Model/DetectedOperation.cs +++ b/AsbCloudDb/Model/DetectedOperation.cs @@ -8,7 +8,7 @@ using System.Text.Json.Serialization; namespace AsbCloudDb.Model { [Table("t_detected_operation"), Comment("автоматически определенные операции по телеметрии")] - public class DetectedOperation + public class DetectedOperation : IId { [Key] [Column("id")] @@ -20,9 +20,6 @@ namespace AsbCloudDb.Model [Column("id_category"), Comment("Id категории операции")] public int IdCategory { get; set; } - [Column("id_user"), Comment("Id пользователя по телеметрии на момент начала операции")] - public int IdUsersAtStart { get; set; } - [Column("date_start", TypeName = "timestamp with time zone"), Comment("Дата начала операции")] public DateTimeOffset DateStart { get; set; } From a3938a2dff21d92f67557536a3abdf4ad72544f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D1=82=D0=B5=D0=BF=D0=B0=D0=BD=D0=BE=D0=B2=20=D0=94?= =?UTF-8?q?=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9?= Date: Tue, 20 Feb 2024 11:15:05 +0300 Subject: [PATCH 05/12] =?UTF-8?q?=D0=A0=D0=B5=D1=84=D0=B0=D0=BA=D1=82?= =?UTF-8?q?=D0=BE=D1=80=D0=B8=D0=BD=D0=B3=20DTO?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Data/DetectedOperation/DetectedOperationDto.cs | 11 ++++++----- .../Services/DetectOperations/DetectableTelemetry.cs | 1 - .../Detectors/OperationDetectorResult.cs | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/AsbCloudApp/Data/DetectedOperation/DetectedOperationDto.cs b/AsbCloudApp/Data/DetectedOperation/DetectedOperationDto.cs index 2b0fc768..1d6f3421 100644 --- a/AsbCloudApp/Data/DetectedOperation/DetectedOperationDto.cs +++ b/AsbCloudApp/Data/DetectedOperation/DetectedOperationDto.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data.DetectedOperation; @@ -72,14 +73,14 @@ public class DetectedOperationDto: IId [Required] public WellOperationCategoryDto OperationCategory { get; set; } = null!; - ///

- /// Пользователь панели оператора - /// - public string? TelemetryUserName { get; set; } - /// /// Ключевой параметр операции /// [Required] public double Value { get; set; } + + /// + /// Доп. инфо по операции + /// + public IDictionary ExtraData { get; set; } = new Dictionary(); } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/DetectOperations/DetectableTelemetry.cs b/AsbCloudInfrastructure/Services/DetectOperations/DetectableTelemetry.cs index 55a605f2..0e42bb1f 100644 --- a/AsbCloudInfrastructure/Services/DetectOperations/DetectableTelemetry.cs +++ b/AsbCloudInfrastructure/Services/DetectOperations/DetectableTelemetry.cs @@ -5,7 +5,6 @@ namespace AsbCloudInfrastructure.Services.DetectOperations; public class DetectableTelemetry { public DateTimeOffset DateTime { get; set; } - public int? IdUser { get; set; } public int Mode { get; set; } public float WellDepth { get; set; } public float Pressure { get; set; } diff --git a/AsbCloudInfrastructure/Services/DetectOperations/Detectors/OperationDetectorResult.cs b/AsbCloudInfrastructure/Services/DetectOperations/Detectors/OperationDetectorResult.cs index fcab00bd..8325d86c 100644 --- a/AsbCloudInfrastructure/Services/DetectOperations/Detectors/OperationDetectorResult.cs +++ b/AsbCloudInfrastructure/Services/DetectOperations/Detectors/OperationDetectorResult.cs @@ -1,4 +1,4 @@ -using AsbCloudDb.Model; +using AsbCloudApp.Data.DetectedOperation; namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors { @@ -7,6 +7,6 @@ namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors { public int TelemetryBegin { get; set; } public int TelemetryEnd { get; set; } - public DetectedOperation Operation { get; set; } = null!; + public DetectedOperationDto Operation { get; set; } = null!; } } From aa297e235d0e0054ea523ebd48fa3fc140f968d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D1=82=D0=B5=D0=BF=D0=B0=D0=BD=D0=BE=D0=B2=20=D0=94?= =?UTF-8?q?=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9?= Date: Tue, 20 Feb 2024 11:16:46 +0300 Subject: [PATCH 06/12] =?UTF-8?q?=D0=A0=D0=B5=D1=84=D0=B0=D0=BA=D1=82?= =?UTF-8?q?=D0=BE=D1=80=D0=B8=D0=BD=D0=B3=20=D0=B4=D0=B5=D1=82=D0=B5=D0=BA?= =?UTF-8?q?=D1=82=D0=BE=D1=80=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Detectors/DetectorAbstract.cs | 11 +++++------ .../Detectors/DetectorDrilling.cs | 5 +++-- .../Detectors/DetectorSlipsTime.cs | 3 ++- .../Detectors/DetectorDrillingTests.cs | 18 ++++-------------- 4 files changed, 14 insertions(+), 23 deletions(-) diff --git a/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorAbstract.cs b/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorAbstract.cs index 228d0810..2ce2d57d 100644 --- a/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorAbstract.cs +++ b/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorAbstract.cs @@ -35,7 +35,7 @@ namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors protected const int IdReasonOfEnd_Custom1 = 10_000; - public bool TryDetect(int idTelemetry, DetectableTelemetry[] telemetry, int begin, int end, DetectedOperation? previousOperation, + public bool TryDetect(int idTelemetry, DetectableTelemetry[] telemetry, int begin, int end, DetectedOperationDto? previousOperation, out OperationDetectorResult? result) { // Проверка соответствия критерию начала операции @@ -82,9 +82,9 @@ namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors protected virtual bool IsValidOperationDetectorResult(OperationDetectorResult operationDetectorResult) => operationDetectorResult.Operation.DateEnd - operationDetectorResult.Operation.DateStart > TimeSpan.FromSeconds(3); - protected abstract bool DetectBegin(DetectableTelemetry[] telemetry, int position, DetectedOperation? previousOperation); + protected abstract bool DetectBegin(DetectableTelemetry[] telemetry, int position, DetectedOperationDto? previousOperation); - protected virtual int DetectEnd(DetectableTelemetry[] telemetry, int position, DetectedOperation? previousOperation) + protected virtual int DetectEnd(DetectableTelemetry[] telemetry, int position, DetectedOperationDto? previousOperation) => DetectBegin(telemetry, position, previousOperation) ? IdReasonOfEnd_NotDetected : IdReasonOfEnd_NotDetectBegin; @@ -110,16 +110,15 @@ namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors return result; } - private DetectedOperation MakeDetectedOperation(int idTelemetry, DetectableTelemetry[] telemetry, int begin, int end) + private DetectedOperationDto MakeDetectedOperation(int idTelemetry, DetectableTelemetry[] telemetry, int begin, int end) { var pBegin = telemetry[begin]; var pEnd = telemetry[end]; var (IdCategory, ExtraData) = GetSpecificInformation(telemetry, begin, end); - var operation = new DetectedOperation + var operation = new DetectedOperationDto { IdCategory = IdCategory, IdTelemetry = idTelemetry, - IdUsersAtStart = pBegin.IdUser ?? -1, DateStart = pBegin.DateTime, DateEnd = pEnd.DateTime, DepthStart = (double)pBegin.WellDepth, diff --git a/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorDrilling.cs b/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorDrilling.cs index 68eda39e..88084bfe 100644 --- a/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorDrilling.cs +++ b/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorDrilling.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using AsbCloudApp.Data.DetectedOperation; using AsbCloudDb.Model; namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors; @@ -12,7 +13,7 @@ public class DetectorDrilling : DetectorAbstract public const string ExtraDataKeyDispersionOfNormalizedRotorSpeed = "dispersionOfNormalizedRotorSpeed"; public const string ExtraDataKeyAvgRotorSpeed = "avgRotorSpeed"; - protected override bool DetectBegin(DetectableTelemetry[] telemetry, int position, DetectedOperation? previousOperation) + protected override bool DetectBegin(DetectableTelemetry[] telemetry, int position, DetectedOperationDto? previousOperation) { var point0 = telemetry[position]; var delta = point0.WellDepth - point0.BitDepth; @@ -25,7 +26,7 @@ public class DetectorDrilling : DetectorAbstract return true; } - protected override int DetectEnd(DetectableTelemetry[] telemetry, int position, DetectedOperation? previousOperation) + protected override int DetectEnd(DetectableTelemetry[] telemetry, int position, DetectedOperationDto? previousOperation) { var point0 = telemetry[position]; var delta = point0.WellDepth - point0.BitDepth; diff --git a/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorSlipsTime.cs b/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorSlipsTime.cs index 58bdba27..9388918d 100644 --- a/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorSlipsTime.cs +++ b/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorSlipsTime.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using AsbCloudApp.Data.DetectedOperation; using AsbCloudDb.Model; namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors; @@ -9,7 +10,7 @@ public class DetectorSlipsTime : DetectorAbstract protected override double CalcValue(DetectableTelemetry[] telemetry, int begin, int end) => CalcDeltaMinutes(telemetry, begin, end); - protected override bool DetectBegin(DetectableTelemetry[] telemetry, int position, DetectedOperation? previousOperation) + protected override bool DetectBegin(DetectableTelemetry[] telemetry, int position, DetectedOperationDto? previousOperation) { var point0 = telemetry[position]; var delta = point0.WellDepth - point0.BitDepth; diff --git a/AsbCloudWebApi.Tests/Services/DetectedOperations/Detectors/DetectorDrillingTests.cs b/AsbCloudWebApi.Tests/Services/DetectedOperations/Detectors/DetectorDrillingTests.cs index 8a61dd15..bd8c5690 100644 --- a/AsbCloudWebApi.Tests/Services/DetectedOperations/Detectors/DetectorDrillingTests.cs +++ b/AsbCloudWebApi.Tests/Services/DetectedOperations/Detectors/DetectorDrillingTests.cs @@ -1,5 +1,5 @@ using System.Collections.Generic; -using AsbCloudDb.Model; +using AsbCloudApp.Data.DetectedOperation; using AsbCloudInfrastructure.Services.DetectOperations; using AsbCloudInfrastructure.Services.DetectOperations.Detectors; using Xunit; @@ -10,8 +10,7 @@ public class DetectorDrillingTests : DetectorDrilling { private const int idSlide = 5002; private const int idRotor = 5003; - private const int idSlideWithOscillation = 12000; - + [Theory] [MemberData(nameof(TelemetryRangeDrillingRotor))] public void DefineDrillingOperation_ShouldReturn_DrillingRotor(DetectableTelemetry[] telemetryRange) @@ -54,7 +53,7 @@ public class DetectorDrillingTests : DetectorDrilling //arrange var operationDetectorResult = new OperationDetectorResult { - Operation = new DetectedOperation + Operation = new DetectedOperationDto { DepthStart = 5000, DepthEnd = 6000, @@ -76,7 +75,7 @@ public class DetectorDrillingTests : DetectorDrilling //arrange var operationDetectorResult = new OperationDetectorResult { - Operation = new DetectedOperation + Operation = new DetectedOperationDto { DepthStart = 5000, DepthEnd = 5000, @@ -201,7 +200,6 @@ public class DetectorDrillingTests : DetectorDrilling { new DetectableTelemetry { - IdUser = 1, WellDepth = 415.306f, Pressure = 53.731934f, HookWeight = 41.049942f, @@ -211,7 +209,6 @@ public class DetectorDrillingTests : DetectorDrilling }, new DetectableTelemetry { - IdUser = 1, WellDepth = 415.311f, Pressure = 57.660595f, HookWeight = 40.898712f, @@ -221,7 +218,6 @@ public class DetectorDrillingTests : DetectorDrilling }, new DetectableTelemetry { - IdUser = 1, WellDepth = 415.326f, Pressure = 59.211086f, HookWeight = 40.882797f, @@ -231,7 +227,6 @@ public class DetectorDrillingTests : DetectorDrilling }, new DetectableTelemetry { - IdUser = 1, WellDepth = 415.344f, Pressure = 59.484406f, HookWeight = 40.91972f, @@ -241,7 +236,6 @@ public class DetectorDrillingTests : DetectorDrilling }, new DetectableTelemetry { - IdUser = 1, WellDepth = 415.364f, Pressure = 60.739918f, HookWeight = 40.795666f, @@ -251,7 +245,6 @@ public class DetectorDrillingTests : DetectorDrilling }, new DetectableTelemetry { - IdUser = 1, WellDepth = 415.378f, Pressure = 62.528984f, HookWeight = 40.52114f, @@ -261,7 +254,6 @@ public class DetectorDrillingTests : DetectorDrilling }, new DetectableTelemetry { - IdUser = 1, WellDepth = 415.392f, Pressure = 67.0039f, HookWeight = 38.878895f, @@ -271,7 +263,6 @@ public class DetectorDrillingTests : DetectorDrilling }, new DetectableTelemetry { - IdUser = 1, WellDepth = 415.392f, Pressure = 65.72418f, HookWeight = 42.53173f, @@ -281,7 +272,6 @@ public class DetectorDrillingTests : DetectorDrilling }, new DetectableTelemetry { - IdUser = 1, WellDepth = 415.392f, Pressure = 56.82195f, HookWeight = 43.15844f, From 7919926c210591ca68e9cf0a8c6771f0016a3b86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D1=82=D0=B5=D0=BF=D0=B0=D0=BD=D0=BE=D0=B2=20=D0=94?= =?UTF-8?q?=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9?= Date: Tue, 20 Feb 2024 11:21:16 +0300 Subject: [PATCH 07/12] =?UTF-8?q?=D0=A0=D0=B5=D1=84=D0=B0=D0=BA=D1=82?= =?UTF-8?q?=D0=BE=D1=80=D0=B8=D0=BD=D0=B3=20=D1=81=D0=B5=D1=80=D0=B2=D0=B8?= =?UTF-8?q?=D1=81=D0=BE=D0=B2=20=D1=82=D0=B5=D0=BB=D0=B5=D0=BC=D0=B5=D1=82?= =?UTF-8?q?=D1=80=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AsbCloudApp/Services/ITelemetryDataService.cs | 15 +++++-- .../Services/SAUB/TelemetryDataBaseService.cs | 44 ++++++++++++------- .../Services/SAUB/TelemetryDataSaubService.cs | 6 +-- .../SAUB/TelemetryDataBaseController.cs | 4 +- 4 files changed, 46 insertions(+), 23 deletions(-) diff --git a/AsbCloudApp/Services/ITelemetryDataService.cs b/AsbCloudApp/Services/ITelemetryDataService.cs index bb40771b..9cf4a805 100644 --- a/AsbCloudApp/Services/ITelemetryDataService.cs +++ b/AsbCloudApp/Services/ITelemetryDataService.cs @@ -23,18 +23,27 @@ namespace AsbCloudApp.Services /// кол-во элементов до которых эти данные прореживаются /// /// - Task> GetAsync(int idWell, + Task> GetByWellAsync(int idWell, DateTime dateBegin = default, double intervalSec = 600d, int approxPointsCount = 1024, CancellationToken token = default); /// - /// Получить данные тех. процесса + /// Получить данные тех. процесса по скважине /// /// /// /// /// - Task> GetAsync(int idWell, TelemetryDataRequest request, CancellationToken token); + Task> GetByWellAsync(int idWell, TelemetryDataRequest request, CancellationToken token); + + /// + /// Получение данных тех. процесса по телеметрии + /// + /// + /// + /// + /// + Task> GetByTelemetryAsync(int idTelemetry, TelemetryDataRequest request, CancellationToken token); /// /// Период за который есть данные по скважине в рамках временного интервала diff --git a/AsbCloudInfrastructure/Services/SAUB/TelemetryDataBaseService.cs b/AsbCloudInfrastructure/Services/SAUB/TelemetryDataBaseService.cs index e296692c..f9cc64ee 100644 --- a/AsbCloudInfrastructure/Services/SAUB/TelemetryDataBaseService.cs +++ b/AsbCloudInfrastructure/Services/SAUB/TelemetryDataBaseService.cs @@ -11,6 +11,7 @@ using System.Diagnostics; using System.Linq; using System.Threading; using System.Threading.Tasks; +using AsbCloudApp.Requests; namespace AsbCloudInfrastructure.Services.SAUB { @@ -22,7 +23,7 @@ namespace AsbCloudInfrastructure.Services.SAUB protected readonly ITelemetryService telemetryService; protected readonly ITelemetryDataCache telemetryDataCache; - public TelemetryDataBaseService( + protected TelemetryDataBaseService( IAsbCloudDbContext db, ITelemetryService telemetryService, ITelemetryDataCache telemetryDataCache) @@ -86,7 +87,7 @@ namespace AsbCloudInfrastructure.Services.SAUB } /// - public virtual async Task> GetAsync(int idWell, + public virtual async Task> GetByWellAsync(int idWell, DateTime dateBegin = default, double intervalSec = 600d, int approxPointsCount = 1024, CancellationToken token = default) { @@ -146,23 +147,41 @@ namespace AsbCloudInfrastructure.Services.SAUB } /// - public virtual async Task> GetAsync(int idWell, AsbCloudApp.Requests.TelemetryDataRequest request, CancellationToken token) + public virtual async Task> GetByWellAsync(int idWell, TelemetryDataRequest request, CancellationToken token) { var telemetry = telemetryService.GetOrDefaultTelemetryByIdWell(idWell); if (telemetry is null) return Enumerable.Empty(); - var timezone = telemetryService.GetTimezone(telemetry.Id); + return await GetByTelemetryAsync(telemetry.Id, request, token); + } - var cache = telemetryDataCache.GetOrDefault(telemetry.Id, request); + public async Task> GetByTelemetryAsync(int idTelemetry, TelemetryDataRequest request, CancellationToken token) + { + var timezone = telemetryService.GetTimezone(idTelemetry); + + var cache = telemetryDataCache.GetOrDefault(idTelemetry, request); + if(cache is not null) return cache; + + var query = BuildQuery(idTelemetry, request); + var entities = await query + .AsNoTracking() + .ToArrayAsync(token); + + var dtos = entities.Select(e => Convert(e, timezone.Hours)); + + return dtos; + } + + private IQueryable BuildQuery(int idTelemetry, TelemetryDataRequest request) + { var dbSet = db.Set(); var query = dbSet - .Where(d => d.IdTelemetry == telemetry.Id) - .AsNoTracking(); + .Where(d => d.IdTelemetry == idTelemetry); if (request.GeDate.HasValue) { @@ -196,12 +215,7 @@ namespace AsbCloudInfrastructure.Services.SAUB break; } - var entities = await query - .ToArrayAsync(token); - - var dtos = entities.Select(e => Convert(e, timezone.Hours)); - - return dtos; + return query; } /// @@ -263,9 +277,9 @@ namespace AsbCloudInfrastructure.Services.SAUB return telemetryDataCache.GetOrDefaultDataDateRange(telemetry.Id); } - public abstract TDto Convert(TEntity src, double timezoneOffset); + protected abstract TDto Convert(TEntity src, double timezoneOffset); - public abstract TEntity Convert(TDto src, double timezoneOffset); + protected abstract TEntity Convert(TDto src, double timezoneOffset); } } diff --git a/AsbCloudInfrastructure/Services/SAUB/TelemetryDataSaubService.cs b/AsbCloudInfrastructure/Services/SAUB/TelemetryDataSaubService.cs index fdced02c..92db8e4d 100644 --- a/AsbCloudInfrastructure/Services/SAUB/TelemetryDataSaubService.cs +++ b/AsbCloudInfrastructure/Services/SAUB/TelemetryDataSaubService.cs @@ -111,7 +111,7 @@ public class TelemetryDataSaubService : TelemetryDataBaseService(); var telemetryUser = telemetryUserService @@ -122,7 +122,7 @@ public class TelemetryDataSaubService : TelemetryDataBaseService(); var telemetryUser = telemetryUserService.GetOrDefault(src.IdTelemetry, src.IdUser ?? int.MinValue); @@ -151,7 +151,7 @@ public class TelemetryDataSaubService : TelemetryDataBaseService 32_768 }; - var data = await GetAsync(idWell, beginDate, intervalSec, approxPointsCount, token); + var data = await GetByWellAsync(idWell, beginDate, intervalSec, approxPointsCount, token); var fileName = $"DataSaub idWell{idWell}"; if (telemetry.Info is not null) diff --git a/AsbCloudWebApi/Controllers/SAUB/TelemetryDataBaseController.cs b/AsbCloudWebApi/Controllers/SAUB/TelemetryDataBaseController.cs index 4c8ec124..5ff378de 100644 --- a/AsbCloudWebApi/Controllers/SAUB/TelemetryDataBaseController.cs +++ b/AsbCloudWebApi/Controllers/SAUB/TelemetryDataBaseController.cs @@ -92,7 +92,7 @@ namespace AsbCloudWebApi.Controllers.SAUB if (!isCompanyOwnsWell) return Forbid(); - var content = await telemetryDataService.GetAsync(idWell, begin, + var content = await telemetryDataService.GetByWellAsync(idWell, begin, intervalSec, approxPointsCount, token).ConfigureAwait(false); return Ok(content); @@ -123,7 +123,7 @@ namespace AsbCloudWebApi.Controllers.SAUB if (!isCompanyOwnsWell) return Forbid(); - var content = await telemetryDataService.GetAsync(idWell, request, token); + var content = await telemetryDataService.GetByWellAsync(idWell, request, token); return Ok(content); } From a77c3b45667c0026b3ad6fb39ad83dea260e15b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D1=82=D0=B5=D0=BF=D0=B0=D0=BD=D0=BE=D0=B2=20=D0=94?= =?UTF-8?q?=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9?= Date: Tue, 20 Feb 2024 11:22:58 +0300 Subject: [PATCH 08/12] =?UTF-8?q?=D0=A0=D0=B5=D1=84=D0=B0=D0=BA=D1=82?= =?UTF-8?q?=D0=BE=D1=80=D0=B8=D0=BD=D0=B3=20=D0=B0=D0=B2=D1=82=D0=BE=20?= =?UTF-8?q?=D0=BE=D0=BF=D1=80=D0=B5=D0=B4=D0=B5=D0=BB=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F=20=D0=BE=D0=BF=D0=B5=D1=80=D0=B0=D1=86=D0=B8=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IDetectedOperationRepository.cs | 13 +- .../Services/IDetectedOperationService.cs | 12 +- .../Repository/DetectedOperationRepository.cs | 60 ++++--- .../DetectedOperationExportService.cs | 34 ++-- .../DetectedOperationService.cs | 94 +++++++++-- .../WorkOperationDetection.cs | 149 ++++-------------- 6 files changed, 186 insertions(+), 176 deletions(-) diff --git a/AsbCloudApp/Repositories/IDetectedOperationRepository.cs b/AsbCloudApp/Repositories/IDetectedOperationRepository.cs index 5a52b455..d7fe5865 100644 --- a/AsbCloudApp/Repositories/IDetectedOperationRepository.cs +++ b/AsbCloudApp/Repositories/IDetectedOperationRepository.cs @@ -1,15 +1,17 @@ -using AsbCloudApp.Data.DetectedOperation; +using System; +using AsbCloudApp.Data.DetectedOperation; using AsbCloudApp.Requests; using System.Collections.Generic; using System.Threading.Tasks; using System.Threading; +using AsbCloudApp.Services; namespace AsbCloudApp.Repositories; /// /// Таблица автоматически определенных операций /// -public interface IDetectedOperationRepository +public interface IDetectedOperationRepository : ICrudRepository { /// /// Добавление записей @@ -63,4 +65,11 @@ public interface IDetectedOperationRepository /// /// Task DeleteRange(int idUser, IEnumerable ids, CancellationToken token); + + /// + /// Получение дат последних определённых операций + /// + /// + /// + Task> GetLastDetectedDatesAsync(CancellationToken token); } diff --git a/AsbCloudApp/Services/IDetectedOperationService.cs b/AsbCloudApp/Services/IDetectedOperationService.cs index 5109fa56..998032ba 100644 --- a/AsbCloudApp/Services/IDetectedOperationService.cs +++ b/AsbCloudApp/Services/IDetectedOperationService.cs @@ -1,4 +1,5 @@ -using AsbCloudApp.Data; +using System; +using AsbCloudApp.Data; using AsbCloudApp.Data.DetectedOperation; using AsbCloudApp.Requests; using System.Collections.Generic; @@ -52,5 +53,14 @@ namespace AsbCloudApp.Services /// /// Task> GetOperationsStatAsync(DetectedOperationByWellRequest request, CancellationToken token); + + /// + /// Определение операций + /// + /// + /// + /// + /// + Task> DetectOperationsAsync(int idTelemetry, DateTimeOffset? beginDate, CancellationToken token); } } diff --git a/AsbCloudInfrastructure/Repository/DetectedOperationRepository.cs b/AsbCloudInfrastructure/Repository/DetectedOperationRepository.cs index 50ec6c9e..3cbb9c07 100644 --- a/AsbCloudInfrastructure/Repository/DetectedOperationRepository.cs +++ b/AsbCloudInfrastructure/Repository/DetectedOperationRepository.cs @@ -15,44 +15,52 @@ using System.Threading.Tasks; namespace AsbCloudInfrastructure.Repository; -public class DetectedOperationRepository : IDetectedOperationRepository +public class DetectedOperationRepository : CrudRepositoryBase, + IDetectedOperationRepository { - private readonly IAsbCloudDbContext db; private readonly ITelemetryService telemetryService; - public DetectedOperationRepository( - IAsbCloudDbContext db, + public DetectedOperationRepository(IAsbCloudDbContext context, ITelemetryService telemetryService) + : base(context) { - this.db = db; this.telemetryService = telemetryService; } public async Task Delete(int idUser, DetectedOperationByTelemetryRequest request, CancellationToken token) { var query = BuildQuery(request); - db.Set().RemoveRange(query); - return await db.SaveChangesAsync(token); + dbContext.Set().RemoveRange(query); + return await dbContext.SaveChangesAsync(token); } public async Task DeleteRange(int idUser, IEnumerable ids, CancellationToken token) { - var query = db.Set() + var query = dbContext.Set() .Where(e => ids.Contains( e.Id)); - db.Set() + dbContext.Set() .RemoveRange(query); - return await db.SaveChangesAsync(token); + return await dbContext.SaveChangesAsync(token); } + public async Task> GetLastDetectedDatesAsync(CancellationToken token) => + await dbContext.Set() + .GroupBy(o => o.IdTelemetry) + .Select(g => new + { + IdTelemetry = g.Key, + LastDate = g.Max(o => o.DateEnd) + }) + .ToDictionaryAsync(x => x.IdTelemetry, x => x.LastDate, token); + public async Task> Get(DetectedOperationByTelemetryRequest request, CancellationToken token) { var query = BuildQuery(request) .Include(o => o.OperationCategory); var entities = await query.ToArrayAsync(token); - var offset = telemetryService.GetTimezone(request.IdTelemetry).Offset; - var dtos = entities.Select(o => Convert(o, offset)); + var dtos = entities.Select(Convert); return dtos; } @@ -63,14 +71,14 @@ public class DetectedOperationRepository : IDetectedOperationRepository return 0; var entities = dtos.Select(Convert); - var dbset = db.Set(); + var dbset = dbContext.Set(); foreach(var entity in entities) { entity.Id = default; dbset.Add(entity); } - return await db.SaveChangesWithExceptionHandling(token); + return await dbContext.SaveChangesWithExceptionHandling(token); } public async Task Update(int idUser, IEnumerable dtos, CancellationToken token) @@ -89,7 +97,7 @@ public class DetectedOperationRepository : IDetectedOperationRepository if (ids.Length != dtos.Count()) throw new ArgumentInvalidException(nameof(dtos), "Все записи должны иметь уникальные Id"); - var dbSet = db.Set(); + var dbSet = dbContext.Set(); var existingEntitiesCount = await dbSet .Where(o => ids.Contains(o.Id)) @@ -106,7 +114,7 @@ public class DetectedOperationRepository : IDetectedOperationRepository for(var i = 0; i < entities.Length; i++) entries[i] = dbSet.Update(entities[i]); - var result = await db.SaveChangesWithExceptionHandling(token); + var result = await dbContext.SaveChangesWithExceptionHandling(token); for (var i = 0; i < entries.Length; i++) entries[i].State = EntityState.Detached; @@ -131,7 +139,7 @@ public class DetectedOperationRepository : IDetectedOperationRepository private IQueryable BuildQuery(DetectedOperationByTelemetryRequest request) { - var query = db.Set() + var query = dbContext.Set() .Where(o => o.IdTelemetry == request.IdTelemetry); if (request.IdsCategories.Any()) @@ -173,19 +181,21 @@ public class DetectedOperationRepository : IDetectedOperationRepository return query; } - private static DetectedOperationDto Convert(DetectedOperation entity, TimeSpan offset) + protected override DetectedOperationDto Convert(DetectedOperation src) { - var dto = entity.Adapt(); - dto.DateStart = entity.DateStart.ToOffset(offset); - dto.DateEnd = entity.DateEnd.ToOffset(offset); + var timezone = telemetryService.GetTimezone(src.IdTelemetry); + + var dto = src.Adapt(); + dto.DateStart = src.DateStart.ToOffset(timezone.Offset); + dto.DateEnd = src.DateEnd.ToOffset(timezone.Offset); return dto; } - private static DetectedOperation Convert(DetectedOperationDto dto) + protected override DetectedOperation Convert(DetectedOperationDto src) { - var entity = dto.Adapt(); - entity.DateStart = dto.DateStart.ToUniversalTime(); - entity.DateEnd = dto.DateEnd.ToUniversalTime(); + var entity = src.Adapt(); + entity.DateStart = src.DateStart.ToUniversalTime(); + entity.DateEnd = src.DateEnd.ToUniversalTime(); return entity; } } diff --git a/AsbCloudInfrastructure/Services/DetectOperations/DetectedOperationExportService.cs b/AsbCloudInfrastructure/Services/DetectOperations/DetectedOperationExportService.cs index 987f274f..3ba4350a 100644 --- a/AsbCloudInfrastructure/Services/DetectOperations/DetectedOperationExportService.cs +++ b/AsbCloudInfrastructure/Services/DetectOperations/DetectedOperationExportService.cs @@ -19,9 +19,9 @@ namespace AsbCloudInfrastructure.Services.DetectOperations; public class DetectedOperationExportService { - private readonly IAsbCloudDbContext db; - private readonly IWellService wellService; + private readonly IWellService wellService; private readonly IWellOperationCategoryRepository wellOperationCategoryRepository; + private readonly IDetectedOperationService detectedOperationService; private const int headerRowsCount = 1; private const string cellDepositName = "B1"; @@ -40,15 +40,14 @@ public class DetectedOperationExportService private const int columnIdReasonOfEnd = 9; private const int columnComment = 10; - public DetectedOperationExportService( - IAsbCloudDbContext db, - IWellService wellService, - IWellOperationCategoryRepository wellOperationCategoryRepository) + public DetectedOperationExportService(IWellService wellService, + IWellOperationCategoryRepository wellOperationCategoryRepository, + IDetectedOperationService detectedOperationService) { - this.db = db; - this.wellService = wellService; + this.wellService = wellService; this.wellOperationCategoryRepository = wellOperationCategoryRepository; - } + this.detectedOperationService = detectedOperationService; + } /// /// Экспорт excel файла с операциями по скважине @@ -68,12 +67,12 @@ public class DetectedOperationExportService if (!well.IdTelemetry.HasValue) throw new ArgumentInvalidException(nameof(idWell), $"Well {idWell} has no telemetry"); - var operations = await WorkOperationDetection.DetectOperationsAsync(well.IdTelemetry.Value, DateTime.UnixEpoch, db, token); + var operations = await detectedOperationService.DetectOperationsAsync(well.IdTelemetry.Value, DateTime.UnixEpoch, token); return await GenerateExcelFileStreamAsync(well, host, operations, token); } - private async Task GenerateExcelFileStreamAsync(WellDto well, string host, IEnumerable operationDetectorResults, + private async Task GenerateExcelFileStreamAsync(WellDto well, string host, IEnumerable operationDetectorResults, CancellationToken cancellationToken) { using var excelTemplateStream = await GetExcelTemplateStreamAsync(cancellationToken); @@ -88,7 +87,7 @@ public class DetectedOperationExportService return memoryStream; } - private void AddToWorkbook(XLWorkbook workbook, WellDto well, string host, IEnumerable operations) + private void AddToWorkbook(XLWorkbook workbook, WellDto well, string host, IEnumerable operations) { const string sheetName = "Операции"; @@ -104,14 +103,17 @@ public class DetectedOperationExportService AddToSheet(sheet, well, host, orderedOperations); } - private void AddToSheet(IXLWorksheet sheet, WellDto well, string host, IList operations) + private void AddToSheet(IXLWorksheet sheet, WellDto well, string host, IList operations) { var wellOperationCategories = wellOperationCategoryRepository.Get(true); sheet.Cell(cellDepositName).SetCellValue(well.Deposit); sheet.Cell(cellClusterName).SetCellValue(well.Cluster); sheet.Cell(cellWellName).SetCellValue(well.Caption); - sheet.Cell(cellDeltaDate).SetCellValue((TimeSpan)(Enumerable.Max(operations, (Func)(o => o.DateEnd)) - Enumerable.Min(operations, (Func)(o => o.DateStart)))); + + var deltaDate = operations.Max(o => o.DateEnd - o.DateStart); + + sheet.Cell(cellDeltaDate).SetCellValue(deltaDate); for (int i = 0; i < operations.Count; i++) { @@ -157,7 +159,7 @@ public class DetectedOperationExportService } } - private static string GetCategoryName(IEnumerable wellOperationCategories, DetectedOperation current) + private static string GetCategoryName(IEnumerable wellOperationCategories, DetectedOperationDto current) { var idCategory = current.IdCategory; if (idCategory == WellOperationCategory.IdSlide && @@ -198,7 +200,7 @@ public class DetectedOperationExportService return memoryStream; } - private static string CreateComment(DetectedOperation operation) + private static string CreateComment(DetectedOperationDto operation) { switch (operation.IdCategory) { diff --git a/AsbCloudInfrastructure/Services/DetectOperations/DetectedOperationService.cs b/AsbCloudInfrastructure/Services/DetectOperations/DetectedOperationService.cs index bd8fba77..fca85b82 100644 --- a/AsbCloudInfrastructure/Services/DetectOperations/DetectedOperationService.cs +++ b/AsbCloudInfrastructure/Services/DetectOperations/DetectedOperationService.cs @@ -1,16 +1,16 @@ -using AsbCloudApp.Data; +using System; +using AsbCloudApp.Data; using AsbCloudApp.Data.DetectedOperation; using AsbCloudApp.Repositories; using AsbCloudApp.Requests; using AsbCloudApp.Services; -using AsbCloudDb; using AsbCloudDb.Model; using Mapster; -using Microsoft.EntityFrameworkCore; using System.Collections.Generic; using System.Linq; using System.Threading; using System.Threading.Tasks; +using AsbCloudInfrastructure.Services.DetectOperations.Detectors; namespace AsbCloudInfrastructure.Services.DetectOperations; @@ -19,21 +19,29 @@ public class DetectedOperationService : IDetectedOperationService private readonly IDetectedOperationRepository operationRepository; private readonly IWellOperationCategoryRepository wellOperationCategoryRepository; private readonly IWellService wellService; - private readonly IRepositoryWellRelated operationValueService; - private readonly IScheduleRepository scheduleService; + private readonly IRepositoryWellRelated operationValueRepository; + private readonly IScheduleRepository scheduleRepository; + private readonly ITelemetryDataSaubService telemetryDataSaubService; + private static readonly DetectorAbstract[] detectors = { + new DetectorDrilling(), + new DetectorSlipsTime() + }; + public DetectedOperationService( IDetectedOperationRepository operationRepository, IWellOperationCategoryRepository wellOperationCategoryRepository, IWellService wellService, IRepositoryWellRelated operationValueRepository, - IScheduleRepository scheduleRepository) + IScheduleRepository scheduleRepository, + ITelemetryDataSaubService telemetryDataSaubService) { this.operationRepository = operationRepository; this.wellOperationCategoryRepository = wellOperationCategoryRepository; this.wellService = wellService; - this.operationValueService = operationValueRepository; - this.scheduleService = scheduleRepository; + this.operationValueRepository = operationValueRepository; + this.scheduleRepository = scheduleRepository; + this.telemetryDataSaubService = telemetryDataSaubService; } public async Task GetAsync(DetectedOperationByWellRequest request, CancellationToken token) @@ -60,8 +68,8 @@ public class DetectedOperationService : IDetectedOperationService var requestByTelemetry = new DetectedOperationByTelemetryRequest(well.IdTelemetry.Value, request); var data = await operationRepository.Get(requestByTelemetry, token); - var operationValues = await operationValueService.GetByIdWellAsync(request.IdWell, token); - var schedules = await scheduleService.GetByIdWellAsync(request.IdWell, token); + var operationValues = await operationValueRepository.GetByIdWellAsync(request.IdWell, token); + var schedules = await scheduleRepository.GetByIdWellAsync(request.IdWell, token); var dtos = data.Select(o => Convert(o, operationValues, schedules)); return dtos; } @@ -103,9 +111,7 @@ public class DetectedOperationService : IDetectedOperationService if (!operations.Any()) return Enumerable.Empty(); - - var operationValues = await operationValueService.GetByIdWellAsync(request.IdWell, token); - + var dtos = operations .GroupBy(o => (o.IdCategory, o.OperationCategory.Name)) .OrderBy(g => g.Key) @@ -126,6 +132,68 @@ public class DetectedOperationService : IDetectedOperationService return dtos; } + public async Task> DetectOperationsAsync(int idTelemetry, DateTimeOffset? beginDate, CancellationToken token) + { + const int take = 4 * 86_400; + + var detectedOperations = new List(); + DetectedOperationDto? lastDetectedOperation = null; + const int minOperationLength = 5; + const int maxDetectorsInterpolationFrameLength = 30; + const int gap = maxDetectorsInterpolationFrameLength + minOperationLength; + + while (true) + { + var request = new TelemetryDataRequest + { + GeDate = beginDate, + Take = take, + Order = 0 + }; + + var detectableTelemetries = (await telemetryDataSaubService.GetByTelemetryAsync(idTelemetry, request, token)) + .Where(t => t.BlockPosition >= 0) + .Select(t => new DetectableTelemetry + { + DateTime = t.DateTime, + Mode = t.Mode, + WellDepth = t.WellDepth, + Pressure = t.Pressure, + HookWeight = t.HookWeight, + BlockPosition = t.BlockPosition, + BitDepth = t.BitDepth, + RotorSpeed = t.RotorSpeed, + }).ToArray(); + + if (detectableTelemetries.Length < gap) + break; + + var isDetected = false; + var positionBegin = 0; + var positionEnd = detectableTelemetries.Length - gap; + while (positionEnd > positionBegin) + { + foreach (var detector in detectors) + { + if (!detector.TryDetect(idTelemetry, detectableTelemetries, positionBegin, positionEnd, lastDetectedOperation, out var result)) + continue; + + detectedOperations.Add(result!.Operation); + lastDetectedOperation = result.Operation; + isDetected = true; + positionBegin = result.TelemetryEnd; + break; + } + + positionBegin += 1; + } + + beginDate = isDetected ? lastDetectedOperation!.DateEnd : detectableTelemetries[positionEnd].DateTime; + } + + return detectedOperations; + } + public async Task DeleteAsync(DetectedOperationByWellRequest request, CancellationToken token) { var well = await wellService.GetOrDefaultAsync(request.IdWell, token); diff --git a/AsbCloudInfrastructure/Services/DetectOperations/WorkOperationDetection.cs b/AsbCloudInfrastructure/Services/DetectOperations/WorkOperationDetection.cs index aece226e..9b011970 100644 --- a/AsbCloudInfrastructure/Services/DetectOperations/WorkOperationDetection.cs +++ b/AsbCloudInfrastructure/Services/DetectOperations/WorkOperationDetection.cs @@ -1,12 +1,12 @@ -using AsbCloudDb.Model; -using Microsoft.EntityFrameworkCore; -using System; +using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Threading; using System.Threading.Tasks; -using AsbCloudInfrastructure.Services.DetectOperations.Detectors; +using AsbCloudApp.Data; +using AsbCloudApp.Repositories; +using AsbCloudApp.Services; using AsbCloudInfrastructure.Background; using Microsoft.Extensions.DependencyInjection; @@ -14,19 +14,6 @@ namespace AsbCloudInfrastructure.Services.DetectOperations; public class WorkOperationDetection: Work { - private static readonly DetectorAbstract[] detectors = new DetectorAbstract[] - { - new DetectorDrilling(), - new DetectorSlipsTime() - // new DetectorRotor(), - // new DetectorSlide(), - //new DetectorDevelopment(), - //new DetectorTemplating(), - //new DetectorStaticSurveying(), - //new DetectorFlashingBeforeConnection(), - //new DetectorFlashing(), - //new DetectorTemplatingWhileDrilling(), - }; public WorkOperationDetection() :base("Operation detection") @@ -42,115 +29,39 @@ public class WorkOperationDetection: Work protected override async Task Action(string id, IServiceProvider services, Action onProgressCallback, CancellationToken token) { - using var db = services.GetRequiredService(); - db.Database.SetCommandTimeout(TimeSpan.FromMinutes(5)); - var lastDetectedDates = await db.DetectedOperations - .GroupBy(o => o.IdTelemetry) - .Select(g => new - { - IdTelemetry = g.Key, - LastDate = g.Max(o => o.DateEnd) - }) - .ToListAsync(token); + var telemetryRepository = services.GetRequiredService>(); + var detectedOperationRepository = services.GetRequiredService(); + var detectedOperationService = services.GetRequiredService(); - var telemetryIds = await db.Telemetries - .Where(t => t.Info != null && t.TimeZone != null) - .Select(t => t.Id) - .ToListAsync(token); + var telemetryIds = (await telemetryRepository.GetAllAsync(token)) + .Select(t => t.Id); - var joinedlastDetectedDates = telemetryIds - .GroupJoin(lastDetectedDates, - t => t, - o => o.IdTelemetry, - (outer, inner) => new - { - IdTelemetry = outer, - inner.SingleOrDefault()?.LastDate, - }); + var lastDetectedDates = await detectedOperationRepository.GetLastDetectedDatesAsync(token); - var affected = 0; - var count = joinedlastDetectedDates.Count(); - var i = 0d; - foreach (var item in joinedlastDetectedDates) + var beginDatesDetectOperations = new List<(int TelemetryId, DateTimeOffset? BeginDate)>(); + + foreach (var telemetryId in telemetryIds) { - var stopwatch = Stopwatch.StartNew(); - var startDate = item.LastDate ?? DateTimeOffset.MinValue; - onProgressCallback($"start detecting telemetry: {item.IdTelemetry} from {startDate}", i++ / count); - var newOperations = await DetectOperationsAsync(item.IdTelemetry, startDate, db, token); - stopwatch.Stop(); - if (newOperations.Any()) + if (lastDetectedDates.TryGetValue(telemetryId, out var beginDate)) { - db.DetectedOperations.AddRange(newOperations); - affected += await db.SaveChangesAsync(token); + beginDatesDetectOperations.Add((telemetryId, beginDate)); + continue; } - } - } - - //todo: move this logic to DetectedOperationsService - internal static async Task> DetectOperationsAsync(int idTelemetry, DateTimeOffset begin, IAsbCloudDbContext db, CancellationToken token) - { - var query = db.TelemetryDataSaub - .AsNoTracking() - .Where(d => d.IdTelemetry == idTelemetry) - .Where(d => d.BlockPosition >= 0) - .Select(d => new DetectableTelemetry - { - DateTime = d.DateTime, - IdUser = d.IdUser, - Mode = d.Mode, - WellDepth = d.WellDepth, - Pressure = d.Pressure, - HookWeight = d.HookWeight, - BlockPosition = d.BlockPosition, - BitDepth = d.BitDepth, - RotorSpeed = d.RotorSpeed, - }) - .OrderBy(d => d.DateTime); - - var take = 4 * 86_400; // 4 дня - var startDate = begin; - var detectedOperations = new List(8); - DetectedOperation? lastDetectedOperation = null; - const int minOperationLength = 5; - const int maxDetectorsInterpolationFrameLength = 30; - const int gap = maxDetectorsInterpolationFrameLength + minOperationLength; - - while (true) - { - var data = await query - .Where(d => d.DateTime > startDate) - .Take(take) - .ToArrayAsync(token); - - if (data.Length < gap) - break; - - var isDetected = false; - var positionBegin = 0; - var positionEnd = data.Length - gap; - while (positionEnd > positionBegin) - { - foreach (var detector in detectors) - { - if (!detector.TryDetect(idTelemetry, data, positionBegin, positionEnd, lastDetectedOperation, out var result)) - continue; - - detectedOperations.Add(result!.Operation); - lastDetectedOperation = result.Operation; - isDetected = true; - positionBegin = result.TelemetryEnd; - break; - } - - positionBegin += 1; - } - - if (isDetected) - startDate = lastDetectedOperation!.DateEnd; - else - startDate = data[positionEnd].DateTime; + + beginDatesDetectOperations.Add((telemetryId, null)); } - return detectedOperations; + var count = beginDatesDetectOperations.Count; + + for (var i = 0; i < count; i++) + { + var (idTelemetry, beginDate) = beginDatesDetectOperations[i]; + + onProgressCallback($"Start detecting telemetry: {idTelemetry} from {beginDate}", i++ / count); + var detectedOperations = await detectedOperationService.DetectOperationsAsync(idTelemetry, beginDate, token); + + if (detectedOperations.Any()) + await detectedOperationRepository.InsertRangeAsync(detectedOperations, token); + } } } From 53715dfaaabd5e4690dfc1cd5d158c52fe7e892e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D1=82=D0=B5=D0=BF=D0=B0=D0=BD=D0=BE=D0=B2=20=D0=94?= =?UTF-8?q?=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9?= Date: Tue, 20 Feb 2024 12:37:58 +0300 Subject: [PATCH 09/12] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=20TelemetryDataS?= =?UTF-8?q?pinService?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/SAUB/TelemetryDataSpinService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AsbCloudInfrastructure/Services/SAUB/TelemetryDataSpinService.cs b/AsbCloudInfrastructure/Services/SAUB/TelemetryDataSpinService.cs index dab1e851..3a6f60d4 100644 --- a/AsbCloudInfrastructure/Services/SAUB/TelemetryDataSpinService.cs +++ b/AsbCloudInfrastructure/Services/SAUB/TelemetryDataSpinService.cs @@ -16,14 +16,14 @@ namespace AsbCloudInfrastructure.Services.SAUB : base(db, telemetryService, telemetryDataCache) { } - public override TelemetryDataSpin Convert(TelemetryDataSpinDto src, double timezoneOffset) + protected override TelemetryDataSpin Convert(TelemetryDataSpinDto src, double timezoneOffset) { var entity = src.Adapt(); entity.DateTime = src.DateTime.ToUtcDateTimeOffset(timezoneOffset); return entity; } - public override TelemetryDataSpinDto Convert(TelemetryDataSpin src, double timezoneOffset) + protected override TelemetryDataSpinDto Convert(TelemetryDataSpin src, double timezoneOffset) { var dto = src.Adapt(); dto.DateTime = src.DateTime.ToRemoteDateTime(timezoneOffset); From 3e84b1591f56542493522dab0073898f00cd1949 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D1=82=D0=B5=D0=BF=D0=B0=D0=BD=D0=BE=D0=B2=20=D0=94?= =?UTF-8?q?=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9?= Date: Tue, 20 Feb 2024 13:01:13 +0300 Subject: [PATCH 10/12] =?UTF-8?q?=D0=92=D0=B5=D1=80=D0=BD=D1=83=D0=BB=20?= =?UTF-8?q?=D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5?= =?UTF-8?q?=D0=BB=D1=8F=20=D0=B4=D0=BB=D1=8F=20=D0=B0=D0=B2=D1=82=D0=BE=20?= =?UTF-8?q?=D0=BE=D0=BF=D1=80=D0=B5=D0=B4=D0=B5=D0=BB=D1=91=D0=BD=D0=BD?= =?UTF-8?q?=D1=8B=D1=85=20=D0=BE=D0=BF=D0=B5=D1=80=D0=B0=D1=86=D0=B8=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DetectedOperation/DetectedOperationDto.cs | 5 + AsbCloudApp/Data/SAUB/TelemetryDataSaubDto.cs | 5 + ...tectedOperateion_Remove_IdUser.Designer.cs | 9453 ----------------- ...090713_DetectedOperateion_Remove_IdUser.cs | 27 - .../AsbCloudDbContextModelSnapshot.cs | 5 + AsbCloudDb/Model/DetectedOperation.cs | 3 + .../DetectOperations/DetectableTelemetry.cs | 1 + .../DetectedOperationService.cs | 1 + .../Detectors/DetectorAbstract.cs | 1 + 9 files changed, 21 insertions(+), 9480 deletions(-) delete mode 100644 AsbCloudDb/Migrations/20240219090713_DetectedOperateion_Remove_IdUser.Designer.cs delete mode 100644 AsbCloudDb/Migrations/20240219090713_DetectedOperateion_Remove_IdUser.cs diff --git a/AsbCloudApp/Data/DetectedOperation/DetectedOperationDto.cs b/AsbCloudApp/Data/DetectedOperation/DetectedOperationDto.cs index 1d6f3421..e81a45fb 100644 --- a/AsbCloudApp/Data/DetectedOperation/DetectedOperationDto.cs +++ b/AsbCloudApp/Data/DetectedOperation/DetectedOperationDto.cs @@ -30,6 +30,11 @@ public class DetectedOperationDto: IId /// [Required] public int IdUserAtStart { get; set; } + + /// + /// Пользователь панели оператора + /// + public string? TelemetryUserName { get; set; } /// /// Дата завершения операции в часовом поясе скважины diff --git a/AsbCloudApp/Data/SAUB/TelemetryDataSaubDto.cs b/AsbCloudApp/Data/SAUB/TelemetryDataSaubDto.cs index e1e7cf96..8f2794fc 100644 --- a/AsbCloudApp/Data/SAUB/TelemetryDataSaubDto.cs +++ b/AsbCloudApp/Data/SAUB/TelemetryDataSaubDto.cs @@ -13,6 +13,11 @@ namespace AsbCloudApp.Data.SAUB /// [Required] public DateTime DateTime { get; set; } + + /// + /// Пользователь САУБ + /// + public int? IdUser { get; set; } /// /// Режим работы САУБ: diff --git a/AsbCloudDb/Migrations/20240219090713_DetectedOperateion_Remove_IdUser.Designer.cs b/AsbCloudDb/Migrations/20240219090713_DetectedOperateion_Remove_IdUser.Designer.cs deleted file mode 100644 index 7b109f9b..00000000 --- a/AsbCloudDb/Migrations/20240219090713_DetectedOperateion_Remove_IdUser.Designer.cs +++ /dev/null @@ -1,9453 +0,0 @@ -// -using System; -using System.Text.Json; -using AsbCloudDb.Model; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace AsbCloudDb.Migrations -{ - [DbContext(typeof(AsbCloudDbContext))] - [Migration("20240219090713_DetectedOperateion_Remove_IdUser")] - partial class DetectedOperateion_Remove_IdUser - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .UseCollation("Russian_Russia.1251") - .HasAnnotation("ProductVersion", "6.0.22") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.HasPostgresExtension(modelBuilder, "adminpack"); - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("AsbCloudDb.Model.Cluster", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Caption") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("caption") - .HasComment("Название"); - - b.Property("IdDeposit") - .HasColumnType("integer") - .HasColumnName("id_deposit"); - - b.Property("Latitude") - .HasColumnType("double precision") - .HasColumnName("latitude"); - - b.Property("Longitude") - .HasColumnType("double precision") - .HasColumnName("longitude"); - - b.Property("Timezone") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("timezone") - .HasComment("Смещение часового пояса от UTC"); - - b.HasKey("Id"); - - b.HasIndex("IdDeposit"); - - b.ToTable("t_cluster"); - - b.HasComment("Кусты"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.Company", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Caption") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("caption"); - - b.Property("IdCompanyType") - .HasMaxLength(255) - .HasColumnType("integer") - .HasColumnName("id_company_type") - .HasComment("вид деятельности"); - - b.HasKey("Id"); - - b.HasIndex("IdCompanyType"); - - b.ToTable("t_company"); - - b.HasData( - new - { - Id = 1, - Caption = "ООО \"АСБ\"", - IdCompanyType = 3 - }); - }); - - modelBuilder.Entity("AsbCloudDb.Model.CompanyType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Caption") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("caption"); - - b.Property("IsContact") - .HasColumnType("boolean") - .HasColumnName("is_contact"); - - b.Property("Order") - .HasColumnType("integer") - .HasColumnName("order"); - - b.HasKey("Id"); - - b.ToTable("t_company_type"); - - b.HasData( - new - { - Id = 1, - Caption = "Недропользователь", - IsContact = true, - Order = 3 - }, - new - { - Id = 2, - Caption = "Буровой подрядчик", - IsContact = true, - Order = 2 - }, - new - { - Id = 3, - Caption = "Сервис автоматизации бурения", - IsContact = true, - Order = 0 - }, - new - { - Id = 4, - Caption = "Сервис по ГТИ", - IsContact = true, - Order = 6 - }, - new - { - Id = 5, - Caption = "Растворный сервис", - IsContact = true, - Order = 4 - }, - new - { - Id = 6, - Caption = "Сервис по ННБ", - IsContact = true, - Order = 5 - }, - new - { - Id = 7, - Caption = "Служба супервайзинга", - IsContact = false, - Order = 1 - }, - new - { - Id = 9, - Caption = "Сервис по цементированию", - IsContact = true, - Order = 7 - }, - new - { - Id = 11, - Caption = "Дизельный сервис", - IsContact = false, - Order = 9 - }, - new - { - Id = 12, - Caption = "Сервис по обслуживанию верхних силовых приводов", - IsContact = true, - Order = 8 - }); - }); - - modelBuilder.Entity("AsbCloudDb.Model.Contact", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Company") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("company") - .HasComment("компания"); - - b.Property("Email") - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("email") - .HasComment("email"); - - b.Property("FullName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("full_name") - .HasComment("ФИО"); - - b.Property("IdCompanyType") - .HasMaxLength(255) - .HasColumnType("integer") - .HasColumnName("id_company_type") - .HasComment("вид деятельности"); - - b.Property("IdWell") - .HasMaxLength(255) - .HasColumnType("integer") - .HasColumnName("id_well") - .HasComment("ключ скважины"); - - b.Property("Phone") - .HasMaxLength(50) - .HasColumnType("character varying(50)") - .HasColumnName("phone") - .HasComment("номер телефона"); - - b.Property("Position") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("position") - .HasComment("должность"); - - b.HasKey("Id"); - - b.HasIndex("IdCompanyType"); - - b.HasIndex("IdWell"); - - b.ToTable("t_contact"); - - b.HasComment("Контакты"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.DailyReports.DailyReport", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Date") - .HasColumnType("date") - .HasColumnName("date") - .HasComment("Дата формирования отчёта"); - - b.Property("DateLastUpdate") - .HasColumnType("timestamp with time zone") - .HasColumnName("date_last_update") - .HasComment("Дата последнего обновления"); - - b.Property("IdWell") - .HasColumnType("integer") - .HasColumnName("id_well") - .HasComment("ID скважины"); - - b.Property("SignBlock") - .HasColumnType("jsonb") - .HasColumnName("sign_block") - .HasComment("Подпись"); - - b.Property("SubsystemBlock") - .HasColumnType("jsonb") - .HasColumnName("subsystem_block") - .HasComment("Наработкой подсистем"); - - b.Property("TimeBalanceBlock") - .HasColumnType("jsonb") - .HasColumnName("time_balance_block") - .HasComment("Баланс времени"); - - b.HasKey("Id"); - - b.HasIndex("IdWell", "Date") - .IsUnique(); - - b.ToTable("t_daily_report"); - - b.HasComment("Ежедневные отчёты"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.DataSaubStat", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AxialLoad") - .HasColumnType("double precision") - .HasColumnName("axial_load") - .HasComment("Фактическая нагрузка"); - - b.Property("AxialLoadLimitMax") - .HasColumnType("double precision") - .HasColumnName("axial_load_limit_max") - .HasComment("Максимально допустимая нагрузка"); - - b.Property("AxialLoadSp") - .HasColumnType("double precision") - .HasColumnName("axial_load_sp") - .HasComment("Ограничение факт. нагрузки"); - - b.Property("BlockSpeedSp") - .HasColumnType("double precision") - .HasColumnName("block_speed_sp") - .HasComment("Ограничение скорости блока"); - - b.Property("DateEnd") - .HasColumnType("timestamp with time zone") - .HasColumnName("date_end") - .HasComment("Дата и время окончания"); - - b.Property("DateStart") - .HasColumnType("timestamp with time zone") - .HasColumnName("date_start") - .HasComment("Дата и время начала"); - - b.Property("DepthEnd") - .HasColumnType("double precision") - .HasColumnName("depth_end") - .HasComment("Глубина забоя по стволу конечная"); - - b.Property("DepthStart") - .HasColumnType("double precision") - .HasColumnName("depth_start") - .HasComment("Глубина забоя по стволу начальная"); - - b.Property("EnabledSubsystems") - .HasColumnType("integer") - .HasColumnName("enabled_subsystems") - .HasComment("Флаги подсистем"); - - b.Property("Flow") - .HasColumnType("double precision") - .HasColumnName("flow") - .HasComment("Фактический расход"); - - b.Property("HasOscillation") - .HasColumnType("boolean") - .HasColumnName("has_oscillation") - .HasComment("Наличие или отсутствие осцилляции"); - - b.Property("IdCategory") - .HasColumnType("integer") - .HasColumnName("id_category") - .HasComment("Название автоопределённой операции"); - - b.Property("IdFeedRegulator") - .HasColumnType("smallint") - .HasColumnName("id_feed_regulator") - .HasComment("Работа при достижении ограничения"); - - b.Property("IdTelemetry") - .HasColumnType("integer") - .HasColumnName("id_telemetry") - .HasComment("Ключ телеметрии"); - - b.Property("Pressure") - .HasColumnType("double precision") - .HasColumnName("pressure") - .HasComment("Давление"); - - b.Property("PressureIdle") - .HasColumnType("double precision") - .HasColumnName("pressure_idle") - .HasComment("Давление холостого хода"); - - b.Property("PressureSp") - .HasColumnType("double precision") - .HasColumnName("pressure_sp") - .HasComment("Ограничение фактического давления"); - - b.Property("RotorSpeed") - .HasColumnType("double precision") - .HasColumnName("rotor_speed") - .HasComment("Фактическая скорость оборотов ВСП"); - - b.Property("RotorTorque") - .HasColumnType("double precision") - .HasColumnName("rotor_torque") - .HasComment("Фактический момент"); - - b.Property("RotorTorqueLimitMax") - .HasColumnType("double precision") - .HasColumnName("rotor_torque_limit_max") - .HasComment("Максимально допустимый момент"); - - b.Property("RotorTorqueSp") - .HasColumnType("double precision") - .HasColumnName("rotor_torque_sp") - .HasComment("Ограничение факт. момента"); - - b.Property("Speed") - .HasColumnType("double precision") - .HasColumnName("speed") - .HasComment("Скорость бурения"); - - b.HasKey("Id"); - - b.HasIndex("IdCategory"); - - b.HasIndex("IdTelemetry"); - - b.ToTable("t_data_saub_stat"); - - b.HasComment("Кеш-таблица для хранения данных для РТК-отчета"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.Deposit", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Caption") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("caption"); - - b.Property("Latitude") - .HasColumnType("double precision") - .HasColumnName("latitude"); - - b.Property("Longitude") - .HasColumnType("double precision") - .HasColumnName("longitude"); - - b.Property("Timezone") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("timezone") - .HasComment("Смещение часового пояса от UTC"); - - b.HasKey("Id"); - - b.ToTable("t_deposit"); - - b.HasComment("Месторождение"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.DetectedOperation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateEnd") - .HasColumnType("timestamp with time zone") - .HasColumnName("date_end") - .HasComment("Дата начала операции"); - - b.Property("DateStart") - .HasColumnType("timestamp with time zone") - .HasColumnName("date_start") - .HasComment("Дата начала операции"); - - b.Property("DepthEnd") - .HasColumnType("double precision") - .HasColumnName("depth_end") - .HasComment("Глубина после завершения операции, м"); - - b.Property("DepthStart") - .HasColumnType("double precision") - .HasColumnName("depth_start") - .HasComment("Глубина на начало операции, м"); - - b.Property("EnabledSubsystems") - .HasColumnType("integer") - .HasColumnName("enabled_subsystems") - .HasComment("флаги включенных подсистем"); - - b.Property("ExtraData") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("extra_data") - .HasComment("доп. инфо по операции"); - - b.Property("IdCategory") - .HasColumnType("integer") - .HasColumnName("id_category") - .HasComment("Id категории операции"); - - b.Property("IdTelemetry") - .HasColumnType("integer") - .HasColumnName("id_telemetry"); - - b.Property("Value") - .HasColumnType("double precision") - .HasColumnName("value") - .HasComment("Ключевой показатель операции"); - - b.HasKey("Id"); - - b.HasIndex("IdCategory"); - - b.HasIndex("IdTelemetry"); - - b.ToTable("t_detected_operation"); - - b.HasComment("автоматически определенные операции по телеметрии"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.Driller", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasComment("Идентификатор"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("name") - .HasComment("Имя"); - - b.Property("Patronymic") - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("patronymic") - .HasComment("Отчество"); - - b.Property("Surname") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("surname") - .HasComment("Фамилия"); - - b.HasKey("Id"); - - b.ToTable("t_driller"); - - b.HasComment("Бурильщик"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.DrillingProgramPart", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("IdFileCategory") - .HasColumnType("integer") - .HasColumnName("id_file_category"); - - b.Property("IdWell") - .HasColumnType("integer") - .HasColumnName("id_well"); - - b.HasKey("Id"); - - b.HasIndex("IdFileCategory"); - - b.HasIndex("IdWell", "IdFileCategory") - .IsUnique(); - - b.ToTable("t_drilling_program_part"); - - b.HasComment("части программ бурения"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.DrillTest", b => - { - b.Property("Id") - .HasColumnType("integer") - .HasColumnName("id") - .HasComment("Идентификатор"); - - b.Property("IdTelemetry") - .HasColumnType("integer") - .HasColumnName("id_telemetry") - .HasComment("Идентификатор телеметрии"); - - b.Property("DepthStart") - .HasColumnType("real") - .HasColumnName("depthStart") - .HasComment("Глубина начала"); - - b.Property("Params") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("t_drill_test_params") - .HasComment("Параметры записи drill test"); - - b.Property("TimeStampStart") - .HasColumnType("timestamp with time zone") - .HasColumnName("timestamp_start") - .HasComment("Время начала"); - - b.HasKey("Id", "IdTelemetry"); - - b.HasIndex("IdTelemetry"); - - b.ToTable("t_drill_test"); - - b.HasComment("Drill_test"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.Faq", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasComment("Идентификатор"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Answer") - .HasColumnType("text") - .HasColumnName("answer") - .HasComment("Текст ответа"); - - b.Property("CounterQuestion") - .HasColumnType("integer") - .HasColumnName("counter_question") - .HasComment("Счетчик повторений вопроса"); - - b.Property("DateAnswer") - .HasColumnType("timestamp with time zone") - .HasColumnName("date_answer") - .HasComment("Дата ответа"); - - b.Property("DateCreatedQuestion") - .HasColumnType("timestamp with time zone") - .HasColumnName("date_created_question") - .HasComment("Дата создания вопроса"); - - b.Property("DateLastEditedQuestion") - .HasColumnType("timestamp with time zone") - .HasColumnName("date_last_edited_question") - .HasComment("Дата последнего редактирования вопроса"); - - b.Property("IdAuthorAnswer") - .HasColumnType("integer") - .HasColumnName("id_author_answer") - .HasComment("id автора ответа"); - - b.Property("IdAuthorQuestion") - .HasColumnType("integer") - .HasColumnName("id_author_question") - .HasComment("id автора вопроса"); - - b.Property("IdReplacementQuestion") - .HasColumnType("integer") - .HasColumnName("id_replacement_question") - .HasComment("Ключ заменяющего вопроса"); - - b.Property("IsFrequently") - .HasColumnType("boolean") - .HasColumnName("is_frequently") - .HasComment("Частый вопрос"); - - b.Property("Question") - .IsRequired() - .HasColumnType("text") - .HasColumnName("question") - .HasComment("Текст вопроса"); - - b.Property("State") - .HasColumnType("integer") - .HasColumnName("state") - .HasComment("Статус вопроса"); - - b.HasKey("Id"); - - b.HasIndex("IdAuthorAnswer"); - - b.HasIndex("IdAuthorQuestion"); - - b.ToTable("t_faq"); - - b.HasComment("вопросы пользователей"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.FileCategory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Name") - .IsRequired() - .HasColumnType("text") - .HasColumnName("name") - .HasComment("Название категории"); - - b.Property("ShortName") - .HasColumnType("text") - .HasColumnName("short_name") - .HasComment("Короткое название категории"); - - b.HasKey("Id"); - - b.ToTable("t_file_category"); - - b.HasComment("Категории файлов"); - - b.HasData( - new - { - Id = 1, - Name = "Растворный сервис", - ShortName = "fluidService" - }, - new - { - Id = 2, - Name = "Цементирование", - ShortName = "cement" - }, - new - { - Id = 3, - Name = "ННБ", - ShortName = "nnb" - }, - new - { - Id = 4, - Name = "ГТИ", - ShortName = "gti" - }, - new - { - Id = 5, - Name = "Документы по скважине", - ShortName = "wellDocuments" - }, - new - { - Id = 6, - Name = "Супервайзер", - ShortName = "supervisor" - }, - new - { - Id = 7, - Name = "Мастер", - ShortName = "master" - }, - new - { - Id = 8, - Name = "Долотный сервис", - ShortName = "toolService" - }, - new - { - Id = 9, - Name = "Буровой подрядчик", - ShortName = "drillService" - }, - new - { - Id = 10, - Name = "Сервис по заканчиванию скважины", - ShortName = "closingService" - }, - new - { - Id = 12, - Name = "Рапорт", - ShortName = "report" - }, - new - { - Id = 1000, - Name = "Программа бурения" - }, - new - { - Id = 1001, - Name = "Задание от геологов" - }, - new - { - Id = 1002, - Name = "Профиль ствола скважины (ННБ)" - }, - new - { - Id = 1003, - Name = "Технологические расчеты (ННБ)" - }, - new - { - Id = 1004, - Name = "Долотная программа" - }, - new - { - Id = 1005, - Name = "Программа по растворам" - }, - new - { - Id = 1006, - Name = "Программа геофизических исследований" - }, - new - { - Id = 1007, - Name = "Планы спусков обсадных колонн" - }, - new - { - Id = 1008, - Name = "Программы цементирования обсадных колонн" - }, - new - { - Id = 10000, - Name = "Проект на бурение транспортного и горизонтального участков скважины" - }, - new - { - Id = 10001, - Name = "Программа на бурение транспортного и горизонтального участков скважины" - }, - new - { - Id = 10002, - Name = "Акт о начале бурения" - }, - new - { - Id = 10003, - Name = "План работ спуска и цементирования направления" - }, - new - { - Id = 10004, - Name = "Программа цементирования направления" - }, - new - { - Id = 10005, - Name = "Мера обсадных труб (направление)" - }, - new - { - Id = 10006, - Name = "Акт на выполненные работы по цементированию направления" - }, - new - { - Id = 10007, - Name = "Отчет по цементированию направления (график)" - }, - new - { - Id = 10008, - Name = "План работ спуска и цементирования кондуктора" - }, - new - { - Id = 10009, - Name = "Программа цементирования (кондуктор)" - }, - new - { - Id = 10010, - Name = "Мера обсадных труб (кондуктор)" - }, - new - { - Id = 10011, - Name = "Карта крепления кондуктора" - }, - new - { - Id = 10012, - Name = "Акт на выполненные работы по цементированию кондуктора" - }, - new - { - Id = 10013, - Name = "Отчет по цементированию кондуктора (график)" - }, - new - { - Id = 10014, - Name = "Акт о замере расстояния от стола ротора до муфты кондуктора" - }, - new - { - Id = 10015, - Name = "Акт опресовки цементного кольца за кондуктором" - }, - new - { - Id = 10016, - Name = "Акт опресовки ППГ с глухими плашками совместно с кондуктором" - }, - new - { - Id = 10017, - Name = "Акт опресовки ПУГ, ППГ с трубными плашками совместно с кондуктором" - }, - new - { - Id = 10018, - Name = "План работ на крепление обсадной колонны (эк. колонна)" - }, - new - { - Id = 10019, - Name = "Программа цементирования (эк. колонна)" - }, - new - { - Id = 10020, - Name = "Мера труб эксплуатационной колонны" - }, - new - { - Id = 10021, - Name = "Карта по креплению скважины (эк. колонна)" - }, - new - { - Id = 10022, - Name = "Акт на установку пружинных центраторов" - }, - new - { - Id = 10023, - Name = "Отчет по цементированию эксплуатационной колонны (график)" - }, - new - { - Id = 10024, - Name = "Акт на выполненные работы по цементированию эксплуатационной колонны" - }, - new - { - Id = 10025, - Name = "Акт об испытании эк. колонны на герметичность (СТОП)" - }, - new - { - Id = 10026, - Name = "Акт опресовки ППГ с глухими плашками совместно с э/колонной" - }, - new - { - Id = 10027, - Name = "Акт опресовки ПУГ, ППГ с трубными плашками совместно с э/колонной" - }, - new - { - Id = 10028, - Name = "Акт на вскрытие продуктивного пласта" - }, - new - { - Id = 10029, - Name = "Акт замера параметров раствора при бурении горизонтального участка" - }, - new - { - Id = 10030, - Name = "Разрешение на спуск «хвостовика» (телефонограмма)" - }, - new - { - Id = 10031, - Name = "План работ на спуск «хвостовика»" - }, - new - { - Id = 10032, - Name = "Акт готовности бурового и энергетического оборудования к спуску «хвостовика»" - }, - new - { - Id = 10033, - Name = "Акт шаблонировки ствола скважины перед спуском «хвостовика»" - }, - new - { - Id = 10034, - Name = "Мера обсадных труб (хвостовик)" - }, - new - { - Id = 10035, - Name = "Акт выполненных работ по спуску хвостовика с закачкой (нефти, солевого раствора" - }, - new - { - Id = 10036, - Name = "Акт о переводе скважины на тех. воду" - }, - new - { - Id = 10037, - Name = "Акт об окончании бурения" - }, - new - { - Id = 10038, - Name = "Акт на передачу скважины в освоение (КРС)" - }, - new - { - Id = 10039, - Name = "Акт на опресовку межколонного пространства с КРС" - }, - new - { - Id = 10040, - Name = "Акт на сдачу скважины в ЦДНГ" - }, - new - { - Id = 10041, - Name = "Паспорт ОУС (заполняется геологами)" - }, - new - { - Id = 10042, - Name = "Паспорт скважины (заполняется геологами)" - }, - new - { - Id = 10043, - Name = "Фактические данные бурения (вставляются в паспорт скважины)" - }, - new - { - Id = 20000, - Name = "Справки по страницам" - }, - new - { - Id = 30000, - Name = "Инструкции" - }); - }); - - modelBuilder.Entity("AsbCloudDb.Model.FileInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("IdAuthor") - .HasColumnType("integer") - .HasColumnName("id_author") - .HasComment("Id пользователя, загрузившего файл"); - - b.Property("IdCategory") - .HasColumnType("integer") - .HasColumnName("id_category") - .HasComment("id категории файла"); - - b.Property("IdWell") - .HasColumnType("integer") - .HasColumnName("id_well") - .HasComment("id скважины"); - - b.Property("IsDeleted") - .HasColumnType("boolean") - .HasColumnName("is_deleted") - .HasComment("Удален ли файл"); - - b.Property("Name") - .IsRequired() - .HasColumnType("text") - .HasColumnName("name") - .HasComment("Название файла"); - - b.Property("Size") - .HasColumnType("bigint") - .HasColumnName("file_size") - .HasComment("Размер файла"); - - b.Property("UploadDate") - .HasColumnType("timestamp with time zone") - .HasColumnName("date"); - - b.HasKey("Id"); - - b.HasIndex("IdAuthor"); - - b.HasIndex("IdCategory"); - - b.HasIndex("IdWell"); - - b.ToTable("t_file_info"); - - b.HasComment("Файлы всех категорий"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.FileMark", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Comment") - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("comment") - .HasComment("Комментарий"); - - b.Property("DateCreated") - .HasColumnType("timestamp with time zone") - .HasColumnName("date_created") - .HasComment("Дата совершенного действия"); - - b.Property("IdFile") - .HasColumnType("integer") - .HasColumnName("id_file") - .HasComment("id файла"); - - b.Property("IdMarkType") - .HasColumnType("integer") - .HasColumnName("id_mark_type") - .HasComment("0 - отклонен, 1 - согласован"); - - b.Property("IdUser") - .HasColumnType("integer") - .HasColumnName("id_user") - .HasComment("id пользователя"); - - b.Property("IsDeleted") - .HasColumnType("boolean") - .HasColumnName("is_deleted") - .HasComment("Помечен ли файл как удаленный"); - - b.HasKey("Id"); - - b.HasIndex("IdFile"); - - b.HasIndex("IdUser"); - - b.ToTable("t_file_mark"); - - b.HasComment("Действия с файлами."); - }); - - modelBuilder.Entity("AsbCloudDb.Model.GTR.WitsItemFloat", b => - { - b.Property("IdTelemetry") - .HasColumnType("integer") - .HasColumnName("id_telemetry"); - - b.Property("IdRecord") - .HasColumnType("integer") - .HasColumnName("id_record"); - - b.Property("IdItem") - .HasColumnType("integer") - .HasColumnName("id_item"); - - b.Property("DateTime") - .HasColumnType("timestamp with time zone") - .HasColumnName("date"); - - b.Property("Value") - .HasColumnType("real") - .HasColumnName("value"); - - b.HasKey("IdTelemetry", "IdRecord", "IdItem", "DateTime"); - - b.ToTable("t_wits_float"); - - b.HasComment("таблица данных ГТИ с типом значения float"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.GTR.WitsItemInt", b => - { - b.Property("IdTelemetry") - .HasColumnType("integer") - .HasColumnName("id_telemetry"); - - b.Property("IdRecord") - .HasColumnType("integer") - .HasColumnName("id_record"); - - b.Property("IdItem") - .HasColumnType("integer") - .HasColumnName("id_item"); - - b.Property("DateTime") - .HasColumnType("timestamp with time zone") - .HasColumnName("date"); - - b.Property("Value") - .HasColumnType("integer") - .HasColumnName("value"); - - b.HasKey("IdTelemetry", "IdRecord", "IdItem", "DateTime"); - - b.ToTable("t_wits_int"); - - b.HasComment("таблица данных ГТИ с типом значения int"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.GTR.WitsItemString", b => - { - b.Property("IdTelemetry") - .HasColumnType("integer") - .HasColumnName("id_telemetry"); - - b.Property("IdRecord") - .HasColumnType("integer") - .HasColumnName("id_record"); - - b.Property("IdItem") - .HasColumnType("integer") - .HasColumnName("id_item"); - - b.Property("DateTime") - .HasColumnType("timestamp with time zone") - .HasColumnName("date"); - - b.Property("Value") - .IsRequired() - .HasColumnType("text") - .HasColumnName("value"); - - b.HasKey("IdTelemetry", "IdRecord", "IdItem", "DateTime"); - - b.ToTable("t_wits_string"); - - b.HasComment("таблица данных ГТИ с типом значения string"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.HelpPage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("IdCategory") - .HasColumnType("integer") - .HasColumnName("id_category") - .HasComment("Id категории файла"); - - b.Property("Name") - .IsRequired() - .HasColumnType("text") - .HasColumnName("name") - .HasComment("Название файла"); - - b.Property("Size") - .HasColumnType("bigint") - .HasColumnName("file_size") - .HasComment("Размер файла"); - - b.Property("UrlPage") - .IsRequired() - .HasColumnType("text") - .HasColumnName("url_page") - .HasComment("Url страницы"); - - b.HasKey("Id"); - - b.HasIndex("IdCategory"); - - b.ToTable("t_help_page"); - - b.HasComment("Справки"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.LimitingParameter", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateEnd") - .HasColumnType("timestamp with time zone") - .HasColumnName("date_end"); - - b.Property("DateStart") - .HasColumnType("timestamp with time zone") - .HasColumnName("date_start"); - - b.Property("DepthEnd") - .HasColumnType("real") - .HasColumnName("depth_end"); - - b.Property("DepthStart") - .HasColumnType("real") - .HasColumnName("depth_start"); - - b.Property("IdFeedRegulator") - .HasColumnType("smallint") - .HasColumnName("id_feed_regulator"); - - b.Property("IdTelemetry") - .HasColumnType("integer") - .HasColumnName("id_telemetry"); - - b.HasKey("Id"); - - b.HasIndex("IdTelemetry"); - - b.ToTable("t_limiting_parameter"); - - b.HasComment("Ограничения по параметрам телеметрии"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.Manuals.Manual", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateDownload") - .HasColumnType("timestamp with time zone") - .HasColumnName("date_download") - .HasComment("Дата загрузки"); - - b.Property("IdAuthor") - .HasColumnType("integer") - .HasColumnName("id_author") - .HasComment("Id автора"); - - b.Property("IdCategory") - .HasColumnType("integer") - .HasColumnName("id_category") - .HasComment("Id категории файла"); - - b.Property("IdDirectory") - .HasColumnType("integer") - .HasColumnName("id_directory") - .HasComment("Id директории"); - - b.Property("Name") - .IsRequired() - .HasColumnType("text") - .HasColumnName("name") - .HasComment("Название"); - - b.HasKey("Id"); - - b.HasIndex("IdAuthor"); - - b.HasIndex("IdCategory"); - - b.HasIndex("IdDirectory"); - - b.ToTable("t_manual"); - - b.HasComment("Инструкции"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.Manuals.ManualDirectory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("IdParent") - .HasColumnType("integer") - .HasColumnName("id_parent") - .HasComment("Id родительской директории"); - - b.Property("Name") - .IsRequired() - .HasColumnType("text") - .HasColumnName("name") - .HasComment("Название"); - - b.HasKey("Id"); - - b.HasIndex("IdParent"); - - b.ToTable("t_manual_directory"); - - b.HasComment("Директория для инструкций"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.Measure", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Data") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("data") - .HasComment("Данные таблицы последних данных"); - - b.Property("IdCategory") - .HasColumnType("integer") - .HasColumnName("id_category") - .HasComment("id категории"); - - b.Property("IdWell") - .HasColumnType("integer") - .HasColumnName("id_well") - .HasComment("id скважины"); - - b.Property("IsDeleted") - .HasColumnType("boolean") - .HasColumnName("is_deleted") - .HasComment("Пометка удаленным"); - - b.Property("Timestamp") - .HasColumnType("timestamp with time zone") - .HasColumnName("timestamp") - .HasComment("время добавления"); - - b.HasKey("Id"); - - b.HasIndex("IdCategory"); - - b.HasIndex("IdWell"); - - b.ToTable("t_measure"); - - b.HasComment("Таблица c данными для вкладки 'Последние данные'"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.MeasureCategory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Name") - .IsRequired() - .HasColumnType("text") - .HasColumnName("name") - .HasComment("Название категории"); - - b.Property("ShortName") - .HasColumnType("text") - .HasColumnName("short_name") - .HasComment("Короткое название категории"); - - b.HasKey("Id"); - - b.ToTable("t_measure_category"); - - b.HasComment("Категория последних данных"); - - b.HasData( - new - { - Id = 1, - Name = "Показатели бурового раствора", - ShortName = "Раствор" - }, - new - { - Id = 2, - Name = "Шламограмма", - ShortName = "Шламограмма" - }, - new - { - Id = 3, - Name = "ННБ", - ShortName = "ННБ" - }); - }); - - modelBuilder.Entity("AsbCloudDb.Model.Notification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("IdNotificationCategory") - .HasColumnType("integer") - .HasColumnName("id_notification_category") - .HasComment("Id категории уведомления"); - - b.Property("IdTransportType") - .HasColumnType("integer") - .HasColumnName("id_transport_type") - .HasComment("Id типа доставки уведомления"); - - b.Property("IdUser") - .HasColumnType("integer") - .HasColumnName("id_user") - .HasComment("Id получателя"); - - b.Property("Message") - .IsRequired() - .HasColumnType("text") - .HasColumnName("message") - .HasComment("Сообщение уведомления"); - - b.Property("ReadDate") - .HasColumnType("timestamp with time zone") - .HasColumnName("read_date") - .HasComment("Дата прочтения уведомления"); - - b.Property("RegistrationDate") - .HasColumnType("timestamp with time zone") - .HasColumnName("registration_date") - .HasComment("Дата регистрации уведомления"); - - b.Property("SentDate") - .HasColumnType("timestamp with time zone") - .HasColumnName("sent_date") - .HasComment("Дата отправки уведомления"); - - b.Property("Title") - .IsRequired() - .HasColumnType("text") - .HasColumnName("title") - .HasComment("Заголовок уведомления"); - - b.HasKey("Id"); - - b.HasIndex("IdNotificationCategory"); - - b.HasIndex("IdUser"); - - b.ToTable("t_notification"); - - b.HasComment("Уведомления"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.NotificationCategory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Name") - .IsRequired() - .HasColumnType("text") - .HasColumnName("name"); - - b.HasKey("Id"); - - b.ToTable("t_notification_category"); - - b.HasComment("Категории уведомлений"); - - b.HasData( - new - { - Id = 1, - Name = "Системные уведомления" - }); - }); - - modelBuilder.Entity("AsbCloudDb.Model.OperationValue", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasComment("Идентификатор"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DepthEnd") - .HasColumnType("double precision") - .HasColumnName("depth_end") - .HasComment("Конечная глубина"); - - b.Property("DepthStart") - .HasColumnType("double precision") - .HasColumnName("depth_start") - .HasComment("Старотовая глубина"); - - b.Property("IdOperationCategory") - .HasColumnType("integer") - .HasColumnName("id_operation_category") - .HasComment("Ид категории операции"); - - b.Property("IdWell") - .HasColumnType("integer") - .HasColumnName("id_well") - .HasComment("Ид скважины"); - - b.Property("StandardValue") - .HasColumnType("double precision") - .HasColumnName("standard_value") - .HasComment("Нормативный показатель"); - - b.Property("TargetValue") - .HasColumnType("double precision") - .HasColumnName("target_value") - .HasComment("Целевой показатель"); - - b.HasKey("Id"); - - b.HasIndex("IdOperationCategory"); - - b.HasIndex("IdWell"); - - b.ToTable("t_operationvalue"); - - b.HasComment("Целевые/нормативные показатели операции"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.Permission", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("description") - .HasComment("Краткое описание"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("name") - .HasComment("Название"); - - b.HasKey("Id"); - - b.ToTable("t_permission"); - - b.HasComment("Разрешения на доступ к данным"); - - b.HasData( - new - { - Id = 100, - Description = "Разрешение удалять админ. Кусты", - Name = "AdminCluster.delete" - }, - new - { - Id = 101, - Description = "Разрешение редактировать админ. Кусты", - Name = "AdminCluster.edit" - }, - new - { - Id = 102, - Description = "Разрешение просматривать админ. Кусты", - Name = "AdminCluster.get" - }, - new - { - Id = 103, - Description = "Разрешение удалять админ. Компании", - Name = "AdminCompany.delete" - }, - new - { - Id = 104, - Description = "Разрешение редактировать админ. Компании", - Name = "AdminCompany.edit" - }, - new - { - Id = 105, - Description = "Разрешение просматривать админ. Компании", - Name = "AdminCompany.get" - }, - new - { - Id = 106, - Description = "Разрешение удалять админ. Типы компаний", - Name = "AdminCompanyType.delete" - }, - new - { - Id = 107, - Description = "Разрешение редактировать админ. Типы компаний", - Name = "AdminCompanyType.edit" - }, - new - { - Id = 108, - Description = "Разрешение просматривать админ. Типы компаний", - Name = "AdminCompanyType.get" - }, - new - { - Id = 109, - Description = "Разрешение удалять админ. Месторождения", - Name = "AdminDeposit.delete" - }, - new - { - Id = 110, - Description = "Разрешение редактировать админ. Месторождения", - Name = "AdminDeposit.edit" - }, - new - { - Id = 111, - Description = "Разрешение просматривать админ. Месторождения", - Name = "AdminDeposit.get" - }, - new - { - Id = 112, - Description = "Разрешение удалять админ. Разрешения", - Name = "AdminPermission.delete" - }, - new - { - Id = 113, - Description = "Разрешение редактировать админ. Разрешения", - Name = "AdminPermission.edit" - }, - new - { - Id = 114, - Description = "Разрешение просматривать админ. Разрешения", - Name = "AdminPermission.get" - }, - new - { - Id = 115, - Description = "Разрешение удалять админ. Телеметрию", - Name = "AdminTelemetry.delete" - }, - new - { - Id = 116, - Description = "Разрешение редактировать админ. Телеметрию", - Name = "AdminTelemetry.edit" - }, - new - { - Id = 117, - Description = "Разрешение просматривать админ. Телеметрию", - Name = "AdminTelemetry.get" - }, - new - { - Id = 118, - Description = "Разрешение удалять админ. Пользователей", - Name = "AdminUser.delete" - }, - new - { - Id = 119, - Description = "Разрешение редактировать админ. Пользователей", - Name = "AdminUser.edit" - }, - new - { - Id = 120, - Description = "Разрешение просматривать админ. Пользователей", - Name = "AdminUser.get" - }, - new - { - Id = 121, - Description = "Разрешение удалять админ. Роли пользователей", - Name = "AdminUserRole.delete" - }, - new - { - Id = 122, - Description = "Разрешение редактировать админ. Роли пользователей", - Name = "AdminUserRole.edit" - }, - new - { - Id = 123, - Description = "Разрешение просматривать админ. Роли пользователей", - Name = "AdminUserRole.get" - }, - new - { - Id = 124, - Description = "Разрешение удалять админ. Скважины", - Name = "AdminWell.delete" - }, - new - { - Id = 125, - Description = "Разрешение редактировать админ. Скважины", - Name = "AdminWell.edit" - }, - new - { - Id = 126, - Description = "Разрешение просматривать админ. Скважины", - Name = "AdminWell.get" - }, - new - { - Id = 127, - Description = "Разрешение удалять админ. Подсистемы", - Name = "AdminSubsytem.delete" - }, - new - { - Id = 128, - Description = "Разрешение редактировать админ. Подсистемы", - Name = "AdminSubsytem.edit" - }, - new - { - Id = 129, - Description = "Разрешение просматривать админ. Подсистемы", - Name = "AdminSubsytem.get" - }, - new - { - Id = 200, - Description = "Разрешение редактировать 0", - Name = "Auth.edit" - }, - new - { - Id = 201, - Description = "Разрешение просматривать 0", - Name = "Auth.get" - }, - new - { - Id = 202, - Description = "Разрешение просматривать Кусты", - Name = "Cluster.get" - }, - new - { - Id = 203, - Description = "Разрешение просматривать Месторождения", - Name = "Deposit.get" - }, - new - { - Id = 204, - Description = "Разрешение удалять РТК", - Name = "DrillFlowChart.delete" - }, - new - { - Id = 205, - Description = "Разрешение редактировать РТК", - Name = "DrillFlowChart.edit" - }, - new - { - Id = 206, - Description = "Разрешение просматривать РТК", - Name = "DrillFlowChart.get" - }, - new - { - Id = 207, - Description = "Разрешение удалять Программу бурения", - Name = "DrillingProgram.delete" - }, - new - { - Id = 208, - Description = "Разрешение редактировать Программу бурения", - Name = "DrillingProgram.edit" - }, - new - { - Id = 209, - Description = "Разрешение просматривать Программу бурения", - Name = "DrillingProgram.get" - }, - new - { - Id = 210, - Description = "Разрешение удалять Режимы бурения", - Name = "DrillParams.delete" - }, - new - { - Id = 211, - Description = "Разрешение редактировать Режимы бурения", - Name = "DrillParams.edit" - }, - new - { - Id = 212, - Description = "Разрешение просматривать Режимы бурения", - Name = "DrillParams.get" - }, - new - { - Id = 213, - Description = "Разрешение удалять Файлы", - Name = "File.delete" - }, - new - { - Id = 214, - Description = "Разрешение редактировать Файлы", - Name = "File.edit" - }, - new - { - Id = 215, - Description = "Разрешение просматривать Файлы", - Name = "File.get" - }, - new - { - Id = 216, - Description = "Разрешение удалять Измерения", - Name = "Measure.delete" - }, - new - { - Id = 217, - Description = "Разрешение редактировать Измерения", - Name = "Measure.edit" - }, - new - { - Id = 218, - Description = "Разрешение просматривать Измерения", - Name = "Measure.get" - }, - new - { - Id = 219, - Description = "Разрешение просматривать Сообщения телеметрии", - Name = "Message.get" - }, - new - { - Id = 220, - Description = "Разрешение просматривать Статистику по операциям", - Name = "OperationStat.get" - }, - new - { - Id = 221, - Description = "Разрешение редактировать Рапорта", - Name = "Report.edit" - }, - new - { - Id = 222, - Description = "Разрешение просматривать Рапорта", - Name = "Report.get" - }, - new - { - Id = 223, - Description = "Разрешение просматривать админ. Системная статистика", - Name = "RequestTracker.get" - }, - new - { - Id = 224, - Description = "Разрешение удалять Рекомендации уставок", - Name = "Setpoints.delete" - }, - new - { - Id = 225, - Description = "Разрешение редактировать Рекомендации уставок", - Name = "Setpoints.edit" - }, - new - { - Id = 226, - Description = "Разрешение просматривать Рекомендации уставок", - Name = "Setpoints.get" - }, - new - { - Id = 227, - Description = "Разрешение редактировать Телеметрии", - Name = "Telemetry.edit" - }, - new - { - Id = 228, - Description = "Разрешение просматривать Анализ телеметрии", - Name = "TelemetryAnalytics.get" - }, - new - { - Id = 229, - Description = "Разрешение редактировать Данные телеметрии по САУБ", - Name = "TelemetryDataSaub.edit" - }, - new - { - Id = 230, - Description = "Разрешение просматривать Данные телеметрии по САУБ", - Name = "TelemetryDataSaub.get" - }, - new - { - Id = 231, - Description = "Разрешение редактировать Данные телеметрии по SpinMaster", - Name = "TelemetryDataSpin.edit" - }, - new - { - Id = 232, - Description = "Разрешение просматривать Данные телеметрии по SpinMaster", - Name = "TelemetryDataSpin.get" - }, - new - { - Id = 233, - Description = "Разрешение редактировать Скважины", - Name = "Well.edit" - }, - new - { - Id = 234, - Description = "Разрешение просматривать Скважины", - Name = "Well.get" - }, - new - { - Id = 235, - Description = "Разрешение редактировать Композитные скважины", - Name = "WellComposite.edit" - }, - new - { - Id = 236, - Description = "Разрешение просматривать Композитные скважины", - Name = "WellComposite.get" - }, - new - { - Id = 237, - Description = "Разрешение удалять Операции по скважинам", - Name = "WellOperation.delete" - }, - new - { - Id = 238, - Description = "Разрешение редактировать Операции по скважинам", - Name = "WellOperation.edit" - }, - new - { - Id = 239, - Description = "Разрешение просматривать Операции по скважинам", - Name = "WellOperation.get" - }, - new - { - Id = 240, - Description = "Разрешение редактировать Файлы категории 1 (Растворный сервис)", - Name = "File.edit1" - }, - new - { - Id = 241, - Description = "Разрешение редактировать Файлы категории 2 (Цементирование)", - Name = "File.edit2" - }, - new - { - Id = 242, - Description = "Разрешение редактировать Файлы категории 3 (ННБ)", - Name = "File.edit3" - }, - new - { - Id = 243, - Description = "Разрешение редактировать Файлы категории 4 (ГТИ)", - Name = "File.edit4" - }, - new - { - Id = 244, - Description = "Разрешение редактировать Файлы категории 5 (Документы по скважине)", - Name = "File.edit5" - }, - new - { - Id = 245, - Description = "Разрешение редактировать Файлы категории 6 (Супервайзер)", - Name = "File.edit6" - }, - new - { - Id = 246, - Description = "Разрешение редактировать Файлы категории 7 (Мастер)", - Name = "File.edit7" - }, - new - { - Id = 247, - Description = "Разрешение редактировать Файлы категории 8 (Долотный сервис)", - Name = "File.edit8" - }, - new - { - Id = 248, - Description = "Разрешение редактировать Файлы категории 9 (Буровой подрядчик)", - Name = "File.edit9" - }, - new - { - Id = 249, - Description = "Разрешение редактировать Файлы категории 10 (Сервис по заканчиванию скважины)", - Name = "File.edit10" - }, - new - { - Id = 250, - Description = "Разрешение редактировать Файлы категории 11 (Рапорт)", - Name = "File.edit11" - }, - new - { - Id = 251, - Description = "Разрешение редактировать Файлы категории 12", - Name = "File.edit12" - }, - new - { - Id = 252, - Description = "Разрешение редактировать Файлы категории 12", - Name = "File.edit13" - }, - new - { - Id = 253, - Description = "Разрешение редактировать Файлы категории 13", - Name = "File.edit14" - }, - new - { - Id = 254, - Description = "Разрешение редактировать Файлы категории 14", - Name = "File.edit15" - }, - new - { - Id = 255, - Description = "Разрешение редактировать Файлы категории 15", - Name = "File.edit16" - }, - new - { - Id = 256, - Description = "Разрешение редактировать Файлы категории 16", - Name = "File.edit17" - }, - new - { - Id = 257, - Description = "Разрешение редактировать Файлы категории 17", - Name = "File.edit18" - }, - new - { - Id = 258, - Description = "Разрешение редактировать Файлы категории 18", - Name = "File.edit19" - }, - new - { - Id = 259, - Description = "Разрешение редактировать Файлы категории 19", - Name = "File.edit20" - }, - new - { - Id = 260, - Description = "Разрешение редактировать Файлы категории 20", - Name = "File.edit21" - }, - new - { - Id = 261, - Description = "Разрешение редактировать Файлы категории 21", - Name = "File.edit22" - }, - new - { - Id = 262, - Description = "Разрешение редактировать Файлы категории 22", - Name = "File.edit23" - }, - new - { - Id = 263, - Description = "Разрешение редактировать Файлы категории 23", - Name = "File.edit24" - }, - new - { - Id = 264, - Description = "Разрешение редактировать Файлы категории 24", - Name = "File.edit25" - }, - new - { - Id = 265, - Description = "Разрешение редактировать Файлы категории 25", - Name = "File.edit26" - }, - new - { - Id = 266, - Description = "Разрешение редактировать Файлы категории 26", - Name = "File.edit27" - }, - new - { - Id = 267, - Description = "Разрешение редактировать Файлы категории 27", - Name = "File.edit28" - }, - new - { - Id = 268, - Description = "Разрешение редактировать Файлы категории 28", - Name = "File.edit29" - }, - new - { - Id = 269, - Description = "Разрешение редактировать Файлы категории 29", - Name = "File.edit30" - }, - new - { - Id = 380, - Description = "Разрешение просматривать список бурильщиков", - Name = "Driller.get" - }, - new - { - Id = 381, - Description = "Разрешение редактировать бурильщика", - Name = "Driller.edit" - }, - new - { - Id = 382, - Description = "Разрешение удалять бурильщик", - Name = "Driller.delete" - }, - new - { - Id = 383, - Description = "Разрешение просматривать графики бурильщиков", - Name = "Schedule.get" - }, - new - { - Id = 384, - Description = "Разрешение редактировать график бурильщика", - Name = "Schedule.edit" - }, - new - { - Id = 385, - Description = "Разрешение удалять график бурильщика", - Name = "Schedule.delete" - }, - new - { - Id = 386, - Description = "Разрешение просматривать суточный рапорт", - Name = "DailyReport.get" - }, - new - { - Id = 387, - Description = "Разрешение редактировать суточный рапорт", - Name = "DailyReport.edit" - }, - new - { - Id = 388, - Description = "Разрешение просматривать авто. определенные операции", - Name = "DetectedOperation.get" - }, - new - { - Id = 389, - Description = "Разрешение просматривать целевые значения", - Name = "OperationValue.get" - }, - new - { - Id = 390, - Description = "Разрешение редактировать целевые значения", - Name = "OperationValue.edit" - }, - new - { - Id = 391, - Description = "Разрешение удалять целевые значения", - Name = "OperationValue.delete" - }, - new - { - Id = 400, - Description = "Разрешение просматривать инфо по wits параметрам", - Name = "WitsInfo.get" - }, - new - { - Id = 401, - Description = "Разрешение просматривать WITS record 1", - Name = "WitsRecord1.get" - }, - new - { - Id = 407, - Description = "Разрешение просматривать WITS record 7", - Name = "WitsRecord7.get" - }, - new - { - Id = 408, - Description = "Разрешение просматривать WITS record 8", - Name = "WitsRecord8.get" - }, - new - { - Id = 450, - Description = "Разрешение просматривать WITS record 50", - Name = "WitsRecord50.get" - }, - new - { - Id = 460, - Description = "Разрешение просматривать WITS record 60", - Name = "WitsRecord60.get" - }, - new - { - Id = 461, - Description = "Разрешение просматривать WITS record 61", - Name = "WitsRecord61.get" - }, - new - { - Id = 500, - Description = "Разрешение удалять Категорий документов файлов", - Name = "FileCategory.delete" - }, - new - { - Id = 501, - Description = "Разрешение редактировать Категорий документов файлов", - Name = "FileCategory.edit" - }, - new - { - Id = 502, - Description = "Разрешение просматривать Категорий документов файлов", - Name = "FileCategory.get" - }, - new - { - Id = 503, - Description = "Разрешение удалять Дело скважины", - Name = "WellFinalDocuments.delete" - }, - new - { - Id = 504, - Description = "Разрешение редактировать Дело скважины", - Name = "WellFinalDocuments.edit" - }, - new - { - Id = 505, - Description = "Разрешение просматривать Дело скважины", - Name = "WellFinalDocuments.get" - }, - new - { - Id = 506, - Description = "Разрешение редактировать ответственных за загрузку файла Дело скважины", - Name = "WellFinalDocuments.editPublisher" - }, - new - { - Id = 507, - Description = "Разрешение просматривать наработка талевого каната", - Name = "TelemetryWirelineRunOut.get" - }, - new - { - Id = 510, - Description = "Разрешение просматривать плановая траектория", - Name = "PlannedTrajectory.get" - }, - new - { - Id = 511, - Description = "Разрешение редактировать плановая траектория", - Name = "PlannedTrajectory.edit" - }, - new - { - Id = 512, - Description = "Разрешение удалять плановая траектория", - Name = "PlannedTrajectory.delete" - }, - new - { - Id = 516, - Description = "Разрешение просматривать статистику вопросов", - Name = "FaqStatistics.get" - }, - new - { - Id = 517, - Description = "Разрешение редактировать вопрос", - Name = "FaqStatistics.edit" - }, - new - { - Id = 518, - Description = "Разрешение удалять вопрос", - Name = "FaqStatistics.delete" - }, - new - { - Id = 519, - Description = "Разрешение просматривать список контактов", - Name = "WellContact.get" - }, - new - { - Id = 520, - Description = "Разрешение редактировать список контактов", - Name = "WellContact.edit" - }, - new - { - Id = 521, - Description = "Разрешить создание справок по страницам", - Name = "HelpPage.edit" - }, - new - { - Id = 522, - Description = "Разрешить удаление всех настроек пользователя", - Name = "UserSettings.delete" - }, - new - { - Id = 523, - Description = "Разрешить редактирование инструкций", - Name = "Manual.edit" - }, - new - { - Id = 524, - Description = "Разрешить получение инструкций", - Name = "Manual.get" - }, - new - { - Id = 525, - Description = "Разрешение на редактирование РТК у завершенной скважины", - Name = "ProcessMap.editCompletedWell" - }, - new - { - Id = 526, - Description = "Разрешение на редактирование операций у завершенной скважины", - Name = "WellOperation.editCompletedWell" - }, - new - { - Id = 527, - Description = "Разрешение на удаление инструкций", - Name = "Manual.delete" - }, - new - { - Id = 528, - Description = "Разрешение на удаление контакта", - Name = "WellContact.delete" - }, - new - { - Id = 530, - Description = "Разрешение на редактирование плановой конструкции скважины", - Name = "WellSectionPlan.edit" - }, - new - { - Id = 531, - Description = "Разрешение на удаление плановой конструкции скважины", - Name = "WellSectionPlan.delete" - }); - }); - - modelBuilder.Entity("AsbCloudDb.Model.ProcessMaps.ProcessMapPlanDrilling", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasComment("Идентификатор"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AxialLoadLimitMax") - .HasColumnType("double precision") - .HasColumnName("axial_load_limit_max") - .HasComment("Осевая нагрузка, т, допустимый максимум"); - - b.Property("AxialLoadPlan") - .HasColumnType("double precision") - .HasColumnName("axial_load_plan") - .HasComment("Осевая нагрузка, т, план"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("comment") - .HasComment("Комментарий"); - - b.Property("Creation") - .HasColumnType("timestamp with time zone") - .HasColumnName("creation") - .HasComment("дата создания"); - - b.Property("DeltaPressureLimitMax") - .HasColumnType("double precision") - .HasColumnName("delta_pressure_limit_max") - .HasComment("Перепад давления, атм, допустимый максимум"); - - b.Property("DeltaPressurePlan") - .HasColumnType("double precision") - .HasColumnName("delta_pressure_plan") - .HasComment("Перепад давления, атм, план"); - - b.Property("DepthEnd") - .HasColumnType("double precision") - .HasColumnName("depth_end") - .HasComment("Глубина по стволу до, м"); - - b.Property("DepthStart") - .HasColumnType("double precision") - .HasColumnName("depth_start") - .HasComment("Глубина по стволу от, м"); - - b.Property("FlowLimitMax") - .HasColumnType("double precision") - .HasColumnName("flow_limit_max") - .HasComment("Расход, л/с, допустимый максимум"); - - b.Property("FlowPlan") - .HasColumnType("double precision") - .HasColumnName("flow_plan") - .HasComment("Расход, л/с, план"); - - b.Property("IdAuthor") - .HasColumnType("integer") - .HasColumnName("id_author") - .HasComment("Автор"); - - b.Property("IdEditor") - .HasColumnType("integer") - .HasColumnName("id_editor") - .HasComment("Редактор"); - - b.Property("IdMode") - .HasColumnType("integer") - .HasColumnName("id_mode") - .HasComment("Id режима (1- ротор, 2 слайд)"); - - b.Property("IdPrevious") - .HasColumnType("integer") - .HasColumnName("id_previous") - .HasComment("ИД состояния записи: \n0 - актуальная\n1 - замененная\n2 - удаленная"); - - b.Property("IdState") - .HasColumnType("integer") - .HasColumnName("id_state") - .HasComment("ИД состояния записи: \n0 - актуальная\n1 - замененная\n2 - удаленная"); - - b.Property("IdWell") - .HasColumnType("integer") - .HasColumnName("id_well") - .HasComment("Id скважины"); - - b.Property("IdWellSectionType") - .HasColumnType("integer") - .HasColumnName("id_wellsection_type") - .HasComment("Тип секции"); - - b.Property("Obsolete") - .HasColumnType("timestamp with time zone") - .HasColumnName("obsolete") - .HasComment("дата устаревания"); - - b.Property("RopPlan") - .HasColumnType("double precision") - .HasColumnName("rop_plan") - .HasComment("Плановая механическая скорость, м/ч"); - - b.Property("TopDriveSpeedLimitMax") - .HasColumnType("double precision") - .HasColumnName("top_drive_speed_limit_max") - .HasComment("Обороты на ВСП, допустимый максимум"); - - b.Property("TopDriveSpeedPlan") - .HasColumnType("double precision") - .HasColumnName("top_drive_speed_plan") - .HasComment("Обороты на ВСП, план"); - - b.Property("TopDriveTorqueLimitMax") - .HasColumnType("double precision") - .HasColumnName("top_drive_torque_limit_max") - .HasComment("Момент на ВСП, допустимый максимум"); - - b.Property("TopDriveTorquePlan") - .HasColumnType("double precision") - .HasColumnName("top_drive_torque_plan") - .HasComment("Момент на ВСП, план"); - - b.Property("UsageSaub") - .HasColumnType("double precision") - .HasColumnName("usage_saub") - .HasComment("Плановый процент использования АКБ"); - - b.Property("UsageSpin") - .HasColumnType("double precision") - .HasColumnName("usage_spin") - .HasComment("Плановый процент использования spin master"); - - b.HasKey("Id"); - - b.HasIndex("IdAuthor"); - - b.HasIndex("IdEditor"); - - b.HasIndex("IdPrevious"); - - b.HasIndex("IdWell"); - - b.HasIndex("IdWellSectionType"); - - b.ToTable("t_process_map_plan_drilling"); - - b.HasComment("РТК план бурение"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.ProcessMaps.ProcessMapWellDrilling", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AxialLoadLimitMax") - .HasColumnType("double precision") - .HasColumnName("axial_load_limit_max") - .HasComment("Нагрузка, допустимый максимум"); - - b.Property("AxialLoadPlan") - .HasColumnType("double precision") - .HasColumnName("axial_load_plan") - .HasComment("Нагрузка, план"); - - b.Property("Comment") - .HasColumnType("text") - .HasColumnName("comment") - .HasComment("Комментарий"); - - b.Property("DepthEnd") - .HasColumnType("double precision") - .HasColumnName("depth_end") - .HasComment("Глубина по стволу до, м"); - - b.Property("DepthStart") - .HasColumnType("double precision") - .HasColumnName("depth_start") - .HasComment("Глубина по стволу от, м"); - - b.Property("FlowLimitMax") - .HasColumnType("double precision") - .HasColumnName("flow_limit_max") - .HasComment("Расход, допустимый максимум"); - - b.Property("FlowPlan") - .HasColumnType("double precision") - .HasColumnName("flow_plan") - .HasComment("Расход, план"); - - b.Property("IdMode") - .HasColumnType("integer") - .HasColumnName("id_mode") - .HasComment("Id режима (1- ротор, 2 слайд)"); - - b.Property("IdUser") - .HasColumnType("integer") - .HasColumnName("id_user") - .HasComment("Id пользователя"); - - b.Property("IdWell") - .HasColumnType("integer") - .HasColumnName("id_well") - .HasComment("Id скважины"); - - b.Property("IdWellSectionType") - .HasColumnType("integer") - .HasColumnName("id_wellsection_type") - .HasComment("Тип секции"); - - b.Property("LastUpdate") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_update") - .HasComment("Дата последнего изменения"); - - b.Property("PressureLimitMax") - .HasColumnType("double precision") - .HasColumnName("pressure_limit_max") - .HasComment("Перепад давления, допустимый максимум"); - - b.Property("PressurePlan") - .HasColumnType("double precision") - .HasColumnName("pressure_plan") - .HasComment("Перепад давления, план"); - - b.Property("RopPlan") - .HasColumnType("double precision") - .HasColumnName("rop_plan") - .HasComment("Плановая механическая скорость, м/ч"); - - b.Property("TopDriveSpeedLimitMax") - .HasColumnType("double precision") - .HasColumnName("top_drive_speed_limit_max") - .HasComment("Обороты на ВСП, допустимый максимум"); - - b.Property("TopDriveSpeedPlan") - .HasColumnType("double precision") - .HasColumnName("top_drive_speed_plan") - .HasComment("Обороты на ВСП, план"); - - b.Property("TopDriveTorqueLimitMax") - .HasColumnType("double precision") - .HasColumnName("top_drive_torque_limit_max") - .HasComment("Момент на ВСП, допустимый максимум"); - - b.Property("TopDriveTorquePlan") - .HasColumnType("double precision") - .HasColumnName("top_drive_torque_plan") - .HasComment("Момент на ВСП, план"); - - b.Property("UsageSaub") - .HasColumnType("double precision") - .HasColumnName("usage_saub") - .HasComment("Плановый процент использования АКБ"); - - b.Property("UsageSpin") - .HasColumnType("double precision") - .HasColumnName("usage_spin") - .HasComment("Плановый процент использования spin master"); - - b.HasKey("Id"); - - b.HasIndex("IdUser"); - - b.HasIndex("IdWell"); - - b.HasIndex("IdWellSectionType"); - - b.ToTable("t_process_map_well_drilling"); - - b.HasComment("РТК бурение скважины"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.ProcessMaps.ProcessMapWellReam", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Comment") - .HasColumnType("text") - .HasColumnName("comment") - .HasComment("Комментарий"); - - b.Property("DepthEnd") - .HasColumnType("double precision") - .HasColumnName("depth_end") - .HasComment("Глубина по стволу до, м"); - - b.Property("DepthStart") - .HasColumnType("double precision") - .HasColumnName("depth_start") - .HasComment("Глубина по стволу от, м"); - - b.Property("IdUser") - .HasColumnType("integer") - .HasColumnName("id_user") - .HasComment("Id пользователя"); - - b.Property("IdWell") - .HasColumnType("integer") - .HasColumnName("id_well") - .HasComment("Id скважины"); - - b.Property("IdWellSectionType") - .HasColumnType("integer") - .HasColumnName("id_wellsection_type") - .HasComment("Тип секции"); - - b.Property("LastUpdate") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_update") - .HasComment("Дата последнего изменения"); - - b.Property("Pressure") - .HasColumnType("double precision") - .HasColumnName("pressure") - .HasComment("Давление, атм"); - - b.Property("Repeats") - .HasColumnType("double precision") - .HasColumnName("repeats") - .HasComment("Количество повторений"); - - b.Property("SetpointDrag") - .HasColumnType("double precision") - .HasColumnName("setpoint_drag") - .HasComment("Уставка зятяжки, т"); - - b.Property("SetpointTight") - .HasColumnType("double precision") - .HasColumnName("setpoint_tight") - .HasComment("Уставка посадки, т"); - - b.Property("SpeedDownward") - .HasColumnType("double precision") - .HasColumnName("speed_downward") - .HasComment("Скорость спуска, м/ч"); - - b.Property("SpeedUpward") - .HasColumnType("double precision") - .HasColumnName("speed_upward") - .HasComment("Скорость подъёма, м/ч"); - - b.Property("SpinDownward") - .HasColumnType("double precision") - .HasColumnName("spin_downward") - .HasComment("Вращение при движении вниз, об/мин"); - - b.Property("SpinUpward") - .HasColumnType("double precision") - .HasColumnName("spin_upward") - .HasComment("Вращение при движении вверх, об/мин"); - - b.Property("Torque") - .HasColumnType("double precision") - .HasColumnName("torque") - .HasComment("Момент, кН*м"); - - b.HasKey("Id"); - - b.HasIndex("IdUser"); - - b.HasIndex("IdWell"); - - b.HasIndex("IdWellSectionType"); - - b.ToTable("t_process_map_well_ream"); - - b.HasComment("РТК проработка скважины"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => - { - b.Property("IdCompany") - .HasColumnType("integer") - .HasColumnName("id_company"); - - b.Property("IdWell") - .HasColumnType("integer") - .HasColumnName("id_well"); - - b.HasKey("IdCompany", "IdWell"); - - b.HasIndex("IdWell"); - - b.ToTable("t_relation_company_well"); - - b.HasComment("отношение скважин и компаний"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.RelationContactWell", b => - { - b.Property("IdWell") - .HasColumnType("integer") - .HasColumnName("id_well"); - - b.Property("IdUser") - .HasColumnType("integer") - .HasColumnName("id_user"); - - b.HasKey("IdWell", "IdUser"); - - b.HasIndex("IdUser"); - - b.ToTable("t_relation_contact_well"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.RelationUserDrillingProgramPart", b => - { - b.Property("IdUser") - .HasColumnType("integer") - .HasColumnName("id_user"); - - b.Property("IdDrillingProgramPart") - .HasColumnType("integer") - .HasColumnName("id_drilling_program_part"); - - b.Property("IdUserRole") - .HasColumnType("integer") - .HasColumnName("id_role") - .HasComment("1 - publisher, 2 - approver"); - - b.HasKey("IdUser", "IdDrillingProgramPart") - .HasName("t_relation_user_drilling_program_part_pk"); - - b.HasIndex("IdDrillingProgramPart"); - - b.ToTable("t_relation_user_drilling_program_part"); - - b.HasComment("Отношение пользователей и частей ПБ"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.RelationUserRolePermission", b => - { - b.Property("IdUserRole") - .HasColumnType("integer") - .HasColumnName("id_user_role"); - - b.Property("IdPermission") - .HasColumnType("integer") - .HasColumnName("id_permission"); - - b.HasKey("IdUserRole", "IdPermission"); - - b.HasIndex("IdPermission"); - - b.ToTable("t_relation_user_role_permission"); - - b.HasComment("Отношение ролей пользователей и разрешений доступа"); - - b.HasData( - new - { - IdUserRole = 1100, - IdPermission = 102 - }, - new - { - IdUserRole = 1100, - IdPermission = 111 - }, - new - { - IdUserRole = 1101, - IdPermission = 101 - }, - new - { - IdUserRole = 1101, - IdPermission = 100 - }, - new - { - IdUserRole = 1102, - IdPermission = 105 - }, - new - { - IdUserRole = 1102, - IdPermission = 108 - }, - new - { - IdUserRole = 1103, - IdPermission = 104 - }, - new - { - IdUserRole = 1103, - IdPermission = 103 - }, - new - { - IdUserRole = 1104, - IdPermission = 108 - }, - new - { - IdUserRole = 1105, - IdPermission = 107 - }, - new - { - IdUserRole = 1105, - IdPermission = 106 - }, - new - { - IdUserRole = 1106, - IdPermission = 111 - }, - new - { - IdUserRole = 1107, - IdPermission = 110 - }, - new - { - IdUserRole = 1107, - IdPermission = 109 - }, - new - { - IdUserRole = 1108, - IdPermission = 114 - }, - new - { - IdUserRole = 1109, - IdPermission = 113 - }, - new - { - IdUserRole = 1109, - IdPermission = 112 - }, - new - { - IdUserRole = 1110, - IdPermission = 123 - }, - new - { - IdUserRole = 1110, - IdPermission = 114 - }, - new - { - IdUserRole = 1111, - IdPermission = 122 - }, - new - { - IdUserRole = 1111, - IdPermission = 121 - }, - new - { - IdUserRole = 1112, - IdPermission = 117 - }, - new - { - IdUserRole = 1113, - IdPermission = 105 - }, - new - { - IdUserRole = 1113, - IdPermission = 123 - }, - new - { - IdUserRole = 1113, - IdPermission = 120 - }, - new - { - IdUserRole = 1114, - IdPermission = 119 - }, - new - { - IdUserRole = 1114, - IdPermission = 118 - }, - new - { - IdUserRole = 1114, - IdPermission = 200 - }, - new - { - IdUserRole = 1115, - IdPermission = 223 - }, - new - { - IdUserRole = 1116, - IdPermission = 105 - }, - new - { - IdUserRole = 1116, - IdPermission = 102 - }, - new - { - IdUserRole = 1116, - IdPermission = 117 - }, - new - { - IdUserRole = 1116, - IdPermission = 126 - }, - new - { - IdUserRole = 1117, - IdPermission = 125 - }, - new - { - IdUserRole = 1117, - IdPermission = 124 - }, - new - { - IdUserRole = 1200, - IdPermission = 203 - }, - new - { - IdUserRole = 1200, - IdPermission = 230 - }, - new - { - IdUserRole = 1201, - IdPermission = 202 - }, - new - { - IdUserRole = 1201, - IdPermission = 203 - }, - new - { - IdUserRole = 1201, - IdPermission = 220 - }, - new - { - IdUserRole = 1202, - IdPermission = 203 - }, - new - { - IdUserRole = 1202, - IdPermission = 220 - }, - new - { - IdUserRole = 1202, - IdPermission = 236 - }, - new - { - IdUserRole = 1202, - IdPermission = 212 - }, - new - { - IdUserRole = 1203, - IdPermission = 235 - }, - new - { - IdUserRole = 1204, - IdPermission = 202 - }, - new - { - IdUserRole = 1204, - IdPermission = 203 - }, - new - { - IdUserRole = 1205, - IdPermission = 215 - }, - new - { - IdUserRole = 1206, - IdPermission = 203 - }, - new - { - IdUserRole = 1206, - IdPermission = 206 - }, - new - { - IdUserRole = 1207, - IdPermission = 205 - }, - new - { - IdUserRole = 1208, - IdPermission = 218 - }, - new - { - IdUserRole = 1209, - IdPermission = 217 - }, - new - { - IdUserRole = 1210, - IdPermission = 203 - }, - new - { - IdUserRole = 1210, - IdPermission = 230 - }, - new - { - IdUserRole = 1210, - IdPermission = 219 - }, - new - { - IdUserRole = 1211, - IdPermission = 203 - }, - new - { - IdUserRole = 1211, - IdPermission = 220 - }, - new - { - IdUserRole = 1211, - IdPermission = 239 - }, - new - { - IdUserRole = 1212, - IdPermission = 238 - }, - new - { - IdUserRole = 1212, - IdPermission = 237 - }, - new - { - IdUserRole = 1213, - IdPermission = 203 - }, - new - { - IdUserRole = 1213, - IdPermission = 239 - }, - new - { - IdUserRole = 1213, - IdPermission = 212 - }, - new - { - IdUserRole = 1214, - IdPermission = 211 - }, - new - { - IdUserRole = 1214, - IdPermission = 210 - }, - new - { - IdUserRole = 1215, - IdPermission = 203 - }, - new - { - IdUserRole = 1215, - IdPermission = 222 - }, - new - { - IdUserRole = 1216, - IdPermission = 221 - }, - new - { - IdUserRole = 1217, - IdPermission = 226 - }, - new - { - IdUserRole = 1218, - IdPermission = 225 - }, - new - { - IdUserRole = 1218, - IdPermission = 224 - }, - new - { - IdUserRole = 1219, - IdPermission = 203 - }, - new - { - IdUserRole = 1219, - IdPermission = 206 - }, - new - { - IdUserRole = 1219, - IdPermission = 230 - }, - new - { - IdUserRole = 1219, - IdPermission = 232 - }, - new - { - IdUserRole = 1220, - IdPermission = 203 - }, - new - { - IdUserRole = 1220, - IdPermission = 228 - }, - new - { - IdUserRole = 1221, - IdPermission = 202 - }, - new - { - IdUserRole = 1221, - IdPermission = 203 - }, - new - { - IdUserRole = 1221, - IdPermission = 220 - }, - new - { - IdUserRole = 1221, - IdPermission = 234 - }, - new - { - IdUserRole = 1500, - IdPermission = 507 - }, - new - { - IdUserRole = 1500, - IdPermission = 510 - }, - new - { - IdUserRole = 1501, - IdPermission = 214 - }, - new - { - IdUserRole = 1501, - IdPermission = 213 - }, - new - { - IdUserRole = 1502, - IdPermission = 207 - }, - new - { - IdUserRole = 1502, - IdPermission = 208 - }, - new - { - IdUserRole = 2000, - IdPermission = 205 - }, - new - { - IdUserRole = 2000, - IdPermission = 204 - }, - new - { - IdUserRole = 2000, - IdPermission = 245 - }, - new - { - IdUserRole = 2001, - IdPermission = 244 - }, - new - { - IdUserRole = 2001, - IdPermission = 245 - }, - new - { - IdUserRole = 2002, - IdPermission = 244 - }, - new - { - IdUserRole = 2002, - IdPermission = 246 - }, - new - { - IdUserRole = 2002, - IdPermission = 237 - }, - new - { - IdUserRole = 2002, - IdPermission = 238 - }, - new - { - IdUserRole = 2003, - IdPermission = 240 - }, - new - { - IdUserRole = 2003, - IdPermission = 217 - }, - new - { - IdUserRole = 2003, - IdPermission = 216 - }, - new - { - IdUserRole = 2004, - IdPermission = 242 - }, - new - { - IdUserRole = 2004, - IdPermission = 217 - }, - new - { - IdUserRole = 2004, - IdPermission = 216 - }, - new - { - IdUserRole = 2004, - IdPermission = 205 - }, - new - { - IdUserRole = 2004, - IdPermission = 204 - }, - new - { - IdUserRole = 2005, - IdPermission = 247 - }, - new - { - IdUserRole = 2005, - IdPermission = 205 - }, - new - { - IdUserRole = 2005, - IdPermission = 204 - }, - new - { - IdUserRole = 2006, - IdPermission = 243 - }, - new - { - IdUserRole = 2006, - IdPermission = 205 - }, - new - { - IdUserRole = 2006, - IdPermission = 204 - }, - new - { - IdUserRole = 2007, - IdPermission = 241 - }, - new - { - IdUserRole = 2007, - IdPermission = 205 - }, - new - { - IdUserRole = 2007, - IdPermission = 204 - }, - new - { - IdUserRole = 1, - IdPermission = 100 - }, - new - { - IdUserRole = 1, - IdPermission = 101 - }, - new - { - IdUserRole = 1, - IdPermission = 102 - }, - new - { - IdUserRole = 1, - IdPermission = 103 - }, - new - { - IdUserRole = 1, - IdPermission = 104 - }, - new - { - IdUserRole = 1, - IdPermission = 105 - }, - new - { - IdUserRole = 1, - IdPermission = 106 - }, - new - { - IdUserRole = 1, - IdPermission = 107 - }, - new - { - IdUserRole = 1, - IdPermission = 108 - }, - new - { - IdUserRole = 1, - IdPermission = 109 - }, - new - { - IdUserRole = 1, - IdPermission = 110 - }, - new - { - IdUserRole = 1, - IdPermission = 111 - }, - new - { - IdUserRole = 1, - IdPermission = 112 - }, - new - { - IdUserRole = 1, - IdPermission = 113 - }, - new - { - IdUserRole = 1, - IdPermission = 114 - }, - new - { - IdUserRole = 1, - IdPermission = 115 - }, - new - { - IdUserRole = 1, - IdPermission = 116 - }, - new - { - IdUserRole = 1, - IdPermission = 117 - }, - new - { - IdUserRole = 1, - IdPermission = 118 - }, - new - { - IdUserRole = 1, - IdPermission = 119 - }, - new - { - IdUserRole = 1, - IdPermission = 120 - }, - new - { - IdUserRole = 1, - IdPermission = 121 - }, - new - { - IdUserRole = 1, - IdPermission = 122 - }, - new - { - IdUserRole = 1, - IdPermission = 123 - }, - new - { - IdUserRole = 1, - IdPermission = 124 - }, - new - { - IdUserRole = 1, - IdPermission = 125 - }, - new - { - IdUserRole = 1, - IdPermission = 126 - }, - new - { - IdUserRole = 1, - IdPermission = 127 - }, - new - { - IdUserRole = 1, - IdPermission = 128 - }, - new - { - IdUserRole = 1, - IdPermission = 129 - }, - new - { - IdUserRole = 1, - IdPermission = 200 - }, - new - { - IdUserRole = 1, - IdPermission = 201 - }, - new - { - IdUserRole = 1, - IdPermission = 202 - }, - new - { - IdUserRole = 1, - IdPermission = 203 - }, - new - { - IdUserRole = 1, - IdPermission = 204 - }, - new - { - IdUserRole = 1, - IdPermission = 205 - }, - new - { - IdUserRole = 1, - IdPermission = 206 - }, - new - { - IdUserRole = 1, - IdPermission = 207 - }, - new - { - IdUserRole = 1, - IdPermission = 208 - }, - new - { - IdUserRole = 1, - IdPermission = 209 - }, - new - { - IdUserRole = 1, - IdPermission = 210 - }, - new - { - IdUserRole = 1, - IdPermission = 211 - }, - new - { - IdUserRole = 1, - IdPermission = 212 - }, - new - { - IdUserRole = 1, - IdPermission = 213 - }, - new - { - IdUserRole = 1, - IdPermission = 214 - }, - new - { - IdUserRole = 1, - IdPermission = 215 - }, - new - { - IdUserRole = 1, - IdPermission = 216 - }, - new - { - IdUserRole = 1, - IdPermission = 217 - }, - new - { - IdUserRole = 1, - IdPermission = 218 - }, - new - { - IdUserRole = 1, - IdPermission = 219 - }, - new - { - IdUserRole = 1, - IdPermission = 220 - }, - new - { - IdUserRole = 1, - IdPermission = 221 - }, - new - { - IdUserRole = 1, - IdPermission = 222 - }, - new - { - IdUserRole = 1, - IdPermission = 223 - }, - new - { - IdUserRole = 1, - IdPermission = 224 - }, - new - { - IdUserRole = 1, - IdPermission = 225 - }, - new - { - IdUserRole = 1, - IdPermission = 226 - }, - new - { - IdUserRole = 1, - IdPermission = 227 - }, - new - { - IdUserRole = 1, - IdPermission = 228 - }, - new - { - IdUserRole = 1, - IdPermission = 229 - }, - new - { - IdUserRole = 1, - IdPermission = 230 - }, - new - { - IdUserRole = 1, - IdPermission = 231 - }, - new - { - IdUserRole = 1, - IdPermission = 232 - }, - new - { - IdUserRole = 1, - IdPermission = 233 - }, - new - { - IdUserRole = 1, - IdPermission = 234 - }, - new - { - IdUserRole = 1, - IdPermission = 235 - }, - new - { - IdUserRole = 1, - IdPermission = 236 - }, - new - { - IdUserRole = 1, - IdPermission = 237 - }, - new - { - IdUserRole = 1, - IdPermission = 238 - }, - new - { - IdUserRole = 1, - IdPermission = 239 - }, - new - { - IdUserRole = 1, - IdPermission = 240 - }, - new - { - IdUserRole = 1, - IdPermission = 241 - }, - new - { - IdUserRole = 1, - IdPermission = 242 - }, - new - { - IdUserRole = 1, - IdPermission = 243 - }, - new - { - IdUserRole = 1, - IdPermission = 244 - }, - new - { - IdUserRole = 1, - IdPermission = 245 - }, - new - { - IdUserRole = 1, - IdPermission = 246 - }, - new - { - IdUserRole = 1, - IdPermission = 247 - }, - new - { - IdUserRole = 1, - IdPermission = 248 - }, - new - { - IdUserRole = 1, - IdPermission = 249 - }, - new - { - IdUserRole = 1, - IdPermission = 250 - }, - new - { - IdUserRole = 1, - IdPermission = 251 - }, - new - { - IdUserRole = 1, - IdPermission = 252 - }, - new - { - IdUserRole = 1, - IdPermission = 253 - }, - new - { - IdUserRole = 1, - IdPermission = 254 - }, - new - { - IdUserRole = 1, - IdPermission = 255 - }, - new - { - IdUserRole = 1, - IdPermission = 256 - }, - new - { - IdUserRole = 1, - IdPermission = 257 - }, - new - { - IdUserRole = 1, - IdPermission = 258 - }, - new - { - IdUserRole = 1, - IdPermission = 259 - }, - new - { - IdUserRole = 1, - IdPermission = 260 - }, - new - { - IdUserRole = 1, - IdPermission = 261 - }, - new - { - IdUserRole = 1, - IdPermission = 262 - }, - new - { - IdUserRole = 1, - IdPermission = 263 - }, - new - { - IdUserRole = 1, - IdPermission = 264 - }, - new - { - IdUserRole = 1, - IdPermission = 265 - }, - new - { - IdUserRole = 1, - IdPermission = 266 - }, - new - { - IdUserRole = 1, - IdPermission = 267 - }, - new - { - IdUserRole = 1, - IdPermission = 268 - }, - new - { - IdUserRole = 1, - IdPermission = 269 - }, - new - { - IdUserRole = 1, - IdPermission = 380 - }, - new - { - IdUserRole = 1, - IdPermission = 381 - }, - new - { - IdUserRole = 1, - IdPermission = 382 - }, - new - { - IdUserRole = 1, - IdPermission = 383 - }, - new - { - IdUserRole = 1, - IdPermission = 384 - }, - new - { - IdUserRole = 1, - IdPermission = 385 - }, - new - { - IdUserRole = 1, - IdPermission = 386 - }, - new - { - IdUserRole = 1, - IdPermission = 387 - }, - new - { - IdUserRole = 1, - IdPermission = 388 - }, - new - { - IdUserRole = 1, - IdPermission = 389 - }, - new - { - IdUserRole = 1, - IdPermission = 390 - }, - new - { - IdUserRole = 1, - IdPermission = 391 - }, - new - { - IdUserRole = 1, - IdPermission = 400 - }, - new - { - IdUserRole = 1, - IdPermission = 401 - }, - new - { - IdUserRole = 1, - IdPermission = 407 - }, - new - { - IdUserRole = 1, - IdPermission = 408 - }, - new - { - IdUserRole = 1, - IdPermission = 450 - }, - new - { - IdUserRole = 1, - IdPermission = 460 - }, - new - { - IdUserRole = 1, - IdPermission = 461 - }, - new - { - IdUserRole = 1, - IdPermission = 500 - }, - new - { - IdUserRole = 1, - IdPermission = 501 - }, - new - { - IdUserRole = 1, - IdPermission = 502 - }, - new - { - IdUserRole = 1, - IdPermission = 503 - }, - new - { - IdUserRole = 1, - IdPermission = 504 - }, - new - { - IdUserRole = 1, - IdPermission = 505 - }, - new - { - IdUserRole = 1, - IdPermission = 506 - }, - new - { - IdUserRole = 1, - IdPermission = 507 - }, - new - { - IdUserRole = 1, - IdPermission = 510 - }, - new - { - IdUserRole = 1, - IdPermission = 511 - }, - new - { - IdUserRole = 1, - IdPermission = 512 - }, - new - { - IdUserRole = 1, - IdPermission = 516 - }, - new - { - IdUserRole = 1, - IdPermission = 517 - }, - new - { - IdUserRole = 1, - IdPermission = 518 - }, - new - { - IdUserRole = 1, - IdPermission = 519 - }, - new - { - IdUserRole = 1, - IdPermission = 520 - }, - new - { - IdUserRole = 1, - IdPermission = 521 - }, - new - { - IdUserRole = 1, - IdPermission = 522 - }, - new - { - IdUserRole = 1, - IdPermission = 523 - }, - new - { - IdUserRole = 1, - IdPermission = 524 - }, - new - { - IdUserRole = 1, - IdPermission = 525 - }, - new - { - IdUserRole = 1, - IdPermission = 526 - }, - new - { - IdUserRole = 1, - IdPermission = 527 - }, - new - { - IdUserRole = 1, - IdPermission = 528 - }, - new - { - IdUserRole = 1, - IdPermission = 530 - }, - new - { - IdUserRole = 1, - IdPermission = 531 - }); - }); - - modelBuilder.Entity("AsbCloudDb.Model.RelationUserRoleUserRole", b => - { - b.Property("Id") - .HasColumnType("integer") - .HasColumnName("id_user_role"); - - b.Property("IdInclude") - .HasColumnType("integer") - .HasColumnName("id_include_user_role"); - - b.HasKey("Id", "IdInclude") - .HasName("t_relation_user_role_user_role_pk"); - - b.HasIndex("IdInclude"); - - b.ToTable("t_relation_user_role_user_role"); - - b.HasComment("Отношение ролей к ролям"); - - b.HasData( - new - { - Id = 1101, - IdInclude = 1100 - }, - new - { - Id = 1103, - IdInclude = 1102 - }, - new - { - Id = 1105, - IdInclude = 1104 - }, - new - { - Id = 1107, - IdInclude = 1106 - }, - new - { - Id = 1109, - IdInclude = 1108 - }, - new - { - Id = 1111, - IdInclude = 1110 - }, - new - { - Id = 1114, - IdInclude = 1113 - }, - new - { - Id = 1117, - IdInclude = 1116 - }, - new - { - Id = 1203, - IdInclude = 1202 - }, - new - { - Id = 1207, - IdInclude = 1206 - }, - new - { - Id = 1209, - IdInclude = 1208 - }, - new - { - Id = 1212, - IdInclude = 1211 - }, - new - { - Id = 1214, - IdInclude = 1213 - }, - new - { - Id = 1216, - IdInclude = 1215 - }, - new - { - Id = 1218, - IdInclude = 1217 - }, - new - { - Id = 2000, - IdInclude = 1200 - }, - new - { - Id = 2000, - IdInclude = 1201 - }, - new - { - Id = 2000, - IdInclude = 1202 - }, - new - { - Id = 2000, - IdInclude = 1204 - }, - new - { - Id = 2000, - IdInclude = 1205 - }, - new - { - Id = 2000, - IdInclude = 1206 - }, - new - { - Id = 2000, - IdInclude = 1208 - }, - new - { - Id = 2000, - IdInclude = 1210 - }, - new - { - Id = 2000, - IdInclude = 1211 - }, - new - { - Id = 2000, - IdInclude = 1213 - }, - new - { - Id = 2000, - IdInclude = 1215 - }, - new - { - Id = 2000, - IdInclude = 1217 - }, - new - { - Id = 2000, - IdInclude = 1219 - }, - new - { - Id = 2000, - IdInclude = 1220 - }, - new - { - Id = 2000, - IdInclude = 1221 - }, - new - { - Id = 2000, - IdInclude = 1500 - }, - new - { - Id = 2000, - IdInclude = 1501 - }, - new - { - Id = 2000, - IdInclude = 1502 - }, - new - { - Id = 2001, - IdInclude = 1500 - }, - new - { - Id = 2001, - IdInclude = 1501 - }, - new - { - Id = 2001, - IdInclude = 1502 - }, - new - { - Id = 2002, - IdInclude = 1500 - }, - new - { - Id = 2002, - IdInclude = 1501 - }, - new - { - Id = 2002, - IdInclude = 1502 - }, - new - { - Id = 2003, - IdInclude = 1500 - }, - new - { - Id = 2003, - IdInclude = 1501 - }, - new - { - Id = 2003, - IdInclude = 1502 - }, - new - { - Id = 2004, - IdInclude = 1500 - }, - new - { - Id = 2004, - IdInclude = 1501 - }, - new - { - Id = 2004, - IdInclude = 1502 - }, - new - { - Id = 2005, - IdInclude = 1500 - }, - new - { - Id = 2005, - IdInclude = 1501 - }, - new - { - Id = 2005, - IdInclude = 1502 - }, - new - { - Id = 2006, - IdInclude = 1500 - }, - new - { - Id = 2006, - IdInclude = 1501 - }, - new - { - Id = 2006, - IdInclude = 1502 - }, - new - { - Id = 2007, - IdInclude = 1500 - }, - new - { - Id = 2007, - IdInclude = 1501 - }, - new - { - Id = 2007, - IdInclude = 1502 - }); - }); - - modelBuilder.Entity("AsbCloudDb.Model.RelationUserUserRole", b => - { - b.Property("IdUser") - .HasColumnType("integer") - .HasColumnName("id_user"); - - b.Property("IdUserRole") - .HasColumnType("integer") - .HasColumnName("id_user_role"); - - b.HasKey("IdUser", "IdUserRole"); - - b.HasIndex("IdUserRole"); - - b.ToTable("t_relation_user_user_role"); - - b.HasComment("Отношение пользователей и ролей"); - - b.HasData( - new - { - IdUser = 1, - IdUserRole = 1 - }); - }); - - modelBuilder.Entity("AsbCloudDb.Model.ReportProperty", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Begin") - .HasColumnType("timestamp with time zone") - .HasColumnName("begin"); - - b.Property("End") - .HasColumnType("timestamp with time zone") - .HasColumnName("end") - .HasComment("timestamp with time zone"); - - b.Property("Format") - .HasColumnType("integer") - .HasColumnName("format") - .HasComment("Формат отчета"); - - b.Property("IdFile") - .HasColumnType("integer") - .HasColumnName("id_file") - .HasComment("id файла-родителя"); - - b.Property("IdWell") - .HasColumnType("integer") - .HasColumnName("id_well") - .HasComment("id скважины"); - - b.Property("Step") - .HasColumnType("integer") - .HasColumnName("step") - .HasComment("размер шага в секундах"); - - b.HasKey("Id"); - - b.HasIndex("IdFile"); - - b.HasIndex("IdWell"); - - b.ToTable("t_report_property"); - - b.HasComment("Отчеты с данными по буровым"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.Schedule", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id") - .HasComment("Идентификатор"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DrillEnd") - .HasColumnType("timestamp with time zone") - .HasColumnName("drill_end") - .HasComment("Конец вахты"); - - b.Property("DrillStart") - .HasColumnType("timestamp with time zone") - .HasColumnName("drill_start") - .HasComment("Начало вахты"); - - b.Property("IdDriller") - .HasColumnType("integer") - .HasColumnName("id_driller") - .HasComment("Идентификатор бурильщика"); - - b.Property("IdWell") - .HasColumnType("integer") - .HasColumnName("id_well") - .HasComment("Идентификатор скважины"); - - b.Property("ShiftEnd") - .HasColumnType("time without time zone") - .HasColumnName("shift_end") - .HasComment("Конец смены"); - - b.Property("ShiftStart") - .HasColumnType("time without time zone") - .HasColumnName("shift_start") - .HasComment("Начало смены"); - - b.HasKey("Id"); - - b.HasIndex("IdDriller"); - - b.HasIndex("IdWell"); - - b.ToTable("t_schedule"); - - b.HasComment("График работы бурильщика"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.SetpointsRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Comment") - .HasColumnType("text") - .HasColumnName("comment") - .HasComment("комментарий для оператора"); - - b.Property("IdAuthor") - .HasColumnType("integer") - .HasColumnName("id_author") - .HasComment("Id пользователя, загрузившего файл"); - - b.Property("IdState") - .HasColumnType("integer") - .HasColumnName("id_state") - .HasComment("0: неизвестно, 1:ожидает отправки, 2: отправлено, 3: принято оператором, 4: отклонено оператором, 5: устарело"); - - b.Property("IdWell") - .HasColumnType("integer") - .HasColumnName("id_well") - .HasComment("id скважины"); - - b.Property("ObsolescenceSec") - .HasColumnType("integer") - .HasColumnName("obsolescence") - .HasComment("сек. до устаревания"); - - b.Property("Setpoints") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("setpoint_set") - .HasComment("Набор уставок"); - - b.Property("UploadDate") - .HasColumnType("timestamp with time zone") - .HasColumnName("date"); - - b.HasKey("Id"); - - b.HasIndex("IdAuthor"); - - b.HasIndex("IdWell"); - - b.ToTable("t_setpoints_rquest"); - - b.HasComment("Запросы на изменение уставок панели оператора"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.Subsystem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("description"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("name"); - - b.HasKey("Id"); - - b.ToTable("t_subsystem"); - - b.HasComment("Описание подсистем"); - - b.HasData( - new - { - Id = 1, - Description = "Совместная работа режимов \"Бурение в роторе\" и \"Бурение в слайде\"", - Name = "АПД" - }, - new - { - Id = 11, - Description = "Режим работы \"Бурение в роторе\"", - Name = "АПД ротор" - }, - new - { - Id = 12, - Description = "Режим работы \"Бурение в слайде\"", - Name = "АПД слайд" - }, - new - { - Id = 65536, - Description = "Осцилляция", - Name = "Осцилляция" - }, - new - { - Id = 65537, - Description = "Демпфер", - Name = "Демпфер" - }); - }); - - modelBuilder.Entity("AsbCloudDb.Model.Telemetry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Info") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("info") - .HasComment("Информация с панели о скважине"); - - b.Property("RemoteUid") - .IsRequired() - .HasColumnType("text") - .HasColumnName("remote_uid") - .HasComment("Идентификатор передающего устройства. Может повторяться в списке, так как комплекты оборудования переезжают от скв. к скв."); - - b.Property("TimeZone") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("timezone") - .HasComment("Смещение часового пояса от UTC"); - - b.HasKey("Id"); - - b.HasIndex(new[] { "RemoteUid" }, "t_telemetry_remote_uid_index"); - - b.ToTable("t_telemetry"); - - b.HasComment("таблица привязки телеметрии от комплектов к конкретной скважине."); - }); - - modelBuilder.Entity("AsbCloudDb.Model.TelemetryDataSaub", b => - { - b.Property("IdTelemetry") - .HasColumnType("integer") - .HasColumnName("id_telemetry"); - - b.Property("DateTime") - .HasColumnType("timestamp with time zone") - .HasColumnName("date") - .HasComment("'2021-10-19 18:23:54+05'"); - - b.Property("AxialLoad") - .HasColumnType("real") - .HasColumnName("axial_load") - .HasComment("Осевая нагрузка"); - - b.Property("AxialLoadLimitMax") - .HasColumnType("real") - .HasColumnName("axial_load_limit_max") - .HasComment("Осевая нагрузка. Аварийная макс."); - - b.Property("AxialLoadSp") - .HasColumnType("real") - .HasColumnName("axial_load_sp") - .HasComment("Осевая нагрузка. Задание"); - - b.Property("BitDepth") - .HasColumnType("real") - .HasColumnName("bit_depth") - .HasComment("Положение инструмента"); - - b.Property("BlockPosition") - .HasColumnType("real") - .HasColumnName("block_position") - .HasComment("Высота талевого блока"); - - b.Property("BlockPositionMax") - .HasColumnType("real") - .HasColumnName("block_position_max") - .HasComment("Талевый блок. Макс положение"); - - b.Property("BlockPositionMin") - .HasColumnType("real") - .HasColumnName("block_position_min") - .HasComment("Талевый блок. Мин положение"); - - b.Property("BlockSpeed") - .HasColumnType("real") - .HasColumnName("block_speed") - .HasComment("Скорость талевого блока"); - - b.Property("BlockSpeedSp") - .HasColumnType("real") - .HasColumnName("block_speed_sp") - .HasComment("Скорости талевого блока. Задание"); - - b.Property("BlockSpeedSpDevelop") - .HasColumnType("real") - .HasColumnName("block_speed_sp_develop") - .HasComment("Талевый блок. Задание скорости для проработки"); - - b.Property("BlockSpeedSpRotor") - .HasColumnType("real") - .HasColumnName("block_speed_sp_rotor") - .HasComment("Талевый блок. Задание скорости для роторного бурения"); - - b.Property("BlockSpeedSpSlide") - .HasColumnType("real") - .HasColumnName("block_speed_sp_slide") - .HasComment("Талевый блок. Задание скорости для режима слайда"); - - b.Property("Flow") - .HasColumnType("real") - .HasColumnName("flow") - .HasComment("Расход"); - - b.Property("FlowDeltaLimitMax") - .HasColumnType("real") - .HasColumnName("flow_delta_limit_max") - .HasComment("Расход. Аварийный макс."); - - b.Property("FlowIdle") - .HasColumnType("real") - .HasColumnName("flow_idle") - .HasComment("Расход. Холостой ход"); - - b.Property("HookWeight") - .HasColumnType("real") - .HasColumnName("hook_weight") - .HasComment("Вес на крюке"); - - b.Property("HookWeightIdle") - .HasColumnType("real") - .HasColumnName("hook_weight_idle") - .HasComment("Вес на крюке. Холостой ход"); - - b.Property("HookWeightLimitMax") - .HasColumnType("real") - .HasColumnName("hook_weight_limit_max") - .HasComment("Вес на крюке. Затяжка"); - - b.Property("HookWeightLimitMin") - .HasColumnType("real") - .HasColumnName("hook_weight_limit_min") - .HasComment("Вес на крюке. Посадка"); - - b.Property("IdFeedRegulator") - .HasColumnType("smallint") - .HasColumnName("id_feed_regulator") - .HasComment("Текущий критерий бурения"); - - b.Property("IdUser") - .HasColumnType("integer") - .HasColumnName("id_user") - .HasComment("Пользователь САУБ"); - - b.Property("Mode") - .HasColumnType("smallint") - .HasColumnName("mode") - .HasComment("Режим САУБ"); - - b.Property("Mse") - .HasColumnType("real") - .HasColumnName("mse") - .HasComment("MSE"); - - b.Property("MseState") - .HasColumnType("smallint") - .HasColumnName("mse_state") - .HasComment("Текущее состояние работы MSE"); - - b.Property("Pressure") - .HasColumnType("real") - .HasColumnName("pressure") - .HasComment("Давление"); - - b.Property("PressureDeltaLimitMax") - .HasColumnType("real") - .HasColumnName("pressure_delta_limit_max") - .HasComment("Давление дифф. Аварийное макс."); - - b.Property("PressureIdle") - .HasColumnType("real") - .HasColumnName("pressure_idle") - .HasComment("Давление. Холостой ход"); - - b.Property("PressureSp") - .HasColumnType("real") - .HasColumnName("pressure_sp") - .HasComment("Давление. Задание"); - - b.Property("PressureSpDevelop") - .HasColumnType("real") - .HasColumnName("pressure_sp_develop") - .HasComment("Давление. Задание для проработки"); - - b.Property("PressureSpRotor") - .HasColumnType("real") - .HasColumnName("pressure_sp_rotor") - .HasComment("Давление. Задание для роторного бурения"); - - b.Property("PressureSpSlide") - .HasColumnType("real") - .HasColumnName("pressure_sp_slide") - .HasComment("Давление. Задание для режима слайда"); - - b.Property("Pump0Flow") - .HasColumnType("real") - .HasColumnName("pump0_flow") - .HasComment("Расход. Буровой насос 1"); - - b.Property("Pump1Flow") - .HasColumnType("real") - .HasColumnName("pump1_flow") - .HasComment("Расход. Буровой насос 2"); - - b.Property("Pump2Flow") - .HasColumnType("real") - .HasColumnName("pump2_flow") - .HasComment("Расход. Буровой насос 3"); - - b.Property("RotorSpeed") - .HasColumnType("real") - .HasColumnName("rotor_speed") - .HasComment("Обороты ротора"); - - b.Property("RotorTorque") - .HasColumnType("real") - .HasColumnName("rotor_torque") - .HasComment("Момент на роторе"); - - b.Property("RotorTorqueIdle") - .HasColumnType("real") - .HasColumnName("rotor_torque_idle") - .HasComment("Момент на роторе. Холостой ход"); - - b.Property("RotorTorqueLimitMax") - .HasColumnType("real") - .HasColumnName("rotor_torque_limit_max") - .HasComment("Момент на роторе. Аварийный макс."); - - b.Property("RotorTorqueSp") - .HasColumnType("real") - .HasColumnName("rotor_torque_sp") - .HasComment("Момент на роторе. Задание"); - - b.Property("WellDepth") - .HasColumnType("real") - .HasColumnName("well_depth") - .HasComment("Глубина забоя"); - - b.HasKey("IdTelemetry", "DateTime"); - - b.ToTable("t_telemetry_data_saub"); - - b.HasComment("набор основных данных по SAUB"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.TelemetryDataSaubStat", b => - { - b.Property("Count") - .HasColumnType("bigint") - .HasColumnName("count_items"); - - b.Property("DateMax") - .HasColumnType("timestamp with time zone") - .HasColumnName("date_max"); - - b.Property("DateMin") - .HasColumnType("timestamp with time zone") - .HasColumnName("date_min"); - - b.Property("DepthMax") - .HasColumnType("real") - .HasColumnName("depth_max"); - - b.Property("DepthMin") - .HasColumnType("real") - .HasColumnName("depth_min"); - - b.Property("IdTelemetry") - .HasColumnType("integer") - .HasColumnName("id_telemetry"); - - b.ToView("mw_telemetry_datas_saub_stat"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.TelemetryDataSpin", b => - { - b.Property("IdTelemetry") - .HasColumnType("integer") - .HasColumnName("id_telemetry"); - - b.Property("DateTime") - .HasColumnType("timestamp with time zone") - .HasColumnName("date") - .HasComment("'2021-10-19 18:23:54+05'"); - - b.Property("Mode") - .HasColumnType("smallint") - .HasColumnName("mode") - .HasComment("Выбранный режим управления"); - - b.Property("PositionRight") - .HasColumnType("real") - .HasColumnName("position_right") - .HasComment("Крайний правый угол осцилляции"); - - b.Property("PositionZero") - .HasColumnType("real") - .HasColumnName("position_zero") - .HasComment("Нулевая позиция осцилляции"); - - b.Property("RevolsLeftLimit") - .HasColumnType("real") - .HasColumnName("revols_left_limit") - .HasComment("Ограничение числа оборотов влево"); - - b.Property("RevolsLeftTotal") - .HasColumnType("real") - .HasColumnName("revols_left_total") - .HasComment("Суммарное количество оборотов влево"); - - b.Property("RevolsRightLimit") - .HasColumnType("real") - .HasColumnName("revols_right_limit") - .HasComment("Ограничение числа оборотов вправо"); - - b.Property("RevolsRightTotal") - .HasColumnType("real") - .HasColumnName("revols_right_total") - .HasComment("Суммарное количество оборотов вправо"); - - b.Property("SpeedLeftSp") - .HasColumnType("real") - .HasColumnName("speed_left_sp") - .HasComment("Заданная скорость вращения влево"); - - b.Property("SpeedRightSp") - .HasColumnType("real") - .HasColumnName("speed_right_sp") - .HasComment("Заданная скорость вращения вправо"); - - b.Property("State") - .HasColumnType("smallint") - .HasColumnName("state") - .HasComment("Переменная этапа"); - - b.HasKey("IdTelemetry", "DateTime"); - - b.ToTable("t_telemetry_data_spin"); - - b.HasComment("набор основных данных по SpinMaster"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.TelemetryEvent", b => - { - b.Property("IdTelemetry") - .HasColumnType("integer") - .HasColumnName("id_telemetry"); - - b.Property("IdEvent") - .HasColumnType("integer") - .HasColumnName("id_event"); - - b.Property("IdCategory") - .HasColumnType("integer") - .HasColumnName("id_category"); - - b.Property("MessageTemplate") - .IsRequired() - .HasColumnType("text") - .HasColumnName("message_template"); - - b.HasKey("IdTelemetry", "IdEvent"); - - b.ToTable("t_telemetry_event"); - - b.HasComment("Справочник событий. События формируют сообщения. Разделено по версиям посылок от телеметрии."); - }); - - modelBuilder.Entity("AsbCloudDb.Model.TelemetryMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Arg0") - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("arg0") - .HasComment("Аргумент №0 для вставки в шаблон сообщения"); - - b.Property("Arg1") - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("arg1"); - - b.Property("Arg2") - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("arg2"); - - b.Property("Arg3") - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("arg3"); - - b.Property("DateTime") - .HasColumnType("timestamp with time zone") - .HasColumnName("date"); - - b.Property("IdEvent") - .HasColumnType("integer") - .HasColumnName("id_event"); - - b.Property("IdTelemetry") - .HasColumnType("integer") - .HasColumnName("id_telemetry"); - - b.Property("IdTelemetryUser") - .HasColumnType("integer") - .HasColumnName("id_telemetry_user") - .HasComment("Пользователь панели отправляющей телеметрию. не пользователь облака."); - - b.Property("WellDepth") - .HasColumnType("double precision") - .HasColumnName("well_depth"); - - b.HasKey("Id"); - - b.HasIndex("IdTelemetry"); - - b.ToTable("t_telemetry_message"); - - b.HasComment("Сообщения на буровых"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.TelemetryUser", b => - { - b.Property("IdTelemetry") - .HasColumnType("integer") - .HasColumnName("id_telemetry"); - - b.Property("IdUser") - .HasColumnType("integer") - .HasColumnName("id_user"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("Name") - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("name"); - - b.Property("Patronymic") - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("patronymic"); - - b.Property("Surname") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("surname"); - - b.HasKey("IdTelemetry", "IdUser"); - - b.ToTable("t_telemetry_user"); - - b.HasComment("Пользователи панели САУБ. Для сообщений."); - }); - - modelBuilder.Entity("AsbCloudDb.Model.TelemetryWirelineRunOut", b => - { - b.Property("IdTelemetry") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id_telemetry") - .HasComment("Идентификатор телеметрии"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("IdTelemetry")); - - b.Property("DateTime") - .HasColumnType("timestamp with time zone") - .HasColumnName("date_time") - .HasComment("Отметка времени"); - - b.Property("Hauling") - .HasColumnType("real") - .HasColumnName("hauling") - .HasComment("Наработка талевого каната с момента перетяжки каната, т*км"); - - b.Property("HaulingWarnSp") - .HasColumnType("real") - .HasColumnName("hauling_warn_sp") - .HasComment("Наработка талевого каната до сигнализации о необходимости перетяжки, т*км"); - - b.Property("Replace") - .HasColumnType("real") - .HasColumnName("replace") - .HasComment("Наработка талевого каната с момента замены каната, т*км"); - - b.Property("ReplaceWarnSp") - .HasColumnType("real") - .HasColumnName("replace_warn_sp") - .HasComment("Наработка талевого каната до сигнализации о необходимости замены, т*км"); - - b.HasKey("IdTelemetry"); - - b.ToTable("t_telemetry_wireline_run_out"); - - b.HasComment("Наработка талевого каната"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.Trajectory.TrajectoryFact", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AzimuthGeo") - .HasColumnType("double precision") - .HasColumnName("azimuth_geo") - .HasComment("Азимут Географ."); - - b.Property("AzimuthMagnetic") - .HasColumnType("double precision") - .HasColumnName("azimuth_magnetic") - .HasComment("Азимут Магнитный"); - - b.Property("Comment") - .HasColumnType("text") - .HasColumnName("comment") - .HasComment("Комментарии"); - - b.Property("IdUser") - .HasColumnType("integer") - .HasColumnName("id_user") - .HasComment("ID пользователя который внес/изменил запись"); - - b.Property("IdWell") - .HasColumnType("integer") - .HasColumnName("id_well") - .HasComment("ID скважины"); - - b.Property("UpdateDate") - .HasColumnType("timestamp with time zone") - .HasColumnName("update_date") - .HasComment("Дата загрузки траектории"); - - b.Property("VerticalDepth") - .HasColumnType("double precision") - .HasColumnName("vertical_depth") - .HasComment("Глубина вертикальная"); - - b.Property("WellboreDepth") - .HasColumnType("double precision") - .HasColumnName("wellbore_depth") - .HasComment("Глубина по стволу"); - - b.Property("ZenithAngle") - .HasColumnType("double precision") - .HasColumnName("zenith_angle") - .HasComment("Угол зенитный"); - - b.HasKey("Id"); - - b.HasIndex("IdUser"); - - b.HasIndex("IdWell"); - - b.ToTable("t_trajectory_fact"); - - b.HasComment("Загрузка фактической траектории"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.Trajectory.TrajectoryPlan", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AzimuthGeo") - .HasColumnType("double precision") - .HasColumnName("azimuth_geo") - .HasComment("Азимут Географ."); - - b.Property("AzimuthMagnetic") - .HasColumnType("double precision") - .HasColumnName("azimuth_magnetic") - .HasComment("Азимут Магнитный"); - - b.Property("Comment") - .HasColumnType("text") - .HasColumnName("comment") - .HasComment("Комментарии"); - - b.Property("IdUser") - .HasColumnType("integer") - .HasColumnName("id_user") - .HasComment("ID пользователя который внес/изменил запись"); - - b.Property("IdWell") - .HasColumnType("integer") - .HasColumnName("id_well") - .HasComment("ID скважины"); - - b.Property("Radius") - .HasColumnType("double precision") - .HasColumnName("radius") - .HasComment("Радиус цели"); - - b.Property("UpdateDate") - .HasColumnType("timestamp with time zone") - .HasColumnName("update_date") - .HasComment("Дата загрузки траектории"); - - b.Property("VerticalDepth") - .HasColumnType("double precision") - .HasColumnName("vertical_depth") - .HasComment("Глубина вертикальная"); - - b.Property("WellboreDepth") - .HasColumnType("double precision") - .HasColumnName("wellbore_depth") - .HasComment("Глубина по стволу"); - - b.Property("ZenithAngle") - .HasColumnType("double precision") - .HasColumnName("zenith_angle") - .HasComment("Угол зенитный"); - - b.HasKey("Id"); - - b.HasIndex("IdUser"); - - b.HasIndex("IdWell"); - - b.ToTable("t_trajectory_plan"); - - b.HasComment("Загрузка плановой траектории"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.User", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Email") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("email") - .HasComment("должность"); - - b.Property("IdCompany") - .HasColumnType("integer") - .HasColumnName("id_company"); - - b.Property("IdState") - .HasColumnType("smallint") - .HasColumnName("state") - .HasComment("состояние:\n0 - не активен, \n1 - активен, \n2 - заблокирован"); - - b.Property("Login") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("login"); - - b.Property("Name") - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("name") - .HasComment("имя"); - - b.Property("PasswordHash") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("password_hash") - .HasComment("соленый хэш пароля.\nпервые 5 символов - соль"); - - b.Property("Patronymic") - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("patronymic") - .HasComment("отчество"); - - b.Property("Phone") - .HasMaxLength(50) - .HasColumnType("character varying(50)") - .HasColumnName("phone") - .HasComment("номер телефона"); - - b.Property("Position") - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("position") - .HasComment("email"); - - b.Property("Surname") - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("surname") - .HasComment("фамилия"); - - b.HasKey("Id"); - - b.HasIndex("IdCompany"); - - b.HasIndex("Login") - .IsUnique(); - - b.ToTable("t_user"); - - b.HasComment("Пользователи облака"); - - b.HasData( - new - { - Id = 1, - Email = "", - IdCompany = 1, - IdState = (short)1, - Login = "dev", - Name = "Разработчик", - PasswordHash = "Vlcj|4fa529103dde7ff72cfe76185f344d4aa87931f8e1b2044e8a7739947c3d18923464eaad93843e4f809c5e126d013072" - }); - }); - - modelBuilder.Entity("AsbCloudDb.Model.UserRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Caption") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("caption") - .HasComment("Название"); - - b.Property("IdType") - .HasColumnType("integer") - .HasColumnName("id_type") - .HasComment("0-роль из стандартной матрицы, \n1-специальная роль для какого-либо пользователя"); - - b.HasKey("Id"); - - b.ToTable("t_user_role"); - - b.HasComment("Роли пользователей в системе"); - - b.HasData( - new - { - Id = 1, - Caption = "root", - IdType = 1 - }, - new - { - Id = 1100, - Caption = "admin_cluster.view", - IdType = 1 - }, - new - { - Id = 1101, - Caption = "admin_cluster.edit", - IdType = 1 - }, - new - { - Id = 1102, - Caption = "admin_company.view", - IdType = 1 - }, - new - { - Id = 1103, - Caption = "admin_company.edit", - IdType = 1 - }, - new - { - Id = 1104, - Caption = "admin_company_type.view", - IdType = 1 - }, - new - { - Id = 1105, - Caption = "admin_company_type.edit", - IdType = 1 - }, - new - { - Id = 1106, - Caption = "admin_deposit.view", - IdType = 1 - }, - new - { - Id = 1107, - Caption = "admin_deposit.edit", - IdType = 1 - }, - new - { - Id = 1108, - Caption = "admin_permission.view", - IdType = 1 - }, - new - { - Id = 1109, - Caption = "admin_permission.edit", - IdType = 1 - }, - new - { - Id = 1110, - Caption = "admin_role.view", - IdType = 1 - }, - new - { - Id = 1111, - Caption = "admin_role.edit", - IdType = 1 - }, - new - { - Id = 1112, - Caption = "admin_telemetry.view", - IdType = 1 - }, - new - { - Id = 1113, - Caption = "admin_user.view", - IdType = 1 - }, - new - { - Id = 1114, - Caption = "admin_user.edit", - IdType = 1 - }, - new - { - Id = 1115, - Caption = "admin_visit_log.view", - IdType = 1 - }, - new - { - Id = 1116, - Caption = "admin_well.view", - IdType = 1 - }, - new - { - Id = 1117, - Caption = "admin_well.edit", - IdType = 1 - }, - new - { - Id = 1200, - Caption = "archive.view", - IdType = 1 - }, - new - { - Id = 1201, - Caption = "cluster.view", - IdType = 1 - }, - new - { - Id = 1202, - Caption = "composite.view", - IdType = 1 - }, - new - { - Id = 1203, - Caption = "composite.edit", - IdType = 1 - }, - new - { - Id = 1204, - Caption = "deposit.view", - IdType = 1 - }, - new - { - Id = 1205, - Caption = "document.view", - IdType = 1 - }, - new - { - Id = 1206, - Caption = "drillProcessFlow.view", - IdType = 1 - }, - new - { - Id = 1207, - Caption = "drillProcessFlow.edit", - IdType = 1 - }, - new - { - Id = 1208, - Caption = "measure.view", - IdType = 1 - }, - new - { - Id = 1209, - Caption = "measure.edit", - IdType = 1 - }, - new - { - Id = 1210, - Caption = "message.view", - IdType = 1 - }, - new - { - Id = 1211, - Caption = "operations.view", - IdType = 1 - }, - new - { - Id = 1212, - Caption = "operations.edit", - IdType = 1 - }, - new - { - Id = 1213, - Caption = "params.view", - IdType = 1 - }, - new - { - Id = 1214, - Caption = "params.edit", - IdType = 1 - }, - new - { - Id = 1215, - Caption = "report.view", - IdType = 1 - }, - new - { - Id = 1216, - Caption = "report.edit", - IdType = 1 - }, - new - { - Id = 1217, - Caption = "setpoints.view", - IdType = 1 - }, - new - { - Id = 1218, - Caption = "setpoints.edit", - IdType = 1 - }, - new - { - Id = 1219, - Caption = "telemetry.view", - IdType = 1 - }, - new - { - Id = 1220, - Caption = "telemetryAnalysis.view", - IdType = 1 - }, - new - { - Id = 1221, - Caption = "well.view", - IdType = 1 - }, - new - { - Id = 1500, - Caption = "Просмотр всего", - IdType = 1 - }, - new - { - Id = 1501, - Caption = "file.edit", - IdType = 1 - }, - new - { - Id = 1502, - Caption = "drillingProgram.edit", - IdType = 1 - }, - new - { - Id = 2000, - Caption = "Заказчик", - IdType = 0 - }, - new - { - Id = 2001, - Caption = "Супервайзер", - IdType = 0 - }, - new - { - Id = 2002, - Caption = "Буровой подрядчик", - IdType = 0 - }, - new - { - Id = 2003, - Caption = "Растворщик", - IdType = 0 - }, - new - { - Id = 2004, - Caption = "Телеметрист", - IdType = 0 - }, - new - { - Id = 2005, - Caption = "Долотный сервис", - IdType = 0 - }, - new - { - Id = 2006, - Caption = "ГТИ", - IdType = 0 - }, - new - { - Id = 2007, - Caption = "Цементирование", - IdType = 0 - }); - }); - - modelBuilder.Entity("AsbCloudDb.Model.UserSetting", b => - { - b.Property("IdUser") - .HasColumnType("integer") - .HasColumnName("id_user"); - - b.Property("Key") - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("key") - .HasComment("Ключ настроек пользователя"); - - b.Property("Value") - .HasColumnType("jsonb") - .HasColumnName("setting_value") - .HasComment("Значение настроек пользователя"); - - b.HasKey("IdUser", "Key"); - - b.ToTable("t_user_settings"); - - b.HasComment("настройки интерфейса пользователя"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.Well", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Caption") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("caption"); - - b.Property("IdCluster") - .HasColumnType("integer") - .HasColumnName("id_cluster"); - - b.Property("IdState") - .HasColumnType("integer") - .HasColumnName("state") - .HasComment("0 - неизвестно, 1 - в работе, 2 - завершена"); - - b.Property("IdTelemetry") - .HasColumnType("integer") - .HasColumnName("id_telemetry"); - - b.Property("IdWellType") - .HasColumnType("integer") - .HasColumnName("id_well_type"); - - b.Property("Latitude") - .HasColumnType("double precision") - .HasColumnName("latitude"); - - b.Property("Longitude") - .HasColumnType("double precision") - .HasColumnName("longitude"); - - b.Property("Timezone") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("timezone") - .HasComment("Смещение часового пояса от UTC"); - - b.HasKey("Id"); - - b.HasIndex("IdCluster"); - - b.HasIndex("IdTelemetry") - .IsUnique(); - - b.HasIndex("IdWellType"); - - b.ToTable("t_well"); - - b.HasComment("скважины"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.WellComposite", b => - { - b.Property("IdWell") - .HasColumnType("integer") - .HasColumnName("id_well") - .HasComment("Id скважины получателя"); - - b.Property("IdWellSrc") - .HasColumnType("integer") - .HasColumnName("id_well_src") - .HasComment("Id скважины композита"); - - b.Property("IdWellSectionType") - .HasColumnType("integer") - .HasColumnName("id_well_section_type") - .HasComment("Id тип секции композита"); - - b.HasKey("IdWell", "IdWellSrc", "IdWellSectionType"); - - b.HasIndex("IdWellSectionType"); - - b.HasIndex("IdWellSrc"); - - b.ToTable("t_well_composite"); - - b.HasComment("Композитная скважина"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.WellFinalDocument", b => - { - b.Property("IdWell") - .HasColumnType("integer") - .HasColumnName("id_well"); - - b.Property("IdUser") - .HasColumnType("integer") - .HasColumnName("id_user"); - - b.Property("IdCategory") - .HasColumnType("integer") - .HasColumnName("id_category"); - - b.HasKey("IdWell", "IdUser", "IdCategory") - .HasName("t_well_final_documents_pk"); - - b.HasIndex("IdCategory"); - - b.HasIndex("IdUser"); - - b.ToTable("t_well_final_documents"); - - b.HasComment("Дело скважины"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.WellOperation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("CategoryInfo") - .HasColumnType("text") - .HasColumnName("category_info") - .HasComment("Доп. информация к выбраной категории"); - - b.Property("Comment") - .HasColumnType("text") - .HasColumnName("comment") - .HasComment("Комментарий"); - - b.Property("DateStart") - .HasColumnType("timestamp with time zone") - .HasColumnName("date_start") - .HasComment("Дата начала операции"); - - b.Property("DepthEnd") - .HasColumnType("double precision") - .HasColumnName("depth_end") - .HasComment("Глубина после завершения операции, м"); - - b.Property("DepthStart") - .HasColumnType("double precision") - .HasColumnName("depth_start") - .HasComment("Глубина на начало операции, м"); - - b.Property("DurationHours") - .HasColumnType("double precision") - .HasColumnName("duration_hours") - .HasComment("Продолжительность, часы"); - - b.Property("IdCategory") - .HasColumnType("integer") - .HasColumnName("id_category") - .HasComment("Id категории операции"); - - b.Property("IdPlan") - .HasColumnType("integer") - .HasColumnName("id_plan") - .HasComment("Id плановой операции"); - - b.Property("IdType") - .HasColumnType("integer") - .HasColumnName("id_type") - .HasComment("0 = План или 1 = Факт"); - - b.Property("IdUser") - .HasColumnType("integer"); - - b.Property("IdWell") - .HasColumnType("integer") - .HasColumnName("id_well") - .HasComment("Id скважины"); - - b.Property("IdWellSectionType") - .HasColumnType("integer") - .HasColumnName("id_well_section_type") - .HasComment("Id тип секции скважины"); - - b.Property("LastUpdateDate") - .HasColumnType("timestamp with time zone"); - - b.HasKey("Id"); - - b.HasIndex("DateStart"); - - b.HasIndex("DepthEnd"); - - b.HasIndex("IdCategory"); - - b.HasIndex("IdPlan"); - - b.HasIndex("IdWell"); - - b.HasIndex("IdWellSectionType"); - - b.ToTable("t_well_operation"); - - b.HasComment("Данные по операциям на скважине"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.WellOperationCategory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("IdParent") - .HasColumnType("integer") - .HasColumnName("id_parent") - .HasComment("id родительской категории"); - - b.Property("KeyValueName") - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("key_value_name") - .HasComment("Название ключевого показателя операции"); - - b.Property("KeyValueUnits") - .HasMaxLength(16) - .HasColumnType("character varying(16)") - .HasColumnName("key_value_units") - .HasComment("Единицы измерения ключевого показателя операции"); - - b.Property("Name") - .IsRequired() - .HasColumnType("text") - .HasColumnName("name") - .HasComment("Название категории операции"); - - b.HasKey("Id"); - - b.HasIndex("IdParent"); - - b.ToTable("t_well_operation_category"); - - b.HasComment("Справочник операций на скважине"); - - b.HasData( - new - { - Id = 3000, - KeyValueName = "dT", - KeyValueUnits = "м/ч", - Name = "БУРЕНИЕ" - }, - new - { - Id = 3001, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "СПО" - }, - new - { - Id = 3002, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "КРЕПЛЕНИЕ" - }, - new - { - Id = 3003, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "ГФР" - }, - new - { - Id = 3004, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Вспомогательные операции" - }, - new - { - Id = 3005, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Непроизводительное время (НПВ)" - }, - new - { - Id = 4000, - IdParent = 3000, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "КНБК" - }, - new - { - Id = 4001, - IdParent = 3000, - KeyValueName = "dT", - KeyValueUnits = "м/ч", - Name = "Механическое. бурение" - }, - new - { - Id = 4002, - IdParent = 3000, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Статический замер" - }, - new - { - Id = 4003, - IdParent = 3000, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Нормализация диаметра скважины" - }, - new - { - Id = 4004, - IdParent = 3000, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Наращивание" - }, - new - { - Id = 4005, - IdParent = 3001, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "СПО" - }, - new - { - Id = 4006, - IdParent = 3002, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Спуск обсадной колонны" - }, - new - { - Id = 4018, - IdParent = 3002, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Крепление" - }, - new - { - Id = 4007, - IdParent = 3002, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Цементирование" - }, - new - { - Id = 4008, - IdParent = 3002, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Вспомогательные работы при креплении" - }, - new - { - Id = 4009, - IdParent = 3003, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Сборка/разборка приборов ГИС" - }, - new - { - Id = 4010, - IdParent = 3003, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "СПО" - }, - new - { - Id = 4011, - IdParent = 3003, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "ГИС" - }, - new - { - Id = 4012, - IdParent = 3004, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Промывка, ОБР" - }, - new - { - Id = 4013, - IdParent = 3004, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Вспомогательные работы" - }, - new - { - Id = 4014, - IdParent = 3005, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Ремонт оборудования" - }, - new - { - Id = 4015, - IdParent = 3005, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Аварийные работы" - }, - new - { - Id = 4016, - IdParent = 3005, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Осложнение" - }, - new - { - Id = 4017, - IdParent = 3005, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Незаложенные в ГГД операции" - }, - new - { - Id = 5000, - IdParent = 4000, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Разборка КНБК" - }, - new - { - Id = 5001, - IdParent = 4000, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Сборка КНБК" - }, - new - { - Id = 5002, - IdParent = 4001, - KeyValueName = "МСП", - KeyValueUnits = "м/ч", - Name = "Бурение слайдом" - }, - new - { - Id = 5003, - IdParent = 4001, - KeyValueName = "МСП", - KeyValueUnits = "м/ч", - Name = "Бурение ротором" - }, - new - { - Id = 5004, - IdParent = 4002, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Замер ЗТС (запись MWD)" - }, - new - { - Id = 5005, - IdParent = 4003, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Промывка перед наращиванием" - }, - new - { - Id = 5006, - IdParent = 4003, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Проработка во время бурения" - }, - new - { - Id = 5007, - IdParent = 4003, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Проработка перед наращиванием" - }, - new - { - Id = 5008, - IdParent = 4003, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Шаблонировка во время бурения" - }, - new - { - Id = 5009, - IdParent = 4003, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Шаблонировка перед наращиванием" - }, - new - { - Id = 5010, - IdParent = 4004, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Наращивание" - }, - new - { - Id = 5011, - IdParent = 4004, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Удержание в клиньях" - }, - new - { - Id = 5012, - IdParent = 4005, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Подъем инструмента" - }, - new - { - Id = 5013, - IdParent = 4005, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Подъем КНБК" - }, - new - { - Id = 5014, - IdParent = 4005, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Спуск инструмента" - }, - new - { - Id = 5015, - IdParent = 4005, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Спуск КНБК" - }, - new - { - Id = 5016, - IdParent = 4006, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Промывка при спуске ОК" - }, - new - { - Id = 5017, - IdParent = 4006, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Спуск ОК" - }, - new - { - Id = 5018, - IdParent = 4007, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "ОЗЦ" - }, - new - { - Id = 5019, - IdParent = 4007, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Цементирование" - }, - new - { - Id = 5020, - IdParent = 4008, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Опрессовка БИ" - }, - new - { - Id = 5021, - IdParent = 4008, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Опрессовка ОК" - }, - new - { - Id = 5022, - IdParent = 4008, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "ПЗР при спуске ОК" - }, - new - { - Id = 5023, - IdParent = 4008, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "ПЗР при цементировании" - }, - new - { - Id = 5024, - IdParent = 4009, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Разборка комплекса приборов ГИС" - }, - new - { - Id = 5025, - IdParent = 4009, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Сборка комплекса приборов ГИС" - }, - new - { - Id = 5026, - IdParent = 4010, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Подъем приборов ГИС (на трубах)" - }, - new - { - Id = 5027, - IdParent = 4010, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Спуск приборов ГИС (на трубах)" - }, - new - { - Id = 5028, - IdParent = 4011, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Комплекс ГИС на жестком кабеле" - }, - new - { - Id = 5029, - IdParent = 4011, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Комплекс ГИС на кабеле" - }, - new - { - Id = 5030, - IdParent = 4011, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Комплекс ГИС на трубах" - }, - new - { - Id = 5031, - IdParent = 4012, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Закачка/прокачка пачки" - }, - new - { - Id = 5032, - IdParent = 4012, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Обработка БР" - }, - new - { - Id = 5033, - IdParent = 4012, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Ориентирование ТС при бурении" - }, - new - { - Id = 5034, - IdParent = 4012, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Перезапись гаммы-каротажа" - }, - new - { - Id = 5035, - IdParent = 4012, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Приготовление БР" - }, - new - { - Id = 5036, - IdParent = 4012, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Промывка" - }, - new - { - Id = 5037, - IdParent = 4012, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Разбуривание тех.оснастки" - }, - new - { - Id = 5038, - IdParent = 4012, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Спуск инструмента с проработкой" - }, - new - { - Id = 5039, - IdParent = 4013, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "ВМР" - }, - new - { - Id = 5040, - IdParent = 4013, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Демонтаж ПВО" - }, - new - { - Id = 5041, - IdParent = 4013, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Долив затруба при подъёме" - }, - new - { - Id = 5042, - IdParent = 4013, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Монтаж ПВО" - }, - new - { - Id = 5043, - IdParent = 4013, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Наработка жёлоба" - }, - new - { - Id = 5044, - IdParent = 4013, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Обвязка устья с циркуляционной системой" - }, - new - { - Id = 5045, - IdParent = 4013, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Оборудование устья" - }, - new - { - Id = 5046, - IdParent = 4013, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Опрессовка ПВО" - }, - new - { - Id = 5047, - IdParent = 4013, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Перемонтаж ПВО " - }, - new - { - Id = 5048, - IdParent = 4013, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Перетяжка талевого каната" - }, - new - { - Id = 5049, - IdParent = 4013, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "ПЗР при сборке КНБК" - }, - new - { - Id = 5050, - IdParent = 4013, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Полная замена талевого каната" - }, - new - { - Id = 5051, - IdParent = 4013, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "ПР перед забуркой направления" - }, - new - { - Id = 5052, - IdParent = 4013, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Продувка манифольда" - }, - new - { - Id = 5053, - IdParent = 4013, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Срезка" - }, - new - { - Id = 5054, - IdParent = 4013, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Тайм-дриллинг" - }, - new - { - Id = 5055, - IdParent = 4013, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Тех.отстой" - }, - new - { - Id = 5056, - IdParent = 4013, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Учебная тревога \"Выброс\"" - }, - new - { - Id = 5057, - IdParent = 4013, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Чистка ЦСГО/емкостного блока" - }, - new - { - Id = 5058, - IdParent = 4014, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Ремонт бурового оборудования" - }, - new - { - Id = 5059, - IdParent = 4015, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Ловильные работы" - }, - new - { - Id = 5060, - IdParent = 4015, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Ожидание" - }, - new - { - Id = 5061, - IdParent = 4015, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Определение места прихвата и ЛМ" - }, - new - { - Id = 5062, - IdParent = 4015, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Работа яссом" - }, - new - { - Id = 5063, - IdParent = 4015, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Расхаживание" - }, - new - { - Id = 5064, - IdParent = 4015, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "СПО - колокол" - }, - new - { - Id = 5065, - IdParent = 4015, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "СПО - метчик" - }, - new - { - Id = 5066, - IdParent = 4015, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "СПО - овершот" - }, - new - { - Id = 5067, - IdParent = 4015, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "СПО - труболовка" - }, - new - { - Id = 5068, - IdParent = 4015, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Торпедирование (встряхивание)" - }, - new - { - Id = 5069, - IdParent = 4015, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Торпедирование (отстрел)" - }, - new - { - Id = 5070, - IdParent = 4015, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Установка ванн" - }, - new - { - Id = 5071, - IdParent = 4015, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Фрезеровка" - }, - new - { - Id = 5072, - IdParent = 4016, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Контролируемое ГНВП" - }, - new - { - Id = 5073, - IdParent = 4016, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Поглощение" - }, - new - { - Id = 5074, - IdParent = 4016, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Сальникообразование" - }, - new - { - Id = 5075, - IdParent = 4016, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Утяжеление БР" - }, - new - { - Id = 5076, - IdParent = 4017, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "НПВ / прочее" - }, - new - { - Id = 5077, - IdParent = 4017, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Обработка раствора (несоответствие параметров)" - }, - new - { - Id = 5078, - IdParent = 4017, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "подъем ОК" - }, - new - { - Id = 5079, - IdParent = 4017, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Ревизия КНБК/инструмента/ЗТС" - }, - new - { - Id = 5082, - IdParent = 4000, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Сборка устройства ориентирования КО" - }, - new - { - Id = 5083, - IdParent = 4003, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Проработка принудительная" - }, - new - { - Id = 5084, - IdParent = 4005, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Шаблонировка подъем БИ, продувка" - }, - new - { - Id = 5085, - IdParent = 4005, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Спуск бурильного инструмента со сборкой с мостков" - }, - new - { - Id = 5086, - IdParent = 4005, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Подъем БИ с выбросом на мостки" - }, - new - { - Id = 5087, - IdParent = 4005, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Спуск БИ со сборкой с мостков" - }, - new - { - Id = 5088, - IdParent = 4005, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Сборка и спуск ТБТ" - }, - new - { - Id = 5089, - IdParent = 4005, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Спуск КО на транспотрной колонне" - }, - new - { - Id = 5090, - IdParent = 4008, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Отворот допускной трубы" - }, - new - { - Id = 5091, - IdParent = 4008, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Активация подвески, опрессовка" - }, - new - { - Id = 5092, - IdParent = 4008, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Монтаж, опрессовка ФА" - }, - new - { - Id = 5093, - IdParent = 4008, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Сборка хвостовика 114мм (согласно схеме)" - }, - new - { - Id = 5094, - IdParent = 4008, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "ПЗР к спуску УЭЦН" - }, - new - { - Id = 5095, - IdParent = 4008, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Активация подвески (потайной колонны, хвостовика)" - }, - new - { - Id = 5096, - IdParent = 4008, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Шаблонирование перед спуском" - }, - new - { - Id = 5097, - IdParent = 4012, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Промывка - перевод скважины на новый раствор" - }, - new - { - Id = 5098, - IdParent = 4013, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Сборка БИ с мостков на подсвечник" - }, - new - { - Id = 5099, - IdParent = 4013, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Подготовка ствола скважины. Перезапись ГК в интервале установки КО." - }, - new - { - Id = 5100, - IdParent = 4013, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Смена рабочего переводника ВСП" - }, - new - { - Id = 5101, - IdParent = 4014, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Ремонт" - }, - new - { - Id = 5102, - IdParent = 4018, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Спуск пакера" - }, - new - { - Id = 5103, - IdParent = 4011, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Запись гамма-каратожа" - }, - new - { - Id = 5104, - IdParent = 4013, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Шаблонирование спуск БИ" - }, - new - { - Id = 5105, - IdParent = 4018, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Сборка клин-отклонителя" - }, - new - { - Id = 5106, - IdParent = 4018, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Ориентирование и посадка клина-отклонителя" - }, - new - { - Id = 5107, - IdParent = 4018, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Протяжка подъемного патрубка подвески" - }, - new - { - Id = 5108, - IdParent = 4018, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Подъем клина-отклонителя" - }, - new - { - Id = 5109, - IdParent = 4018, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Стыковка стингера с хвостовиком основного ствола" - }, - new - { - Id = 5110, - IdParent = 4018, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Ориентирование и установка стыковочного узла хвостовика" - }, - new - { - Id = 5111, - IdParent = 4001, - KeyValueName = "МСП", - KeyValueUnits = "м/ч", - Name = "Бурение с отбором керна" - }, - new - { - Id = 5112, - IdParent = 4018, - KeyValueName = "dT", - KeyValueUnits = "мин", - Name = "Работа пакером в обсадной колонне" - }); - }); - - modelBuilder.Entity("AsbCloudDb.Model.WellSections.WellSectionPlan", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DepthEnd") - .HasColumnType("double precision") - .HasColumnName("depth_end") - .HasComment("Конечная глубина бурения, м"); - - b.Property("DepthStart") - .HasColumnType("double precision") - .HasColumnName("depth_start") - .HasComment("Начальная глубина бурения, м"); - - b.Property("IdSectionType") - .HasColumnType("integer") - .HasColumnName("id_section_type") - .HasComment("Тип секции"); - - b.Property("IdUser") - .HasColumnType("integer") - .HasColumnName("id_user") - .HasComment("Id пользователя"); - - b.Property("IdWell") - .HasColumnType("integer") - .HasColumnName("id_well") - .HasComment("Id скважины"); - - b.Property("InnerDiameter") - .HasColumnType("double precision") - .HasColumnName("inner_diameter") - .HasComment("Внутренний диаметр"); - - b.Property("LastUpdateDate") - .HasColumnType("timestamp with time zone") - .HasColumnName("date_last_update") - .HasComment("Дата последнего обновления"); - - b.Property("OuterDiameter") - .HasColumnType("double precision") - .HasColumnName("outer_diameter") - .HasComment("Внешний диаметр"); - - b.HasKey("Id"); - - b.HasIndex("IdSectionType"); - - b.HasIndex("IdWell", "IdSectionType") - .IsUnique(); - - b.ToTable("t_well_section_plan"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.WellSectionType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Caption") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("caption") - .HasComment("Название"); - - b.Property("Order") - .HasColumnType("real") - .HasColumnName("order") - .HasComment("Порядок"); - - b.HasKey("Id"); - - b.ToTable("t_well_section_type"); - - b.HasComment("конструкция секции скважины"); - - b.HasData( - new - { - Id = 1, - Caption = "Пилотный ствол", - Order = 4f - }, - new - { - Id = 2, - Caption = "Направление", - Order = 0f - }, - new - { - Id = 3, - Caption = "Кондуктор", - Order = 1f - }, - new - { - Id = 4, - Caption = "Эксплуатационная колонна", - Order = 3f - }, - new - { - Id = 5, - Caption = "Транспортный ствол", - Order = 5f - }, - new - { - Id = 6, - Caption = "Хвостовик", - Order = 6f - }, - new - { - Id = 7, - Caption = "Пилотный ствол 2", - Order = 4.1f - }, - new - { - Id = 8, - Caption = "Направление 2", - Order = 0.1f - }, - new - { - Id = 9, - Caption = "Кондуктор 2", - Order = 1.1f - }, - new - { - Id = 10, - Caption = "Эксплуатационная колонна 2", - Order = 3.1f - }, - new - { - Id = 11, - Caption = "Транспортный ствол 2", - Order = 5.1f - }, - new - { - Id = 12, - Caption = "Хвостовик 2", - Order = 6.1f - }, - new - { - Id = 13, - Caption = "Пилотный ствол 3", - Order = 4.2f - }, - new - { - Id = 14, - Caption = "Направление 3", - Order = 0.2f - }, - new - { - Id = 15, - Caption = "Кондуктор 3", - Order = 1.2f - }, - new - { - Id = 16, - Caption = "Эксплуатационная колонна 3", - Order = 3.2f - }, - new - { - Id = 17, - Caption = "Транспортный ствол 3", - Order = 5.2f - }, - new - { - Id = 18, - Caption = "Хвостовик 3", - Order = 6.2f - }, - new - { - Id = 19, - Caption = "Пилотный ствол 4", - Order = 4.3f - }, - new - { - Id = 20, - Caption = "Направление 4", - Order = 0.3f - }, - new - { - Id = 21, - Caption = "Кондуктор 4", - Order = 1.3f - }, - new - { - Id = 22, - Caption = "Эксплуатационная колонна 4", - Order = 3.3f - }, - new - { - Id = 23, - Caption = "Транспортный ствол 4", - Order = 5.3f - }, - new - { - Id = 24, - Caption = "Хвостовик 4", - Order = 6.3f - }, - new - { - Id = 25, - Caption = "Пилотный ствол 5", - Order = 4.4f - }, - new - { - Id = 26, - Caption = "Направление 5", - Order = 0.4f - }, - new - { - Id = 27, - Caption = "Кондуктор 5", - Order = 1.4f - }, - new - { - Id = 28, - Caption = "Эксплуатационная колонна 5", - Order = 3.4f - }, - new - { - Id = 29, - Caption = "Транспортный ствол 5", - Order = 5.4f - }, - new - { - Id = 30, - Caption = "Хвостовик 5", - Order = 6.4f - }, - new - { - Id = 31, - Caption = "Техническая колонна", - Order = 2f - }, - new - { - Id = 32, - Caption = "Техническая колонна 2", - Order = 2.1f - }, - new - { - Id = 33, - Caption = "Техническая колонна 3", - Order = 2.2f - }, - new - { - Id = 34, - Caption = "Хвостовик 6", - Order = 6.5f - }, - new - { - Id = 35, - Caption = "Хвостовик 7", - Order = 6.6f - }, - new - { - Id = 36, - Caption = "Хвостовик 8", - Order = 6.7f - }, - new - { - Id = 37, - Caption = "Хвостовик 9", - Order = 6.8f - }, - new - { - Id = 38, - Caption = "Хвостовик 10", - Order = 6.9f - }); - }); - - modelBuilder.Entity("AsbCloudDb.Model.WellType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Caption") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .HasColumnName("caption") - .HasComment("Название"); - - b.HasKey("Id"); - - b.ToTable("t_well_type"); - - b.HasComment("конструкция скважины"); - - b.HasData( - new - { - Id = 1, - Caption = "Наклонно-направленная" - }, - new - { - Id = 2, - Caption = "Горизонтальная" - }); - }); - - modelBuilder.Entity("AsbCloudDb.Model.WITS.RecordBase", b => - { - b.Property("IdTelemetry") - .HasColumnType("integer") - .HasColumnName("id_telemetry"); - - b.Property("DateTime") - .HasColumnType("timestamp with time zone") - .HasColumnName("date"); - - b.Property("Actcod") - .HasColumnType("smallint") - .HasColumnName("ACTCOD"); - - b.Property("Date") - .HasColumnType("integer") - .HasColumnName("DATE"); - - b.Property("Recid") - .HasColumnType("smallint") - .HasColumnName("RECID"); - - b.Property("Seqid") - .HasColumnType("integer") - .HasColumnName("SEQID"); - - b.Property("Stknum") - .HasColumnType("smallint") - .HasColumnName("STKNUM"); - - b.Property("Time") - .HasColumnType("integer") - .HasColumnName("TIME"); - - b.Property("Wellid") - .HasColumnType("text") - .HasColumnName("WELLID"); - - b.HasKey("IdTelemetry", "DateTime"); - - b.ToTable("t_telemetry_wits_base"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.WITS.Record1", b => - { - b.HasBaseType("AsbCloudDb.Model.WITS.RecordBase"); - - b.Property("Blkpos") - .HasColumnType("real") - .HasColumnName("BLKPOS"); - - b.Property("Chkp") - .HasColumnType("real") - .HasColumnName("CHKP"); - - b.Property("Deptbitm") - .HasColumnType("real") - .HasColumnName("DEPTBITM"); - - b.Property("Deptbitv") - .HasColumnType("real") - .HasColumnName("DEPTBITV"); - - b.Property("Deptmeas") - .HasColumnType("real") - .HasColumnName("DEPTMEAS"); - - b.Property("Deptretm") - .HasColumnType("real") - .HasColumnName("DEPTRETM"); - - b.Property("Deptvert") - .HasColumnType("real") - .HasColumnName("DEPTVERT"); - - b.Property("Gasa") - .HasColumnType("real") - .HasColumnName("GASA"); - - b.Property("Hkla") - .HasColumnType("real") - .HasColumnName("HKLA"); - - b.Property("Hklx") - .HasColumnType("real") - .HasColumnName("HKLX"); - - b.Property("Lagstks") - .HasColumnType("smallint") - .HasColumnName("LAGSTKS"); - - b.Property("Mcia") - .HasColumnType("real") - .HasColumnName("MCIA"); - - b.Property("Mcoa") - .HasColumnType("real") - .HasColumnName("MCOA"); - - b.Property("Mdia") - .HasColumnType("real") - .HasColumnName("MDIA"); - - b.Property("Mdoa") - .HasColumnType("real") - .HasColumnName("MDOA"); - - b.Property("Mfia") - .HasColumnType("real") - .HasColumnName("MFIA"); - - b.Property("Mfoa") - .HasColumnType("real") - .HasColumnName("MFOA"); - - b.Property("Mfop") - .HasColumnType("smallint") - .HasColumnName("MFOP"); - - b.Property("Mtia") - .HasColumnType("real") - .HasColumnName("MTIA"); - - b.Property("Mtoa") - .HasColumnType("real") - .HasColumnName("MTOA"); - - b.Property("Ropa") - .HasColumnType("real") - .HasColumnName("ROPA"); - - b.Property("Rpma") - .HasColumnType("smallint") - .HasColumnName("RPMA"); - - b.Property("Spare1") - .HasColumnType("real") - .HasColumnName("SPARE1"); - - b.Property("Spare2") - .HasColumnType("real") - .HasColumnName("SPARE2"); - - b.Property("Spare3") - .HasColumnType("real") - .HasColumnName("SPARE3"); - - b.Property("Spare4") - .HasColumnType("real") - .HasColumnName("SPARE4"); - - b.Property("Spare5") - .HasColumnType("real") - .HasColumnName("SPARE5"); - - b.Property("Spm1") - .HasColumnType("smallint") - .HasColumnName("SPM1"); - - b.Property("Spm2") - .HasColumnType("smallint") - .HasColumnName("SPM2"); - - b.Property("Spm3") - .HasColumnType("smallint") - .HasColumnName("SPM3"); - - b.Property("Sppa") - .HasColumnType("real") - .HasColumnName("SPPA"); - - b.Property("Stkc") - .HasColumnType("integer") - .HasColumnName("STKC"); - - b.Property("TelemetryId") - .HasColumnType("integer"); - - b.Property("Torqa") - .HasColumnType("real") - .HasColumnName("TORQA"); - - b.Property("Torqx") - .HasColumnType("real") - .HasColumnName("TORQX"); - - b.Property("Tvolact") - .HasColumnType("real") - .HasColumnName("TVOLACT"); - - b.Property("Tvolcact") - .HasColumnType("real") - .HasColumnName("TVOLCACT"); - - b.Property("Woba") - .HasColumnType("real") - .HasColumnName("WOBA"); - - b.Property("Wobx") - .HasColumnType("real") - .HasColumnName("WOBX"); - - b.HasIndex("TelemetryId"); - - b.ToTable("t_telemetry_wits_1"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.WITS.Record50", b => - { - b.HasBaseType("AsbCloudDb.Model.WITS.RecordBase"); - - b.Property("Deptbitm") - .HasColumnType("real") - .HasColumnName("DEPTBITM"); - - b.Property("DeptmeasGdpMc") - .HasColumnType("real") - .HasColumnName("DEPTMEAS_GDP_mc"); - - b.Property("DeptmeasMcrstat") - .HasColumnType("real") - .HasColumnName("DEPTMEAS_MCRSTAT"); - - b.Property("DeptmeasRa33Mc") - .HasColumnType("real") - .HasColumnName("DEPTMEAS_RA33_mc"); - - b.Property("DeptmeasRa33f2Mc") - .HasColumnType("real") - .HasColumnName("DEPTMEAS_RA33F2_mc"); - - b.Property("DeptmeasRa33f4Mc") - .HasColumnType("real") - .HasColumnName("DEPTMEAS_RA33F4_mc"); - - b.Property("DeptmeasRp33Mc") - .HasColumnType("real") - .HasColumnName("DEPTMEAS_RP33_mc"); - - b.Property("DeptmeasRp33f2Mc") - .HasColumnType("real") - .HasColumnName("DEPTMEAS_RP33F2_mc"); - - b.Property("DeptmeasRp33f4Mc") - .HasColumnType("real") - .HasColumnName("DEPTMEAS_RP33F4_mc"); - - b.Property("DeptmeasSlvlMc") - .HasColumnType("real") - .HasColumnName("DEPTMEAS_SLVL_mc"); - - b.Property("GdpMc") - .HasColumnType("real") - .HasColumnName("GDP_mc"); - - b.Property("Mcrstat") - .HasColumnType("real") - .HasColumnName("MCRSTAT"); - - b.Property("Ra33Mc") - .HasColumnType("real") - .HasColumnName("RA33_mc"); - - b.Property("Ra33f2Mc") - .HasColumnType("real") - .HasColumnName("RA33F2_mc"); - - b.Property("Ra33f4Mc") - .HasColumnType("real") - .HasColumnName("RA33F4_mc"); - - b.Property("Rp33Mc") - .HasColumnType("real") - .HasColumnName("RP33_mc"); - - b.Property("Rp33f2Mc") - .HasColumnType("real") - .HasColumnName("RP33F2_mc"); - - b.Property("Rp33f4Mc") - .HasColumnType("real") - .HasColumnName("RP33F4_mc"); - - b.Property("SlvlMc") - .HasColumnType("real") - .HasColumnName("SLVL_mc"); - - b.Property("TelemetryId") - .HasColumnType("integer"); - - b.HasIndex("TelemetryId"); - - b.ToTable("t_telemetry_wits_50"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.WITS.Record60", b => - { - b.HasBaseType("AsbCloudDb.Model.WITS.RecordBase"); - - b.Property("Btot") - .HasColumnType("real") - .HasColumnName("Btot"); - - b.Property("Bx") - .HasColumnType("real") - .HasColumnName("Bx"); - - b.Property("By") - .HasColumnType("real") - .HasColumnName("By"); - - b.Property("Bz") - .HasColumnType("real") - .HasColumnName("Bz"); - - b.Property("Deptbitm") - .HasColumnType("real") - .HasColumnName("DEPTBITM"); - - b.Property("Deptmeas") - .HasColumnType("real") - .HasColumnName("DEPTMEAS"); - - b.Property("Gtot") - .HasColumnType("real") - .HasColumnName("Gtot"); - - b.Property("Gx") - .HasColumnType("real") - .HasColumnName("Gx"); - - b.Property("Gy") - .HasColumnType("real") - .HasColumnName("Gy"); - - b.Property("Gz") - .HasColumnType("real") - .HasColumnName("Gz"); - - b.Property("TelemetryId") - .HasColumnType("integer"); - - b.HasIndex("TelemetryId"); - - b.ToTable("t_telemetry_wits_60"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.WITS.Record61", b => - { - b.HasBaseType("AsbCloudDb.Model.WITS.RecordBase"); - - b.Property("Att06h") - .HasColumnType("real") - .HasColumnName("ATT06H"); - - b.Property("Att06l") - .HasColumnType("real") - .HasColumnName("ATT06L"); - - b.Property("Att10h") - .HasColumnType("real") - .HasColumnName("ATT10H"); - - b.Property("Att10l") - .HasColumnType("real") - .HasColumnName("ATT10L"); - - b.Property("Deptbitm") - .HasColumnType("real") - .HasColumnName("DEPTBITM"); - - b.Property("Deptmeas") - .HasColumnType("real") - .HasColumnName("DEPTMEAS"); - - b.Property("Phl1f1") - .HasColumnType("real") - .HasColumnName("PHL1F1"); - - b.Property("Phl1f2") - .HasColumnType("real") - .HasColumnName("PHL1F2"); - - b.Property("Phl2f1") - .HasColumnType("real") - .HasColumnName("PHL2F1"); - - b.Property("Phl2f2") - .HasColumnType("real") - .HasColumnName("PHL2F2"); - - b.Property("Status") - .HasColumnType("real") - .HasColumnName("Status"); - - b.Property("TelemetryId") - .HasColumnType("integer"); - - b.HasIndex("TelemetryId"); - - b.ToTable("t_telemetry_wits_61"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.WITS.Record7", b => - { - b.HasBaseType("AsbCloudDb.Model.WITS.RecordBase"); - - b.Property("Deptmeas") - .HasColumnType("real") - .HasColumnName("DEPTMEAS"); - - b.Property("Deptsvym") - .HasColumnType("real") - .HasColumnName("DEPTSVYM"); - - b.Property("Deptsvyv") - .HasColumnType("real") - .HasColumnName("DEPTSVYV"); - - b.Property("Passnum") - .HasColumnType("smallint") - .HasColumnName("PASSNUM"); - - b.Property("Spare1") - .HasColumnType("real") - .HasColumnName("SPARE1"); - - b.Property("Spare2") - .HasColumnType("real") - .HasColumnName("SPARE2"); - - b.Property("Spare3") - .HasColumnType("real") - .HasColumnName("SPARE3"); - - b.Property("Spare4") - .HasColumnType("real") - .HasColumnName("SPARE4"); - - b.Property("Spare5") - .HasColumnType("real") - .HasColumnName("SPARE5"); - - b.Property("Svyazc") - .HasColumnType("real") - .HasColumnName("SVYAZC"); - - b.Property("Svyazu") - .HasColumnType("real") - .HasColumnName("SVYAZU"); - - b.Property("Svydls") - .HasColumnType("real") - .HasColumnName("SVYDLS"); - - b.Property("Svyew") - .HasColumnType("real") - .HasColumnName("SVYEW"); - - b.Property("Svygtf") - .HasColumnType("real") - .HasColumnName("SVYGTF"); - - b.Property("Svyinc") - .HasColumnType("real") - .HasColumnName("SVYINC"); - - b.Property("Svymtf") - .HasColumnType("real") - .HasColumnName("SVYMTF"); - - b.Property("Svyns") - .HasColumnType("real") - .HasColumnName("SVYNS"); - - b.Property("Svytype") - .HasColumnType("text") - .HasColumnName("SVYTYPE"); - - b.Property("Svywalk") - .HasColumnType("real") - .HasColumnName("SVYWALK"); - - b.Property("TelemetryId") - .HasColumnType("integer"); - - b.HasIndex("TelemetryId"); - - b.ToTable("t_telemetry_wits_7"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.WITS.Record8", b => - { - b.HasBaseType("AsbCloudDb.Model.WITS.RecordBase"); - - b.Property("Deptbitm") - .HasColumnType("real") - .HasColumnName("DEPTBITM"); - - b.Property("Deptbitv") - .HasColumnType("real") - .HasColumnName("DEPTBITV"); - - b.Property("Deptcalm") - .HasColumnType("real") - .HasColumnName("DEPTCALM"); - - b.Property("Deptcalv") - .HasColumnType("real") - .HasColumnName("DEPTCALV"); - - b.Property("Deptfdm") - .HasColumnType("real") - .HasColumnName("DEPTFDM"); - - b.Property("Deptfdv") - .HasColumnType("real") - .HasColumnName("DEPTFDV"); - - b.Property("Deptgr1m") - .HasColumnType("real") - .HasColumnName("DEPTGR1M"); - - b.Property("Deptgr1v") - .HasColumnType("real") - .HasColumnName("DEPTGR1V"); - - b.Property("Deptgr2m") - .HasColumnType("real") - .HasColumnName("DEPTGR2M"); - - b.Property("Deptgr2v") - .HasColumnType("real") - .HasColumnName("DEPTGR2V"); - - b.Property("Deptmeas") - .HasColumnType("real") - .HasColumnName("DEPTMEAS"); - - b.Property("Deptp1m") - .HasColumnType("real") - .HasColumnName("DEPTP1M"); - - b.Property("Deptp1v") - .HasColumnType("real") - .HasColumnName("DEPTP1V"); - - b.Property("Deptp2m") - .HasColumnType("real") - .HasColumnName("DEPTP2M"); - - b.Property("Deptp2v") - .HasColumnType("real") - .HasColumnName("DEPTP2V"); - - b.Property("Deptrs1m") - .HasColumnType("real") - .HasColumnName("DEPTRS1M"); - - b.Property("Deptrs1v") - .HasColumnType("real") - .HasColumnName("DEPTRS1V"); - - b.Property("Deptrs2m") - .HasColumnType("real") - .HasColumnName("DEPTRS2M"); - - b.Property("Deptrs2v") - .HasColumnType("real") - .HasColumnName("DEPTRS2V"); - - b.Property("Deptvert") - .HasColumnType("real") - .HasColumnName("DEPTVERT"); - - b.Property("Mclp") - .HasColumnType("real") - .HasColumnName("MCLP"); - - b.Property("Mfd") - .HasColumnType("real") - .HasColumnName("MFD"); - - b.Property("Mffp") - .HasColumnType("real") - .HasColumnName("MFFP"); - - b.Property("Mfpp") - .HasColumnType("real") - .HasColumnName("MFPP"); - - b.Property("Mfrann") - .HasColumnType("real") - .HasColumnName("MFRANN"); - - b.Property("Mfrpipe") - .HasColumnType("real") - .HasColumnName("MFRPIPE"); - - b.Property("Mftann") - .HasColumnType("real") - .HasColumnName("MFTANN"); - - b.Property("Mftpipe") - .HasColumnType("real") - .HasColumnName("MFTPIPE"); - - b.Property("Mg1") - .HasColumnType("real") - .HasColumnName("MG1"); - - b.Property("Mg1c") - .HasColumnType("real") - .HasColumnName("MG1C"); - - b.Property("Mg2") - .HasColumnType("real") - .HasColumnName("MG2"); - - b.Property("Mg2c") - .HasColumnType("real") - .HasColumnName("MG2C"); - - b.Property("Mpo1") - .HasColumnType("real") - .HasColumnName("MPO1"); - - b.Property("Mpo2") - .HasColumnType("real") - .HasColumnName("MPO2"); - - b.Property("Mr1") - .HasColumnType("real") - .HasColumnName("MR1"); - - b.Property("Mr1c") - .HasColumnType("real") - .HasColumnName("MR1C"); - - b.Property("Mr2") - .HasColumnType("real") - .HasColumnName("MR2"); - - b.Property("Mr2c") - .HasColumnType("real") - .HasColumnName("MR2C"); - - b.Property("Passnum") - .HasColumnType("smallint") - .HasColumnName("PASSNUM"); - - b.Property("Spare1") - .HasColumnType("real") - .HasColumnName("SPARE1"); - - b.Property("Spare2") - .HasColumnType("real") - .HasColumnName("SPARE2"); - - b.Property("Spare3") - .HasColumnType("real") - .HasColumnName("SPARE3"); - - b.Property("Spare4") - .HasColumnType("real") - .HasColumnName("SPARE4"); - - b.Property("Spare5") - .HasColumnType("real") - .HasColumnName("SPARE5"); - - b.Property("Spare6") - .HasColumnType("real") - .HasColumnName("SPARE6"); - - b.Property("Spare7") - .HasColumnType("real") - .HasColumnName("SPARE7"); - - b.Property("Spare8") - .HasColumnType("real") - .HasColumnName("SPARE8"); - - b.Property("Spare9") - .HasColumnType("real") - .HasColumnName("SPARE9"); - - b.Property("TelemetryId") - .HasColumnType("integer"); - - b.HasIndex("TelemetryId"); - - b.ToTable("t_telemetry_wits_8"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.Cluster", b => - { - b.HasOne("AsbCloudDb.Model.Deposit", "Deposit") - .WithMany("Clusters") - .HasForeignKey("IdDeposit") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("t_cluster_t_deposit_id_fk"); - - b.Navigation("Deposit"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.Company", b => - { - b.HasOne("AsbCloudDb.Model.CompanyType", "CompanyType") - .WithMany("Companies") - .HasForeignKey("IdCompanyType") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("CompanyType"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.Contact", b => - { - b.HasOne("AsbCloudDb.Model.CompanyType", "CompanyType") - .WithMany("Contacts") - .HasForeignKey("IdCompanyType") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("AsbCloudDb.Model.Well", "Well") - .WithMany("Contacts") - .HasForeignKey("IdWell") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("CompanyType"); - - b.Navigation("Well"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.DailyReports.DailyReport", b => - { - b.HasOne("AsbCloudDb.Model.Well", "Well") - .WithMany() - .HasForeignKey("IdWell") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Well"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.DataSaubStat", b => - { - b.HasOne("AsbCloudDb.Model.WellOperationCategory", "OperationCategory") - .WithMany() - .HasForeignKey("IdCategory") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("AsbCloudDb.Model.Telemetry", "Telemetry") - .WithMany() - .HasForeignKey("IdTelemetry") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("OperationCategory"); - - b.Navigation("Telemetry"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.DetectedOperation", b => - { - b.HasOne("AsbCloudDb.Model.WellOperationCategory", "OperationCategory") - .WithMany() - .HasForeignKey("IdCategory") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("AsbCloudDb.Model.Telemetry", "Telemetry") - .WithMany() - .HasForeignKey("IdTelemetry") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("OperationCategory"); - - b.Navigation("Telemetry"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.DrillingProgramPart", b => - { - b.HasOne("AsbCloudDb.Model.FileCategory", "FileCategory") - .WithMany() - .HasForeignKey("IdFileCategory") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("AsbCloudDb.Model.Well", "Well") - .WithMany("DrillingProgramParts") - .HasForeignKey("IdWell") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("FileCategory"); - - b.Navigation("Well"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.DrillTest", b => - { - b.HasOne("AsbCloudDb.Model.Telemetry", "Telemetry") - .WithMany() - .HasForeignKey("IdTelemetry") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Telemetry"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.Faq", b => - { - b.HasOne("AsbCloudDb.Model.User", "AuthorAnswer") - .WithMany() - .HasForeignKey("IdAuthorAnswer"); - - b.HasOne("AsbCloudDb.Model.User", "AuthorQuestion") - .WithMany() - .HasForeignKey("IdAuthorQuestion") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("AuthorAnswer"); - - b.Navigation("AuthorQuestion"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.FileInfo", b => - { - b.HasOne("AsbCloudDb.Model.User", "Author") - .WithMany("Files") - .HasForeignKey("IdAuthor"); - - b.HasOne("AsbCloudDb.Model.FileCategory", "FileCategory") - .WithMany() - .HasForeignKey("IdCategory") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("AsbCloudDb.Model.Well", "Well") - .WithMany() - .HasForeignKey("IdWell") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Author"); - - b.Navigation("FileCategory"); - - b.Navigation("Well"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.FileMark", b => - { - b.HasOne("AsbCloudDb.Model.FileInfo", "FileInfo") - .WithMany("FileMarks") - .HasForeignKey("IdFile") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("t_file_mark_t_file_info_fk"); - - b.HasOne("AsbCloudDb.Model.User", "User") - .WithMany("FileMarks") - .HasForeignKey("IdUser") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("t_user_t_file_mark_fk"); - - b.Navigation("FileInfo"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.GTR.WitsItemFloat", b => - { - b.HasOne("AsbCloudDb.Model.Telemetry", "Telemetry") - .WithMany() - .HasForeignKey("IdTelemetry") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Telemetry"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.GTR.WitsItemInt", b => - { - b.HasOne("AsbCloudDb.Model.Telemetry", "Telemetry") - .WithMany() - .HasForeignKey("IdTelemetry") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Telemetry"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.GTR.WitsItemString", b => - { - b.HasOne("AsbCloudDb.Model.Telemetry", "Telemetry") - .WithMany() - .HasForeignKey("IdTelemetry") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Telemetry"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.HelpPage", b => - { - b.HasOne("AsbCloudDb.Model.FileCategory", "FileCategory") - .WithMany() - .HasForeignKey("IdCategory") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("FileCategory"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.LimitingParameter", b => - { - b.HasOne("AsbCloudDb.Model.Telemetry", "Telemetry") - .WithMany() - .HasForeignKey("IdTelemetry") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Telemetry"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.Manuals.Manual", b => - { - b.HasOne("AsbCloudDb.Model.User", "Author") - .WithMany() - .HasForeignKey("IdAuthor") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("AsbCloudDb.Model.FileCategory", "Category") - .WithMany() - .HasForeignKey("IdCategory") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("AsbCloudDb.Model.Manuals.ManualDirectory", "Directory") - .WithMany("Manuals") - .HasForeignKey("IdDirectory") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Author"); - - b.Navigation("Category"); - - b.Navigation("Directory"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.Manuals.ManualDirectory", b => - { - b.HasOne("AsbCloudDb.Model.Manuals.ManualDirectory", "Parent") - .WithMany("Children") - .HasForeignKey("IdParent") - .OnDelete(DeleteBehavior.Cascade); - - b.Navigation("Parent"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.Measure", b => - { - b.HasOne("AsbCloudDb.Model.MeasureCategory", "Category") - .WithMany("Measures") - .HasForeignKey("IdCategory") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("AsbCloudDb.Model.Well", "Well") - .WithMany() - .HasForeignKey("IdWell") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Category"); - - b.Navigation("Well"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.Notification", b => - { - b.HasOne("AsbCloudDb.Model.NotificationCategory", "NotificationCategory") - .WithMany("Notifications") - .HasForeignKey("IdNotificationCategory") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("AsbCloudDb.Model.User", "User") - .WithMany() - .HasForeignKey("IdUser") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("NotificationCategory"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.OperationValue", b => - { - b.HasOne("AsbCloudDb.Model.WellOperationCategory", "OperationCategory") - .WithMany() - .HasForeignKey("IdOperationCategory") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("AsbCloudDb.Model.Well", "Well") - .WithMany() - .HasForeignKey("IdWell") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("OperationCategory"); - - b.Navigation("Well"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.ProcessMaps.ProcessMapPlanDrilling", b => - { - b.HasOne("AsbCloudDb.Model.User", "Author") - .WithMany() - .HasForeignKey("IdAuthor") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("AsbCloudDb.Model.User", "Editor") - .WithMany() - .HasForeignKey("IdEditor") - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne("AsbCloudDb.Model.ProcessMaps.ProcessMapPlanDrilling", "Previous") - .WithMany() - .HasForeignKey("IdPrevious"); - - b.HasOne("AsbCloudDb.Model.Well", "Well") - .WithMany() - .HasForeignKey("IdWell") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("AsbCloudDb.Model.WellSectionType", "WellSectionType") - .WithMany() - .HasForeignKey("IdWellSectionType") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Author"); - - b.Navigation("Editor"); - - b.Navigation("Previous"); - - b.Navigation("Well"); - - b.Navigation("WellSectionType"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.ProcessMaps.ProcessMapWellDrilling", b => - { - b.HasOne("AsbCloudDb.Model.User", "User") - .WithMany() - .HasForeignKey("IdUser") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("AsbCloudDb.Model.Well", "Well") - .WithMany() - .HasForeignKey("IdWell") - .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.ProcessMaps.ProcessMapWellReam", b => - { - b.HasOne("AsbCloudDb.Model.User", "User") - .WithMany() - .HasForeignKey("IdUser") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("AsbCloudDb.Model.Well", "Well") - .WithMany() - .HasForeignKey("IdWell") - .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 => - { - b.HasOne("AsbCloudDb.Model.Company", "Company") - .WithMany("RelationCompaniesWells") - .HasForeignKey("IdCompany") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("t_relation_company_well_t_company_id_fk"); - - b.HasOne("AsbCloudDb.Model.Well", "Well") - .WithMany("RelationCompaniesWells") - .HasForeignKey("IdWell") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("t_relation_company_well_t_well_id_fk"); - - b.Navigation("Company"); - - b.Navigation("Well"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.RelationContactWell", b => - { - b.HasOne("AsbCloudDb.Model.User", "User") - .WithMany("RelationContactsWells") - .HasForeignKey("IdUser") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("AsbCloudDb.Model.Well", "Well") - .WithMany() - .HasForeignKey("IdWell") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("User"); - - b.Navigation("Well"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.RelationUserDrillingProgramPart", b => - { - b.HasOne("AsbCloudDb.Model.DrillingProgramPart", "DrillingProgramPart") - .WithMany("RelatedUsers") - .HasForeignKey("IdDrillingProgramPart") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("AsbCloudDb.Model.User", "User") - .WithMany() - .HasForeignKey("IdUser") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DrillingProgramPart"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.RelationUserRolePermission", b => - { - b.HasOne("AsbCloudDb.Model.Permission", "Permission") - .WithMany("RelationUserRolePermissions") - .HasForeignKey("IdPermission") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("AsbCloudDb.Model.UserRole", "UserRole") - .WithMany("RelationUserRolePermissions") - .HasForeignKey("IdUserRole") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Permission"); - - b.Navigation("UserRole"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.RelationUserRoleUserRole", b => - { - b.HasOne("AsbCloudDb.Model.UserRole", "Role") - .WithMany("RelationUserRoleUserRoles") - .HasForeignKey("Id") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("AsbCloudDb.Model.UserRole", "IncludeRole") - .WithMany() - .HasForeignKey("IdInclude") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("IncludeRole"); - - b.Navigation("Role"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.RelationUserUserRole", b => - { - b.HasOne("AsbCloudDb.Model.User", "User") - .WithMany("RelationUsersUserRoles") - .HasForeignKey("IdUser") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("AsbCloudDb.Model.UserRole", "UserRole") - .WithMany("RelationUsersUserRoles") - .HasForeignKey("IdUserRole") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("User"); - - b.Navigation("UserRole"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.ReportProperty", b => - { - b.HasOne("AsbCloudDb.Model.FileInfo", "File") - .WithMany() - .HasForeignKey("IdFile") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("AsbCloudDb.Model.Well", "Well") - .WithMany() - .HasForeignKey("IdWell") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("File"); - - b.Navigation("Well"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.Schedule", b => - { - b.HasOne("AsbCloudDb.Model.Driller", "Driller") - .WithMany("Schedule") - .HasForeignKey("IdDriller") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("t_schedule_t_driller_id_driller"); - - b.HasOne("AsbCloudDb.Model.Well", "Well") - .WithMany() - .HasForeignKey("IdWell") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Driller"); - - b.Navigation("Well"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.SetpointsRequest", b => - { - b.HasOne("AsbCloudDb.Model.User", "Author") - .WithMany() - .HasForeignKey("IdAuthor") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("AsbCloudDb.Model.Well", "Well") - .WithMany() - .HasForeignKey("IdWell") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Author"); - - b.Navigation("Well"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.TelemetryDataSaub", b => - { - b.HasOne("AsbCloudDb.Model.Telemetry", "Telemetry") - .WithMany("DataSaub") - .HasForeignKey("IdTelemetry") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("t_telemetry_data_saub_t_telemetry_id_fk"); - - b.Navigation("Telemetry"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.TelemetryDataSpin", b => - { - b.HasOne("AsbCloudDb.Model.Telemetry", "Telemetry") - .WithMany("DataSpin") - .HasForeignKey("IdTelemetry") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("t_telemetry_data_spin_t_telemetry_id_fk"); - - b.Navigation("Telemetry"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.TelemetryEvent", b => - { - b.HasOne("AsbCloudDb.Model.Telemetry", "Telemetry") - .WithMany("Events") - .HasForeignKey("IdTelemetry") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("t_event_t_telemetry_id_fk"); - - b.Navigation("Telemetry"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.TelemetryMessage", b => - { - b.HasOne("AsbCloudDb.Model.Telemetry", "Telemetry") - .WithMany("Messages") - .HasForeignKey("IdTelemetry") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("t_messages_t_telemetry_id_fk"); - - b.Navigation("Telemetry"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.TelemetryUser", b => - { - b.HasOne("AsbCloudDb.Model.Telemetry", "Telemetry") - .WithMany("Users") - .HasForeignKey("IdTelemetry") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("t_telemetry_user_t_telemetry_id_fk"); - - b.Navigation("Telemetry"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.Trajectory.TrajectoryFact", b => - { - b.HasOne("AsbCloudDb.Model.User", "User") - .WithMany() - .HasForeignKey("IdUser") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("AsbCloudDb.Model.Well", "Well") - .WithMany() - .HasForeignKey("IdWell") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("User"); - - b.Navigation("Well"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.Trajectory.TrajectoryPlan", b => - { - b.HasOne("AsbCloudDb.Model.User", "User") - .WithMany() - .HasForeignKey("IdUser") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("AsbCloudDb.Model.Well", "Well") - .WithMany() - .HasForeignKey("IdWell") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("User"); - - b.Navigation("Well"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.User", b => - { - b.HasOne("AsbCloudDb.Model.Company", "Company") - .WithMany("Users") - .HasForeignKey("IdCompany") - .OnDelete(DeleteBehavior.SetNull) - .IsRequired() - .HasConstraintName("t_user_t_company_id_fk"); - - b.Navigation("Company"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.UserSetting", b => - { - b.HasOne("AsbCloudDb.Model.User", "User") - .WithMany() - .HasForeignKey("IdUser") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("User"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.Well", b => - { - b.HasOne("AsbCloudDb.Model.Cluster", "Cluster") - .WithMany("Wells") - .HasForeignKey("IdCluster") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("t_well_t_cluster_id_fk"); - - b.HasOne("AsbCloudDb.Model.Telemetry", "Telemetry") - .WithOne("Well") - .HasForeignKey("AsbCloudDb.Model.Well", "IdTelemetry") - .OnDelete(DeleteBehavior.SetNull) - .HasConstraintName("t_well_t_telemetry_id_fk"); - - b.HasOne("AsbCloudDb.Model.WellType", "WellType") - .WithMany("Wells") - .HasForeignKey("IdWellType") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Cluster"); - - b.Navigation("Telemetry"); - - b.Navigation("WellType"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.WellComposite", b => - { - b.HasOne("AsbCloudDb.Model.Well", "Well") - .WithMany("WellComposites") - .HasForeignKey("IdWell") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("t_well_сomposite_t_well_id_fk"); - - b.HasOne("AsbCloudDb.Model.WellSectionType", "WellSectionType") - .WithMany("WellComposites") - .HasForeignKey("IdWellSectionType") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("t_well_сomposite_t_well_section_type_id_fk"); - - b.HasOne("AsbCloudDb.Model.Well", "WellSrc") - .WithMany("WellCompositeSrcs") - .HasForeignKey("IdWellSrc") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("t_well_сomposite_src_t_well_id_fk"); - - b.Navigation("Well"); - - b.Navigation("WellSectionType"); - - b.Navigation("WellSrc"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.WellFinalDocument", b => - { - b.HasOne("AsbCloudDb.Model.FileCategory", "Category") - .WithMany() - .HasForeignKey("IdCategory") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("AsbCloudDb.Model.User", "User") - .WithMany() - .HasForeignKey("IdUser") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("AsbCloudDb.Model.Well", "Well") - .WithMany() - .HasForeignKey("IdWell") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Category"); - - b.Navigation("User"); - - b.Navigation("Well"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.WellOperation", b => - { - b.HasOne("AsbCloudDb.Model.WellOperationCategory", "OperationCategory") - .WithMany() - .HasForeignKey("IdCategory") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("AsbCloudDb.Model.WellOperation", "OperationPlan") - .WithMany() - .HasForeignKey("IdPlan") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("AsbCloudDb.Model.Well", "Well") - .WithMany("WellOperations") - .HasForeignKey("IdWell") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("AsbCloudDb.Model.WellSectionType", "WellSectionType") - .WithMany("WellOperations") - .HasForeignKey("IdWellSectionType") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("OperationCategory"); - - b.Navigation("OperationPlan"); - - b.Navigation("Well"); - - b.Navigation("WellSectionType"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.WellOperationCategory", b => - { - b.HasOne("AsbCloudDb.Model.WellOperationCategory", "Parent") - .WithMany() - .HasForeignKey("IdParent"); - - b.Navigation("Parent"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.WellSections.WellSectionPlan", b => - { - b.HasOne("AsbCloudDb.Model.WellSectionType", "SectionType") - .WithMany() - .HasForeignKey("IdSectionType") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("AsbCloudDb.Model.Well", "Well") - .WithMany() - .HasForeignKey("IdWell") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("SectionType"); - - b.Navigation("Well"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.WITS.Record1", b => - { - b.HasOne("AsbCloudDb.Model.Telemetry", "Telemetry") - .WithMany() - .HasForeignKey("TelemetryId"); - - b.HasOne("AsbCloudDb.Model.WITS.RecordBase", null) - .WithOne() - .HasForeignKey("AsbCloudDb.Model.WITS.Record1", "IdTelemetry", "DateTime") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Telemetry"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.WITS.Record50", b => - { - b.HasOne("AsbCloudDb.Model.Telemetry", "Telemetry") - .WithMany() - .HasForeignKey("TelemetryId"); - - b.HasOne("AsbCloudDb.Model.WITS.RecordBase", null) - .WithOne() - .HasForeignKey("AsbCloudDb.Model.WITS.Record50", "IdTelemetry", "DateTime") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Telemetry"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.WITS.Record60", b => - { - b.HasOne("AsbCloudDb.Model.Telemetry", "Telemetry") - .WithMany() - .HasForeignKey("TelemetryId"); - - b.HasOne("AsbCloudDb.Model.WITS.RecordBase", null) - .WithOne() - .HasForeignKey("AsbCloudDb.Model.WITS.Record60", "IdTelemetry", "DateTime") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Telemetry"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.WITS.Record61", b => - { - b.HasOne("AsbCloudDb.Model.Telemetry", "Telemetry") - .WithMany() - .HasForeignKey("TelemetryId"); - - b.HasOne("AsbCloudDb.Model.WITS.RecordBase", null) - .WithOne() - .HasForeignKey("AsbCloudDb.Model.WITS.Record61", "IdTelemetry", "DateTime") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Telemetry"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.WITS.Record7", b => - { - b.HasOne("AsbCloudDb.Model.Telemetry", "Telemetry") - .WithMany() - .HasForeignKey("TelemetryId"); - - b.HasOne("AsbCloudDb.Model.WITS.RecordBase", null) - .WithOne() - .HasForeignKey("AsbCloudDb.Model.WITS.Record7", "IdTelemetry", "DateTime") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Telemetry"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.WITS.Record8", b => - { - b.HasOne("AsbCloudDb.Model.Telemetry", "Telemetry") - .WithMany() - .HasForeignKey("TelemetryId"); - - b.HasOne("AsbCloudDb.Model.WITS.RecordBase", null) - .WithOne() - .HasForeignKey("AsbCloudDb.Model.WITS.Record8", "IdTelemetry", "DateTime") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Telemetry"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.Cluster", b => - { - b.Navigation("Wells"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.Company", b => - { - b.Navigation("RelationCompaniesWells"); - - b.Navigation("Users"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.CompanyType", b => - { - b.Navigation("Companies"); - - b.Navigation("Contacts"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.Deposit", b => - { - b.Navigation("Clusters"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.Driller", b => - { - b.Navigation("Schedule"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.DrillingProgramPart", b => - { - b.Navigation("RelatedUsers"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.FileInfo", b => - { - b.Navigation("FileMarks"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.Manuals.ManualDirectory", b => - { - b.Navigation("Children"); - - b.Navigation("Manuals"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.MeasureCategory", b => - { - b.Navigation("Measures"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.NotificationCategory", b => - { - b.Navigation("Notifications"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.Permission", b => - { - b.Navigation("RelationUserRolePermissions"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.Telemetry", b => - { - b.Navigation("DataSaub"); - - b.Navigation("DataSpin"); - - b.Navigation("Events"); - - b.Navigation("Messages"); - - b.Navigation("Users"); - - b.Navigation("Well"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.User", b => - { - b.Navigation("FileMarks"); - - b.Navigation("Files"); - - b.Navigation("RelationContactsWells"); - - b.Navigation("RelationUsersUserRoles"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.UserRole", b => - { - b.Navigation("RelationUserRolePermissions"); - - b.Navigation("RelationUserRoleUserRoles"); - - b.Navigation("RelationUsersUserRoles"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.Well", b => - { - b.Navigation("Contacts"); - - b.Navigation("DrillingProgramParts"); - - b.Navigation("RelationCompaniesWells"); - - b.Navigation("WellCompositeSrcs"); - - b.Navigation("WellComposites"); - - b.Navigation("WellOperations"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.WellSectionType", b => - { - b.Navigation("WellComposites"); - - b.Navigation("WellOperations"); - }); - - modelBuilder.Entity("AsbCloudDb.Model.WellType", b => - { - b.Navigation("Wells"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/AsbCloudDb/Migrations/20240219090713_DetectedOperateion_Remove_IdUser.cs b/AsbCloudDb/Migrations/20240219090713_DetectedOperateion_Remove_IdUser.cs deleted file mode 100644 index a52d5861..00000000 --- a/AsbCloudDb/Migrations/20240219090713_DetectedOperateion_Remove_IdUser.cs +++ /dev/null @@ -1,27 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace AsbCloudDb.Migrations -{ - public partial class DetectedOperateion_Remove_IdUser : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "id_user", - table: "t_detected_operation"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "id_user", - table: "t_detected_operation", - type: "integer", - nullable: false, - defaultValue: 0, - comment: "Id пользователя по телеметрии на момент начала операции"); - } - } -} diff --git a/AsbCloudDb/Migrations/AsbCloudDbContextModelSnapshot.cs b/AsbCloudDb/Migrations/AsbCloudDbContextModelSnapshot.cs index 0d9d2b4b..eeb9ad9b 100644 --- a/AsbCloudDb/Migrations/AsbCloudDbContextModelSnapshot.cs +++ b/AsbCloudDb/Migrations/AsbCloudDbContextModelSnapshot.cs @@ -532,6 +532,11 @@ namespace AsbCloudDb.Migrations .HasColumnType("integer") .HasColumnName("id_telemetry"); + b.Property("IdUsersAtStart") + .HasColumnType("integer") + .HasColumnName("id_user") + .HasComment("Id пользователя по телеметрии на момент начала операции"); + b.Property("Value") .HasColumnType("double precision") .HasColumnName("value") diff --git a/AsbCloudDb/Model/DetectedOperation.cs b/AsbCloudDb/Model/DetectedOperation.cs index ac6de087..df5abbb1 100644 --- a/AsbCloudDb/Model/DetectedOperation.cs +++ b/AsbCloudDb/Model/DetectedOperation.cs @@ -25,6 +25,9 @@ namespace AsbCloudDb.Model [Column("date_end", TypeName = "timestamp with time zone"), Comment("Дата начала операции")] public DateTimeOffset DateEnd { get; set; } + + [Column("id_user"), Comment("Id пользователя по телеметрии на момент начала операции")] + public int IdUsersAtStart { get; set; } [NotMapped] public double DurationMinutes => (DateEnd - DateStart).TotalMinutes; diff --git a/AsbCloudInfrastructure/Services/DetectOperations/DetectableTelemetry.cs b/AsbCloudInfrastructure/Services/DetectOperations/DetectableTelemetry.cs index 0e42bb1f..9c72c4e8 100644 --- a/AsbCloudInfrastructure/Services/DetectOperations/DetectableTelemetry.cs +++ b/AsbCloudInfrastructure/Services/DetectOperations/DetectableTelemetry.cs @@ -6,6 +6,7 @@ public class DetectableTelemetry { public DateTimeOffset DateTime { get; set; } public int Mode { get; set; } + public int? IdUser { get; set; } public float WellDepth { get; set; } public float Pressure { get; set; } public float HookWeight { get; set; } diff --git a/AsbCloudInfrastructure/Services/DetectOperations/DetectedOperationService.cs b/AsbCloudInfrastructure/Services/DetectOperations/DetectedOperationService.cs index fca85b82..06415870 100644 --- a/AsbCloudInfrastructure/Services/DetectOperations/DetectedOperationService.cs +++ b/AsbCloudInfrastructure/Services/DetectOperations/DetectedOperationService.cs @@ -156,6 +156,7 @@ public class DetectedOperationService : IDetectedOperationService .Select(t => new DetectableTelemetry { DateTime = t.DateTime, + IdUser = t.IdUser, Mode = t.Mode, WellDepth = t.WellDepth, Pressure = t.Pressure, diff --git a/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorAbstract.cs b/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorAbstract.cs index 2ce2d57d..6c5b99de 100644 --- a/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorAbstract.cs +++ b/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorAbstract.cs @@ -119,6 +119,7 @@ namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors { IdCategory = IdCategory, IdTelemetry = idTelemetry, + IdUserAtStart = pBegin.IdUser ?? -1, DateStart = pBegin.DateTime, DateEnd = pEnd.DateTime, DepthStart = (double)pBegin.WellDepth, From 615771395d815e04eea233ad5ab3bf74044f29ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D1=82=D0=B5=D0=BF=D0=B0=D0=BD=D0=BE=D0=B2=20=D0=94?= =?UTF-8?q?=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9?= Date: Wed, 21 Feb 2024 07:29:01 +0300 Subject: [PATCH 11/12] =?UTF-8?q?=D0=A0=D0=B5=D1=84=D0=B0=D0=BA=D1=82?= =?UTF-8?q?=D0=BE=D1=80=D0=B8=D0=BD=D0=B3=20WorkOperationDetection=20?= =?UTF-8?q?=D0=B8=D0=B7=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=D1=81=D1=8F=20=D0=BE?= =?UTF-8?q?=D1=82=20=D0=B4=D0=B2=D1=83=D1=85=20=D1=86=D0=B8=D0=BA=D0=BB?= =?UTF-8?q?=D0=BE=D0=B2=20=D0=B2=D0=BD=D1=83=D1=82=D1=80=D0=B8=20=D0=BC?= =?UTF-8?q?=D0=B5=D1=82=D0=BE=D0=B4=D0=B0=20Action?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WorkOperationDetection.cs | 27 +++++-------------- 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/AsbCloudInfrastructure/Services/DetectOperations/WorkOperationDetection.cs b/AsbCloudInfrastructure/Services/DetectOperations/WorkOperationDetection.cs index 9b011970..f562e744 100644 --- a/AsbCloudInfrastructure/Services/DetectOperations/WorkOperationDetection.cs +++ b/AsbCloudInfrastructure/Services/DetectOperations/WorkOperationDetection.cs @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Threading; @@ -34,31 +33,19 @@ public class WorkOperationDetection: Work var detectedOperationService = services.GetRequiredService(); var telemetryIds = (await telemetryRepository.GetAllAsync(token)) - .Select(t => t.Id); + .Select(t => t.Id) + .ToArray(); var lastDetectedDates = await detectedOperationRepository.GetLastDetectedDatesAsync(token); - var beginDatesDetectOperations = new List<(int TelemetryId, DateTimeOffset? BeginDate)>(); - - foreach (var telemetryId in telemetryIds) + for (var i = 0; i < telemetryIds.Length; i++) { - if (lastDetectedDates.TryGetValue(telemetryId, out var beginDate)) - { - beginDatesDetectOperations.Add((telemetryId, beginDate)); - continue; - } + var telemetryId = telemetryIds[i]; - beginDatesDetectOperations.Add((telemetryId, null)); - } - - var count = beginDatesDetectOperations.Count; - - for (var i = 0; i < count; i++) - { - var (idTelemetry, beginDate) = beginDatesDetectOperations[i]; + var beginDate = lastDetectedDates.TryGetValue(telemetryId, out var date) ? date : (DateTimeOffset?)null; - onProgressCallback($"Start detecting telemetry: {idTelemetry} from {beginDate}", i++ / count); - var detectedOperations = await detectedOperationService.DetectOperationsAsync(idTelemetry, beginDate, token); + onProgressCallback($"Start detecting telemetry: {telemetryId} from {beginDate}", i++ / telemetryIds.Length); + var detectedOperations = await detectedOperationService.DetectOperationsAsync(telemetryId, beginDate, token); if (detectedOperations.Any()) await detectedOperationRepository.InsertRangeAsync(detectedOperations, token); From ac21fc6776e96833c373df5590979cc0ccb19144 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D1=82=D0=B5=D0=BF=D0=B0=D0=BD=D0=BE=D0=B2=20=D0=94?= =?UTF-8?q?=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9?= Date: Wed, 21 Feb 2024 09:48:13 +0300 Subject: [PATCH 12/12] Fix mapping entity to dto --- .../Repository/DetectedOperationRepository.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/AsbCloudInfrastructure/Repository/DetectedOperationRepository.cs b/AsbCloudInfrastructure/Repository/DetectedOperationRepository.cs index 3cbb9c07..21db64ba 100644 --- a/AsbCloudInfrastructure/Repository/DetectedOperationRepository.cs +++ b/AsbCloudInfrastructure/Repository/DetectedOperationRepository.cs @@ -60,7 +60,8 @@ public class DetectedOperationRepository : CrudRepositoryBase o.OperationCategory); var entities = await query.ToArrayAsync(token); - var dtos = entities.Select(Convert); + var offset = telemetryService.GetTimezone(request.IdTelemetry).Offset; + var dtos = entities.Select(o => Convert(o, offset)); return dtos; } @@ -181,13 +182,11 @@ public class DetectedOperationRepository : CrudRepositoryBase(); - dto.DateStart = src.DateStart.ToOffset(timezone.Offset); - dto.DateEnd = src.DateEnd.ToOffset(timezone.Offset); + dto.DateStart = src.DateStart.ToOffset(offset); + dto.DateEnd = src.DateEnd.ToOffset(offset); return dto; }