Add a cache system on the referential info
+ Add an identity service
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
using skydiveLogs_api.Domain;
|
||||
|
||||
namespace skydiveLogs_api.DomainBusiness.Interfaces
|
||||
{
|
||||
public interface ICacheService
|
||||
{
|
||||
#region Public Methods
|
||||
|
||||
bool Contains(CacheType type, int id = 0);
|
||||
|
||||
void Delete(CacheType type, int id = 0);
|
||||
|
||||
T Get<T>(CacheType type, int id = 0);
|
||||
|
||||
void Put(CacheType type, object value, int duration, int id = 0);
|
||||
|
||||
#endregion Public Methods
|
||||
}
|
||||
}
|
||||
@@ -1,24 +1,26 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
using skydiveLogs_api.Domain;
|
||||
|
||||
using skydiveLogs_api.Domain;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace skydiveLogs_api.DomainBusiness.Interfaces
|
||||
{
|
||||
public interface IDropZoneService
|
||||
{
|
||||
IEnumerable<DropZone> GetAllDzs(User connectedUser);
|
||||
|
||||
DropZone GetDzById(int id);
|
||||
|
||||
void DeleteDzById(int id);
|
||||
|
||||
bool UpdateDz(int id, DropZone dropZone);
|
||||
#region Public Methods
|
||||
|
||||
void AddNewDz(DropZone dropZone);
|
||||
|
||||
bool AddToFavorite(int dzId, User connectedUser);
|
||||
bool AddToFavorite(int dzId);
|
||||
|
||||
bool RemoveToFavorite(int dzId, User connectedUser);
|
||||
void DeleteDzById(int id);
|
||||
|
||||
IEnumerable<DropZone> GetAllDzs();
|
||||
|
||||
DropZone GetDzById(int id);
|
||||
|
||||
bool RemoveToFavorite(int dzId);
|
||||
|
||||
bool UpdateDz(int id, DropZone dropZone);
|
||||
|
||||
#endregion Public Methods
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,22 +1,24 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
using skydiveLogs_api.Domain;
|
||||
|
||||
using skydiveLogs_api.Domain;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace skydiveLogs_api.DomainBusiness.Interfaces
|
||||
{
|
||||
public interface IGearService
|
||||
{
|
||||
IEnumerable<Gear> GetAllGears(User connectedUser);
|
||||
#region Public Methods
|
||||
|
||||
Gear GetGearById(int id);
|
||||
void AddNewGear(Gear gear);
|
||||
|
||||
void AddRentalGear(User newUser);
|
||||
|
||||
void DeleteGearById(int id);
|
||||
|
||||
void UpdateGear(int id, Gear gear);
|
||||
IEnumerable<Gear> GetAllGears();
|
||||
|
||||
void AddNewGear(Gear gear, User connectedUser);
|
||||
Gear GetGearById(int id);
|
||||
|
||||
void AddRentalGear(User connectedUser);
|
||||
bool UpdateGear(int id, Gear gear);
|
||||
|
||||
#endregion Public Methods
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
using skydiveLogs_api.Domain;
|
||||
|
||||
namespace skydiveLogs_api.DomainBusiness.Interfaces
|
||||
{
|
||||
public interface IIdentityService
|
||||
{
|
||||
User ConnectedUser { get; }
|
||||
}
|
||||
}
|
||||
@@ -2,24 +2,26 @@
|
||||
|
||||
using skydiveLogs_api.Domain;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.DomainBusiness.Interfaces
|
||||
{
|
||||
public interface IJumpService
|
||||
{
|
||||
IEnumerable<Jump> GetAllJumps(User connectedUser);
|
||||
|
||||
Jump GetJumpById(int id);
|
||||
#region Public Methods
|
||||
|
||||
void AddNewJump(int aircraftId,
|
||||
int dzId,
|
||||
int jumpTypeId,
|
||||
int gearId,
|
||||
Jump jump,
|
||||
User connectedUser);
|
||||
Jump jump);
|
||||
|
||||
void DeleteJumpById(int id);
|
||||
|
||||
IEnumerable<Jump> GetAllJumps();
|
||||
|
||||
Jump GetJumpById(int id);
|
||||
|
||||
void UpdateJump(int id, Jump jump);
|
||||
|
||||
void DeleteJumpById(int id);
|
||||
#endregion Public Methods
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,30 +1,32 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
using skydiveLogs_api.Domain;
|
||||
|
||||
using skydiveLogs_api.Domain;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace skydiveLogs_api.DomainBusiness.Interfaces
|
||||
{
|
||||
public interface IStatsService
|
||||
{
|
||||
IEnumerable<Statistic> GetStatsByDz(User connectedUser);
|
||||
#region Public Methods
|
||||
|
||||
IEnumerable<Statistic> GetStatsByAircraft(User connectedUser);
|
||||
SimpleSummary GetSimpleSummary();
|
||||
|
||||
IEnumerable<Statistic> GetStatsByJumpType(User connectedUser);
|
||||
IEnumerable<Statistic> GetStatsByAircraft();
|
||||
|
||||
IEnumerable<Statistic> GetStatsByGear(User connectedUser);
|
||||
IEnumerable<Statistic> GetStatsByDz();
|
||||
|
||||
IEnumerable<Statistic> GetStatsByYear(User connectedUser);
|
||||
IEnumerable<Statistic> GetStatsByGear();
|
||||
|
||||
IEnumerable<Statistic> GetStatsForLastYearByDz(User connectedUser);
|
||||
IEnumerable<Statistic> GetStatsByJumpType();
|
||||
|
||||
IEnumerable<Statistic> GetStatsForLastYearByJumpType(User connectedUser);
|
||||
IEnumerable<Statistic> GetStatsByYear();
|
||||
|
||||
IEnumerable<Statistic> GetStatsForLastMonthByDz(User connectedUser);
|
||||
IEnumerable<Statistic> GetStatsForLastMonthByDz();
|
||||
|
||||
IEnumerable<Statistic> GetStatsForLastMonthByJumpType(User connectedUser);
|
||||
IEnumerable<Statistic> GetStatsForLastMonthByJumpType();
|
||||
|
||||
SimpleSummary GetSimpleSummary(User connectedUser);
|
||||
IEnumerable<Statistic> GetStatsForLastYearByDz();
|
||||
|
||||
IEnumerable<Statistic> GetStatsForLastYearByJumpType();
|
||||
|
||||
#endregion Public Methods
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,19 +2,22 @@
|
||||
|
||||
using skydiveLogs_api.Domain;
|
||||
|
||||
|
||||
namespace skydiveLogs_api.DomainBusiness.Interfaces
|
||||
{
|
||||
public interface IUserImageService
|
||||
{
|
||||
IEnumerable<UserImage> GetAllImages(User connectedUser);
|
||||
#region Public Methods
|
||||
|
||||
void AddNewImage(UserImage image);
|
||||
|
||||
void DeleteImageById(int id);
|
||||
|
||||
IEnumerable<UserImage> GetAllImages();
|
||||
|
||||
UserImage GetImageById(int id);
|
||||
|
||||
void AddNewImage(UserImage image, User connectedUser);
|
||||
|
||||
void UpdateImage(int id, UserImage image);
|
||||
|
||||
void DeleteImageById(int id);
|
||||
#endregion Public Methods
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user