<?php
namespace Claromentis\People\Entity\Map;

$GLOBALS["__65da1b1ec2d6653e8a0ab7848e53" . "6215"] = (@$GLOBALS["__65da1b1ec2d6653e" . "8a0ab7848e536215"] ?: array()) + array("_c8f7f72ce1" . "bbf96c92e1b" . "24081df9250" => base64_decode("dXNlcl9yb2xlcw=" . "="), "_adbffcf1128327d7a0a" . "7cdc2164b7256" => base64_decode("cm9s" . "ZWlk"), "us" . "er" . "id" => base64_decode("dXNlcml" . "k"), "_35b54f844f87c3db31" . "eca42284fefc39" => base64_decode("ZXhfYXJlYV9" . "pZA=="));
use Analogue\ORM\Exceptions\MappingException;
use Analogue\ORM\Relationships\BelongsTo;
use Analogue\ORM\Relationships\BelongsToMany;
use Claromentis\Core\ORM\EntityMap;
use Claromentis\People\Entity\Extranet;
use Claromentis\People\Entity\Role;
use Claromentis\People\Entity\User;







class RoleMap extends EntityMap
{
    
    
    
    
    
    
    protected $table = 'roles';
    
    
    
    
    
    
    protected $primaryKey = 'roleid';
    
    
    
    
    
    
    protected $attributes = ['id', 'name', 'description', 'inactive', 'date_created', 'default_skin', 'owner_id', 'extranet_id'];
    
    
    
    
    
    
    protected $mappings = ['roleid' => 'id', 'rolename' => 'name', 'ex_area_id' => 'extranet_id', 'owner' => 'owner_id'];
    
    
    
    
    
    
    
    
    
    
    public function extranet(Role $_d1071a032215f0eb5c4a8ef175f7049d)
    {
        return $this->belongsTo($_d1071a032215f0eb5c4a8ef175f7049d, Extranet::class, $GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"]["_35b54f844f87c3db31eca42284fefc" . "39"]);
    }
    
    
    
    
    
    
    
    
    
    
    public function users(Role $_d1071a032215f0eb5c4a8ef175f7049d)
    {
        return $this->belongsToMany($_d1071a032215f0eb5c4a8ef175f7049d, User::class, $GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["_c8f7f72ce1" . "bbf96c92e1b" . "24081df9250"], $GLOBALS["__65da1b1ec2d6653e8a0ab7848e53621" . "5"]["_adbffcf11" . "28327d7a0a" . "7cdc2164b7" . "256"], $GLOBALS["__65da1b1ec2d6653e8a0ab7848" . "e536215"]["useri" . "d"]);
    }
}