#include "campdata.h"
#include <define.h>

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;
}

int CampData::id() const
{
    return m_id;
}

void CampData::setId(int 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;
}

QOdbList<ServiceItemPtr> CampData::services() const
{
    return m_services;
}

void CampData::setServices(const QOdbList<QSharedPointer<ServiceItem> > &services)
{
    m_services = services;
}

void CampData::addServiceItem(ServiceItemPtr serviceItem)
{
    m_services.append(serviceItem);
}

void CampData::removeServiceItem(ServiceItemPtr serviceItem)
{
    m_services.removeOne(serviceItem);
}

QOdbList<AddressItemPtr> CampData::people() const
{
    return m_people;
}

void CampData::setPeople(const QOdbList<AddressItemPtr> &people)
{
    m_people = people;
}

void CampData::addPerson(AddressItemPtr person)
{
    m_people.append(person);
}

void CampData::removePerson(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;
}
