<?php

namespace App\Models;

class PermissionGroupMapping extends BaseModel
{
    /**
     * The database table used by the model.
     *
     * @var string
     */
    protected $table = 'permission_group_mapping';
    protected $appends = [];

    const CREATED_AT = 'created_at';
    const UPDATED_AT = 'updated_at';

    protected $dateFormat = 'U';
    protected $guarded = [];

    /**
     * The attributes excluded from the model's JSON form.
     *
     * @var array
     */
    protected $hidden = [];

    public function permissionGroup ()
    {
        return $this->belongsTo("App\Models\PermissionGroup","permission_group_id");
    }

    public function permission ()
    {
        return $this->belongsTo("App\Models\Permission","permission_id");
    }

}
