You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#ifndef PERSON_H
|
|
|
|
#define PERSON_H
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include <QString>
|
|
|
|
|
|
|
|
#include <odb/core.hxx>
|
|
|
|
|
|
|
|
#pragma db object
|
|
|
|
class Person : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
Q_PROPERTY(QString firstName READ getFirstName WRITE setFirstName)
|
|
|
|
Q_PROPERTY(QString lastName READ getLastName WRITE setLastName)
|
|
|
|
public:
|
|
|
|
Person();
|
|
|
|
|
|
|
|
int getId() const;
|
|
|
|
void setId(int value);
|
|
|
|
|
|
|
|
QString getFirstName() const;
|
|
|
|
void setFirstName(const QString &value);
|
|
|
|
|
|
|
|
QString getLastName() const;
|
|
|
|
void setLastName(const QString &value);
|
|
|
|
|
|
|
|
private:
|
|
|
|
friend class odb::access;
|
|
|
|
#pragma db id auto
|
|
|
|
int id;
|
|
|
|
QString firstName;
|
|
|
|
QString lastName;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // PERSON_H
|