Commit c23addb3 authored by Volker Krause's avatar Volker Krause
Browse files

Extend Ticket and ProgramMembership by a validity time interval

parent b14e1930
......@@ -17,6 +17,8 @@ public:
QString membershipNumber;
Person member;
QString token;
QDateTime validFrom;
QDateTime validUntil;
};
KITINERARY_MAKE_SIMPLE_CLASS(ProgramMembership)
......@@ -24,6 +26,8 @@ KITINERARY_MAKE_PROPERTY(ProgramMembership, QString, programName, setProgramName
KITINERARY_MAKE_PROPERTY(ProgramMembership, QString, membershipNumber, setMembershipNumber)
KITINERARY_MAKE_PROPERTY(ProgramMembership, Person, member, setMember)
KITINERARY_MAKE_PROPERTY(ProgramMembership, QString, token, setToken)
KITINERARY_MAKE_PROPERTY(ProgramMembership, QDateTime, validFrom, setValidFrom)
KITINERARY_MAKE_PROPERTY(ProgramMembership, QDateTime, validUntil, setValidUntil)
KITINERARY_MAKE_OPERATOR(ProgramMembership)
}
......
......@@ -39,6 +39,10 @@ class KITINERARY_EXPORT ProgramMembership
*/
Q_PROPERTY(QVariant tokenData READ tokenData STORED false)
/** Non-standard extension for ticket validity time ranges. */
KITINERARY_PROPERTY(QDateTime, validFrom, setValidFrom)
KITINERARY_PROPERTY(QDateTime, validUntil, setValidUntil)
public:
Token::TokenType tokenType() const;
QVariant tokenData() const;
......
......@@ -38,6 +38,8 @@ public:
Seat ticketedSeat;
QString ticketToken;
Person underName;
QDateTime validFrom;
QDateTime validUntil;
};
KITINERARY_MAKE_SIMPLE_CLASS(Ticket)
......@@ -47,6 +49,8 @@ KITINERARY_MAKE_PROPERTY(Ticket, QString, ticketNumber, setTicketNumber)
KITINERARY_MAKE_PROPERTY(Ticket, Seat, ticketedSeat, setTicketedSeat)
KITINERARY_MAKE_PROPERTY(Ticket, QString, ticketToken, setTicketToken)
KITINERARY_MAKE_PROPERTY(Ticket, Person, underName, setUnderName)
KITINERARY_MAKE_PROPERTY(Ticket, QDateTime, validFrom, setValidFrom)
KITINERARY_MAKE_PROPERTY(Ticket, QDateTime, validUntil, setValidUntil)
KITINERARY_MAKE_OPERATOR(Ticket)
Token::TokenType Ticket::ticketTokenType() const
......
......@@ -56,6 +56,10 @@ class KITINERARY_EXPORT Ticket
KITINERARY_PROPERTY(KItinerary::Person, underName, setUnderName)
/** Non-standard extension for ticket validity time ranges. */
KITINERARY_PROPERTY(QDateTime, validFrom, setValidFrom)
KITINERARY_PROPERTY(QDateTime, validUntil, setValidUntil)
public:
/** The type of content in the ticketToken property.
* @deprecated Use Token::TokenType instead.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment