Elive::Entity::Role - Elluminate Role entity class


Elive documentation Contained in the Elive distribution.

Index


Code Index:

NAME

Top

Elive::Entity::Role - Elluminate Role entity class

DESCRIPTION

Top

This is a structural class for Elive roles. It is a component of the Elive::Entity::User and Elive::Entity::Participants::Participant entities.


Elive documentation Contained in the Elive distribution.

package Elive::Entity::Role;
use warnings; use strict;

use Mouse;
use Mouse::Util::TypeConstraints;

extends 'Elive::DAO';

__PACKAGE__->entity_name('Role');

has 'roleId' => (is => 'rw', isa => 'Int', required => 1);
__PACKAGE__->primary_key('roleId');

coerce 'Elive::Entity::Role' => from 'HashRef'
          => via {Elive::Entity::Role->new($_) };

coerce 'Elive::Entity::Role' => from 'Int'
          => via {Elive::Entity::Role->new({roleId => $_}) };

1;