Add project files.
This commit is contained in:
parent
8c8ea941cb
commit
5998d71562
25
Persistence.sln
Normal file
25
Persistence.sln
Normal file
@ -0,0 +1,25 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.9.34714.143
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Persistence", "Persistence\Persistence.csproj", "{417177AE-A27E-445B-B3B9-D5EFCEC812A0}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{417177AE-A27E-445B-B3B9-D5EFCEC812A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{417177AE-A27E-445B-B3B9-D5EFCEC812A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{417177AE-A27E-445B-B3B9-D5EFCEC812A0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{417177AE-A27E-445B-B3B9-D5EFCEC812A0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {B9055079-BB6F-482E-A0B7-39421CF2674E}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
71
Persistence/ClassDiagram.cd
Normal file
71
Persistence/ClassDiagram.cd
Normal file
@ -0,0 +1,71 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ClassDiagram MajorVersion="1" MinorVersion="1">
|
||||
<Class Name="Persistence.Repositories.AbstractChangeLogRepository<T, TRequest>" Collapsed="true">
|
||||
<Position X="7.75" Y="2.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>ACCAAAAAAAAABAAQAAAABAAAAAACAAAgAAAAAABAAAE=</HashCode>
|
||||
<FileName>Repositories\AbstractChangeLogRepository.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Persistence.Repositories.AbstractTimeSeriesDataRepository<T>" Collapsed="true">
|
||||
<Position X="10.75" Y="2.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Repositories\AbstractTimeSeriesDataRepository.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Persistence.Services.ArchiveService" Collapsed="true" BaseTypeListCollapsed="true">
|
||||
<Position X="7.75" Y="4.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Services\ArchiveService.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" Collapsed="true" />
|
||||
</Class>
|
||||
<Class Name="Persistence.Services.TimeSeriesDataObserverService" Collapsed="true" BaseTypeListCollapsed="true">
|
||||
<Position X="11" Y="4.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Services\TimeSeriesDataObserverService.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" Collapsed="true" />
|
||||
</Class>
|
||||
<Interface Name="Persistence.Repositories.IChangeLogRepository<T, TRequest>">
|
||||
<Position X="4.75" Y="2.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>ACCAAAAAAAAABAAAAAAABAAAAAACAAAgAAAAAABAAAE=</HashCode>
|
||||
<FileName>Repositories\IChangeLogRepository.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Interface>
|
||||
<Interface Name="Persistence.Repositories.ISyncRepository<T>" Collapsed="true">
|
||||
<Position X="3.75" Y="1.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Repositories\ISyncRepository.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Interface>
|
||||
<Interface Name="Persistence.Repositories.ITimeSeriesDataRepository<T>" Collapsed="true">
|
||||
<Position X="2.5" Y="2.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Repositories\ITimeSeriesDataRepository.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Interface>
|
||||
<Interface Name="Persistence.Services.IArchiveService" Collapsed="true">
|
||||
<Position X="2.75" Y="6" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Services\IArchiveService.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Interface>
|
||||
<Interface Name="Persistence.Services.ITimeSeriesDataObserverService" Collapsed="true">
|
||||
<Position X="4.75" Y="6" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Services\ITimeSeriesDataObserverService.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Interface>
|
||||
<Font Name="Segoe UI" Size="9" />
|
||||
</ClassDiagram>
|
9
Persistence/Persistence.csproj
Normal file
9
Persistence/Persistence.csproj
Normal file
@ -0,0 +1,9 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
54
Persistence/Repositories/AbstractChangeLogRepository.cs
Normal file
54
Persistence/Repositories/AbstractChangeLogRepository.cs
Normal file
@ -0,0 +1,54 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Persistence.Repositories;
|
||||
public abstract class AbstractChangeLogRepository<T, TRequest> : IChangeLogRepository<T, TRequest>
|
||||
{
|
||||
public Task<int> Clear(int idUser, TRequest request, CancellationToken token)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Task<int> ClearAndInsertRange(int idUser, TRequest request, IEnumerable<T> dtos, CancellationToken token)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Task<IEnumerable<T>> GetCurrent(TRequest request, CancellationToken token)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Task<IEnumerable<DateOnly>> GetDatesChange(TRequest request, CancellationToken token)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Task<IEnumerable<T>> GetGtDate(DateTimeOffset date, CancellationToken token)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Task<int> InsertRange(int idUser, IEnumerable<T> dtos, CancellationToken token)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Task<int> MarkAsDeleted(int idUser, IEnumerable<int> ids, CancellationToken token)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Task<int> UpdateOrInsertRange(int idUser, IEnumerable<T> dtos, CancellationToken token)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Task<int> UpdateRange(int idUser, IEnumerable<T> dtos, CancellationToken token)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
14
Persistence/Repositories/AbstractTimeSeriesDataRepository.cs
Normal file
14
Persistence/Repositories/AbstractTimeSeriesDataRepository.cs
Normal file
@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Persistence.Repositories;
|
||||
public abstract class AbstractTimeSeriesDataRepository<T> : ITimeSeriesDataRepository<T>
|
||||
{
|
||||
public Task<IEnumerable<T>> GetGtDate(DateTimeOffset date, CancellationToken token)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
95
Persistence/Repositories/IChangeLogRepository.cs
Normal file
95
Persistence/Repositories/IChangeLogRepository.cs
Normal file
@ -0,0 +1,95 @@
|
||||
namespace Persistence.Repositories;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
public interface IChangeLogRepository<T, TRequest> : ISyncRepository<T>
|
||||
{
|
||||
/// <summary>
|
||||
/// Добавление записей
|
||||
/// </summary>
|
||||
/// <param name="idUser">пользователь, который добавляет</param>
|
||||
/// <param name="dtos"></param>
|
||||
/// <param name="token"></param>
|
||||
/// <returns></returns>
|
||||
Task<int> InsertRange(int idUser, IEnumerable<T> dtos, CancellationToken token);
|
||||
|
||||
/// <summary>
|
||||
/// Редактирование записей
|
||||
/// </summary>
|
||||
/// <param name="idUser">пользователь, который редактирует</param>
|
||||
/// <param name="dtos"></param>
|
||||
/// <param name="token"></param>
|
||||
/// <returns></returns>
|
||||
Task<int> UpdateRange(int idUser, IEnumerable<T> dtos, CancellationToken token);
|
||||
|
||||
/// <summary>
|
||||
/// Добавляет Dto у которых id == 0, изменяет dto у которых id != 0
|
||||
/// </summary>
|
||||
/// <param name="idUser">пользователь, который редактирует или добавляет</param>
|
||||
/// <param name="dtos"></param>
|
||||
/// <param name="token"></param>
|
||||
/// <returns></returns>
|
||||
Task<int> UpdateOrInsertRange(int idUser, IEnumerable<T> dtos, CancellationToken token);
|
||||
|
||||
/// <summary>
|
||||
/// Помечает записи как удаленные
|
||||
/// </summary>
|
||||
/// <param name="idUser">пользователь, который чистит</param>
|
||||
/// <param name="request">Фильтр по свойствам конкретной сущности</param>
|
||||
/// <param name="token"></param>
|
||||
/// <returns></returns>
|
||||
Task<int> Clear(int idUser, TRequest request, CancellationToken token);
|
||||
|
||||
/// <summary>
|
||||
/// Очистить и добавить новые
|
||||
/// </summary>
|
||||
/// <param name="idUser"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="dtos"></param>
|
||||
/// <param name="token"></param>
|
||||
/// <returns></returns>
|
||||
Task<int> ClearAndInsertRange(int idUser, TRequest request, IEnumerable<T> dtos, CancellationToken token);
|
||||
|
||||
/// <summary>
|
||||
/// Пометить записи как удаленные
|
||||
/// </summary>
|
||||
/// <param name="idUser"></param>
|
||||
/// <param name="ids"></param>
|
||||
/// <param name="token"></param>
|
||||
/// <returns></returns>
|
||||
Task<int> MarkAsDeleted(int idUser, IEnumerable<int> ids, CancellationToken token);
|
||||
|
||||
/// <summary>
|
||||
/// Получение дат изменений записей
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="token"></param>
|
||||
/// <returns></returns>
|
||||
Task<IEnumerable<DateOnly>> GetDatesChange(TRequest request, CancellationToken token);
|
||||
|
||||
/// <summary>
|
||||
/// Получение измененных записей за определенную дату
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="date">Фильтр по дате. Если null - вернет все записи, без привязки к дате</param>
|
||||
/// <param name="token"></param>
|
||||
/// <returns></returns>
|
||||
//Task<IEnumerable<ChangeLogDto<T>>> GetChangeLogForDate(TRequest request, DateOnly? date, CancellationToken token);
|
||||
|
||||
/// <summary>
|
||||
/// Получение текущих сейчас записей по параметрам
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="token"></param>
|
||||
/// <returns></returns>
|
||||
Task<IEnumerable<T>> GetCurrent(TRequest request, CancellationToken token);
|
||||
|
||||
/// <summary>
|
||||
/// Получение объекта, реализующего интерфейс IChangeLogRepositoryBuilder
|
||||
/// для последующих вызовов методов фильтрации по запросам
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
//IChangeLogQueryBuilder<TDto, TRequest> GetQueryBuilder(ChangeLogRequest request);
|
||||
}
|
16
Persistence/Repositories/ISyncRepository.cs
Normal file
16
Persistence/Repositories/ISyncRepository.cs
Normal file
@ -0,0 +1,16 @@
|
||||
namespace Persistence.Repositories;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
public interface ISyncRepository<T>
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="date"></param>
|
||||
/// <param name="token"></param>
|
||||
/// <returns></returns>
|
||||
Task<IEnumerable<T>> GetGtDate(DateTimeOffset date, CancellationToken token);
|
||||
}
|
10
Persistence/Repositories/ITimeSeriesDataRepository.cs
Normal file
10
Persistence/Repositories/ITimeSeriesDataRepository.cs
Normal file
@ -0,0 +1,10 @@
|
||||
namespace Persistence.Repositories;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
public interface ITimeSeriesDataRepository<T> : ISyncRepository<T>
|
||||
{
|
||||
|
||||
}
|
4
Persistence/Services/ArchiveService.cs
Normal file
4
Persistence/Services/ArchiveService.cs
Normal file
@ -0,0 +1,4 @@
|
||||
namespace Persistence.Services;
|
||||
public abstract class ArchiveService : IArchiveService
|
||||
{
|
||||
}
|
4
Persistence/Services/IArchiveService.cs
Normal file
4
Persistence/Services/IArchiveService.cs
Normal file
@ -0,0 +1,4 @@
|
||||
namespace Persistence.Services;
|
||||
internal interface IArchiveService
|
||||
{
|
||||
}
|
4
Persistence/Services/ITimeSeriesDataObserverService.cs
Normal file
4
Persistence/Services/ITimeSeriesDataObserverService.cs
Normal file
@ -0,0 +1,4 @@
|
||||
namespace Persistence.Services;
|
||||
public interface ITimeSeriesDataObserverService
|
||||
{
|
||||
}
|
4
Persistence/Services/TimeSeriesDataObserverService.cs
Normal file
4
Persistence/Services/TimeSeriesDataObserverService.cs
Normal file
@ -0,0 +1,4 @@
|
||||
namespace Persistence.Services;
|
||||
public abstract class TimeSeriesDataObserverService : ITimeSeriesDataObserverService
|
||||
{
|
||||
}
|
Loading…
Reference in New Issue
Block a user