46 #ifndef __WTX_SYS_USER_TEMPLATE_H_234e0174_6b7d_11e8_b503_fb1ef3651ec0__ 47 #define __WTX_SYS_USER_TEMPLATE_H_234e0174_6b7d_11e8_b503_fb1ef3651ec0__ 49 #include <Wt/Auth/Dbo/AuthInfo.h> 51 #include <Wtx/Dbo/PermissionItemTpl.h> 52 #include <Wtx/Sys/Group/Item.h> 53 #include "Definition.h" 64 Template(
const std::string & key =
"",
const std::string & cfy =
"" )
117 Wt::Dbo::collection< Wt::Dbo::ptr<Wtx::Sys::Group::Item> > & inGroup() {
return m_inGroup; }
118 const Wt::Dbo::collection< Wt::Dbo::ptr<Wtx::Sys::Group::Item> > & inGroup()
const {
return m_inGroup; }
120 #ifdef WTX_USING_USERAUTH 121 Wt::Dbo::weak_ptr< Wt::Auth::Dbo::AuthInfo<C> > authInfo() {
return m_authInfo; }
122 const Wt::Dbo::weak_ptr< Wt::Auth::Dbo::AuthInfo<C> > authInfo()
const {
return m_authInfo; }
125 template<
class Action>
void persist( Action &a )
128 m_firstName .persist( a, &TableDef(). FirstNameFieldDef );
129 m_lastName .persist( a, &TableDef(). LastNameFieldDef );
130 m_middleName .persist( a, &TableDef(). MiddleNameFieldDef );
131 m_nickName .persist( a, &TableDef(). NicknameFieldDef );
132 m_abbreviation .persist( a, &TableDef(). AbbreviationFieldDef );
133 m_alias .persist( a, &TableDef(). AliasFieldDef );
134 m_phone .persist( a, &TableDef(). PhoneFieldDef );
135 m_mobile .persist( a, &TableDef(). MobileFieldDef );
136 m_email .persist( a, &TableDef(). EmailFieldDef );
137 m_alert .persist( a, &TableDef(). AlertFieldDef );
138 m_groups .persist( a, &TableDef(). GroupsFieldDef );
139 m_storage .persist( a, &TableDef(). StorageFieldDef );
140 m_notes .persist( a, &TableDef(). NotesFieldDef );
142 #ifdef WTX_USING_USERAUTH 143 Wt::Dbo::hasOne( a, m_authInfo,
"user" );
146 Wt::Dbo::hasMany( a, m_inGroup, Wt::Dbo::RelationType::ManyToMany,
"zcUserGroup" );
165 Wt::Dbo::collection< Wt::Dbo::ptr<Wtx::Sys::Group::Item> > m_inGroup;
167 #ifdef WTX_USING_USERAUTH 168 Wt::Dbo::weak_ptr< Wt::Auth::Dbo::AuthInfo<C> > m_authInfo;