2023-12-12 12:14:14 +01:00
|
|
|
#ifndef TARIFF_CUSTOMER_H_INCLUDED
|
|
|
|
#define TARIFF_CUSTOMER_H_INCLUDED
|
2023-12-12 11:59:35 +01:00
|
|
|
|
|
|
|
#include <QString>
|
2023-12-15 13:28:04 +01:00
|
|
|
#include <QDebug>
|
|
|
|
#include <QDebugStateSaver>
|
2023-12-12 11:59:35 +01:00
|
|
|
|
2023-12-12 17:55:44 +01:00
|
|
|
struct ATBCustomer {
|
|
|
|
enum class CustomerType {ADULT=1000, CHILD, TEEN};
|
2023-12-12 11:59:35 +01:00
|
|
|
|
2023-12-12 17:55:44 +01:00
|
|
|
ATBCustomer() = default;
|
2023-12-12 11:59:35 +01:00
|
|
|
|
2023-12-12 12:14:14 +01:00
|
|
|
CustomerType cust_type;
|
2023-12-12 12:10:55 +01:00
|
|
|
QString cust_label;
|
2023-12-15 13:28:04 +01:00
|
|
|
|
|
|
|
friend QDebug operator<<(QDebug debug, ATBCustomer const &customer) {
|
|
|
|
QDebugStateSaver saver(debug);
|
|
|
|
|
|
|
|
switch(customer.cust_type) {
|
|
|
|
case ATBCustomer::CustomerType::ADULT:
|
|
|
|
debug.nospace()
|
|
|
|
<< " cust_type: " << "CustomerType::ADULT" << "\n"
|
|
|
|
<< "cust_label: " << customer.cust_label << "\n";
|
|
|
|
break;
|
|
|
|
case ATBCustomer::CustomerType::CHILD:
|
|
|
|
debug.nospace()
|
|
|
|
<< " cust_type: " << "CustomerType::CHILD" << "\n"
|
|
|
|
<< "cust_label: " << customer.cust_label << "\n";
|
|
|
|
break;
|
|
|
|
case ATBCustomer::CustomerType::TEEN:
|
|
|
|
debug.nospace()
|
|
|
|
<< " cust_type: " << "CustomerType::TEEN" << "\n"
|
|
|
|
<< "cust_label: " << customer.cust_label << "\n";
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return debug;
|
|
|
|
}
|
2023-12-12 11:59:35 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // TARIFF_CUSTOMER_H_INCLUDED
|