Deleted `CommonBirbankScript` and its associated derived classes (`GetLastDaysHistoryBirbankScript`, `LoginAndCheckAccountsBirbankScript`, `PayByCardBirbankScript`). Removed dependencies on these scripts, including XML parsing, account handling, and transaction workflows related to the Birbank app.
40 lines
1.2 KiB
C++
40 lines
1.2 KiB
C++
#pragma once
|
|
#include <QSet>
|
|
#include "db/AccountInfo.h"
|
|
|
|
class AccountDAO {
|
|
public:
|
|
[[nodiscard]] static bool upsertAccount(const AccountInfo &info);
|
|
|
|
[[nodiscard]] static bool updateAccountById(
|
|
int id,
|
|
const QString &status,
|
|
const QString &description,
|
|
const QString ¤cy
|
|
);
|
|
|
|
[[nodiscard]] static bool deleteAccount(int id);
|
|
|
|
[[nodiscard]] static bool updateCardNumber(int accountId, const QString &cardNumber);
|
|
|
|
[[nodiscard]] static bool updateMaterialId(int accountId, const QString &materialId);
|
|
|
|
[[nodiscard]] static QList<AccountInfo> getAccounts(const QString &deviceId, const QString &appName);
|
|
|
|
[[nodiscard]] static AccountInfo getAccountById(int accountId);
|
|
|
|
[[nodiscard]] static QList<AccountInfo> getAccountsByAppCode(const QString &appCode);
|
|
|
|
[[nodiscard]] static AccountInfo findAppAccount(
|
|
const QString &deviceId,
|
|
const QString &appName,
|
|
const QString &lastNumber
|
|
);
|
|
|
|
[[nodiscard]] static AccountInfo findByMaterialId(const QString &materialId);
|
|
|
|
[[nodiscard]] static QStringList getActiveMaterialIds();
|
|
|
|
[[nodiscard]] static QStringList getActiveMaterialIdsExcludingDevices(const QSet<QString> &excludeDevices);
|
|
};
|