many fixes and improvements - rework for modules/ and common/

feat(emailer): add Postmark and Resend providers
This commit is contained in:
2025-06-06 12:21:43 -04:00
parent 31ba18fa8d
commit 25b94d3e02
313 changed files with 6586 additions and 18260 deletions

View File

@@ -0,0 +1,21 @@
using System.ComponentModel.DataAnnotations;
using Hutopy.Common.Domain;
namespace Hutopy.Modules.Tipping.Data;
public class Tip : Entity
{
public Guid CreatorId { get; set; }
public TipStatus Status { get; set; }
public decimal Amount { get; set; }
[MaxLength(8)] public required string Currency { get; set; }
[MaxLength(2048)] public required string Message { get; set; }
[MaxLength(256)] public required string StripeSessionId { get; set; }
[MaxLength(2048)] public string? StripeInvoiceUrl { get; set; }
}
public enum TipStatus : short
{
Pending = 0,
Paid = 1,
}

View 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");
}
}