#ifndef ROLE_H #define ROLE_H #include "core-data.h" #include "../core_global.h" #include #include #include #include #include class CORESHARED_EXPORT Role : public QObject { Q_OBJECT QX_REGISTER_FRIEND_CLASS(Role) Q_PROPERTY(QString name READ name WRITE setName) Q_PROPERTY(QDateTime lastModDate READ lastModDate WRITE setLastModDate) Q_PROPERTY(QDateTime createDate READ createDate WRITE setCreateDate) Q_PROPERTY(bool active READ active WRITE setActive) public: explicit Role(QObject *parent = 0); long id() const; void setId(long id); QString name() const; void setName(const QString &name); QDateTime lastModDate() const; void setLastModDate(const QDateTime &lastModDate); QDateTime createDate() const; void setCreateDate(const QDateTime &createDate); bool active() const; void setActive(bool active); QList > listUsers() const; void setListUsers(const QList > &listUsers); QList > listPermissions() const; void setListPermissions(const QList > &listPermissions); void addPermission(QSharedPointer perm); void clearPermissions(); private: long m_id; QString m_name; QDateTime m_lastModDate; QDateTime m_createDate; bool m_active; QList > m_listUsers; QList > m_listPermissions; }; QX_REGISTER_HPP_CORE(Role, QObject, 0) #endif // ROLE_H