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-04-02 17:28:07 +05:00
|
|
|
|
DbSet<DataSaubBase> DataSaubBases { get; set; }
|
|
|
|
|
DbSet<Deposit> Deposits { get; set; }
|
|
|
|
|
DbSet<Event> Events { get; set; }
|
|
|
|
|
DbSet<Message> Messages { get; set; }
|
|
|
|
|
DbSet<User> Users { get; set; }
|
|
|
|
|
DbSet<UserRole> UserRoles { get; set; }
|
2021-07-27 16:55:32 +05:00
|
|
|
|
DbSet<ReportProperties> ReportProperties { get; set; }
|
2021-07-23 17:40:31 +05:00
|
|
|
|
DbSet<File> 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; }
|
2021-07-27 13:32:00 +05:00
|
|
|
|
DbSet<TelemetryOperation> Operations { 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; }
|
|
|
|
|
DbSet<WellSection> WellSections { get; set; }
|
|
|
|
|
DbSet<WellOperation> WellOperations { get; set; }
|
|
|
|
|
DbSet<WellType> WellTypes { get; set; }
|
2021-08-02 12:23:18 +05:00
|
|
|
|
DbSet<LastData> LastData { get; set; }
|
2021-04-02 17:28:07 +05:00
|
|
|
|
|
|
|
|
|
int SaveChanges();
|
|
|
|
|
int SaveChanges(bool acceptAllChangesOnSuccess);
|
|
|
|
|
Task<int> SaveChangesAsync(CancellationToken cancellationToken);
|
|
|
|
|
|
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-05-17 14:04:33 +05:00
|
|
|
|
(DateTime From, DateTime To) GetDatesRange<T>(int idTelemetry) where T : class, IIdTelemetryDate;
|
2021-06-25 15:10:05 +05:00
|
|
|
|
IEnumerable<(double? MinDepth, double? MaxDepth, DateTime BeginPeriodDate)> GetDepthToInterval(int telemetryId,
|
2021-06-22 09:49:53 +05:00
|
|
|
|
int intervalHoursTimestamp, int workStartTimestamp, double timezoneOffset);
|
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
|
|
|
|
}
|
|
|
|
|
}
|