-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhyper_column.h
More file actions
40 lines (32 loc) · 921 Bytes
/
hyper_column.h
File metadata and controls
40 lines (32 loc) · 921 Bytes
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
//
// Created by PengPremium on 17/3/5.
//
#ifndef HYPERNATE_COLUMN_H
#define HYPERNATE_COLUMN_H
#include <json.hpp>
#include <string>
namespace hypernate
{
using std::string;
using nlohmann::json;
class hyper_column {
public:
hyper_column(const json& column_config);
string field_name; // name in object
string column_name; // name in database
inline const string get_database_type() { return database_type; }
inline const string get_object_type() { return object_type; }
inline bool is_primary_column() { return is_primary; }
inline bool is_one_to_one_column() { return is_one2one; }
inline bool is_many_to_one_column() { return is_many2one; }
inline bool is_one_to_many_column() { return is_one2many; }
private:
bool is_primary;
string database_type;
string object_type;
bool is_one2one;
bool is_many2one;
bool is_one2many;
};
}
#endif //HYPERNATE_COLUMN_H