Adds transactional outbox and email verification
Implements outbox pattern for reliable message delivery Adds email verification flow with Postmark integration Enhances account registration with secure token generation Introduces background processing for asynchronous email sending Implements database-level notification mechanism for message processing
This commit is contained in:
parent
88812177a9
commit
54b057886c
35 changed files with 1174 additions and 358 deletions
|
|
@ -3,16 +3,16 @@ using PlanTempus.Core.Database;
|
|||
using PlanTempus.Core.Database.ConnectionFactory;
|
||||
|
||||
namespace PlanTempus.Database.ModuleRegistry
|
||||
{
|
||||
|
||||
public class DbPostgreSqlModule : Module
|
||||
{
|
||||
|
||||
public class DbPostgreSqlModule : Module
|
||||
{
|
||||
public required string ConnectionString { get; set; }
|
||||
|
||||
protected override void Load(ContainerBuilder builder)
|
||||
{
|
||||
Insight.Database.Providers.PostgreSQL.PostgreSQLInsightDbProvider.RegisterProvider();
|
||||
|
||||
Insight.Database.Providers.PostgreSQL.PostgreSQLInsightDbProvider.RegisterProvider();
|
||||
Insight.Database.ColumnMapping.Tables.AddMapper(new SnakeCaseToPascalCaseMapper());
|
||||
builder.RegisterType<PostgresConnectionFactory>()
|
||||
.As<IDbConnectionFactory>()
|
||||
.WithParameter(new TypedParameter(typeof(string), ConnectionString))
|
||||
|
|
@ -21,6 +21,20 @@ namespace PlanTempus.Database.ModuleRegistry
|
|||
builder.RegisterType<SqlOperations>()
|
||||
.As<IDatabaseOperations>();
|
||||
}
|
||||
}
|
||||
|
||||
public class SnakeCaseToPascalCaseMapper : Insight.Database.Mapping.IColumnMapper
|
||||
{
|
||||
public string MapColumn(Type type, System.Data.IDataReader reader, int column)
|
||||
{
|
||||
string databaseName = reader.GetName(column);
|
||||
|
||||
var parts = databaseName.Split(['_'], StringSplitOptions.RemoveEmptyEntries);
|
||||
var pascalName = string.Concat(parts.Select(p =>
|
||||
p.Substring(0, 1).ToUpper() + p.Substring(1).ToLower()
|
||||
));
|
||||
|
||||
return pascalName;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue