refactor(domain): Row structs for from_persistence, ID newtypes, kill clippy.toml

- delete clippy.toml (too-many-arguments-threshold=20 hack)
- ChannelRow/MediaItemRow/LibraryItemRow structs for from_persistence
- SnapshotId/ActivityEventId/PlaybackRecordId newtypes
- DomainError variants use ChannelId/UserId instead of Uuid
- ActivityEvent.channel_id: Option<ChannelId> not Option<Uuid>
- InMemory repos key on newtype IDs
- AlgorithmicParams struct for schedule engine
- update all adapters/application/presentation callers
This commit is contained in:
2026-07-12 05:00:49 +02:00
parent 031cba5cfb
commit c0e685a4ee
65 changed files with 684 additions and 695 deletions

View File

@@ -23,7 +23,7 @@ async fn seed_channel(repo: &InMemoryChannelRepository) -> Channel {
repo.channels
.lock()
.unwrap()
.insert(channel.id().value(), channel.clone());
.insert(channel.id(), channel.clone());
channel
}
@@ -35,7 +35,7 @@ async fn list_empty() {
let snaps = list::execute(
&deps,
ListSnapshotsQuery {
channel_id: channel.id().value(),
channel_id: channel.id(),
},
)
.await
@@ -53,7 +53,7 @@ async fn list_returns_saved_snapshots() {
save::execute(
&deps,
SaveSnapshotCommand {
channel_id: channel.id().value(),
channel_id: channel.id(),
label: Some(label.into()),
},
)
@@ -64,7 +64,7 @@ async fn list_returns_saved_snapshots() {
let snaps = list::execute(
&deps,
ListSnapshotsQuery {
channel_id: channel.id().value(),
channel_id: channel.id(),
},
)
.await

View File

@@ -22,7 +22,7 @@ async fn seed_channel(repo: &InMemoryChannelRepository) -> Channel {
repo.channels
.lock()
.unwrap()
.insert(channel.id().value(), channel.clone());
.insert(channel.id(), channel.clone());
channel
}
@@ -34,7 +34,7 @@ async fn save_creates_snapshot() {
let snap = save::execute(
&deps,
SaveSnapshotCommand {
channel_id: channel.id().value(),
channel_id: channel.id(),
label: Some("v1".into()),
},
)
@@ -54,7 +54,7 @@ async fn save_increments_version() {
save::execute(
&deps,
SaveSnapshotCommand {
channel_id: channel.id().value(),
channel_id: channel.id(),
label: None,
},
)
@@ -64,7 +64,7 @@ async fn save_increments_version() {
let snap2 = save::execute(
&deps,
SaveSnapshotCommand {
channel_id: channel.id().value(),
channel_id: channel.id(),
label: None,
},
)