SHA256
feat StayExport - Initial Implementation
- Created models for DB and DTOs: StayExportFile - Added required db migrations. - Added StayExportService and StayExportServiceFactory for stay exporting services. - Added configuration options required for StayExport.
This commit is contained in:
@@ -10,6 +10,7 @@ using Somnia.GuestLog.Models.DTOs;
|
||||
using Somnia.GuestLog.Services;
|
||||
using Somnia.GuestLog.Services.AddressQuery;
|
||||
using Somnia.GuestLog.Services.Entity;
|
||||
using Somnia.GuestLog.Services.StayExport;
|
||||
using Somnia.GuestLog.Utils;
|
||||
using Somnia.GuestLog.Validators;
|
||||
|
||||
@@ -55,19 +56,25 @@ builder.Services.AddSingleton<IValidator<GuestDocumentDTO>, GuestDocumentDTOVali
|
||||
builder.Services.AddSingleton<IValidator<GuestDocIdDTO>, GuestDocIdDTOValidator>();
|
||||
builder.Services.AddSingleton<IValidator<StayEntryDTO>, StayEntryDTOValidator>();
|
||||
|
||||
// Add Services
|
||||
// Add Entity Services
|
||||
builder.Services.AddSingleton<IGuestDocumentEntityService, GuestDocumentEntityService>();
|
||||
builder.Services.AddSingleton<IStayEntryEntityService, StayEntryEntityService>();
|
||||
builder.Services.AddSingleton<IStayExportFileService, StayExportFileService>();
|
||||
|
||||
// Add Services
|
||||
builder.Services.AddSingleton<IDataListService, StaticDataListService>();
|
||||
|
||||
builder.Services.AddScoped<IUserMessageService, UserMessageService>();
|
||||
|
||||
// Add Factories (and it's services)
|
||||
builder.Services.AddFactoryDI<IAddressQueryFactory, ConfigFileAddressQueryFactory>();
|
||||
builder.Services.AddFactoryDI<IStayExportServiceFactory, ConfigFileStaytExportServiceFactory>();
|
||||
|
||||
// Add Options config
|
||||
builder.Services.AddOptions<AddressQueryConfig>()
|
||||
.Bind(builder.Configuration.GetSection(AddressQueryConfig.SectionName));
|
||||
builder.Services.AddOptions<StayExportConfig>()
|
||||
.Bind(builder.Configuration.GetSection(StayExportConfig.SectionName));
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user