#ifndef PERMISSION_H #define PERMISSION_H #include "core-data.h" #include "../core_global.h" #include #include #include #include #include class CORESHARED_EXPORT Permission : public QObject { Q_OBJECT QX_REGISTER_FRIEND_CLASS(Permission) Q_PROPERTY(QString pluginId READ pluginId WRITE setPluginId) Q_PROPERTY(QString permissionName READ permissionName WRITE setPermissionName) 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 Permission(QObject *parent = nullptr); long id() const; void setId(long id); QString pluginId() const; void setPluginId(const QString &pluginId); QString permissionName() const; void setPermissionName(const QString &permissionName); QDateTime lastModDate() const; void setLastModDate(const QDateTime &lastModDate); QDateTime createDate() const; void setCreateDate(const QDateTime &createDate); bool active() const; void setActive(bool active); QList> listRoles() const; void setListRoles(const QList> &listRoles); void addRole(QSharedPointer role); private: long m_id; QString m_pluginId; QString m_permissionName; QDateTime m_lastModDate; QDateTime m_createDate; bool m_active; QList> m_listRoles; }; QX_REGISTER_HPP_CORE(Permission, QObject, 0) #endif // PERMISSION_H