feat: Permission 모델 추가 (Spatie 확장)
- Spatie\Permission\Models\Permission 확장 - tenant() belongsTo 관계 추가 - tenant_id fillable 추가 - API 권한 시스템에서 사용 🤖 Generated with [Claude Code](https://claude.ai/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
20
app/Models/Permissions/Permission.php
Normal file
20
app/Models/Permissions/Permission.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Permissions;
|
||||
|
||||
use App\Models\Tenants\Tenant;
|
||||
use Spatie\Permission\Models\Permission as SpatiePermission;
|
||||
|
||||
class Permission extends SpatiePermission
|
||||
{
|
||||
protected $fillable = [
|
||||
'tenant_id',
|
||||
'name',
|
||||
'guard_name',
|
||||
];
|
||||
|
||||
public function tenant()
|
||||
{
|
||||
return $this->belongsTo(Tenant::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user