commenting my code

This commit is contained in:
TinyAtoms
2019-06-20 08:08:02 -03:00
parent e2c23647a5
commit 7840f791bb
6 changed files with 51 additions and 6 deletions

View File

@@ -9,11 +9,24 @@
using std::vector;
using std::string;
// enum type is basically een manier om categories te representen als een integer in the background, maar om t in code
// aan te geven als de actual category.
enum class Verhicle_type {
"small" = 1,
"medium" = 2,
"large" = 3,
};
/*
db repr of Customer
int id (not null, auto increment)
string name (not nulll)
string card_code (not null)
Dit moet nog verandert worden.
card code zou eigenlijk een randomly generated string moeten zijn, die je bv. op een ndf card zou opslaan en zo zou
authenticaten bij je parking spot. We kunnen dit ipv of samen met een password gebruiken.
clock in en out creeert en compleet een park_time object. Voegt het toe aan een vector.
*/
@@ -26,9 +39,10 @@ public:
void clock_out(int s_id);
// void gen_weekly(); TODO: this
void gen_monthly();
Customer(int id_, string name_, string card_code_);
Customer(int id_, string name_);
private:
Verhicle_type verhicle;
vector<Park_time> park_instances;
};

View File

@@ -6,6 +6,8 @@ db representation:
int id not null
bool taken not null
int customer_id (null) (many to one, foreign key, whatever)
Dit representeert een parkeerplaats. Het heeft als internal state alleen dat t bezet is of niet.
*/
class Park_spot {

View File

@@ -16,6 +16,9 @@ int spot_id (not null, many to one or something like that)
int duration
datetime start (not null)
datetime end
Dit is gewoon een record van hoe lang, wie en waar iemand parkeert. Basically, een component van
de internal state van customer.
*/
class Park_time {