#ifndef EEDB_AUTH_INFO_H
#define EEDB_AUTH_INFO_H

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

namespace eedb {

	namespace auth_info_ {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

	struct auth_info : sqlpp::table_t<auth_info,
				auth_info_::Id,
				auth_info_::User_uid,
				auth_info_::Password_hash,
				auth_info_::Password_method,
				auth_info_::Password_salt,
				auth_info_::Email,
				auth_info_::Email_verified,
				auth_info_::Email_token,
				auth_info_::Email_token_expires,
				auth_info_::Email_token_role> {
		using _value_type = sqlpp::no_value_t;
		struct _alias_t {
			static constexpr const char _literal[] = R"("auth_info")";
			using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
			template<typename T>
				struct _member_t {
					T auth_info;
					T &operator()() { return auth_info; }
					const T &operator()() const { return auth_info; }
				};
		};
	};
}

#endif
