Add drafts for 3 new haeder files.

This commit is contained in:
Gerhard Hoffmann 2023-12-12 12:14:14 +01:00
parent 2b3ee3f384
commit d6324f03a8
3 changed files with 29 additions and 16 deletions

View File

@ -1,15 +1,14 @@
#ifndef TARIFF_CUSTOMER_TYPE_H_INCLUDED
#define TARIFF_CUSTOMER_TYPE_H_INCLUDED
#ifndef TARIFF_CUSTOMER_H_INCLUDED
#define TARIFF_CUSTOMER_H_INCLUDED
#include <QString>
struct CustomerType {
//enum class Customer;
struct Customer {
enum class CustomerType {ADULT=0, CHILD, TEEN};
Customer() = default;
CustomerType() = default;
int cust_type; // 1: Adult, 2: Child:
CustomerType cust_type;
QString cust_label;
};

View File

@ -12,19 +12,19 @@ struct DailyTicket {
int daily_ticket_unit_id;
double daily_ticket_price;
int daily_ticket_tbase_id; // time base setting for ticket:
// 1: absolute: using time stamps
// 2: relative: use offsets from
// some reference time point,
// typically "start time".
int daily_ticket_tbase_id; // time base setting for ticket:
// 1: absolute: using time stamps
// 2: relative: use offsets from
// some reference time point,
// typically "start time".
QVector<int> daily_ticket_clearance_id; // who is allowed to buy the ticket:
// list of user ids
QVector<int> daily_ticket_clearance_type; // who is allowed to buy the ticket:
// list of customer types
QTime daily_ticket_from_min; // used in case time base == 1
QTime daily_ticket_from_min; // used in case time base == 1
QTime daily_ticket_to_max;
int daily_ticket_from_offset_min; // used in case time base == 2
int daily_ticket_from_offset_min; // used in case time base == 2
int daily_ticket_to_offset_max;
};

View File

@ -0,0 +1,14 @@
#ifndef TARIFF_TIME_BASE_H_INCLUDED
#define TARIFF_TIME_BASE_H_INCLUDED
#include <QString>
struct TimeBase {
enum class TimeBaseType {ABSOLUTE=0, RELATIVE=1};
TimeBase() = default;
TimeBaseType tbase_type;
QString tbase_label;
};
#endif // TARIFF_TIME_BASE_H_INCLUDED