30 خطوط
684 B
PHP
30 خطوط
684 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class BacklogItem extends Model
|
|
{
|
|
protected $fillable = [
|
|
'title', 'description', 'type', 'project_id', 'priority',
|
|
'estimated_effort', 'status', 'assigned_sprint_id', 'created_by',
|
|
];
|
|
|
|
public function project(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Project::class);
|
|
}
|
|
|
|
public function assignedSprint(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Sprint::class, 'assigned_sprint_id');
|
|
}
|
|
|
|
public function creator(): BelongsTo
|
|
{
|
|
return $this->belongsTo(User::class, 'created_by');
|
|
}
|
|
}
|