3 #ifndef WOBGEN_MOCoupon
4 #define WOBGEN_MOCoupon
7 #ifndef WOBGEN_MAGICSMOKE__WOB_EXPORT
8 #define WOBGEN_MAGICSMOKE__WOB_EXPORT Q_DECL_IMPORT
12 #include <QCoreApplication>
14 #include "MOCouponRule"
20 Q_PROPERTY(Nullable<QString> couponid READ couponid WRITE setcouponid)
22 Q_PROPERTY(Nullable<QString> description READ description WRITE setdescription)
24 Q_PROPERTY(Nullable<qint64> validfrom READ validfrom WRITE setvalidfrom)
26 Q_PROPERTY(Nullable<qint64> validtill READ validtill WRITE setvalidtill)
28 Q_PROPERTY(Nullable<qint64> amountuse READ amountuse WRITE setamountuse)
30 Q_PROPERTY(Nullable<qint64> ticketsperorder READ ticketsperorder WRITE setticketsperorder)
32 Q_PROPERTY(Nullable<QString> flags READ flags WRITE setflags)
34 Q_PROPERTY(QList<MOCouponRule> rules READ rules WRITE setrules)
46 virtual Nullable<QString>
couponid()
const{
return mp_couponid;}
48 virtual Nullable<QString>
description()
const{
return mp_description;}
50 virtual Nullable<qint64>
validfrom()
const{
return mp_validfrom;}
52 virtual Nullable<qint64>
validtill()
const{
return mp_validtill;}
54 virtual Nullable<qint64>
amountuse()
const{
return mp_amountuse;}
58 virtual Nullable<QString>
flags()
const{
return mp_flags;}
60 virtual QList<MOCouponRule>
rules()
const{
return mp_rules;}
74 virtual void setflags(Nullable<QString> s){mp_flags=s;}
76 virtual void setrules(QList<MOCouponRule> s){mp_rules=s;}
78 virtual void addrules(Nullable<MOCouponRule> a){mp_rules.append(a);}
85 QDomElement toXml(QDomDocument&doc,QString name=
"Coupon");
87 void toXml(QDomDocument&,QDomElement&);
96 explicit MOCoupon(
const QDomElement&);
98 static MOCoupon fromXml(
const QDomElement&);
100 static MOCoupon fromString(
const QString&);
virtual void setrules(QList< MOCouponRule > s)
Definition: srcMOCoupon.h:76
This class represents a coupon.
Definition: srcMOCoupon.h:16
QList< MOCouponRule > mp_rules
Definition: srcMOCoupon.h:43
virtual Nullable< QString > couponid() const
Definition: srcMOCoupon.h:46
virtual Nullable< qint64 > ticketsperorder() const
Definition: srcMOCoupon.h:56
Nullable< qint64 > mp_amountuse
Definition: srcMOCoupon.h:40
MOCoupon()
default constructor: constructs an invalid instance of MOCoupon
Definition: srcMOCoupon.h:90
virtual Nullable< QString > flags() const
Definition: srcMOCoupon.h:58
virtual void setamountuse(Nullable< qint64 > s)
Definition: srcMOCoupon.h:70
virtual void setdescription(Nullable< QString > s)
Definition: srcMOCoupon.h:64
virtual void setvalidfrom(Nullable< qint64 > s)
Definition: srcMOCoupon.h:66
Nullable< QString > mp_flags
Definition: srcMOCoupon.h:42
virtual QList< MOCouponRule > rules() const
Definition: srcMOCoupon.h:60
virtual void setvalidtill(Nullable< qint64 > s)
Definition: srcMOCoupon.h:68
virtual void setticketsperorder(Nullable< qint64 > s)
Definition: srcMOCoupon.h:72
virtual void setflags(Nullable< QString > s)
Definition: srcMOCoupon.h:74
virtual Nullable< QString > description() const
Definition: srcMOCoupon.h:48
Nullable< QString > mp_couponid
Definition: srcMOCoupon.h:36
Q_DECLARE_METATYPE(QDomNode)
virtual void setcouponid(Nullable< QString > s)
Definition: srcMOCoupon.h:62
virtual void clearrules()
Definition: srcMOCoupon.h:77
Nullable< qint64 > mp_validfrom
Definition: srcMOCoupon.h:38
Nullable< qint64 > mp_validtill
Definition: srcMOCoupon.h:39
#define WOBGEN_MAGICSMOKE__WOB_EXPORT
Definition: srcMOCoupon.h:8
Nullable< QString > mp_description
Definition: srcMOCoupon.h:37
virtual ~MOCoupon()
destructor: deletes this copy of the object
Definition: srcMOCoupon.h:102
Nullable< qint64 > mp_ticketsperorder
Definition: srcMOCoupon.h:41
virtual void addrules(Nullable< MOCouponRule > a)
Definition: srcMOCoupon.h:78
virtual Nullable< qint64 > validtill() const
Definition: srcMOCoupon.h:52
virtual Nullable< qint64 > amountuse() const
Definition: srcMOCoupon.h:54
virtual Nullable< qint64 > validfrom() const
Definition: srcMOCoupon.h:50