droplet 1.1.0
A multipurpose Discord bot with the hacker in mind
Loading...
Searching...
No Matches
ProductDTO.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <RowDTOAdapter.hpp>
4#include <cstddef>
5#include <string>
6
7/*
8CREATE TABLE public.products (
9 id serial4 NOT NULL,
10 product_id int8 null,
11 picture_url varchar null,
12 button_text varchar null,
13 price_in_cents int8 null,
14 name varchar null,
15 button_url varchar null,
16 buy_url varchar null,
17 type int8 null
18);
19*/
21 public:
22 enum Type { DOWNLOAD = 0, SUBSCRIPTION = 100 };
23
24 size_t id;
25 size_t product_id;
26 std::string picture_url;
27 std::string button_text;
29 std::string name;
30 std::string button_url;
31 std::string buy_url;
33
34 ProductDTO() = default;
36 std::string picture_url,
37 std::string button_text,
38 size_t price_in_cents,
39 std::string name,
40 std::string button_url,
41 std::string buy_url,
42 Type type);
43
44 ProductDTO(const RowDTOAdapter& row);
45};
Definition ProductDTO.hpp:20
Type
Definition ProductDTO.hpp:22
@ DOWNLOAD
Definition ProductDTO.hpp:22
@ SUBSCRIPTION
Definition ProductDTO.hpp:22
std::string button_text
Definition ProductDTO.hpp:27
size_t product_id
Definition ProductDTO.hpp:25
std::string picture_url
Definition ProductDTO.hpp:26
size_t price_in_cents
Definition ProductDTO.hpp:28
std::string buy_url
Definition ProductDTO.hpp:31
ProductDTO()=default
std::string button_url
Definition ProductDTO.hpp:30
Type type
Definition ProductDTO.hpp:32
std::string name
Definition ProductDTO.hpp:29
size_t id
Definition ProductDTO.hpp:24
Definition RowDTOAdapter.hpp:20