Initial commit
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
#ifndef REFUNDS_REPOSITORY_H
|
||||
#define REFUNDS_REPOSITORY_H
|
||||
|
||||
#include "base_sql_table_repository.h"
|
||||
#include "refunds_repository_interface.h"
|
||||
|
||||
#include <QSqlDatabase>
|
||||
|
||||
class RefundsRepository : public RefundsRepositoryInterface,
|
||||
public BaseSqlTableRepository {
|
||||
public:
|
||||
explicit RefundsRepository(QSqlDatabase &database, QObject *parent);
|
||||
|
||||
// CRUD operations
|
||||
// clang-format off
|
||||
|
||||
RepositoryResult
|
||||
createRefund(const CreateRefundRequest &request) override;
|
||||
|
||||
RepositoryResult
|
||||
getRefundById(qint32 refundId, RefundDTO &refund) const override;
|
||||
|
||||
RepositoryResult
|
||||
getAllRefunds(QVector<RefundDTO> &refunds) const override;
|
||||
|
||||
RepositoryResult
|
||||
updateRefund(const UpdateRefundRequest &request) override;
|
||||
|
||||
RepositoryResult
|
||||
deleteRefundById(qint32 refundId) override;
|
||||
|
||||
// clang-format on
|
||||
private:
|
||||
RefundDTO mapQueryToDTO(const QSqlQuery &query) const;
|
||||
};
|
||||
|
||||
#endif // REFUNDS_REPOSITORY_H
|
||||
Reference in New Issue
Block a user