40 lines
817 B
PHP
40 lines
817 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class GitlabIssues extends Model
|
|
{
|
|
/**
|
|
* Fillable array model
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $fillable = [
|
|
'title',
|
|
'url',
|
|
'estimate_time',
|
|
'spent_time',
|
|
'is_closed',
|
|
'gitlab_id',
|
|
'gitlab_iid',
|
|
'milestone_iid',
|
|
'gitlab_project_id',
|
|
'g_created_at',
|
|
'g_updated_at',
|
|
'g_closed_at',
|
|
'g_due_date'
|
|
];
|
|
|
|
/**
|
|
* Gitlab Labels relationship
|
|
*
|
|
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
|
|
*/
|
|
public function gitlabLabels()
|
|
{
|
|
return $this->belongsToMany(GitlabLabels::class, 'gitlab_issues_labels', 'issue_id', 'label_id')
|
|
->withTimestamps();
|
|
}
|
|
}
|