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.
		
		
		
		
		
			
		
			
				
	
	
		
			94 lines
		
	
	
		
			2.6 KiB
		
	
	
	
		
			C++
		
	
			
		
		
	
	
			94 lines
		
	
	
		
			2.6 KiB
		
	
	
	
		
			C++
		
	
#ifndef CAMPDATA_H
 | 
						|
#define CAMPDATA_H
 | 
						|
 | 
						|
#include "camp-data.h"
 | 
						|
#include <QObject>
 | 
						|
#include <QDate>
 | 
						|
#include <QDecDouble.hh>
 | 
						|
#include <odb/core.hxx>
 | 
						|
#include <odb/qt/list.hxx>
 | 
						|
 | 
						|
#include <data/season.h>
 | 
						|
 | 
						|
#pragma db object
 | 
						|
class CampData : public QObject
 | 
						|
{
 | 
						|
    Q_OBJECT
 | 
						|
    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)
 | 
						|
 | 
						|
public:
 | 
						|
    explicit CampData(QObject *parent = 0);
 | 
						|
 | 
						|
    int id() const;
 | 
						|
    void setId(int 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);
 | 
						|
 | 
						|
    QOdbList<QSharedPointer<ServiceItem> > services() const;
 | 
						|
    void setServices(const QOdbList<QSharedPointer<ServiceItem> > &services);
 | 
						|
    void addServiceItem(ServiceItemPtr serviceItem);
 | 
						|
    void removeServiceItem(ServiceItemPtr serviceItem);
 | 
						|
 | 
						|
    QOdbList<AddressItemPtr> people() const;
 | 
						|
    void setPeople(const QOdbList<AddressItemPtr> &people);
 | 
						|
    void addPerson(AddressItemPtr person);
 | 
						|
    void removePerson(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);
 | 
						|
 | 
						|
private:
 | 
						|
    friend class odb::access;
 | 
						|
#pragma db id auto
 | 
						|
    int 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;
 | 
						|
    int m_totalPrice;
 | 
						|
    int m_sale;
 | 
						|
    bool m_fixedSale;
 | 
						|
    SeasonPtr m_season;
 | 
						|
};
 | 
						|
 | 
						|
#endif // CAMPDATA_H
 |