Database System 0.1.0
Advanced C++20 Database System with Multi-Backend Support
Loading...
Searching...
No Matches
TestUser Class Reference
Inheritance diagram for TestUser:
Inheritance graph
Collaboration diagram for TestUser:
Collaboration graph

Public Member Functions

 TestUser ()=default
 
std::string table_name () const override
 
const entity_metadataget_metadata () const override
 
bool save () override
 
bool load () override
 
bool update () override
 
bool remove () override
 
- Public Member Functions inherited from database::orm::entity_base
virtual ~entity_base ()=default
 

Public Attributes

int64_t id = 0
 
std::string username
 
std::string email
 
bool is_active = true
 

Additional Inherited Members

- Protected Member Functions inherited from database::orm::entity_base
 entity_base ()=default
 

Detailed Description

Definition at line 110 of file unit_tests.cpp.

Constructor & Destructor Documentation

◆ TestUser()

TestUser::TestUser ( )
default

Member Function Documentation

◆ get_metadata()

const entity_metadata & TestUser::get_metadata ( ) const
inlineoverridevirtual

Implements database::orm::entity_base.

Definition at line 122 of file unit_tests.cpp.

122 {
123 static entity_metadata metadata("test_users");
124 return metadata;
125 }
Metadata for entire entities including table mapping and relationships.
Definition entity.h:118

Referenced by TEST_F().

Here is the caller graph for this function:

◆ load()

bool TestUser::load ( )
inlineoverridevirtual

Implements database::orm::entity_base.

Definition at line 132 of file unit_tests.cpp.

132 {
133 // Mock implementation
134 return true;
135 }

◆ remove()

bool TestUser::remove ( )
inlineoverridevirtual

Implements database::orm::entity_base.

Definition at line 142 of file unit_tests.cpp.

142 {
143 // Mock implementation
144 return true;
145 }

◆ save()

bool TestUser::save ( )
inlineoverridevirtual

Implements database::orm::entity_base.

Definition at line 127 of file unit_tests.cpp.

127 {
128 // Mock implementation
129 return true;
130 }

Referenced by TEST_F().

Here is the caller graph for this function:

◆ table_name()

std::string TestUser::table_name ( ) const
inlineoverridevirtual

Implements database::orm::entity_base.

Definition at line 120 of file unit_tests.cpp.

120{ return "test_users"; }

Referenced by TEST_F().

Here is the caller graph for this function:

◆ update()

bool TestUser::update ( )
inlineoverridevirtual

Implements database::orm::entity_base.

Definition at line 137 of file unit_tests.cpp.

137 {
138 // Mock implementation
139 return true;
140 }

Member Data Documentation

◆ email

std::string TestUser::email

Definition at line 114 of file unit_tests.cpp.

Referenced by TEST_F().

◆ id

int64_t TestUser::id = 0

Definition at line 112 of file unit_tests.cpp.

◆ is_active

bool TestUser::is_active = true

Definition at line 115 of file unit_tests.cpp.

Referenced by TEST_F().

◆ username

std::string TestUser::username

Definition at line 113 of file unit_tests.cpp.

Referenced by TEST_F().


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