test with kerkour architecture (https://kerkour.com/rust-web-application-clean-architecture)
This commit is contained in:
17
src/domain/rolle/service.rs
Normal file
17
src/domain/rolle/service.rs
Normal file
@@ -0,0 +1,17 @@
|
||||
mod create_user;
|
||||
|
||||
use super::repository::Repository;
|
||||
use crate::database::DB;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Service {
|
||||
repo: Repository,
|
||||
pub db: DB,
|
||||
}
|
||||
|
||||
impl Service {
|
||||
pub fn new(db: DB) -> Self {
|
||||
let repo = Repository::new();
|
||||
Self { repo, db }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user