You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
1.3 KiB
C

#ifndef VOUCHERITEM_H
#define VOUCHERITEM_H
#include <QObject>
#include <QString>
#include <QDecDouble.hh>
#include <odb/core.hxx>
#include <enums.h>
#pragma db object
class VoucherItem : public QObject
{
Q_OBJECT
Q_PROPERTY(QString name READ name WRITE setName)
Q_PROPERTY(int count READ count WRITE setCount)
Q_PROPERTY(QDecDouble unitPrice READ unitPrice WRITE setUnitPrice)
Q_PROPERTY(QDecDouble price READ price WRITE setPrice)
Q_PROPERTY(Enums::VatType vatType READ vatType WRITE setVatType)
public:
explicit VoucherItem(QObject *parent = 0);
int id() const;
void setId(int id);
QString name() const;
void setName(const QString &name);
int count() const;
void setCount(int count);
QDecDouble unitPrice() const;
void setUnitPrice(QDecDouble unitPrice);
QDecDouble price() const;
void setPrice(QDecDouble price);
int refId() const;
void setRefId(int refId);
QString itemPlugin() const;
void setItemPlugin(const QString &itemPlugin);
Enums::VatType vatType() const;
void setVatType(const Enums::VatType &vatType);
private:
friend class odb::access;
#pragma db id auto
int m_id;
QString m_name;
int m_count;
int m_unitPrice;
int m_price;
int m_refId;
QString m_itemPlugin;
Enums::VatType m_vatType;
};
#endif // VOUCHERITEM_H