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.

98 lines
1.8 KiB
C++

#include "permission.h"
QX_REGISTER_CPP_CORE(Permission)
namespace qx {
template<> void register_class(QxClass<Permission>& t) {
t.setName("Permission");
t.id(&Permission::m_id, "id");
t.data(&Permission::m_pluginId, "pluginId");
t.data(&Permission::m_permissionName, "permissionName");
t.data(&Permission::m_lastModDate, "lastModDate");
t.data(&Permission::m_createDate, "createDate");
t.data(&Permission::m_active, "active");
t.relationManyToMany(&Permission::m_listRoles, "object_id_fk", "Role_listPermissions", "value", "object_id");
}
}
Permission::Permission(QObject *parent) :
QObject(parent)
{
}
long Permission::id() const
{
return m_id;
}
void Permission::setId(long id)
{
m_id = id;
}
QString Permission::pluginId() const
{
return m_pluginId;
}
void Permission::setPluginId(const QString &pluginId)
{
m_pluginId = pluginId;
}
QString Permission::permissionName() const
{
return m_permissionName;
}
void Permission::setPermissionName(const QString &permissionName)
{
m_permissionName = permissionName;
}
QDateTime Permission::lastModDate() const
{
return m_lastModDate;
}
void Permission::setLastModDate(const QDateTime &lastModDate)
{
m_lastModDate = lastModDate;
}
QDateTime Permission::createDate() const
{
return m_createDate;
}
void Permission::setCreateDate(const QDateTime &createDate)
{
m_createDate = createDate;
}
bool Permission::active() const
{
return m_active;
}
void Permission::setActive(bool active)
{
m_active = active;
}
QList<QSharedPointer<Role> > Permission::listRoles() const
{
return m_listRoles;
}
void Permission::setListRoles(const QList<QSharedPointer<Role> > &listRoles)
{
m_listRoles = listRoles;
}
void Permission::addRole(QSharedPointer<Role> role)
{
m_listRoles.append(role);
}