Added apis

This commit is contained in:
2022-10-04 11:06:48 +02:00
parent 6234cf18e8
commit ae74f66c3a
28 changed files with 392 additions and 300 deletions

View File

@@ -1,8 +1,11 @@
use std::sync::Arc;
use async_trait::async_trait;
use como_domain::item::{requests::CreateItemDto, responses::CreatedItemDto};
pub type DynItemService = Arc<dyn ItemService + Send + Sync>;
#[async_trait]
pub trait ItemService {}
pub trait ItemService {
async fn add_item(&self, item: CreateItemDto) -> anyhow::Result<CreatedItemDto>;
}