fd3602fa28
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.
482 lines
17 KiB
C#
482 lines
17 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using BirthList.Infrastructure.Persistence;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Metadata;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
|
|
#nullable disable
|
|
|
|
namespace BirthList.Infrastructure.Migrations
|
|
{
|
|
[DbContext(typeof(RegistryDbContext))]
|
|
[Migration("20260517162502_AddUserActionLog")]
|
|
partial class AddUserActionLog
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasAnnotation("ProductVersion", "8.0.26")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
|
|
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
|
|
|
modelBuilder.Entity("BirthList.Domain.Entities.ItemContribution", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<decimal>("Amount")
|
|
.HasPrecision(18, 2)
|
|
.HasColumnType("decimal(18,2)");
|
|
|
|
b.Property<DateTimeOffset>("ContributedAtUtc")
|
|
.HasColumnType("datetimeoffset");
|
|
|
|
b.Property<string>("CurrencyCode")
|
|
.IsRequired()
|
|
.HasMaxLength(3)
|
|
.HasColumnType("nvarchar(3)");
|
|
|
|
b.Property<Guid>("RegistryItemId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("TransferMessage")
|
|
.IsRequired()
|
|
.HasMaxLength(500)
|
|
.HasColumnType("nvarchar(500)");
|
|
|
|
b.Property<string>("UserId")
|
|
.IsRequired()
|
|
.HasMaxLength(450)
|
|
.HasColumnType("nvarchar(450)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("RegistryItemId");
|
|
|
|
b.ToTable("ItemContributions");
|
|
});
|
|
|
|
modelBuilder.Entity("BirthList.Domain.Entities.ItemPurchase", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<DateTimeOffset>("PurchasedAtUtc")
|
|
.HasColumnType("datetimeoffset");
|
|
|
|
b.Property<int>("Quantity")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<Guid>("RegistryItemId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("UserId")
|
|
.IsRequired()
|
|
.HasMaxLength(450)
|
|
.HasColumnType("nvarchar(450)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("RegistryItemId");
|
|
|
|
b.ToTable("ItemPurchases");
|
|
});
|
|
|
|
modelBuilder.Entity("BirthList.Domain.Entities.PlatformOwner", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<DateTimeOffset>("AssignedAtUtc")
|
|
.HasColumnType("datetimeoffset");
|
|
|
|
b.Property<string>("UserId")
|
|
.IsRequired()
|
|
.HasMaxLength(450)
|
|
.HasColumnType("nvarchar(450)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("UserId")
|
|
.IsUnique();
|
|
|
|
b.ToTable("PlatformOwners");
|
|
});
|
|
|
|
modelBuilder.Entity("BirthList.Domain.Entities.Registry", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("BabyName")
|
|
.HasMaxLength(100)
|
|
.HasColumnType("nvarchar(100)");
|
|
|
|
b.Property<DateOnly?>("BirthDate")
|
|
.HasColumnType("date");
|
|
|
|
b.Property<DateTimeOffset>("CreatedAtUtc")
|
|
.HasColumnType("datetimeoffset");
|
|
|
|
b.Property<string>("CurrencyCode")
|
|
.IsRequired()
|
|
.HasMaxLength(3)
|
|
.HasColumnType("nvarchar(3)");
|
|
|
|
b.Property<string>("HeaderContentHtml")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("PublicLinkCode")
|
|
.IsRequired()
|
|
.HasMaxLength(100)
|
|
.HasColumnType("nvarchar(100)");
|
|
|
|
b.Property<int>("RegistryType")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("ShippingAddress")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("ThemeKey")
|
|
.IsRequired()
|
|
.HasMaxLength(100)
|
|
.HasColumnType("nvarchar(100)");
|
|
|
|
b.Property<string>("Title")
|
|
.IsRequired()
|
|
.HasMaxLength(250)
|
|
.HasColumnType("nvarchar(250)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("PublicLinkCode")
|
|
.IsUnique();
|
|
|
|
b.ToTable("Registries");
|
|
});
|
|
|
|
modelBuilder.Entity("BirthList.Domain.Entities.RegistryAdmin", b =>
|
|
{
|
|
b.Property<Guid>("RegistryId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("UserId")
|
|
.HasMaxLength(450)
|
|
.HasColumnType("nvarchar(450)");
|
|
|
|
b.Property<DateTimeOffset>("AddedAtUtc")
|
|
.HasColumnType("datetimeoffset");
|
|
|
|
b.HasKey("RegistryId", "UserId");
|
|
|
|
b.ToTable("RegistryAdmins");
|
|
});
|
|
|
|
modelBuilder.Entity("BirthList.Domain.Entities.RegistryAdminInvite", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<DateTimeOffset>("ExpiresAtUtc")
|
|
.HasColumnType("datetimeoffset");
|
|
|
|
b.Property<DateTimeOffset?>("RedeemedAtUtc")
|
|
.HasColumnType("datetimeoffset");
|
|
|
|
b.Property<Guid>("RegistryId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("SentToEmail")
|
|
.HasMaxLength(320)
|
|
.HasColumnType("nvarchar(320)");
|
|
|
|
b.Property<string>("Token")
|
|
.IsRequired()
|
|
.HasMaxLength(120)
|
|
.HasColumnType("nvarchar(120)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("RegistryId");
|
|
|
|
b.HasIndex("Token")
|
|
.IsUnique();
|
|
|
|
b.ToTable("RegistryAdminInvites");
|
|
});
|
|
|
|
modelBuilder.Entity("BirthList.Domain.Entities.RegistryItem", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<DateTimeOffset>("CreatedAtUtc")
|
|
.HasColumnType("datetimeoffset");
|
|
|
|
b.Property<string>("CurrencyCode")
|
|
.IsRequired()
|
|
.HasMaxLength(3)
|
|
.HasColumnType("nvarchar(3)");
|
|
|
|
b.Property<string>("Description")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int>("DesiredQuantity")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<bool>("IsGiven")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<decimal>("MoneyFulfilledAmount")
|
|
.HasPrecision(18, 2)
|
|
.HasColumnType("decimal(18,2)");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(300)
|
|
.HasColumnType("nvarchar(300)");
|
|
|
|
b.Property<bool>("ParticipationAllowed")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<decimal?>("ParticipationTargetAmount")
|
|
.HasPrecision(18, 2)
|
|
.HasColumnType("decimal(18,2)");
|
|
|
|
b.Property<string>("PictureUrl")
|
|
.HasMaxLength(2048)
|
|
.HasColumnType("nvarchar(2048)");
|
|
|
|
b.Property<bool?>("PreferSecondHand")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<decimal?>("PriceAmount")
|
|
.HasPrecision(18, 2)
|
|
.HasColumnType("decimal(18,2)");
|
|
|
|
b.Property<string>("ProductUrl")
|
|
.HasMaxLength(2048)
|
|
.HasColumnType("nvarchar(2048)");
|
|
|
|
b.Property<int>("PurchasedQuantity")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<Guid>("RegistryId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("RegistryId");
|
|
|
|
b.ToTable("RegistryItems");
|
|
});
|
|
|
|
modelBuilder.Entity("BirthList.Domain.Entities.RegistrySettings", b =>
|
|
{
|
|
b.Property<Guid>("RegistryId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("BankAccountBic")
|
|
.HasMaxLength(11)
|
|
.HasColumnType("nvarchar(11)");
|
|
|
|
b.Property<string>("BankAccountDisplayName")
|
|
.HasMaxLength(120)
|
|
.HasColumnType("nvarchar(120)");
|
|
|
|
b.Property<string>("BankAccountIban")
|
|
.HasMaxLength(34)
|
|
.HasColumnType("nvarchar(34)");
|
|
|
|
b.Property<bool>("ShowBankAccountName")
|
|
.HasColumnType("bit");
|
|
|
|
b.HasKey("RegistryId");
|
|
|
|
b.ToTable("RegistrySettings");
|
|
});
|
|
|
|
modelBuilder.Entity("BirthList.Domain.Entities.RegistryVisit", b =>
|
|
{
|
|
b.Property<Guid>("RegistryId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("UserId")
|
|
.HasMaxLength(450)
|
|
.HasColumnType("nvarchar(450)");
|
|
|
|
b.Property<DateTimeOffset>("LastVisitedAtUtc")
|
|
.HasColumnType("datetimeoffset");
|
|
|
|
b.HasKey("RegistryId", "UserId");
|
|
|
|
b.ToTable("RegistryVisits");
|
|
});
|
|
|
|
modelBuilder.Entity("BirthList.Domain.Entities.UserActionLog", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<int>("ActionType")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<decimal>("Amount")
|
|
.HasPrecision(18, 2)
|
|
.HasColumnType("decimal(18,2)");
|
|
|
|
b.Property<DateTimeOffset>("CreatedAtUtc")
|
|
.HasColumnType("datetimeoffset");
|
|
|
|
b.Property<string>("Details")
|
|
.HasMaxLength(500)
|
|
.HasColumnType("nvarchar(500)");
|
|
|
|
b.Property<int>("Quantity")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<Guid>("RegistryId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<Guid?>("RegistryItemId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("UserId")
|
|
.IsRequired()
|
|
.HasMaxLength(450)
|
|
.HasColumnType("nvarchar(450)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("RegistryId");
|
|
|
|
b.ToTable("UserActionLogs");
|
|
});
|
|
|
|
modelBuilder.Entity("BirthList.Domain.Entities.ItemContribution", b =>
|
|
{
|
|
b.HasOne("BirthList.Domain.Entities.RegistryItem", "RegistryItem")
|
|
.WithMany("Contributions")
|
|
.HasForeignKey("RegistryItemId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("RegistryItem");
|
|
});
|
|
|
|
modelBuilder.Entity("BirthList.Domain.Entities.ItemPurchase", b =>
|
|
{
|
|
b.HasOne("BirthList.Domain.Entities.RegistryItem", "RegistryItem")
|
|
.WithMany("Purchases")
|
|
.HasForeignKey("RegistryItemId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("RegistryItem");
|
|
});
|
|
|
|
modelBuilder.Entity("BirthList.Domain.Entities.RegistryAdmin", b =>
|
|
{
|
|
b.HasOne("BirthList.Domain.Entities.Registry", "Registry")
|
|
.WithMany("Admins")
|
|
.HasForeignKey("RegistryId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Registry");
|
|
});
|
|
|
|
modelBuilder.Entity("BirthList.Domain.Entities.RegistryAdminInvite", b =>
|
|
{
|
|
b.HasOne("BirthList.Domain.Entities.Registry", "Registry")
|
|
.WithMany("AdminInvites")
|
|
.HasForeignKey("RegistryId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Registry");
|
|
});
|
|
|
|
modelBuilder.Entity("BirthList.Domain.Entities.RegistryItem", b =>
|
|
{
|
|
b.HasOne("BirthList.Domain.Entities.Registry", "Registry")
|
|
.WithMany("Items")
|
|
.HasForeignKey("RegistryId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Registry");
|
|
});
|
|
|
|
modelBuilder.Entity("BirthList.Domain.Entities.RegistrySettings", b =>
|
|
{
|
|
b.HasOne("BirthList.Domain.Entities.Registry", "Registry")
|
|
.WithOne()
|
|
.HasForeignKey("BirthList.Domain.Entities.RegistrySettings", "RegistryId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Registry");
|
|
});
|
|
|
|
modelBuilder.Entity("BirthList.Domain.Entities.RegistryVisit", b =>
|
|
{
|
|
b.HasOne("BirthList.Domain.Entities.Registry", "Registry")
|
|
.WithMany("Visits")
|
|
.HasForeignKey("RegistryId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Registry");
|
|
});
|
|
|
|
modelBuilder.Entity("BirthList.Domain.Entities.UserActionLog", b =>
|
|
{
|
|
b.HasOne("BirthList.Domain.Entities.Registry", "Registry")
|
|
.WithMany("ActionLogs")
|
|
.HasForeignKey("RegistryId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Registry");
|
|
});
|
|
|
|
modelBuilder.Entity("BirthList.Domain.Entities.Registry", b =>
|
|
{
|
|
b.Navigation("ActionLogs");
|
|
|
|
b.Navigation("AdminInvites");
|
|
|
|
b.Navigation("Admins");
|
|
|
|
b.Navigation("Items");
|
|
|
|
b.Navigation("Visits");
|
|
});
|
|
|
|
modelBuilder.Entity("BirthList.Domain.Entities.RegistryItem", b =>
|
|
{
|
|
b.Navigation("Contributions");
|
|
|
|
b.Navigation("Purchases");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|