Update to Onion Architecture.
This commit is contained in:
20
Back/skydiveLogs-api.Business/Interfaces/IAircraftService.cs
Normal file
20
Back/skydiveLogs-api.Business/Interfaces/IAircraftService.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
using skydiveLogs_api.Domain;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Business.Interfaces
|
||||
{
|
||||
public interface IAircraftService
|
||||
{
|
||||
IEnumerable<Aircraft> GetAllAircrafts();
|
||||
|
||||
Aircraft GetAircraftById(int id);
|
||||
|
||||
void AddNewAircraft(Aircraft aircraft);
|
||||
|
||||
void UpdateAircraft(int id, Aircraft aircraft);
|
||||
|
||||
void DeleteAircraftById(int id);
|
||||
}
|
||||
}
|
||||
20
Back/skydiveLogs-api.Business/Interfaces/IDropZoneService.cs
Normal file
20
Back/skydiveLogs-api.Business/Interfaces/IDropZoneService.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
using skydiveLogs_api.Domain;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Business.Interfaces
|
||||
{
|
||||
public interface IDropZoneService
|
||||
{
|
||||
IEnumerable<DropZone> GetAllDzs();
|
||||
|
||||
DropZone GetDzById(int id);
|
||||
|
||||
void DeleteDzById(int id);
|
||||
|
||||
bool UpdateDz(int id, DropZone dropZone);
|
||||
|
||||
void AddNewDz(DropZone dropZone);
|
||||
}
|
||||
}
|
||||
20
Back/skydiveLogs-api.Business/Interfaces/IGearService.cs
Normal file
20
Back/skydiveLogs-api.Business/Interfaces/IGearService.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
using skydiveLogs_api.Domain;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Business.Interfaces
|
||||
{
|
||||
public interface IGearService
|
||||
{
|
||||
IEnumerable<Gear> GetAllGears(User connectedUser);
|
||||
|
||||
Gear GetGearById(int id);
|
||||
|
||||
void DeleteGearById(int id);
|
||||
|
||||
void UpdateGear(int id, Gear gear);
|
||||
|
||||
void AddNewGear(Gear gear, User connectedUser);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace skydiveLogs_api.Business.Interfaces
|
||||
{
|
||||
public interface IInitDbService
|
||||
{
|
||||
public void GenerateDb();
|
||||
}
|
||||
}
|
||||
25
Back/skydiveLogs-api.Business/Interfaces/IJumpService.cs
Normal file
25
Back/skydiveLogs-api.Business/Interfaces/IJumpService.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
using skydiveLogs_api.Domain;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Business.Interfaces
|
||||
{
|
||||
public interface IJumpService
|
||||
{
|
||||
IEnumerable<Jump> GetAllJumps(User connectedUser);
|
||||
|
||||
Jump GetJumpById(int id);
|
||||
|
||||
void AddNewJump(int aircraftId,
|
||||
int dzId,
|
||||
int jumpTypeId,
|
||||
int gearId,
|
||||
Jump jump,
|
||||
User connectedUser);
|
||||
|
||||
void UpdateJump(int id, Jump jump);
|
||||
|
||||
void DeleteJumpById(int id);
|
||||
}
|
||||
}
|
||||
20
Back/skydiveLogs-api.Business/Interfaces/IJumpTypeService.cs
Normal file
20
Back/skydiveLogs-api.Business/Interfaces/IJumpTypeService.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
using skydiveLogs_api.Domain;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Business.Interfaces
|
||||
{
|
||||
public interface IJumpTypeService
|
||||
{
|
||||
IEnumerable<JumpType> GetAllJumpTypes();
|
||||
|
||||
JumpType GetJumpTypeById(int id);
|
||||
|
||||
void AddNewJumpType(JumpType value);
|
||||
|
||||
void UpdateJumpType(int id, JumpType value);
|
||||
|
||||
void DeleteJumpTypeById(int id);
|
||||
}
|
||||
}
|
||||
30
Back/skydiveLogs-api.Business/Interfaces/IStatsService.cs
Normal file
30
Back/skydiveLogs-api.Business/Interfaces/IStatsService.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
using skydiveLogs_api.Domain;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Business.Interfaces
|
||||
{
|
||||
public interface IStatsService
|
||||
{
|
||||
IEnumerable<Statistic> GetStatsByDz(User connectedUser);
|
||||
|
||||
IEnumerable<Statistic> GetStatsByAircraft(User connectedUser);
|
||||
|
||||
IEnumerable<Statistic> GetStatsByJumpType(User connectedUser);
|
||||
|
||||
IEnumerable<Statistic> GetStatsByGear(User connectedUser);
|
||||
|
||||
IEnumerable<Statistic> GetStatsByYear(User connectedUser);
|
||||
|
||||
IEnumerable<Statistic> GetStatsForLastYearByDz(User connectedUser);
|
||||
|
||||
IEnumerable<Statistic> GetStatsForLastYearByJumpType(User connectedUser);
|
||||
|
||||
IEnumerable<Statistic> GetStatsForLastMonthByDz(User connectedUser);
|
||||
|
||||
IEnumerable<Statistic> GetStatsForLastMonthByJumpType(User connectedUser);
|
||||
|
||||
SimpleSummary GetSimpleSummary(User connectedUser);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
using skydiveLogs_api.Domain;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.Business.Interfaces
|
||||
{
|
||||
public interface IUserImageService
|
||||
{
|
||||
IEnumerable<UserImage> GetAllImages(User connectedUser);
|
||||
|
||||
UserImage GetImageById(int id);
|
||||
|
||||
void AddNewImage(UserImage image, User connectedUser);
|
||||
|
||||
void UpdateImage(int id, UserImage image);
|
||||
|
||||
void DeleteImageById(int id);
|
||||
}
|
||||
}
|
||||
13
Back/skydiveLogs-api.Business/Interfaces/IUserService.cs
Normal file
13
Back/skydiveLogs-api.Business/Interfaces/IUserService.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using skydiveLogs_api.Domain;
|
||||
|
||||
namespace skydiveLogs_api.Business.Interfaces
|
||||
{
|
||||
public interface IUserService
|
||||
{
|
||||
User GetByLogin(string login, string password);
|
||||
|
||||
User GetById(int userId);
|
||||
|
||||
bool AddNewUser(User user);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user