New: Report-System using globally available Interfaces.
This commit is contained in:
51
Client/Services/ReportSystemReportingService.cs
Normal file
51
Client/Services/ReportSystemReportingService.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Interfaces;
|
||||
using SZUAbsolventenverein.Module.ReportSystem.Models;
|
||||
|
||||
namespace SZUAbsolventenverein.Module.ReportSystem.Services
|
||||
{
|
||||
public interface IReportSystemReportingService
|
||||
{
|
||||
Task<Reporting> CreateReportAsync(Reporting reporting);
|
||||
Task<List<Reporting>> GetReportsAsync(int ModuleId);
|
||||
Task<Reporting> GetReportAsync(int ReportableId, int ModuleId);
|
||||
Task<Reporting> UpdateReport(Reporting reporting);
|
||||
Task DeleteReportingAsync(int ReportingId, int ModuleId);
|
||||
}
|
||||
|
||||
public class ReportSystemReportingService : IReportSystemReportingService, IReportingHandler
|
||||
{
|
||||
public void Report(IReportable reportable, string note)
|
||||
{
|
||||
CreateReportAsync(new Reporting
|
||||
{ ModuleId = reportable.ModuleID, EntityId = reportable.EntityID, Note = note, Reason = "Default Reason" });
|
||||
}
|
||||
|
||||
public Task<Reporting> CreateReportAsync(Reporting reporting)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public Task<List<Reporting>> GetReportsAsync(int ModuleId)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public Task<Reporting> GetReportAsync(int ReportableId, int ModuleId)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public Task<Reporting> UpdateReport(Reporting Reporting)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public Task DeleteReportingAsync(int ReportingId, int ModuleId)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user