<?php

namespace App\Models\Master;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class MasterGroupUser extends Model
{
    use HasFactory;
    protected $table = 'ms_group_user';
    protected $primaryKey = 'MsGroupUserId';
    protected $fillable = [
        'ms_group_id',
        'user_id',
    ];

    public function group()
    {
        return $this->belongsTo(MasterGroup::class, 'ms_group_id','MsGroupId');
    }

    public function user()
    {
        return $this->belongsTo(\App\Models\User::class, 'user_id','id');
    }

}
