Added shared projects

This commit is contained in:
Khwezi Mngoma
2026-05-03 16:10:27 +02:00
parent 66c08dc54b
commit 1b997013bb
81 changed files with 4507 additions and 1 deletions
@@ -0,0 +1,19 @@
namespace LiteCharms.Entities.Configuration;
public class OrderRefundConfiguration : IEntityTypeConfiguration<OrderRefund>
{
public void Configure(EntityTypeBuilder<OrderRefund> builder)
{
builder.ToTable(nameof(OrderRefund));
builder.HasKey(f => f.Id);
builder.Property(f => f.CreatedAt).ValueGeneratedOnAdd();
builder.Property(f => f.OrderId).IsRequired();
builder.Property(f => f.Reason).IsRequired();
builder.Property(f => f.Amount).IsRequired().HasPrecision(18, 2);
builder.HasOne(f => f.Order)
.WithOne(o => o.Refund)
.HasForeignKey<OrderRefund>(o => o.OrderId);
}
}