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

@@ -20,11 +20,11 @@ pub struct ActivityEventResponse {
impl From<domain::ActivityEvent> for ActivityEventResponse {
fn from(e: domain::ActivityEvent) -> Self {
Self {
id: e.id(),
id: e.id().value(),
timestamp: e.timestamp(),
event_type: e.event_type().to_string(),
detail: e.detail().to_string(),
channel_id: e.channel_id(),
channel_id: e.channel_id().map(|id| id.value()),
}
}
}

View File

@@ -95,7 +95,7 @@ pub struct ConfigSnapshotResponse {
impl From<domain::ChannelConfigSnapshot> for ConfigSnapshotResponse {
fn from(s: domain::ChannelConfigSnapshot) -> Self {
Self {
id: s.id(),
id: s.id().value(),
version_num: s.version_num(),
label: s.label().map(|s| s.to_string()),
created_at: s.created_at(),