feat(dal): CacheService - структура + CacheMatchingStatusService

This commit is contained in:
Mikhail Trubnikov
2026-01-15 15:01:56 +10:00
parent d89347787e
commit b5c25f3110
12 changed files with 150 additions and 9 deletions

View File

@@ -0,0 +1,14 @@
namespace PARR.DAL.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.Constants;
using PARR.DAL.Cache.Models.Base;
namespace PARR.DAL.Cache.Models
{
/// <summary>
/// КЭШ модель, состояние matching`a
/// </summary>
public class MatchingStatus : IBaseCache<MatchingStatusDto>
{
public required MatchingStatusDto Data { get; set; }
public DateTimeOffset Timestamp { get; set; }
public required string Source { get; set; }
}
public class MatchingStatusDto
{
public DateTimeOffset DateStart { get; set; }
public required TemplateMatcherActionEnum Action { get; set; }
public string? Comment { get; set; }
}
}