#ifndef PERSONPRICE_H #define PERSONPRICE_H #include #include #include #pragma db object class PersonPrice : public QObject { Q_OBJECT Q_PROPERTY(QString description READ description WRITE setDescription) Q_PROPERTY(int fromAge READ fromAge WRITE setFromAge) Q_PROPERTY(int toAge READ toAge WRITE setToAge) Q_PROPERTY(QDecDouble price READ price WRITE setPrice) Q_PROPERTY(bool active READ active WRITE setActive) public: explicit PersonPrice(QObject *parent = 0); int id() const; void setId(int id); QString description() const; void setDescription(const QString &description); int fromAge() const; void setFromAge(int fromAge); int toAge() const; void setToAge(int toAge); QDecDouble price() const; void setPrice(QDecDouble price); bool active() const; void setActive(bool active); private: friend class odb::access; #pragma db id auto int m_id; QString m_description; int m_fromAge; int m_toAge; int m_price; bool m_active; }; #endif // PERSONPRICE_H