implement account and account category services with CRUD operations

This commit is contained in:
GW_MC
2026-05-26 09:51:10 +00:00
parent 8e3c46de33
commit 19219d56f4
6 changed files with 491 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
use std::sync::Arc;
use sea_orm::DatabaseConnection;
pub mod accounts;
pub struct Services {
pub account_category: Arc<dyn accounts::category::AccountCategoryService>,
pub accounts: Arc<dyn accounts::AccountsService>,
}
pub fn create_services(db: DatabaseConnection) -> Services {
let account_category_service = Arc::new(accounts::category::AccountCategoryServiceImpl::new(
db.clone(),
));
Services {
account_category: account_category_service.clone(),
accounts: Arc::new(accounts::AccountsServiceImpl::new(
db,
account_category_service,
)),
}
}