1. [FEAT] 權限劃分為「系統層級」與「客戶層級」,並在後端強制過濾跨權限分配。 2. [FEAT] 整合選單權限至主選單層級 (基本設定、權限設定),簡化角色管理 UI。 3. [STYLE] 側邊欄優化:補齊多語系翻譯,並為基本設定子選單增加視覺圖示。 4. [REFACTOR] 更新 RoleSeeder,將 tenant-admin 重新分類為客戶層級角色。
36 lines
679 B
PHP
36 lines
679 B
PHP
<?php
|
|
|
|
namespace App\Models\Machine;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class MachineModel extends Model
|
|
{
|
|
protected $fillable = [
|
|
'name',
|
|
'company_id',
|
|
'creator_id',
|
|
'updater_id',
|
|
];
|
|
|
|
public function machines()
|
|
{
|
|
return $this->hasMany(Machine::class);
|
|
}
|
|
|
|
public function company()
|
|
{
|
|
return $this->belongsTo(\App\Models\System\Company::class);
|
|
}
|
|
|
|
public function creator()
|
|
{
|
|
return $this->belongsTo(\App\Models\System\User::class, 'creator_id');
|
|
}
|
|
|
|
public function updater()
|
|
{
|
|
return $this->belongsTo(\App\Models\System\User::class, 'updater_id');
|
|
}
|
|
}
|