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.

51 lines
1.1 KiB
C

#ifndef PERSONPRICE_H
#define PERSONPRICE_H
#include <QObject>
#include <QDecDouble.hh>
#include <odb/core.hxx>
#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