application: channels bounded context

CQRS use cases (create/update/delete/get/list/list_by_owner),
ownership checks, auto-snapshot on config change.
Channel setters added to domain model.
This commit is contained in:
2026-07-12 01:57:38 +02:00
parent 2976600d12
commit 6fd47f2d93
18 changed files with 909 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
use domain::models::Channel;
use domain::value_objects::ChannelId;
use domain::DomainResult;
use super::deps::ChannelQueryDeps;
use super::queries::GetChannelQuery;
/// Get a single channel by ID.
pub async fn execute(deps: &ChannelQueryDeps, query: GetChannelQuery) -> DomainResult<Option<Channel>> {
let channel_id = ChannelId::from(query.channel_id);
deps.channel_query.find_by_id(channel_id).await
}
#[cfg(test)]
#[path = "tests/get.rs"]
mod tests;