Wt examples  4.10.4
Public Member Functions | Public Attributes | List of all members
User Class Reference

#include <User.h>

Public Member Functions

template<class Action >
void persist (Action &a)
 

Public Attributes

std::string name
 
int gamesPlayed = 0
 
long long score = 0
 
Wt::WDateTime lastGame
 
dbo::weak_ptr< AuthInfoauthInfo
 

Detailed Description

Definition at line 24 of file User.h.

Member Function Documentation

◆ persist()

template<class Action >
void User::persist ( Action &  a)
inline

Definition at line 34 of file User.h.

35  {
36  dbo::field(a, gamesPlayed, "gamesPlayed");
37  dbo::field(a, score, "score");
38  dbo::field(a, lastGame, "lastGame");
39  dbo::hasOne(a, authInfo, "user");
40  }
dbo::weak_ptr< AuthInfo > authInfo
Definition: User.h:31
long long score
Definition: User.h:29
Wt::WDateTime lastGame
Definition: User.h:30
int gamesPlayed
Definition: User.h:28
void hasOne(Action &action, weak_ptr< C > &value, const std::string &name=std::string())
void field(Action &action, V &value, const std::string &name, int size=-1)

Member Data Documentation

◆ authInfo

dbo::weak_ptr<AuthInfo> User::authInfo

Definition at line 31 of file User.h.

◆ gamesPlayed

int User::gamesPlayed = 0

Definition at line 28 of file User.h.

◆ lastGame

Wt::WDateTime User::lastGame

Definition at line 30 of file User.h.

◆ name

std::string User::name

Definition at line 27 of file User.h.

◆ score

long long User::score = 0

Definition at line 29 of file User.h.


The documentation for this class was generated from the following file: