forked from codeboss-co/ChurchManagerApi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5d457b5
commit 2d2ecd9
Showing
6 changed files
with
87 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/Features/ChurchManager.Features.Events/ChurchManager.Features.Events.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<Import Project="..\..\Build\ChurchManager.Common.props" /> | ||
<ItemGroup> | ||
<ProjectReference Include="..\..\Infrastructure\ChurchManager.Infrastructure\ChurchManager.Infrastructure.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
36 changes: 36 additions & 0 deletions
36
src/Features/ChurchManager.Features.Events/Commands/RegisterFamilyForEvent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using ChurchManager.SharedKernel.Wrappers; | ||
using MediatR; | ||
|
||
namespace ChurchManager.Features.Events.Commands; | ||
|
||
public record RegisterFamilyForEventCommand(int EventId, IEnumerable<SelectedMember> SelectedMembers) : IRequest<ApiResponse>; | ||
|
||
public record SelectedMember | ||
{ | ||
public int PersonId { get; set; } | ||
public bool IsSelected { get; set; } | ||
public ChildInfo ChildInfo { get; set; } | ||
public Dictionary<int, SessionPreference> SessionPreferences { get; set; } | ||
} | ||
|
||
public record ChildInfo | ||
{ | ||
// Add properties as needed for child information | ||
// For example: | ||
// public string EmergencyContact { get; set; } | ||
// public string AllergiesInfo { get; set; } | ||
} | ||
|
||
public record SessionPreference | ||
{ | ||
public bool? AttendingOnline { get; set; } | ||
public bool? AttendingInPerson { get; set; } | ||
} | ||
|
||
public class RegisterFamilyForEventHandler : IRequestHandler<RegisterFamilyForEventCommand, ApiResponse> | ||
{ | ||
public Task<ApiResponse> Handle(RegisterFamilyForEventCommand command, CancellationToken ct) | ||
{ | ||
return Task.FromResult(new ApiResponse {Succeeded = true, Message = "Registration successful!"}); | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/Features/ChurchManager.Features.Events/Startup/StartupApplication.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using ChurchManager.Infrastructure; | ||
using Microsoft.AspNetCore.Builder; | ||
using Microsoft.AspNetCore.Hosting; | ||
using Microsoft.Extensions.Configuration; | ||
using Microsoft.Extensions.DependencyInjection; | ||
|
||
namespace ChurchManager.Features.Events.Startup; | ||
|
||
public class StartupApplication: IStartupApplication | ||
{ | ||
public void ConfigureServices(IServiceCollection services, IConfiguration configuration) | ||
{ | ||
} | ||
|
||
public void Configure(IApplicationBuilder application, IWebHostEnvironment webHostEnvironment) | ||
{ | ||
} | ||
|
||
public int Priority => 101; | ||
public bool BeforeConfigure => false; | ||
} |