Skip to content

Commit

Permalink
Add Drink constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
minorsecond committed Sep 22, 2022
1 parent c2be1fb commit 7db6c1a
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions src/drink.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,37 @@ class Drink {
friend auto initStorage(const std::string& file_name, int db_version);

public:
explicit Drink(int id,
std::string date,
std::string name,
std::string type,
std::string subtype,
std::string producer,
double abv,
double ibu,
double size,
int rating,
std::string notes,
int vintage,
std::string alcohol_type,
std::string timestamp,
int sort_order):
id(id),
date(date),
name(name),
type(type),
subtype(subtype),
producer(producer),
abv(abv),
ibu(ibu),
size(size),
rating(rating),
notes(notes),
vintage(vintage),
alcohol_type(alcohol_type),
timestamp(timestamp),
sort_order(sort_order){}

// Setters
void set_id(const int &in_id);
void set_date(const std::string &in_date);
Expand Down

0 comments on commit 7db6c1a

Please sign in to comment.