Initial commit - lms-v2 + CLAUDE.md
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
class Position extends Model
|
||||
{
|
||||
protected $fillable = ['name'];
|
||||
|
||||
public function users()
|
||||
{
|
||||
return $this->hasMany(User::class, 'position_id');
|
||||
}
|
||||
|
||||
public function departments()
|
||||
{
|
||||
return $this->belongsToMany(Department::class, 'department_position');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user