use std::sync::Arc; use async_trait::async_trait; use como_domain::{ item::{ queries::{GetItemQuery, GetItemsQuery}, requests::CreateItemDto, responses::CreatedItemDto, ItemDto, }, users::User, }; pub type DynItemService = Arc; #[async_trait] pub trait ItemService { async fn add_item(&self, item: CreateItemDto, user: &User) -> anyhow::Result; async fn get_item(&self, query: GetItemQuery, user: &User) -> anyhow::Result; async fn get_items(&self, query: GetItemsQuery, user: &User) -> anyhow::Result>; }