Aanbod: categorieën als CMS-data met CRUD-routes en categoryId op het aanbod

Nieuwe tabel OfferingsCategories (unieke naam, case-insensitief) en nullable Offering.CategoryId met FK Restrict (migratie AddOfferingCategories). Routes onder /offerings/categories zijn AdminOnly; verwijderen van een gebruikte categorie geeft 409. Het aanbod neemt categoryId (moet bestaan, anders 400) en geeft category (naam) en categoryId terug; niets wordt geseed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-10 13:06:08 +01:00
co-authored by Claude Sonnet 5.5
parent bc763c8ef6
commit 8bda5629ff
29 changed files with 1243 additions and 20 deletions
@@ -19,7 +19,7 @@ public class OfferingsServiceTests
_repo.BeginTransactionAsync().Returns(Substitute.For<IDbContextTransaction>());
}
private OfferingsService CreateSut() => new(_repo, _logger);
private OfferingsService CreateSut() => new(_repo, Substitute.For<IOfferingCategoryRepository>(), _logger);
private static CreateOfferingRequest CreateRequest(bool featured = false) => new(
"Title", "Description", "€ 100", "per month", ["Feature 1"], "Contact", featured);