Lightweight 0.1.0
Loading...
Searching...
No Matches
tables.hpp
1// SPDX-License-Identifier: Apache-2.0
2#pragma once
3#include <Lightweight/DataMapper/DataMapper.hpp>
4#include <Lightweight/SqlConnection.hpp>
5#include <Lightweight/SqlDataBinder.hpp>
6#include <Lightweight/SqlQuery.hpp>
7#include <Lightweight/SqlQueryFormatter.hpp>
8#include <Lightweight/SqlScopedTraceLogger.hpp>
9#include <Lightweight/SqlStatement.hpp>
10#include <Lightweight/SqlTransaction.hpp>
11
12struct lists;
13struct lists_users;
14struct movies;
15struct ratings;
16struct ratings_users;
17
18struct movies final
19{
22 Field<std::optional<double>> movie_release_year;
24 Field<std::optional<SqlText>> movie_title_language;
25 Field<std::optional<int>> movie_popularity;
26 Field<std::optional<SqlText>> movie_image_url;
28 Field<std::optional<SqlText>> director_name;
29 Field<std::optional<SqlText>> director_url;
30};
31
32struct ratings_users final
33{
35 Field<std::optional<SqlText>> rating_date_utc;
36 Field<std::optional<int>> user_trialist;
37 Field<std::optional<int>> user_subscriber;
38 Field<std::optional<SqlText>> user_avatar_image_url;
39 Field<std::optional<SqlText>> user_cover_image_url;
40 Field<std::optional<int>> user_eligible_for_trial;
41 Field<std::optional<int>> user_has_payment_method;
42};
43
44struct lists_users final
45{
48 Field<std::optional<SqlText>> list_update_date_utc;
49 Field<std::optional<SqlText>> list_creation_date_utc;
50 Field<std::optional<int>> user_trialist;
51 Field<std::optional<int>> user_subscriber;
52 Field<std::optional<SqlText>> user_avatar_image_url;
53 Field<std::optional<SqlText>> user_cover_image_url;
54 Field<std::optional<int>> user_eligible_for_trial;
55 Field<std::optional<int>> user_has_payment_method;
56};
57
58struct lists final
59{
63 Field<std::optional<int>> list_movie_number;
64 Field<std::optional<SqlText>> list_update_timestamp_utc;
65 Field<std::optional<SqlText>> list_creation_timestamp_utc;
66 Field<std::optional<int>> list_followers;
68 Field<std::optional<int>> list_comments;
69 Field<std::optional<SqlText>> list_description;
70 Field<std::optional<SqlText>> list_cover_image_url;
71 Field<std::optional<SqlText>> list_first_image_url;
72 Field<std::optional<SqlText>> list_second_image_url;
73 Field<std::optional<SqlText>> list_third_image_url;
74};
75
76struct ratings final
77{
79 Field<std::optional<int>> rating_id;
81 Field<std::optional<double>> rating_score;
82 Field<std::optional<SqlText>> rating_timestamp_utc;
84 Field<std::optional<int>> critic_likes;
85 Field<std::optional<int>> critic_comments;
87 Field<std::optional<int>> user_trialist;
88 Field<std::optional<int>> user_subscriber;
89 Field<std::optional<int>> user_eligible_for_trial;
90 Field<std::optional<int>> user_has_payment_method;
91};
92
Represents a single column in a table.
Definition Field.hpp:71