Replace chapter setting with multi-select locations; add chapter character summary
Chapters now carry many Locations (new Tags-style entity with cross-referencing) instead of a single free-text Setting field, with a Locations tab on the novel for browsing them and seeing every chapter set at each one. Also surfaces the distinct characters appearing in a chapter's beats, linked, under the beat/word count on the outline tab.
This commit is contained in:
@@ -2,6 +2,7 @@ using Novelly.Api.Beats;
|
||||
using Novelly.Api.Chapters;
|
||||
using Novelly.Api.Characters;
|
||||
using Novelly.Api.Genres;
|
||||
using Novelly.Api.Locations;
|
||||
using Novelly.Api.Novels;
|
||||
using Novelly.Api.Questions;
|
||||
using Novelly.Api.Tags;
|
||||
@@ -15,6 +16,7 @@ public abstract class ServiceTestFixture
|
||||
protected TestUserContext UserContext { get; private set; } = null!;
|
||||
protected NovelAccessService Access { get; private set; } = null!;
|
||||
protected TagService Tags { get; private set; } = null!;
|
||||
protected LocationService Locations { get; private set; } = null!;
|
||||
protected NovelService Novels { get; private set; } = null!;
|
||||
protected CharacterService Characters { get; private set; } = null!;
|
||||
protected ChapterService Chapters { get; private set; } = null!;
|
||||
@@ -28,6 +30,7 @@ public abstract class ServiceTestFixture
|
||||
protected CapturingLogger<ChapterService> ChapterLogs { get; private set; } = null!;
|
||||
protected CapturingLogger<BeatService> BeatLogs { get; private set; } = null!;
|
||||
protected CapturingLogger<TagService> TagLogs { get; private set; } = null!;
|
||||
protected CapturingLogger<LocationService> LocationLogs { get; private set; } = null!;
|
||||
protected CapturingLogger<CharacterArcService> ArcLogs { get; private set; } = null!;
|
||||
protected CapturingLogger<OpenQuestionService> QuestionLogs { get; private set; } = null!;
|
||||
protected CapturingLogger<GenreService> GenreLogs { get; private set; } = null!;
|
||||
@@ -50,6 +53,7 @@ public abstract class ServiceTestFixture
|
||||
Db.Context.SaveChanges();
|
||||
|
||||
TagLogs = new CapturingLogger<TagService>();
|
||||
LocationLogs = new CapturingLogger<LocationService>();
|
||||
NovelLogs = new CapturingLogger<NovelService>();
|
||||
CharacterLogs = new CapturingLogger<CharacterService>();
|
||||
ChapterLogs = new CapturingLogger<ChapterService>();
|
||||
@@ -59,13 +63,14 @@ public abstract class ServiceTestFixture
|
||||
GenreLogs = new CapturingLogger<GenreService>();
|
||||
|
||||
Tags = new TagService(Db.Context, Access, TagLogs, new CreateTagRequestValidator(), new UpdateTagRequestValidator());
|
||||
Locations = new LocationService(Db.Context, Access, LocationLogs, new CreateLocationRequestValidator(), new UpdateLocationRequestValidator());
|
||||
Novels = new NovelService(
|
||||
Db.Context, Access, UserContext, NovelLogs, new CreateNovelRequestValidator(), new UpdateNovelRequestValidator());
|
||||
Characters = new CharacterService(
|
||||
Db.Context, Access, Tags, CharacterLogs,
|
||||
new CreateCharacterRequestValidator(), new UpdateCharacterRequestValidator(), new CreateRelationshipRequestValidator(),
|
||||
new LinkCharacterIdentityRequestValidator());
|
||||
Chapters = new ChapterService(Db.Context, Access, Tags, ChapterLogs, new CreateChapterRequestValidator(), new UpdateChapterRequestValidator());
|
||||
Chapters = new ChapterService(Db.Context, Access, Tags, Locations, ChapterLogs, new CreateChapterRequestValidator(), new UpdateChapterRequestValidator());
|
||||
Beats = new BeatService(
|
||||
Db.Context, Access, Tags, BeatLogs,
|
||||
new CreateBeatRequestValidator(), new UpdateBeatRequestValidator(), new ReorderBeatsRequestValidator(),
|
||||
|
||||
Reference in New Issue
Block a user