refactor(application): strip comments, DRY ownership check + parse_content_type

This commit is contained in:
2026-07-12 04:10:58 +02:00
parent 98a54245b1
commit 9dcd169689
62 changed files with 56 additions and 203 deletions

View File

@@ -3,20 +3,16 @@ use uuid::Uuid;
use domain::models::ScheduleConfig;
use domain::value_objects::RecyclePolicy;
/// Create a new channel.
pub struct CreateChannelCommand {
pub owner_id: Uuid,
pub name: String,
pub timezone: String,
}
/// Update an existing channel (partial — only `Some` fields are applied).
pub struct UpdateChannelCommand {
pub channel_id: Uuid,
/// Used for ownership check.
pub owner_id: Uuid,
pub name: Option<String>,
/// `Some(None)` clears the description; `None` leaves it unchanged.
pub description: Option<Option<String>>,
pub timezone: Option<String>,
pub schedule_config: Option<ScheduleConfig>,
@@ -24,9 +20,7 @@ pub struct UpdateChannelCommand {
pub auto_schedule: Option<bool>,
}
/// Delete a channel.
pub struct DeleteChannelCommand {
pub channel_id: Uuid,
/// Used for ownership check.
pub owner_id: Uuid,
}