feat: Перенесены внешние сервисы в Infrastructure. Удалены лишние проекты.
This commit is contained in:
14
PARR.Domain/Cache/Models/Base/IBaseCache.cs
Normal file
14
PARR.Domain/Cache/Models/Base/IBaseCache.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
namespace PARR.Domain.Cache.Models.Base
|
||||
{
|
||||
/// <summary>
|
||||
/// Базовый интерфейс для КЭШ моделей
|
||||
/// </summary>
|
||||
public interface IBaseCache<T>
|
||||
{
|
||||
public T Data { get; set; }
|
||||
|
||||
public DateTimeOffset Timestamp { get; set; }
|
||||
|
||||
public string Source { get; set; }
|
||||
}
|
||||
}
|
||||
27
PARR.Domain/Cache/Models/MatchingStatusItem.cs
Normal file
27
PARR.Domain/Cache/Models/MatchingStatusItem.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using PARR.Domain.Cache.Models.Base;
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
namespace PARR.Domain.Cache.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// КЭШ модель, состояние matching`a
|
||||
/// </summary>
|
||||
public class MatchingStatusItem : IBaseCache<MatchingStatusItemDto>
|
||||
{
|
||||
public required MatchingStatusItemDto Data { get; set; }
|
||||
|
||||
public DateTimeOffset Timestamp { get; set; }
|
||||
|
||||
public required string Source { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class MatchingStatusItemDto
|
||||
{
|
||||
public DateTimeOffset DateStart { get; set; }
|
||||
|
||||
public required TemplateMatcherActionEnum Action { get; set; }
|
||||
|
||||
public string? Comment { get; set; }
|
||||
}
|
||||
}
|
||||
18
PARR.Domain/Cache/Models/UnitFilterIds.cs
Normal file
18
PARR.Domain/Cache/Models/UnitFilterIds.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using PARR.Domain.Cache.Models.Base;
|
||||
|
||||
namespace PARR.Domain.Cache.Models
|
||||
{
|
||||
public class UnitFilterIds : IBaseCache<UnitFilterIdsDto>
|
||||
{
|
||||
public required UnitFilterIdsDto Data { get; set; }
|
||||
|
||||
public DateTimeOffset Timestamp { get; set; }
|
||||
|
||||
public required string Source { get; set; }
|
||||
}
|
||||
|
||||
public class UnitFilterIdsDto
|
||||
{
|
||||
public List<Guid> UnitIds { get; set; } = new();
|
||||
}
|
||||
}
|
||||
11
PARR.Domain/Common/Template/TemplateNameConstantPart.cs
Normal file
11
PARR.Domain/Common/Template/TemplateNameConstantPart.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace PARR.Domain.Common.Template
|
||||
{
|
||||
/// <summary>
|
||||
/// Модель хранения частей имени шаблона в настройках
|
||||
/// </summary>
|
||||
public class TemplateNameConstantPart
|
||||
{
|
||||
public required string Name { get; set; }
|
||||
public required string Value { get; set; }
|
||||
}
|
||||
}
|
||||
35
PARR.Domain/Settings/InfluxDbSettings.cs
Normal file
35
PARR.Domain/Settings/InfluxDbSettings.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
namespace PARR.Domain.Settings
|
||||
{
|
||||
/// <summary>
|
||||
/// Настройки подключения к InfluxDb
|
||||
/// </summary>
|
||||
public class InfluxDbSettings
|
||||
{
|
||||
public string Url { get; set; } = string.Empty;
|
||||
|
||||
public string Organization { get; set; } = string.Empty;
|
||||
|
||||
public InfluxDbBucketRobotsSettings? Robots { get; set; }
|
||||
|
||||
public InfluxDbBucketLogonsSettings? Logons { get; set; }
|
||||
}
|
||||
|
||||
public class InfluxDbBucketRobotsSettings : IInfluxDbBucketSettings
|
||||
{
|
||||
public string Bucket { get; set; } = string.Empty;
|
||||
public string Token { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class InfluxDbBucketLogonsSettings : IInfluxDbBucketSettings
|
||||
{
|
||||
public string Bucket { get; set; } = string.Empty;
|
||||
public string Token { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public interface IInfluxDbBucketSettings
|
||||
{
|
||||
public string Bucket { get; set; }
|
||||
|
||||
public string Token { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user