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.
41 lines
801 B
C
41 lines
801 B
C
8 years ago
|
#ifndef SALE_H
|
||
|
#define SALE_H
|
||
|
|
||
|
#include <QObject>
|
||
|
#include <odb/core.hxx>
|
||
|
#include <QDecDouble.hh>
|
||
|
|
||
|
#pragma db object
|
||
|
class Sale : public QObject
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
Q_PROPERTY(QString description READ description WRITE setDescription)
|
||
|
Q_PROPERTY(QDecDouble sale READ sale WRITE setSale)
|
||
|
Q_PROPERTY(bool fixed READ fixed WRITE setFixed)
|
||
|
|
||
|
public:
|
||
|
explicit Sale(QObject *parent = 0);
|
||
|
|
||
|
int id() const;
|
||
|
void setId(int id);
|
||
|
|
||
|
QDecDouble sale() const;
|
||
|
void setSale(QDecDouble sale);
|
||
|
|
||
|
bool fixed() const;
|
||
|
void setFixed(bool fixed);
|
||
|
|
||
|
QString description() const;
|
||
|
void setDescription(const QString &description);
|
||
|
|
||
|
private:
|
||
|
friend class odb::access;
|
||
|
#pragma db id auto
|
||
|
int m_id;
|
||
|
QString m_description;
|
||
|
int m_sale;
|
||
|
bool m_fixed;
|
||
|
};
|
||
|
|
||
|
#endif // SALE_H
|