Несколько отделений для врачей
Поправил подсчет операций Закончил функцию наполнения отчетов
This commit is contained in:
26
app/Models/UserDepartment.php
Normal file
26
app/Models/UserDepartment.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class UserDepartment extends Model
|
||||
{
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'rf_user_id',
|
||||
'rf_department_id',
|
||||
'is_favorite',
|
||||
];
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'rf_user_id');
|
||||
}
|
||||
|
||||
public function department()
|
||||
{
|
||||
return $this->belongsTo(Department::class, 'rf_department_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user