#ifndef EEDB_AUTH_IDENTITY_H
#define EEDB_AUTH_IDENTITY_H

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

namespace eedb {

	namespace auth_identity_ {

		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 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 Provider {
			struct _alias_t {
				static constexpr const char _literal[] = R"("provider")";
				using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
				template<typename T>
					struct _member_t {
						T provider;
						T &operator()() { return provider; }
						const T &operator()() const { return provider; }
					};
			};

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

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

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

	struct auth_identity : sqlpp::table_t<auth_identity,
				auth_identity_::Id,
				auth_identity_::Auth_info_id,
				auth_identity_::Provider,
				auth_identity_::Identity> {
		using _value_type = sqlpp::no_value_t;
		struct _alias_t {
			static constexpr const char _literal[] = R"("auth_identity")";
			using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
			template<typename T>
				struct _member_t {
					T auth_identity;
					T &operator()() { return auth_identity; }
					const T &operator()() const { return auth_identity; }
				};
		};
	};
}

#endif
