use uuid::Uuid; use crate::error::SpaceResult; use crate::features::SpaceService; use super::types::{CreateSpaceCmd, SpacePage, SpaceView, UpdateSpaceCmd}; use super::usecase; impl SpaceService { pub async fn create_space(&self, caller: Uuid, cmd: CreateSpaceCmd) -> SpaceResult { usecase::create_space(self, caller, cmd).await } pub async fn get_space(&self, caller: Option, id: Uuid) -> SpaceResult { usecase::get_space(self, caller, id).await } pub async fn update_space( &self, caller: Uuid, id: Uuid, cmd: UpdateSpaceCmd, ) -> SpaceResult { usecase::update_space(self, caller, id, cmd).await } pub async fn delete_space(&self, caller: Uuid, id: Uuid) -> SpaceResult<()> { usecase::delete_space(self, caller, id).await } pub async fn list_spaces( &self, caller: Uuid, limit: u64, offset: u64, ) -> SpaceResult { usecase::list_spaces(self, caller, limit, offset).await } }