Build system changed to Cmake, ORM changed to QxORM, Qt6 compatibility.
This commit is contained in:
+20
-22
@@ -5,15 +5,15 @@
|
||||
#include <QObject>
|
||||
#include <QDate>
|
||||
#include <QDecDouble.hh>
|
||||
#include <odb/core.hxx>
|
||||
#include <odb/qt/list.hxx>
|
||||
|
||||
#include <data/season.h>
|
||||
|
||||
#pragma db object
|
||||
#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)
|
||||
@@ -31,10 +31,10 @@ class CampData : public QObject
|
||||
Q_PROPERTY(QDateTime updated READ updated WRITE setUpdated)
|
||||
|
||||
public:
|
||||
explicit CampData(QObject *parent = 0);
|
||||
explicit CampData(QObject *parent = nullptr);
|
||||
|
||||
int id() const;
|
||||
void setId(int id);
|
||||
long id() const;
|
||||
void setId(long id);
|
||||
|
||||
QDate start() const;
|
||||
void setStart(const QDate &start);
|
||||
@@ -51,15 +51,15 @@ public:
|
||||
QString ownerAddress() const;
|
||||
void setOwnerAddress(const QString &ownerAddress);
|
||||
|
||||
QOdbList<QSharedPointer<ServiceItem> > services() const;
|
||||
void setServices(const QOdbList<QSharedPointer<ServiceItem> > &services);
|
||||
void addServiceItem(ServiceItemPtr serviceItem);
|
||||
void removeServiceItem(ServiceItemPtr serviceItem);
|
||||
QList<ServiceItemPtr> services() const;
|
||||
void setServices(const QList<ServiceItemPtr> &services);
|
||||
void addServiceItem(const ServiceItemPtr& serviceItem);
|
||||
void removeServiceItem(const ServiceItemPtr& serviceItem);
|
||||
|
||||
QOdbList<AddressItemPtr> people() const;
|
||||
void setPeople(const QOdbList<AddressItemPtr> &people);
|
||||
void addPerson(AddressItemPtr person);
|
||||
void removePerson(AddressItemPtr person);
|
||||
QList<AddressItemPtr> people() const;
|
||||
void setPeople(const QList<AddressItemPtr> &people);
|
||||
void addPerson(const AddressItemPtr& person);
|
||||
void removePerson(const AddressItemPtr& person);
|
||||
|
||||
QDecDouble totalPrice() const;
|
||||
void setTotalPrice(QDecDouble totalPrice);
|
||||
@@ -98,19 +98,15 @@ public:
|
||||
void setUpdated(const QDateTime &updated);
|
||||
|
||||
private:
|
||||
friend class odb::access;
|
||||
#pragma db id auto
|
||||
int m_id;
|
||||
long m_id;
|
||||
QString m_numSer;
|
||||
QDate m_start;
|
||||
QDate m_end;
|
||||
QString m_ownerFirstame;
|
||||
QString m_ownerLastname;
|
||||
QString m_ownerAddress;
|
||||
#pragma db value_not_null inverse(m_campData)
|
||||
QOdbList<ServiceItemPtr> m_services;
|
||||
#pragma db value_not_null inverse(m_campData)
|
||||
QOdbList<AddressItemPtr> m_people;
|
||||
QList<ServiceItemPtr> m_services;
|
||||
QList<AddressItemPtr> m_people;
|
||||
int m_fullPrice;
|
||||
int m_totalPrice;
|
||||
int m_sale;
|
||||
@@ -124,4 +120,6 @@ private:
|
||||
QDateTime m_updated;
|
||||
};
|
||||
|
||||
QX_REGISTER_HPP_CAMP(CampData, QObject, 0)
|
||||
|
||||
#endif // CAMPDATA_H
|
||||
|
||||
Reference in New Issue
Block a user