many fixes and improvements - rework for modules/ and common/
feat(emailer): add Postmark and Resend providers
This commit is contained in:
22
backend/Modules/Tipping/Data/TippingDbContext.cs
Normal file
22
backend/Modules/Tipping/Data/TippingDbContext.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
namespace Hutopy.Modules.Tipping.Data;
|
||||
|
||||
public sealed class TippingDbContext(
|
||||
DbContextOptions<TippingDbContext> options)
|
||||
: DbContext(options)
|
||||
{
|
||||
public const string SchemaName = "Tipping";
|
||||
|
||||
public DbSet<Tip> Tips => Set<Tip>();
|
||||
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder.HasDefaultSchema(SchemaName);
|
||||
|
||||
modelBuilder
|
||||
.Entity<Tip>()
|
||||
.Property(c => c.CreatedAt)
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasDefaultValueSql("CURRENT_TIMESTAMP");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user