some methods from templates/item.cpp moved to ItemContent
This commit is contained in:
@@ -53,36 +53,13 @@ public:
|
||||
std::wstring name; // group name
|
||||
//std::vector<long> members; // users id
|
||||
|
||||
Group()
|
||||
{
|
||||
Clear();
|
||||
}
|
||||
Group();
|
||||
|
||||
void fields();
|
||||
void table();
|
||||
void after_insert();
|
||||
|
||||
void fields()
|
||||
{
|
||||
field(L"id", id, morm::FT::no_insertable | morm::FT::no_updatable | morm::FT::primary_key);
|
||||
field(L"name", name);
|
||||
}
|
||||
|
||||
void table()
|
||||
{
|
||||
table_name(L"core", L"group");
|
||||
}
|
||||
|
||||
void after_insert()
|
||||
{
|
||||
get_last_sequence_for_primary_key(L"core.group_id_seq", id);
|
||||
}
|
||||
|
||||
|
||||
void Clear()
|
||||
{
|
||||
id = -1;
|
||||
name.clear();
|
||||
//members.clear();
|
||||
}
|
||||
|
||||
void Clear();
|
||||
|
||||
bool do_migration(int & current_table_version);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user