publication workflow: review

This commit is contained in:
Arno Kaimbacher 2019-04-11 18:52:10 +02:00
parent 5df9b0beef
commit ad982a1ac5
26 changed files with 724 additions and 161 deletions

View file

@ -36,7 +36,9 @@ class Dataset extends Model
'project_id',
'embargo_date',
'belongs_to_bibliography',
'editor_id'
'editor_id',
'preferred_editor',
'reviewer_id'
];
//protected $guarded = [];
/**
@ -95,14 +97,22 @@ class Dataset extends Model
return $this->belongsTo(User::class, 'account_id', 'id');
}
/**
* Get the account that the dataset belongs to
/**
* Get the editor of the dataset
*/
public function editor()
{
return $this->belongsTo(User::class, 'editor_id', 'id');
}
/**
* Get the editor of the dataset
*/
public function reviewer()
{
return $this->belongsTo(User::class, 'reviewer_id', 'id');
}
public function collections()
{
return $this