|
|
|
#ifndef POSTDATA_H
|
|
|
|
#define POSTDATA_H
|
|
|
|
|
|
|
|
#include <QString>
|
|
|
|
#include <QObject>
|
|
|
|
#include <QtCore/qglobal.h>
|
|
|
|
#include <QxOrm.h>
|
|
|
|
|
|
|
|
#include "../postregister_global.h"
|
|
|
|
|
|
|
|
class POSTREGISTERSHARED_EXPORT PostData : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
QX_REGISTER_FRIEND_CLASS(PostData)
|
|
|
|
Q_PROPERTY(QString townPart READ townPart WRITE setTownPart)
|
|
|
|
Q_PROPERTY(QString zipCode READ zipCode WRITE setZipCode)
|
|
|
|
Q_PROPERTY(QString postName READ postName WRITE setPostName)
|
|
|
|
Q_PROPERTY(QString code READ code WRITE setCode)
|
|
|
|
Q_PROPERTY(QString township READ township WRITE setTownship)
|
|
|
|
Q_PROPERTY(QString town READ town WRITE setTown)
|
|
|
|
|
|
|
|
public:
|
|
|
|
Q_INVOKABLE explicit PostData(QObject *parent = nullptr);
|
|
|
|
|
|
|
|
QString townPart() const;
|
|
|
|
void setTownPart(const QString &townPart);
|
|
|
|
|
|
|
|
long id() const;
|
|
|
|
void setId(long id);
|
|
|
|
|
|
|
|
QString zipCode() const;
|
|
|
|
void setZipCode(const QString &zipCode);
|
|
|
|
|
|
|
|
QString postName() const;
|
|
|
|
void setPostName(const QString &postName);
|
|
|
|
|
|
|
|
QString code() const;
|
|
|
|
void setCode(const QString &code);
|
|
|
|
|
|
|
|
QString township() const;
|
|
|
|
void setTownship(const QString &township);
|
|
|
|
|
|
|
|
QString town() const;
|
|
|
|
void setTown(const QString &town);
|
|
|
|
|
|
|
|
private:
|
|
|
|
long m_id{0};
|
|
|
|
QString m_townPart;
|
|
|
|
QString m_zipCode;
|
|
|
|
QString m_postName;
|
|
|
|
QString m_code;
|
|
|
|
QString m_township;
|
|
|
|
QString m_town;
|
|
|
|
};
|
|
|
|
|
|
|
|
QX_REGISTER_HPP_POST(PostData, QObject, 0)
|
|
|
|
|
|
|
|
#endif // POSTDATA_H
|