Add UserActionLog and enhance registry features
Build and Push Docker Image / build-and-push (push) Failing after 12m11s
Build and Push Docker Image / build-and-push (push) Failing after 12m11s
- Introduced `UserActionLog` entity to track user actions. - Replaced `CanBeSecondHand` with `PreferSecondHand` property. - Added `ShowBankAccountName` to `RegistrySettings`. - Updated models and migrations for new properties. - Enhanced `RegistryService` with user action logging and item details. - Redesigned `Home.razor` with a grid layout and modal for registries. - Added `RegistryActionLog.razor` for admin action logs. - Improved `RegistryPublic.razor` with purchaser/contributor details. - Replaced sidebar with `TopBar.razor` for responsive navigation. - Updated CSS for new components and improved responsiveness.
This commit is contained in:
@@ -13,6 +13,7 @@ public class RegistryDbContext(DbContextOptions<RegistryDbContext> options) : Db
|
||||
public DbSet<ItemPurchase> ItemPurchases => Set<ItemPurchase>();
|
||||
public DbSet<ItemContribution> ItemContributions => Set<ItemContribution>();
|
||||
public DbSet<RegistryVisit> RegistryVisits => Set<RegistryVisit>();
|
||||
public DbSet<UserActionLog> UserActionLogs => Set<UserActionLog>();
|
||||
public DbSet<PlatformOwner> PlatformOwners => Set<PlatformOwner>();
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
@@ -111,6 +112,18 @@ public class RegistryDbContext(DbContextOptions<RegistryDbContext> options) : Db
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity<UserActionLog>(entity =>
|
||||
{
|
||||
entity.HasKey(x => x.Id);
|
||||
entity.Property(x => x.UserId).HasMaxLength(450);
|
||||
entity.Property(x => x.Amount).HasPrecision(18, 2);
|
||||
entity.Property(x => x.Details).HasMaxLength(500);
|
||||
entity.HasOne(x => x.Registry)
|
||||
.WithMany(x => x.ActionLogs)
|
||||
.HasForeignKey(x => x.RegistryId)
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity<PlatformOwner>(entity =>
|
||||
{
|
||||
entity.HasKey(x => x.Id);
|
||||
|
||||
Reference in New Issue
Block a user