updated models

This commit is contained in:
2018-07-14 12:24:24 +02:00
parent c75b25b89b
commit 6fd1d7eb89
16 changed files with 225 additions and 129 deletions
+2 -8
View File
@@ -10,9 +10,9 @@ use Illuminate\Database\Eloquent\Model;
class TableComment extends Model
{
/** Context data table */
public function dataTable()
public function table()
{
return $this->belongsTo(DataTable::class);
return $this->belongsTo(Table::class);
}
/** Parent comment (that we reply to; can be null) */
@@ -32,10 +32,4 @@ class TableComment extends Model
{
return $this->belongsTo(User::class, 'author_id');
}
/** Reports of this comment */
public function reportsOf()
{
return $this->morphMany(ContentReport::class, 'object');
}
}