-
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.
Add FormFlow for handling multi page journeys (#850)
* Add FormFlow submodule * Add FormFlow journey state store that uses Postgres * Add a convention to bind JourneyInstance properties by default * Add supporting test infrastructure for FormFlow journeys
- Loading branch information
Showing
22 changed files
with
936 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "TeachingRecordSystem/lib/formflow"] | ||
path = TeachingRecordSystem/lib/formflow | ||
url = https://github.com/gunndabad/formflow.git |
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
19 changes: 19 additions & 0 deletions
19
...rdSystem/src/TeachingRecordSystem.Core/DataStore/Postgres/Mappings/JourneyStateMapping.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,19 @@ | ||
using Microsoft.EntityFrameworkCore; | ||
using Microsoft.EntityFrameworkCore.Metadata.Builders; | ||
using TeachingRecordSystem.Core.DataStore.Postgres.Models; | ||
|
||
namespace TeachingRecordSystem.Core.DataStore.Postgres.Mappings; | ||
|
||
public class JourneyStateMapping : IEntityTypeConfiguration<JourneyState> | ||
{ | ||
public void Configure(EntityTypeBuilder<JourneyState> builder) | ||
{ | ||
builder.ToTable("journey_states"); | ||
builder.HasKey(s => s.InstanceId); | ||
builder.Property(s => s.InstanceId).IsRequired().HasMaxLength(300); | ||
builder.Property(s => s.UserId).IsRequired(); | ||
builder.Property(s => s.State).IsRequired(); | ||
builder.Property(s => s.Created).IsRequired(); | ||
builder.Property(s => s.Updated).IsRequired(); | ||
} | ||
} |
Oops, something went wrong.