#ifndef CAMPDATA_H #define CAMPDATA_H #include "camp-data.h" #include #include #include #include #include "../camp_global.h" class CampData : public QObject { Q_OBJECT QX_REGISTER_FRIEND_CLASS(CampData) Q_PROPERTY(QString numSer READ numSer WRITE setNumSer) Q_PROPERTY(QDate start READ start WRITE setStart) Q_PROPERTY(QDate end READ end WRITE setEnd) Q_PROPERTY(QString ownerFirstame READ ownerFirstame WRITE setOwnerFirstame) Q_PROPERTY(QString ownerLastname READ ownerLastname WRITE setOwnerLastname) Q_PROPERTY(QString ownerAddress READ ownerAddress WRITE setOwnerAddress) Q_PROPERTY(QDecDouble totalPrice READ totalPrice WRITE setTotalPrice) Q_PROPERTY(QDecDouble sale READ sale WRITE setSale) Q_PROPERTY(bool fixedSale READ fixedSale WRITE setFixedSale) Q_PROPERTY(QDecDouble totalSale READ totalSale WRITE setTotalSale) Q_PROPERTY(bool onVoucher READ onVoucher WRITE setOnVoucher) Q_PROPERTY(QString createdBy READ createdBy WRITE setCreatedBy) Q_PROPERTY(QString updatedBy READ updatedBy WRITE setUpdatedBy) Q_PROPERTY(QDateTime created READ created WRITE setCreated) Q_PROPERTY(QDateTime updated READ updated WRITE setUpdated) public: explicit CampData(QObject *parent = nullptr); long id() const; void setId(long id); QDate start() const; void setStart(const QDate &start); QDate end() const; void setEnd(const QDate &end); QString ownerFirstame() const; void setOwnerFirstame(const QString &ownerFirstame); QString ownerLastname() const; void setOwnerLastname(const QString &ownerLastname); QString ownerAddress() const; void setOwnerAddress(const QString &ownerAddress); QList services() const; void setServices(const QList &services); void addServiceItem(const ServiceItemPtr& serviceItem); void removeServiceItem(const ServiceItemPtr& serviceItem); QList people() const; void setPeople(const QList &people); void addPerson(const AddressItemPtr& person); void removePerson(const AddressItemPtr& person); QDecDouble totalPrice() const; void setTotalPrice(QDecDouble totalPrice); SeasonPtr season() const; void setSeason(const SeasonPtr &season); QDecDouble sale() const; void setSale(QDecDouble sale); bool fixedSale() const; void setFixedSale(bool fixedSale); QString numSer() const; void setNumSer(const QString &numSer); QDecDouble totalSale() const; void setTotalSale(QDecDouble totalSale); QDecDouble fullPrice() const; void setFullPrice(QDecDouble fullPrice); bool onVoucher() const; void setOnVoucher(bool onVoucher); QString createdBy() const; void setCreatedBy(const QString &createdBy); QString updatedBy() const; void setUpdatedBy(const QString &updatedBy); QDateTime created() const; void setCreated(const QDateTime &created); QDateTime updated() const; void setUpdated(const QDateTime &updated); private: long m_id; QString m_numSer; QDate m_start; QDate m_end; QString m_ownerFirstame; QString m_ownerLastname; QString m_ownerAddress; QList m_services; QList m_people; int m_fullPrice; int m_totalPrice; int m_sale; int m_totalSale; bool m_fixedSale; SeasonPtr m_season; bool m_onVoucher; QString m_createdBy; QString m_updatedBy; QDateTime m_created; QDateTime m_updated; }; QX_REGISTER_HPP_CAMP(CampData, QObject, 0) #endif // CAMPDATA_H