#ifndef VOUCHERITEM_H #define VOUCHERITEM_H #include #include #include #include #include #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(int refId READ refId WRITE setRefId) Q_PROPERTY(QString itemPlugin READ itemPlugin WRITE setItemPlugin) 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