You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
560 B
27 lines
560 B
<?php
|
|
|
|
namespace App\Entities\Projects;
|
|
|
|
use App\Entities\Users\User;
|
|
use App\Entities\Projects\Project;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Issue extends Model
|
|
{
|
|
protected $fillable = ['project_id', 'title', 'body', 'creator_id'];
|
|
|
|
public function project()
|
|
{
|
|
return $this->belongsTo(Project::class);
|
|
}
|
|
|
|
public function pic()
|
|
{
|
|
return $this->belongsTo(User::class)->withDefault(['name' => __('issue.no_pic')]);
|
|
}
|
|
|
|
public function creator()
|
|
{
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
}
|