forked from inderpreetsingh/LBE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuser.h
46 lines (34 loc) · 726 Bytes
/
user.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/**
User.h file for creating a presistence class for User and mapping authinfo with user.
*/
#ifndef USER_H_
#define USER_H_
#include <Wt/Dbo/Dbo>
#include <Wt/Auth/Dbo/AuthInfo>
/**
Wt::Dbo is a C++ ORM for making database driven applications with Witty
*/
namespace dbo = Wt::Dbo;
class User;
/**
mapping AuthInfo with our User Class and for the ease referring it to as AuthInfo
*/
typedef Wt::Auth::Dbo::AuthInfo<User> AuthInfo;
/**
Definition of class User
*/
class User {
private:
std::string name;
public:
/**
adding a persist function, persist function is used to create tables in database,
*/
User();
template <class Action>
void persist(Action& a)
{
dbo::field(a, name, "name" );
}
};
#endif