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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user