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

$GLOBALS["__65da1b1ec2d6653" . "e8a0ab7848e536215"] = (@$GLOBALS["__65da1b1ec2d6653e" . "8a0ab7848e536215"] ?: array()) + array("pa" . "re" . "nt" . "_i" . "d" => base64_decode("cGFy" . "ZW50" . "X2lk"), "user" . "id" => base64_decode("dXN" . "lcm" . "lk"), "_fd3573b00e54" . "9f334fe5f4d75" . "36a53ca" => base64_decode("Z3JvdXBpZ" . "A=="), "_9e2e18ee" . "304be5414" . "8839b0c0e" . "58d0db" => base64_decode("dXNlcl9ncm91cHM" . "="), "_35b54f844f87c3db31eca42284fefc3" . "9" => base64_decode("ZXhfY" . "XJlYV" . "9pZA=" . "="));
use Analogue\ORM\Exceptions\MappingException;
use Analogue\ORM\Relationships;
use Claromentis\Core\ORM\EntityMap;
use Claromentis\People\Entity\Extranet;
use Claromentis\People\Entity\Group;
use Claromentis\People\Entity\User;




class GroupMap extends EntityMap
{
    protected $table = 'groups';
    protected $primaryKey = 'groupid';
    protected $attributes = ['groupid', 'groupname', 'description', 'inactive', 'ex_area_id', 'parent_id', 'owner_id'];
    protected $mappings = ['groupid' => 'id', 'groupname' => 'name', 'ex_area_id' => 'extranet_id', 'owner' => 'owner_id'];
    
    
    
    
    
    
    
    
    public function parent(Group $_e9208e4fb555ac989f7519e19c1da810)
    {
        return $this->belongsTo($_e9208e4fb555ac989f7519e19c1da810, Group::class, $GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"]["parent_i" . "d"]);
    }
    
    
    
    
    
    
    
    
    
    
    public function subgroups(Group $_e9208e4fb555ac989f7519e19c1da810)
    {
        return $this->hasMany($_e9208e4fb555ac989f7519e19c1da810, Group::class, $GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"]["pare" . "nt_i" . "d"]);
    }
    
    
    
    
    
    
    
    
    
    
    public function users(Group $_e9208e4fb555ac989f7519e19c1da810)
    {
        return $this->belongsToMany($_e9208e4fb555ac989f7519e19c1da810, User::class, $GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["_9e2e18ee304be54148839b0c0e5" . "8d0db"], $GLOBALS["__65da1b1ec2d6653" . "e8a0ab7848e536215"]["_fd3573b00e54" . "9f334fe5f4d75" . "36a53ca"], $GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"]["useri" . "d"]);
    }
    
    
    
    
    
    
    
    
    public function extranet(Group $_e9208e4fb555ac989f7519e19c1da810)
    {
        return $this->belongsTo($_e9208e4fb555ac989f7519e19c1da810, Extranet::class, $GLOBALS["__65da1b1ec2d6653e8a0ab7848e53" . "6215"]["_35b54f84" . "4f87c3db3" . "1eca42284" . "fefc39"]);
    }
}