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:
@@ -1,9 +1,8 @@
|
||||
use async_trait::async_trait;
|
||||
use uuid::Uuid;
|
||||
|
||||
use crate::errors::DomainResult;
|
||||
use crate::models::{Channel, ChannelConfigSnapshot, ScheduleConfig};
|
||||
use crate::value_objects::{ChannelId, UserId};
|
||||
use crate::value_objects::{ChannelId, SnapshotId, UserId};
|
||||
|
||||
#[async_trait]
|
||||
pub trait ChannelCommand: Send + Sync {
|
||||
@@ -21,7 +20,7 @@ pub trait ChannelCommand: Send + Sync {
|
||||
async fn patch_config_snapshot_label(
|
||||
&self,
|
||||
channel_id: ChannelId,
|
||||
snapshot_id: Uuid,
|
||||
snapshot_id: SnapshotId,
|
||||
label: Option<String>,
|
||||
) -> DomainResult<Option<ChannelConfigSnapshot>>;
|
||||
}
|
||||
@@ -44,6 +43,6 @@ pub trait ChannelQuery: Send + Sync {
|
||||
async fn get_config_snapshot(
|
||||
&self,
|
||||
channel_id: ChannelId,
|
||||
snapshot_id: Uuid,
|
||||
snapshot_id: SnapshotId,
|
||||
) -> DomainResult<Option<ChannelConfigSnapshot>>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user