#ifndef COMMODITYTYPEDATA_H #define COMMODITYTYPEDATA_H #include #include #include #include #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