deref eusersettings, pub stuff
This commit is contained in:
parent
ba43eeee58
commit
6332ea66d9
@ -11,14 +11,22 @@ use diesel::backend::Backend;
|
||||
|
||||
use libpso::character::settings;
|
||||
|
||||
#[derive(Debug, AsExpression, FromSqlRow)]
|
||||
#[sql_type="sql_types::Binary"]
|
||||
pub struct EUserSettings(pub settings::UserSettings);
|
||||
use elseware::schema::*;
|
||||
|
||||
//const ELSEWHERE_COST: u32 = bcrypt::DEFAULT_COST;
|
||||
const ELSEWHERE_COST: u32 = 5;
|
||||
|
||||
use elseware::schema::*;
|
||||
#[derive(Debug, AsExpression, FromSqlRow)]
|
||||
#[sql_type="sql_types::Binary"]
|
||||
pub struct EUserSettings(pub settings::UserSettings);
|
||||
|
||||
impl std::ops::Deref for EUserSettings {
|
||||
type Target = settings::UserSettings;
|
||||
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Queryable, Identifiable, Debug)]
|
||||
pub struct UserAccount {
|
||||
@ -53,8 +61,8 @@ impl NewUser {
|
||||
#[belongs_to(UserAccount, foreign_key="user_id")]
|
||||
#[table_name="user_settings"]
|
||||
pub struct UserSettings {
|
||||
id: i32,
|
||||
user_id: i32,
|
||||
pub id: i32,
|
||||
pub user_id: i32,
|
||||
//settings: Vec<u8>,
|
||||
pub settings: EUserSettings,
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user