2021-04-02 17:28:07 +05:00
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
2021-05-17 12:53:30 +05:00
|
|
|
|
using System;
|
2021-06-22 09:49:53 +05:00
|
|
|
|
using System.Collections.Generic;
|
2021-04-02 17:28:07 +05:00
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace AsbCloudDb.Model
|
|
|
|
|
{
|
|
|
|
|
public interface IAsbCloudDbContext
|
|
|
|
|
{
|
|
|
|
|
DbSet<Cluster> Clusters { get; set; }
|
2021-07-21 12:30:51 +05:00
|
|
|
|
DbSet<Company> Companies { get; set; }
|
2021-09-14 17:17:33 +05:00
|
|
|
|
DbSet<TelemetryDataSaub> TelemetryDataSaub { get; set; }
|
2021-04-02 17:28:07 +05:00
|
|
|
|
DbSet<Deposit> Deposits { get; set; }
|
2021-08-10 15:53:11 +05:00
|
|
|
|
DbSet<TelemetryEvent> TelemetryEvents { get; set; }
|
|
|
|
|
DbSet<TelemetryMessage> TelemetryMessages { get; set; }
|
2021-04-02 17:28:07 +05:00
|
|
|
|
DbSet<User> Users { get; set; }
|
|
|
|
|
DbSet<UserRole> UserRoles { get; set; }
|
2021-08-16 10:38:48 +05:00
|
|
|
|
DbSet<ReportProperty> ReportProperties { get; set; }
|
2021-08-13 17:26:19 +05:00
|
|
|
|
DbSet<FileInfo> Files { get; set; }
|
2021-07-23 17:40:31 +05:00
|
|
|
|
DbSet<FileCategory> FileCategories { get; set; }
|
2021-07-27 14:43:30 +05:00
|
|
|
|
DbSet<Telemetry> Telemetries { get; set; }
|
|
|
|
|
DbSet<TelemetryUser> TelemetryUsers { get; set; }
|
2021-08-16 14:19:43 +05:00
|
|
|
|
DbSet<WellOperationCategory> TelemetryOperations { get; set; }
|
2021-07-19 15:31:50 +05:00
|
|
|
|
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; }
|
2021-08-28 20:00:04 +05:00
|
|
|
|
DbSet<Measure> Measures { get; set; }
|
|
|
|
|
DbSet<MeasureCategory> MeasureCategories { get; set; }
|
2021-04-02 17:28:07 +05:00
|
|
|
|
|
|
|
|
|
int SaveChanges();
|
|
|
|
|
int SaveChanges(bool acceptAllChangesOnSuccess);
|
|
|
|
|
Task<int> SaveChangesAsync(CancellationToken cancellationToken);
|
|
|
|
|
|
2021-08-09 14:39:56 +05:00
|
|
|
|
DbSet<TEntity> Set<TEntity>(string name) where TEntity : class;
|
2021-08-09 15:41:42 +05:00
|
|
|
|
|
2021-08-09 14:39:56 +05:00
|
|
|
|
DbSet<TEntity> Set<TEntity>() where TEntity : class;
|
|
|
|
|
|
2021-07-21 15:22:58 +05:00
|
|
|
|
IQueryable<Well> GetWellsForCompany(int idCompany);
|
2021-04-02 17:28:07 +05:00
|
|
|
|
IQueryable<User> GetUsersByLogin(string login);
|
2021-09-17 16:24:01 +05:00
|
|
|
|
Task<(DateTime From, DateTime To)> GetDatesRangeAsync<T>(int idTelemetry, CancellationToken token) where T : class, ITelemetryData;
|
2021-08-11 12:11:21 +05:00
|
|
|
|
Task<IEnumerable<(double? MinDepth, double? MaxDepth, DateTime BeginPeriodDate)>> GetDepthToIntervalAsync(int telemetryId,
|
2021-08-11 16:54:42 +05:00
|
|
|
|
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;
|
2021-04-02 17:28:07 +05:00
|
|
|
|
}
|
|
|
|
|
}
|