#ifndef CAMPSERVICE_H #define CAMPSERVICE_H #include #include #include #include #include "data/camp-data.h" #include "settings/campsettings.h" class CampService : public Service, public ISellableService { public: CampService(); void addPerson(const CampDataPtr& data, const AddressbookDataPtr& address); void addService(const CampDataPtr& data, const AccServicePtr& service); void addService(CampDataPtr data, AccServicePtr service, QDecDouble price, const QString& description); void setOwner(const CampDataPtr& data, const AddressItemPtr& person); CampDataPtr create(); void calculate(const CampDataPtr& data); void saveCamp(const CampDataPtr& data); //void updateCamp(CampDataPtr data); //void eraseCamp(CampDataPtr data); //void loadItems(CampDataPtr data); QList allForSeason(); private: ServiceItemPtr addServiceInt(const CampDataPtr& data, const AccServicePtr& service); void calcPeople(CampDataPtr data); void calcServices(const CampDataPtr& data); void calcPrice(const CampDataPtr& data); void addAccFee(const CampDataPtr& data, const AddressItemPtr& item, int startAge, int endAge, int days); CampSettingsPtr m_settings; ISeller *m_seller; // ISellableService interface public: QList shopItems(const QString& category = "") override; IShopItemPtr shopItem(int itemId) override; void addedToVoucher(int itemId, int countAdded) override; ISeller *seller() override; }; #endif // CAMPSERVICE_H