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.
37 lines
662 B
C++
37 lines
662 B
C++
#ifndef COMMODITYTYPEDATA_H
|
|
#define COMMODITYTYPEDATA_H
|
|
|
|
#include <QObject>
|
|
#include <QString>
|
|
#include <odb/core.hxx>
|
|
#include <data/comboitem.h>
|
|
|
|
#pragma db object
|
|
class CommodityTypeData :public ComboItem
|
|
{
|
|
Q_OBJECT
|
|
Q_PROPERTY(QString name READ name WRITE setName)
|
|
|
|
public:
|
|
CommodityTypeData(QObject *parent = 0);
|
|
|
|
int id() const;
|
|
void setId(int id);
|
|
|
|
QString name() const;
|
|
void setName(const QString &name);
|
|
|
|
private:
|
|
friend class odb::access;
|
|
#pragma db id auto
|
|
int m_id;
|
|
QString m_name;
|
|
|
|
// ComboItem interface
|
|
public:
|
|
bool eq(ComboItem *other);
|
|
QString toString();
|
|
};
|
|
|
|
#endif // COMMODITYTYPEDATA_H
|