45 lines
992 B
C++
45 lines
992 B
C++
#ifndef INVENTORY_CATEGORY_HH_
|
|
#define INVENTORY_CATEGORY_HH_
|
|
#include "dbcontainer.hh"
|
|
#include "dbobjectvec.hh"
|
|
#include "dbobjectptr.hh"
|
|
#include "dbobject.hh"
|
|
#include "dbfield.hh"
|
|
#include "dbassocobject.hh"
|
|
|
|
namespace inventory {
|
|
namespace db {
|
|
class DBSession;
|
|
}
|
|
|
|
namespace datamodel {
|
|
class Item;
|
|
class Category : public DBAssocHierarchicalObject<Item, Category> {
|
|
public:
|
|
static const char *sc_table;
|
|
static const char *sc_view;
|
|
static const char *sc_membership_table;
|
|
static const char *sc_dbclass;
|
|
|
|
DBString<Category> description;
|
|
DBBlob<Category> symbol;
|
|
|
|
Category()
|
|
: description(this, &desc_desc),
|
|
symbol(this, &symbol_desc) {}
|
|
|
|
static void create_tables(db::DBSession &session);
|
|
static void validate_tables(db::DBSession &session);
|
|
static void remove_tables(db::DBSession &session);
|
|
|
|
private:
|
|
static const struct DBRecordElementDesc desc_desc;
|
|
static const struct DBRecordElementDesc symbol_desc;
|
|
};
|
|
|
|
}
|
|
}
|
|
|
|
#include "category_impl.hh"
|
|
#endif
|