Add functionality to create transactions
- Transactions work against the account balance - Needs helper functions for users - Needs more testing
This commit is contained in:
@@ -69,4 +69,31 @@ exports.RSSPostRecord = class RSSPostRecord extends baseRSSRecord{
|
||||
super(_id, _title, _link, _category);
|
||||
this.guid = _guid;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Base transaction
|
||||
*/
|
||||
class BaseTransaction {
|
||||
constructor(_provider_transaction_id, _account_id, _discord_tokens_used, _provider_tokens_used, _provider_id) {
|
||||
this.transaction_id = _provider_transaction_id;
|
||||
this.account_id = _account_id;
|
||||
this.discord_tokens_used = _discord_tokens_used;
|
||||
this.provider_tokens_used = _provider_tokens_used;
|
||||
this.provider_id = _provider_id;
|
||||
}
|
||||
}
|
||||
|
||||
exports.BaseTransaction = BaseTransaction;
|
||||
|
||||
/**
|
||||
* Base transaction
|
||||
*/
|
||||
class BaseUserAccount {
|
||||
constructor(_discord_account_id, _account_id) {
|
||||
this.discord_account_id = _discord_account_id;
|
||||
this.account_id = _account_id;
|
||||
}
|
||||
}
|
||||
|
||||
exports.BaseUserAccount = BaseUserAccount;
|
||||
Reference in New Issue
Block a user