use uuid::Uuid; use super::{CreateProjectCmd, ListProjectQuery, ProjectPage, ProjectView, UpdateProjectCmd}; use super::usecase; impl crate::service::ProjectService { pub async fn create_project( &self, actor: Uuid, cmd: CreateProjectCmd, ) -> crate::error::ProjectResult { usecase::create_project(self, actor, cmd).await } pub async fn get_project( &self, actor: Uuid, space_id: Uuid, project_id: Uuid, ) -> crate::error::ProjectResult { usecase::get_project(self, actor, space_id, project_id).await } pub async fn list_projects( &self, actor: Uuid, q: ListProjectQuery, ) -> crate::error::ProjectResult { usecase::list_projects(self, actor, q).await } pub async fn update_project( &self, actor: Uuid, space_id: Uuid, project_id: Uuid, cmd: UpdateProjectCmd, ) -> crate::error::ProjectResult { usecase::update_project(self, actor, space_id, project_id, cmd).await } pub async fn delete_project( &self, actor: Uuid, space_id: Uuid, project_id: Uuid, ) -> crate::error::ProjectResult<()> { usecase::delete_project(self, actor, space_id, project_id).await } }