Split out backup settings from general ops settings

This commit is contained in:
2020-05-21 21:19:34 +00:00
parent 8b778be04b
commit f239e1605e
9 changed files with 87 additions and 77 deletions

View File

@@ -9,7 +9,7 @@ namespace AyaNova.Models
public virtual DbSet<UserOptions> UserOptions { get; set; }
public virtual DbSet<Widget> Widget { get; set; }
public virtual DbSet<GlobalBizSettings> GlobalBizSettings { get; set; }
public virtual DbSet<GlobalOpsSettings> GlobalOpsSettings { get; set; }
public virtual DbSet<GlobalOpsBackupSettings> GlobalOpsSettings { get; set; }
public virtual DbSet<Event> Event { get; set; }
public virtual DbSet<SearchDictionary> SearchDictionary { get; set; }
public virtual DbSet<SearchKey> SearchKey { get; set; }

View File

@@ -0,0 +1,24 @@
using System;
namespace AyaNova.Models
{
public class GlobalOpsBackupSettings
{
public long Id { get; set; }//this is always 1 as there is only ever one single global Ops object
public uint Concurrency { get; set; }
public DateTime BackupTime { get; set; }
public DateTime LastBackup { get; set; }
public int BackupSetsToKeep { get; set; }
public bool BackupAttachments { get; set; }
public GlobalOpsBackupSettings()
{
Id = 1;//always 1
BackupTime = new DateTime(2020, 5, 19, 23, 59, 0, DateTimeKind.Utc);//date doesn't matter it only uses hour
LastBackup = DateTime.MinValue;
BackupSetsToKeep = 3;
}
}
}