#ifndef ACCSERVICE_H #define ACCSERVICE_H #include #include #include #include #include #pragma db object class AccService : public QObject { Q_OBJECT Q_PROPERTY(QString accServiceName READ accServiceName WRITE setAccServiceName) Q_PROPERTY(QString accServiceCode READ accServiceCode WRITE setAccServiceCode) Q_PROPERTY(QDecDouble price READ price WRITE setPrice) Q_PROPERTY(bool active READ active WRITE setActive) Q_PROPERTY(bool salePossible READ salePossible WRITE setSalePossible) Q_PROPERTY(ServiceType serviceType READ serviceType WRITE setServiceType) Q_ENUMS(ServiceType) Q_PROPERTY(Enums::VatType vatType READ vatType WRITE setVatType) public: AccService(QObject *parent = 0); enum ServiceType { CAR,TENT,OTHER }; int id() const; void setId(int id); QDecDouble price() const; void setPrice(QDecDouble price); bool active() const; void setActive(bool active); bool salePossible() const; void setSalePossible(bool salePossible); ServiceType serviceType() const; void setServiceType(const ServiceType &serviceType); QString accServiceName() const; void setAccServiceName(const QString &accServiceName); QString accServiceCode() const; void setAccServiceCode(const QString &accServiceCode); Enums::VatType vatType() const; void setVatType(const Enums::VatType &vatType); private: friend class odb::access; #pragma db id auto int m_id; QString m_accServiceName; int m_price; bool m_active; bool m_salePossible; ServiceType m_serviceType; QString m_accServiceCode; Enums::VatType m_vatType; }; #endif // ACCSERVICE_H