refactored ids from u32 to i64.
This commit is contained in:
1 parent
352bb498d4
commit
d06264401d
4 files changed
+33
-32
No files matched your search
+4
-4
@@ -24,8 +24,8 @@ impl AccountType {
|
||||
}
|
||||
|
||||
pub struct Account {
|
||||
id: u32,
|
||||
amount: u32,
|
||||
id: i64,
|
||||
amount: i64,
|
||||
timestamp: i64,
|
||||
security: Security,
|
||||
account_type: AccountType,
|
||||
@@ -46,7 +46,7 @@ impl Account {
|
||||
});
|
||||
}
|
||||
|
||||
pub fn raw_amount(&self) -> u32 {
|
||||
pub fn raw_amount(&self) -> i64 {
|
||||
self.amount
|
||||
}
|
||||
}
|
||||
@@ -95,7 +95,7 @@ fn create_account(tx: &Transaction, sec: &SecurityId, user: &UserId, account_typ
|
||||
AccountType::SecurityEmitter => "security_emitter",
|
||||
};
|
||||
tx.execute(q, (sec, account_type))?;
|
||||
let id = AccountId::from_id(tx.last_insert_rowid() as u32);
|
||||
let id = AccountId::from_id(tx.last_insert_rowid() as i64);
|
||||
|
||||
let q = "INSERT INTO account_user_permissions(user_id, account_id)
|
||||
VALUES(?1, ?2)";
|
||||
|
||||
Reference in new issue
Block a user