From e312ffc0171f1cedf9e35c514de4b3666cd564f9 Mon Sep 17 00:00:00 2001 From: Max <51083570+DRdrProfessor@users.noreply.github.com> Date: Sat, 8 Jul 2023 00:17:51 +0200 Subject: [PATCH] Reworking db access to make it 'Future proof'. --- SharpRss/Core/IDbAccess.cs | 9 +++++++++ SharpRss/FetchState.cs | 13 +++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 SharpRss/Core/IDbAccess.cs create mode 100644 SharpRss/FetchState.cs diff --git a/SharpRss/Core/IDbAccess.cs b/SharpRss/Core/IDbAccess.cs new file mode 100644 index 0000000..cb49276 --- /dev/null +++ b/SharpRss/Core/IDbAccess.cs @@ -0,0 +1,9 @@ + +namespace SharpRss.Core +{ + // Interface for implementing the database endpoints. + public interface IDbAccess + { + + } +} \ No newline at end of file diff --git a/SharpRss/FetchState.cs b/SharpRss/FetchState.cs new file mode 100644 index 0000000..2fe408c --- /dev/null +++ b/SharpRss/FetchState.cs @@ -0,0 +1,13 @@ +using System; + +namespace SharpRss +{ + // To keep a state at fetching item from the database. + public class FetchState + { + public int TakeAmount { get; set; } = 20; + public int TotalFetched { get; internal set; } + public string DbTableName { get; internal set; } = string.Empty; + public DateTime LastFetchTime { get; internal set; } + } +} \ No newline at end of file