diff options
| author | ilotterytea <iltsu@alright.party> | 2025-04-06 17:28:47 +0400 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-04-06 17:28:47 +0400 |
| commit | 2a49844a95593ac98e919c18651320e62f276fa7 (patch) | |
| tree | 01b7e2ebb1dc7a9ac92e7c3105edfd098271f29a /bot/src/schemas/user.hpp | |
| parent | a1a36cf4d4999b5ce89dce95364c9fd839b54b5d (diff) | |
feat: implementing lua coding
Diffstat (limited to 'bot/src/schemas/user.hpp')
| -rw-r--r-- | bot/src/schemas/user.hpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bot/src/schemas/user.hpp b/bot/src/schemas/user.hpp index 0bd1368..e9d7e0f 100644 --- a/bot/src/schemas/user.hpp +++ b/bot/src/schemas/user.hpp @@ -3,6 +3,7 @@ #include <chrono> #include <optional> #include <pqxx/pqxx> +#include <sol/sol.hpp> #include <string> #include "../utils/chrono.hpp" @@ -40,6 +41,8 @@ namespace bot::schemas { return this->opted_out_at; } + sol::table as_lua_table(std::shared_ptr<sol::state> luaState) const; + private: int id, alias_id; std::string alias_name; @@ -66,6 +69,8 @@ namespace bot::schemas { const PermissionLevel &get_level() const { return this->level; } void set_level(PermissionLevel level) { this->level = level; } + sol::table as_lua_table(std::shared_ptr<sol::state> luaState) const; + private: int id, user_id, channel_id; PermissionLevel level; |
