mirror of
https://github.com/denglihong2007/CRSim
synced 2026-08-05 08:55:52 +08:00
24 lines
860 B
C#
24 lines
860 B
C#
using CRSim.Core.Models;
|
|
using Section = CRSim.Core.Models.Section;
|
|
|
|
namespace CRSim.Core.Abstractions
|
|
{
|
|
public interface IDatabaseService
|
|
{
|
|
List<Station> GetAllStations();
|
|
List<TrainNumber> GetAllTrainNumbers();
|
|
Station GetStationByName(string name);
|
|
TrainNumber GetTrainNumberByNumber(string number);
|
|
void AddStation(Station station);
|
|
void AddTrainNumber(TrainNumber trainNumber);
|
|
void DeleteStation(Station station);
|
|
void DeleteTrainNumber(TrainNumber trainNumber);
|
|
void UpdateStation(string stationName,Station station);
|
|
void UpdateTrainNumber(TrainNumber trainNumber, List<TrainStop> timeTable, List<Section>? sections);
|
|
Task SaveData();
|
|
void ImportData(string jsonFilePath);
|
|
Task ExportData(string path);
|
|
void ClearData();
|
|
}
|
|
}
|