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:
+427
@@ -0,0 +1,427 @@
|
||||
// <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("20260517141758_AddShowBankAccountNameToRegistrySettings")]
|
||||
partial class AddShowBankAccountNameToRegistrySettings
|
||||
{
|
||||
/// <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<bool>("CanBeSecondHand")
|
||||
.HasColumnType("bit");
|
||||
|
||||
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<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.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.Registry", b =>
|
||||
{
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BirthList.Infrastructure.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddShowBankAccountNameToRegistrySettings : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "ShowBankAccountName",
|
||||
table: "RegistrySettings",
|
||||
type: "bit",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ShowBankAccountName",
|
||||
table: "RegistrySettings");
|
||||
}
|
||||
}
|
||||
}
|
||||
+427
@@ -0,0 +1,427 @@
|
||||
// <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("20260517154344_RenameCanBeSecondHandToPreferSecondHand")]
|
||||
partial class RenameCanBeSecondHandToPreferSecondHand
|
||||
{
|
||||
/// <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.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.Registry", b =>
|
||||
{
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BirthList.Infrastructure.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class RenameCanBeSecondHandToPreferSecondHand : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "CanBeSecondHand",
|
||||
table: "RegistryItems",
|
||||
newName: "PreferSecondHand");
|
||||
|
||||
migrationBuilder.AlterColumn<bool>(
|
||||
name: "PreferSecondHand",
|
||||
table: "RegistryItems",
|
||||
type: "bit",
|
||||
nullable: true,
|
||||
oldClrType: typeof(bool),
|
||||
oldType: "bit");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<bool>(
|
||||
name: "PreferSecondHand",
|
||||
table: "RegistryItems",
|
||||
type: "bit",
|
||||
nullable: false,
|
||||
defaultValue: false,
|
||||
oldClrType: typeof(bool),
|
||||
oldType: "bit",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "PreferSecondHand",
|
||||
table: "RegistryItems",
|
||||
newName: "CanBeSecondHand");
|
||||
}
|
||||
}
|
||||
}
|
||||
+481
@@ -0,0 +1,481 @@
|
||||
// <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
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BirthList.Infrastructure.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddUserActionLog : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "UserActionLogs",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
RegistryId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
UserId = table.Column<string>(type: "nvarchar(450)", maxLength: 450, nullable: false),
|
||||
RegistryItemId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
ActionType = table.Column<int>(type: "int", nullable: false),
|
||||
Quantity = table.Column<int>(type: "int", nullable: false),
|
||||
Amount = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false),
|
||||
Details = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
|
||||
CreatedAtUtc = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_UserActionLogs", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_UserActionLogs_Registries_RegistryId",
|
||||
column: x => x.RegistryId,
|
||||
principalTable: "Registries",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_UserActionLogs_RegistryId",
|
||||
table: "UserActionLogs",
|
||||
column: "RegistryId");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "UserActionLogs");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,478 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using BirthList.Infrastructure.Persistence;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BirthList.Infrastructure.Migrations
|
||||
{
|
||||
[DbContext(typeof(RegistryDbContext))]
|
||||
partial class RegistryDbContextModelSnapshot : ModelSnapshot
|
||||
{
|
||||
protected override void BuildModel(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
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user