Files
BirthList/src/BirthList.Domain/Entities/Registry.cs
T
Arne Moerman 09349cb7b7 Add support for item categories in registries
Introduced `RegistryItemCategory` entity for grouping and ordering items within registries. Updated `RegistryItem` and `Registry` entities to support categorization. Added database migrations for `RegistryItemCategories` and updated `RegistryItems` with `CategoryId` and `SortOrder`.

Implemented drag-and-drop functionality for reordering categories and items using JavaScript and Blazor. Enhanced `RegistryAdmin` and `RegistryPublic` components to manage and display categories with collapsible sections.

Updated `RegistryService` to handle category operations, including adding, renaming, removing, and reordering. Added new view models and updated CSS for category styling. Refactored logic to ensure proper ordering and fallback for unassigned items.
2026-05-19 17:02:31 +02:00

24 lines
1.0 KiB
C#

namespace BirthList.Domain.Entities;
public class Registry
{
public Guid Id { get; set; }
public string PublicLinkCode { get; set; } = string.Empty;
public string Title { get; set; } = string.Empty;
public DateOnly? BirthDate { get; set; }
public string? BabyName { get; set; }
public string? HeaderContentHtml { get; set; }
public string? ShippingAddress { get; set; }
public string CurrencyCode { get; set; } = "EUR";
public string ThemeKey { get; set; } = "default";
public RegistryType RegistryType { get; set; } = RegistryType.Birth;
public DateTimeOffset CreatedAtUtc { get; set; }
public ICollection<RegistryAdmin> Admins { get; set; } = [];
public ICollection<RegistryItemCategory> ItemCategories { get; set; } = [];
public ICollection<RegistryItem> Items { get; set; } = [];
public ICollection<RegistryVisit> Visits { get; set; } = [];
public ICollection<RegistryAdminInvite> AdminInvites { get; set; } = [];
public ICollection<UserActionLog> ActionLogs { get; set; } = [];
}