#ifndef EEDB_USER_H
#define EEDB_USER_H

#include <sqlpp11/table.h>
#include <sqlpp11/char_sequence.h>
#include <sqlpp11/column_types.h>

namespace eedb {

	namespace user_ {

		struct Uid {
			struct _alias_t {
				static constexpr const char _literal[] = R"("uid")";
				using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
				template<typename T>
					struct _member_t {
						T uid;
						T &operator()() { return uid; }
						const T &operator()() const { return uid; }
					};
			};

			using _traits = ::sqlpp::make_traits<::sqlpp::integer, sqlpp::tag::must_not_insert, sqlpp::tag::must_not_update>;
		};

		struct Group {
			struct _alias_t {
				static constexpr const char _literal[] = R"("group")";
				using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
				template<typename T>
					struct _member_t {
						T group;
						T &operator()() { return group; }
						const T &operator()() const { return group; }
					};
			};

			using _traits = ::sqlpp::make_traits<::sqlpp::integer>;
		};

		struct Status {
			struct _alias_t {
				static constexpr const char _literal[] = R"("status")";
				using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
				template<typename T>
					struct _member_t {
						T status;
						T &operator()() { return status; }
						const T &operator()() const { return status; }
					};
			};

			using _traits = ::sqlpp::make_traits<::sqlpp::integer>;
		};

		struct Full_name {
			struct _alias_t {
				static constexpr const char _literal[] = R"("full_name")";
				using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
				template<typename T>
					struct _member_t {
						T full_name;
						T &operator()() { return full_name; }
						const T &operator()() const { return full_name; }
					};
			};

			using _traits = ::sqlpp::make_traits<::sqlpp::text, sqlpp::tag::require_insert>;
		};

		struct Created {
			struct _alias_t {
				static constexpr const char _literal[] = R"("created")";
				using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
				template<typename T>
					struct _member_t {
						T created;
						T &operator()() { return created; }
						const T &operator()() const { return created; }
					};
			};

			using _traits = ::sqlpp::make_traits<::sqlpp::time_point>;
		};

		struct Updated {
			struct _alias_t {
				static constexpr const char _literal[] = R"("updated")";
				using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
				template<typename T>
					struct _member_t {
						T updated;
						T &operator()() { return updated; }
						const T &operator()() const { return updated; }
					};
			};

			using _traits = ::sqlpp::make_traits<::sqlpp::time_point, sqlpp::tag::can_be_null>;
		};

		struct Config {
			struct _alias_t {
				static constexpr const char _literal[] = R"("config")";
				using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
				template<typename T>
					struct _member_t {
						T config;
						T &operator()() { return config; }
						const T &operator()() const { return config; }
					};
			};

			using _traits = ::sqlpp::make_traits<::sqlpp::text>;
		};

		struct Auth_info_id {
			struct _alias_t {
				static constexpr const char _literal[] = R"("auth_info_id")";
				using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
				template<typename T>
					struct _member_t {
						T auth_info_id;
						T &operator()() { return auth_info_id; }
						const T &operator()() const { return auth_info_id; }
					};
			};

			using _traits = ::sqlpp::make_traits<::sqlpp::bigint, sqlpp::tag::can_be_null>;
		};
	}

	struct user : sqlpp::table_t<user,
				user_::Uid,
				user_::Group,
				user_::Status,
				user_::Full_name,
				user_::Created,
				user_::Updated,
				user_::Config,
				user_::Auth_info_id> {
		using _value_type = sqlpp::no_value_t;
		struct _alias_t {
			static constexpr const char _literal[] = R"("user")";
			using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
			template<typename T>
				struct _member_t {
					T user;
					T &operator()() { return user; }
					const T &operator()() const { return user; }
				};
		};
	};
}

#endif
