akaunting/app/Models/Auth/UserRole.php

37 lines
627 B
PHP
Raw Normal View History

2022-07-20 17:22:01 +03:00
<?php
namespace App\Models\Auth;
use App\Abstracts\Model;
class UserRole extends Model
{
protected $table = 'user_roles';
protected $tenantable = false;
/**
* The attributes that are mass assignable.
*
* @var array
*/
2022-07-20 17:55:04 +03:00
protected $fillable = ['user_id', 'role_id'];
2022-07-20 17:22:01 +03:00
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = false;
public function user()
{
return $this->belongsTo('App\Models\Auth\User');
}
public function role()
{
return $this->belongsTo('App\Models\Auth\Role');
}
}