feat: Перенесены внешние сервисы в Infrastructure. Удалены лишние проекты.

This commit is contained in:
Mikhail Trubnikov
2026-04-14 16:27:27 +10:00
parent 13dd2815d4
commit 188ebc20a0
159 changed files with 354 additions and 1389 deletions

View 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; }
}
}

View 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; }
}
}

View 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();
}
}

View 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; }
}
}

View 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; }
}
}