DD.WellWorkover.Cloud/AsbCloudDb/Model/IAsbCloudDbContext.cs

49 lines
2.3 KiB
C#
Raw Normal View History

using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
namespace AsbCloudDb.Model
{
public interface IAsbCloudDbContext
{
DbSet<Cluster> Clusters { get; set; }
DbSet<Company> Companies { get; set; }
DbSet<TelemetryDataSaub> TelemetryDataSaub { get; set; }
DbSet<Deposit> Deposits { get; set; }
2021-08-10 15:53:11 +05:00
DbSet<TelemetryEvent> TelemetryEvents { get; set; }
DbSet<TelemetryMessage> TelemetryMessages { get; set; }
DbSet<User> Users { get; set; }
DbSet<UserRole> UserRoles { get; set; }
2021-08-16 10:38:48 +05:00
DbSet<ReportProperty> ReportProperties { get; set; }
DbSet<FileInfo> Files { get; set; }
DbSet<FileCategory> FileCategories { get; set; }
2021-07-27 14:43:30 +05:00
DbSet<Telemetry> Telemetries { get; set; }
DbSet<TelemetryUser> TelemetryUsers { get; set; }
DbSet<WellOperationCategory> TelemetryOperations { get; set; }
DbSet<TelemetryAnalysis> TelemetryAnalysis { get; set; }
2021-07-27 14:43:30 +05:00
DbSet<Well> Wells { get; set; }
2021-08-13 12:33:05 +05:00
DbSet<WellSectionType> WellSectionTypes { get; set; }
2021-07-27 14:43:30 +05:00
DbSet<WellOperation> WellOperations { get; set; }
DbSet<WellType> WellTypes { get; set; }
DbSet<Measure> Measures { get; set; }
DbSet<MeasureCategory> MeasureCategories { get; set; }
int SaveChanges();
int SaveChanges(bool acceptAllChangesOnSuccess);
Task<int> SaveChangesAsync(CancellationToken cancellationToken);
DbSet<TEntity> Set<TEntity>(string name) where TEntity : class;
DbSet<TEntity> Set<TEntity>() where TEntity : class;
2021-07-21 15:22:58 +05:00
IQueryable<Well> GetWellsForCompany(int idCompany);
IQueryable<User> GetUsersByLogin(string login);
Task<(DateTime From, DateTime To)> GetDatesRangeAsync<T>(int idTelemetry, CancellationToken token) where T : class, ITelemetryData;
Task<IEnumerable<(double? MinDepth, double? MaxDepth, DateTime BeginPeriodDate)>> GetDepthToIntervalAsync(int telemetryId,
int intervalHoursTimestamp, int workStartTimestamp, double timezoneOffset, CancellationToken token);
2021-04-07 18:01:56 +05:00
Task<int> CreatePartitionAsync<TEntity>(string propertyName, int id, CancellationToken token = default) where TEntity : class;
}
}