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.
263 lines
4.8 KiB
C++
263 lines
4.8 KiB
C++
#include "campdata.h"
|
|
#include <define.h>
|
|
|
|
QX_REGISTER_CPP_CAMP(CampData)
|
|
|
|
namespace qx {
|
|
template<> void register_class(QxClass<CampData>& t) {
|
|
t.setName("CampData");
|
|
t.id(&CampData::m_id, "id");
|
|
t.data(&CampData::m_numSer, "numSer");
|
|
t.data(&CampData::m_start, "start");
|
|
t.data(&CampData::m_end, "end");
|
|
t.data(&CampData::m_ownerFirstame, "ownerFirstame");
|
|
t.data(&CampData::m_ownerLastname, "ownerLastname");
|
|
t.data(&CampData::m_ownerAddress, "ownerAddress");
|
|
t.data(&CampData::m_totalPrice, "totalPrice");
|
|
t.data(&CampData::m_sale, "sale");
|
|
t.data(&CampData::m_fixedSale, "fixedSale");
|
|
t.data(&CampData::m_fullPrice, "fullPrice");
|
|
t.data(&CampData::m_totalSale, "totalSale");
|
|
t.data(&CampData::m_onVoucher, "onVoucher");
|
|
t.data(&CampData::m_createdBy, "createdBy");
|
|
t.data(&CampData::m_created, "created");
|
|
t.data(&CampData::m_updatedBy, "updatedBy");
|
|
t.data(&CampData::m_updated, "updated");
|
|
|
|
t.relationManyToOne(&CampData::m_season, "season");
|
|
t.relationOneToMany(&CampData::m_people, "people", "campData");
|
|
t.relationOneToMany(&CampData::m_services, "services", "campData");
|
|
}
|
|
}
|
|
|
|
CampData::CampData(QObject *parent) : QObject(parent)
|
|
{
|
|
m_id = 0;
|
|
m_totalPrice = 0;
|
|
m_sale = 0;
|
|
m_totalSale = 0;
|
|
m_fixedSale = false;
|
|
m_fullPrice = 0;
|
|
m_onVoucher = false;
|
|
}
|
|
|
|
long CampData::id() const
|
|
{
|
|
return m_id;
|
|
}
|
|
|
|
void CampData::setId(long id)
|
|
{
|
|
m_id = id;
|
|
}
|
|
|
|
QDate CampData::start() const
|
|
{
|
|
return m_start;
|
|
}
|
|
|
|
void CampData::setStart(const QDate &start)
|
|
{
|
|
m_start = start;
|
|
}
|
|
|
|
QDate CampData::end() const
|
|
{
|
|
return m_end;
|
|
}
|
|
|
|
void CampData::setEnd(const QDate &end)
|
|
{
|
|
m_end = end;
|
|
}
|
|
|
|
QString CampData::ownerFirstame() const
|
|
{
|
|
return m_ownerFirstame;
|
|
}
|
|
|
|
void CampData::setOwnerFirstame(const QString &ownerFirstame)
|
|
{
|
|
m_ownerFirstame = ownerFirstame;
|
|
}
|
|
|
|
QString CampData::ownerLastname() const
|
|
{
|
|
return m_ownerLastname;
|
|
}
|
|
|
|
void CampData::setOwnerLastname(const QString &ownerLastname)
|
|
{
|
|
m_ownerLastname = ownerLastname;
|
|
}
|
|
|
|
QString CampData::ownerAddress() const
|
|
{
|
|
return m_ownerAddress;
|
|
}
|
|
|
|
void CampData::setOwnerAddress(const QString &ownerAddress)
|
|
{
|
|
m_ownerAddress = ownerAddress;
|
|
}
|
|
|
|
QList<ServiceItemPtr> CampData::services() const
|
|
{
|
|
return m_services;
|
|
}
|
|
|
|
void CampData::setServices(const QList<QSharedPointer<ServiceItem> > &services)
|
|
{
|
|
m_services = services;
|
|
}
|
|
|
|
void CampData::addServiceItem(const ServiceItemPtr& serviceItem)
|
|
{
|
|
m_services.append(serviceItem);
|
|
}
|
|
|
|
void CampData::removeServiceItem(const ServiceItemPtr& serviceItem)
|
|
{
|
|
m_services.removeOne(serviceItem);
|
|
}
|
|
|
|
QList<AddressItemPtr> CampData::people() const
|
|
{
|
|
return m_people;
|
|
}
|
|
|
|
void CampData::setPeople(const QList<AddressItemPtr> &people)
|
|
{
|
|
m_people = people;
|
|
}
|
|
|
|
void CampData::addPerson(const AddressItemPtr& person)
|
|
{
|
|
m_people.append(person);
|
|
}
|
|
|
|
void CampData::removePerson(const AddressItemPtr& person)
|
|
{
|
|
m_people.removeOne(person);
|
|
}
|
|
|
|
QDecDouble CampData::totalPrice() const
|
|
{
|
|
return TO_DEC(m_totalPrice);
|
|
}
|
|
|
|
void CampData::setTotalPrice(QDecDouble totalPrice)
|
|
{
|
|
m_totalPrice = FROM_DEC(totalPrice);
|
|
}
|
|
|
|
SeasonPtr CampData::season() const
|
|
{
|
|
return m_season;
|
|
}
|
|
|
|
void CampData::setSeason(const SeasonPtr &season)
|
|
{
|
|
m_season = season;
|
|
}
|
|
|
|
QDecDouble CampData::sale() const
|
|
{
|
|
return TO_DEC(m_sale);
|
|
}
|
|
|
|
void CampData::setSale(QDecDouble sale)
|
|
{
|
|
m_sale = FROM_DEC(sale);
|
|
}
|
|
|
|
bool CampData::fixedSale() const
|
|
{
|
|
return m_fixedSale;
|
|
}
|
|
|
|
void CampData::setFixedSale(bool fixedSale)
|
|
{
|
|
m_fixedSale = fixedSale;
|
|
}
|
|
|
|
QString CampData::numSer() const
|
|
{
|
|
return m_numSer;
|
|
}
|
|
|
|
void CampData::setNumSer(const QString &numSer)
|
|
{
|
|
m_numSer = numSer;
|
|
}
|
|
|
|
QDecDouble CampData::totalSale() const
|
|
{
|
|
return TO_DEC(m_totalSale);
|
|
}
|
|
|
|
void CampData::setTotalSale(QDecDouble totalSale)
|
|
{
|
|
m_totalSale = FROM_DEC(totalSale);
|
|
}
|
|
|
|
QDecDouble CampData::fullPrice() const
|
|
{
|
|
return TO_DEC(m_fullPrice);
|
|
}
|
|
|
|
void CampData::setFullPrice(QDecDouble fullPrice)
|
|
{
|
|
m_fullPrice = FROM_DEC(fullPrice);
|
|
}
|
|
|
|
bool CampData::onVoucher() const
|
|
{
|
|
return m_onVoucher;
|
|
}
|
|
|
|
void CampData::setOnVoucher(bool onVoucher)
|
|
{
|
|
m_onVoucher = onVoucher;
|
|
}
|
|
|
|
QString CampData::createdBy() const
|
|
{
|
|
return m_createdBy;
|
|
}
|
|
|
|
void CampData::setCreatedBy(const QString &createdBy)
|
|
{
|
|
m_createdBy = createdBy;
|
|
}
|
|
|
|
QString CampData::updatedBy() const
|
|
{
|
|
return m_updatedBy;
|
|
}
|
|
|
|
void CampData::setUpdatedBy(const QString &updatedBy)
|
|
{
|
|
m_updatedBy = updatedBy;
|
|
}
|
|
|
|
QDateTime CampData::created() const
|
|
{
|
|
return m_created;
|
|
}
|
|
|
|
void CampData::setCreated(const QDateTime &created)
|
|
{
|
|
m_created = created;
|
|
}
|
|
|
|
QDateTime CampData::updated() const
|
|
{
|
|
return m_updated;
|
|
}
|
|
|
|
void CampData::setUpdated(const QDateTime &updated)
|
|
{
|
|
m_updated = updated;
|
|
}
|