New layout below DataPath (defined in DataFolders):
{mandator}/{year}/*.json
uploads/{mandator}/{year}/
backup/{mandator}/{year}/
XmlToJsonMigrator becomes DataMigrator with two phases: first move the old
{year}/{mandator}/Data, uploads and {year}/backup folders into the new layout
unchanged, then convert the XML data files to JSON. Nothing is overwritten;
an identical file at the target is dropped, a different one stops startup.
Old folders are removed only once empty.
SettingsService builds the new paths; GetYearMandatorPath and
GetLastYearMandatorPath are removed as they now equal the data paths.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
31 lines
No EOL
607 B
C#
31 lines
No EOL
607 B
C#
using System.Collections.Generic;
|
|
using Schaad.Accounting.Datasets;
|
|
|
|
namespace Schaad.Accounting.Interfaces
|
|
{
|
|
public interface ISettingsService
|
|
{
|
|
int GetYear();
|
|
|
|
void SetYear(int year);
|
|
|
|
bool TrySetYear(int year);
|
|
|
|
string GetMandator();
|
|
IReadOnlyList<string> GetMandators(int year);
|
|
|
|
void SetMandator(string mandator);
|
|
|
|
string GetBackupFilePath();
|
|
|
|
string GetUploadPath();
|
|
|
|
string GetCreditCardStatementPath();
|
|
|
|
string GetDbPath();
|
|
|
|
string GetLastYearDbPath();
|
|
|
|
SettingsDataset GetSettings();
|
|
}
|
|
} |