generated from userver-framework/service_template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
72f8814
commit 74820eb
Showing
16 changed files
with
16 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
#pragma once | ||
#include <openapi/json/parse/enum.hpp> | ||
|
||
#include "legacy/models/subgroup/parse.hpp" | ||
#include "legacy/models/timestring/parse.hpp" | ||
#include "type.hpp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
#pragma once | ||
#include <openapi/json/serialize/enum.hpp> | ||
|
||
#include "legacy/models/subgroup/serialize.hpp" | ||
#include "legacy/models/timestring/serialize.hpp" | ||
#include "type.hpp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
#pragma once | ||
#include "legacy/models/subgroup/parse.hpp" | ||
#include "legacy/models/subgroup/postgre.hpp" | ||
#include "legacy/models/subgroup/serialize.hpp" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,14 @@ | ||
#pragma once | ||
#include <userver/storages/postgres/io/enum_types.hpp> | ||
#include <userver/storages/postgres/io/type_mapping.hpp> | ||
#include <userver/utils/trivial_map.hpp> | ||
#include <openapi/enum/pg_mapper.hpp> | ||
|
||
#include "type.hpp" | ||
|
||
namespace userver::storages::postgres::io | ||
{ | ||
using ::legacy::models::Subgroup; | ||
template <> | ||
struct CppToUserPg<Subgroup> : EnumMappingBase<Subgroup> | ||
struct CppToUserPg<::legacy::models::Subgroup> | ||
: openapi::PgMapper<::legacy::models::Subgroup, "timetable_vsu.subgroup"> | ||
{ | ||
static constexpr userver::storages::postgres::DBTypeName postgres_name = | ||
"timetable_vsu.subgroup"; | ||
static constexpr userver::utils::TrivialBiMap enumerators = | ||
[](auto selector) { | ||
return selector() | ||
.Case("all", Subgroup::kAll) | ||
.Case("first", Subgroup::kFirst) | ||
.Case("second", Subgroup::kSecond); | ||
}; | ||
}; | ||
|
||
} // namespace userver::storages::postgres::io |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,7 @@ | ||
#pragma once | ||
|
||
#include <openapi/enum/declare.hpp> | ||
namespace legacy::models | ||
{ | ||
enum struct Subgroup | ||
{ | ||
kAll, | ||
kFirst, | ||
kSecond | ||
}; | ||
DECLARE_OPENAPI_ENUM(Subgroup, int, all, first, second); | ||
} |