Projekt

Allgemein

Profil

Herunterladen als
Herunterladen (1,31 KB) Statistiken
| Zweig: | Revision:
81c23b56 Christian Ehringfeld
/*
6899f814 Christian Ehringfeld
* Copyright (C) 2015 Christian Ehringfeld <c.ehringfeld@t-online.de>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
81c23b56 Christian Ehringfeld
#ifndef MODEL_H
#define MODEL_H
#include <QtGlobal>
#include <QMap>
#include <QDebug>
aa44e7d1 Christian Ehringfeld
#include <QObject>
81c23b56 Christian Ehringfeld
#include "enums/databasetype.h"
6899f814 Christian Ehringfeld
namespace CuteEntityManager {
81c23b56 Christian Ehringfeld
aa44e7d1 Christian Ehringfeld
class Entity : public QObject {
Q_OBJECT
9d05e414 Christian Ehringfeld
Q_PROPERTY(qint64 firstName READ getId WRITE setId NOTIFY idChanged)

signals:
void idChanged();

426974c6 Christian Ehringfeld
public:
9d05e414 Christian Ehringfeld
Entity (QObject *parent = 0);
b0b8dac3 Christian Ehringfeld
virtual qint64 getId();
virtual void setId(qint64 id);
9d05e414 Christian Ehringfeld
virtual QString toString();
81c23b56 Christian Ehringfeld
virtual ~Entity();
caea9141 Christian Ehringfeld
virtual QString getTablename();
81c23b56 Christian Ehringfeld
// virtual QMap<QString, QString> getManyToManyRelations() = 0; //Key = Table, Value = joined Table Column
426974c6 Christian Ehringfeld
protected:
b0b8dac3 Christian Ehringfeld
qint64 id;
81c23b56 Christian Ehringfeld
};
}
#endif // MODEL_H