20 lines
377 B
Rust
20 lines
377 B
Rust
use rusqlite::Connection;
|
|
|
|
use crate::services::_users::UserService;
|
|
|
|
mod _transactions;
|
|
mod _users;
|
|
|
|
pub struct ServiceFactory<'a> {
|
|
conn: &'a Connection,
|
|
}
|
|
|
|
impl ServiceFactory<'_> {
|
|
pub fn new(conn: &Connection) -> ServiceFactory {
|
|
ServiceFactory { conn }
|
|
}
|
|
pub fn get_user_service(&self) -> UserService {
|
|
UserService::new(self.conn)
|
|
}
|
|
}
|