|
@ -2,6 +2,7 @@ use crate::entity::account::*; |
|
|
use crate::entity::character::*;
|
|
|
use crate::entity::character::*;
|
|
|
use crate::entity::item::*;
|
|
|
use crate::entity::item::*;
|
|
|
|
|
|
|
|
|
|
|
|
// TODO: all these Options should be Results
|
|
|
#[async_trait::async_trait]
|
|
|
#[async_trait::async_trait]
|
|
|
pub trait EntityGateway: Send + Sync + Clone {
|
|
|
pub trait EntityGateway: Send + Sync + Clone {
|
|
|
async fn create_user(&mut self, _user: NewUserAccountEntity) -> Option<UserAccountEntity> {
|
|
|
async fn create_user(&mut self, _user: NewUserAccountEntity) -> Option<UserAccountEntity> {
|
|
@ -28,7 +29,7 @@ pub trait EntityGateway: Send + Sync + Clone { |
|
|
unimplemented!();
|
|
|
unimplemented!();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
fn save_user_settings(&mut self, _settings: &UserSettingsEntity) {
|
|
|
|
|
|
|
|
|
async fn save_user_settings(&mut self, _settings: &UserSettingsEntity) {
|
|
|
unimplemented!();
|
|
|
unimplemented!();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
@ -36,6 +37,7 @@ pub trait EntityGateway: Send + Sync + Clone { |
|
|
unimplemented!();
|
|
|
unimplemented!();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// TODO: just make this a vec sorted by slot order?
|
|
|
async fn get_characters_by_user(&self, _user: &UserAccountEntity) -> [Option<CharacterEntity>; 4] {
|
|
|
async fn get_characters_by_user(&self, _user: &UserAccountEntity) -> [Option<CharacterEntity>; 4] {
|
|
|
unimplemented!();
|
|
|
unimplemented!();
|
|
|
}
|
|
|
}
|
|
|