#ifndef FAVORITITEM_H #define FAVORITITEM_H #include #include #include #include #include #include #include class IShopItem; #pragma db object class FavoritItem : public QObject, public IShopItem { Q_OBJECT Q_PROPERTY(int id READ id WRITE setId) Q_PROPERTY(int refId READ refId WRITE setRefId) Q_PROPERTY(QString name READ name WRITE setName) Q_PROPERTY(QDecDouble unitPrice READ unitPrice WRITE setUnitPrice) Q_PROPERTY(Enums::VatType vatType READ vatType WRITE setVatType) Q_PROPERTY(QString pluginId READ pluginId WRITE setPluginId) Q_PROPERTY(QString favButtonName READ favButtonName WRITE setFavButtonName) public: FavoritItem(); // IShopItem interface public: int id() override; void setId(int id); QString name() override; void setName(const QString &name); QDecDouble unitPrice() override; void setUnitPrice(QDecDouble unitPrice); Enums::VatType vatType() override; void setVatType(const Enums::VatType &vatType); QString pluginId() override; void setPluginId(const QString &pluginId); QString favButtonName() const; void setFavButtonName(const QString &favButtonName); int refId() const; void setRefId(int refId); private: friend class odb::access; #pragma db id auto int m_id; int m_refId; QString m_name; int m_unitPrice; Enums::VatType m_vatType; QString m_pluginId; QString m_favButtonName; }; typedef QSharedPointer FavoritItemPtr; #endif // FAVORITITEM_H