2024-07-10 22:37:40 +08:00
|
|
|
#ifndef __HOMEBOX_H__
|
|
|
|
#define __HOMEBOX_H__
|
|
|
|
|
2024-11-26 22:58:54 +08:00
|
|
|
#include <Wt/Dbo/Dbo.h>
|
2024-07-10 22:37:40 +08:00
|
|
|
#include <string>
|
|
|
|
|
2024-11-26 22:58:54 +08:00
|
|
|
namespace HomeBox {
|
|
|
|
class Item {
|
2024-07-10 22:37:40 +08:00
|
|
|
public:
|
2024-11-26 22:58:54 +08:00
|
|
|
std::string name;
|
|
|
|
std::string location;
|
|
|
|
int cost;
|
2024-07-10 22:37:40 +08:00
|
|
|
|
2024-11-26 22:58:54 +08:00
|
|
|
template <class Action>
|
|
|
|
void persist(Action &a) {
|
|
|
|
Wt::Dbo::field(a, name, "name");
|
|
|
|
Wt::Dbo::field(a, location, "location");
|
|
|
|
Wt::Dbo::field(a, cost, "cost");
|
|
|
|
}
|
2024-07-10 22:37:40 +08:00
|
|
|
};
|
2024-11-26 22:58:54 +08:00
|
|
|
} // namespace HomeBox
|
2024-07-10 22:37:40 +08:00
|
|
|
|
|
|
|
#endif // __HOMEBOX_H__
|