some methods from templates/item.cpp moved to ItemContent

This commit is contained in:
2021-06-20 21:22:08 +02:00
parent 801fc062ef
commit ade96bf6d3
10 changed files with 261 additions and 118 deletions

View File

@@ -39,6 +39,42 @@ namespace Winix
{
Group::Group()
{
Clear();
}
void Group::fields()
{
field(L"id", id, morm::FT::no_insertable | morm::FT::no_updatable | morm::FT::primary_key);
field(L"name", name);
}
void Group::table()
{
table_name(L"core", L"group");
}
void Group::after_insert()
{
get_last_sequence_for_primary_key(L"core.group_id_seq", id);
}
void Group::Clear()
{
id = -1;
name.clear();
//members.clear();
}
bool Group::do_migration(int & current_table_version)
{
bool ok = true;