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.
75 lines
1.9 KiB
C++
75 lines
1.9 KiB
C++
#ifndef ACCSERVICE_H
|
|
#define ACCSERVICE_H
|
|
|
|
#include <QObject>
|
|
#include <QString>
|
|
#include <QDecDouble.hh>
|
|
#include <QSharedPointer>
|
|
#include <QtCore/qglobal.h>
|
|
#include <QxOrm.h>
|
|
|
|
#include <enums.h>
|
|
#include "../services_global.h"
|
|
|
|
class SERVICESSHARED_EXPORT AccService : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
QX_REGISTER_FRIEND_CLASS(AccService)
|
|
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_PROPERTY(Enums::VatType vatType READ vatType WRITE setVatType)
|
|
|
|
public:
|
|
explicit AccService(QObject *parent = nullptr);
|
|
|
|
enum ServiceType { CAR,TENT,OTHER,ACCFEE };
|
|
Q_ENUM(ServiceType)
|
|
|
|
long id() const;
|
|
void setId(long 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:
|
|
long m_id{0};
|
|
QString m_accServiceName;
|
|
int m_price{0};
|
|
bool m_active{true};
|
|
bool m_salePossible{false};
|
|
ServiceType m_serviceType{OTHER};
|
|
QString m_accServiceCode;
|
|
Enums::VatType m_vatType{Enums::NONE};
|
|
|
|
};
|
|
|
|
typedef QSharedPointer<AccService> AccServicePtr;
|
|
|
|
QX_REGISTER_HPP_SERVICE(AccService, QObject, 0)
|
|
|
|
#endif // ACCSERVICE_H
|