updated models
This commit is contained in:
+6
-12
@@ -34,7 +34,7 @@ class User extends Authenticatable
|
||||
/** Owned tables */
|
||||
public function dataTables()
|
||||
{
|
||||
return $this->hasMany(DataTable::class, 'owner_id');
|
||||
return $this->hasMany(Table::class, 'owner_id');
|
||||
}
|
||||
|
||||
/** Assigned OAuth identities */
|
||||
@@ -43,10 +43,10 @@ class User extends Authenticatable
|
||||
return $this->hasMany(OAuthIdentity::class);
|
||||
}
|
||||
|
||||
/** Assigned OAuth identities */
|
||||
public function changesets()
|
||||
/** Authored proposals */
|
||||
public function proposals()
|
||||
{
|
||||
return $this->hasMany(Changeset::class, 'author_id');
|
||||
return $this->hasMany(Proposal::class, 'author_id');
|
||||
}
|
||||
|
||||
/** Authored comments */
|
||||
@@ -58,13 +58,13 @@ class User extends Authenticatable
|
||||
/** User's favourite tables (personal collection) */
|
||||
public function favouriteTables()
|
||||
{
|
||||
return $this->belongsToMany(DataTable::class, 'table_favourites');
|
||||
return $this->belongsToMany(Table::class, 'table_favourites');
|
||||
}
|
||||
|
||||
/** Tables whose discussions user follows (this is similar to favourites) */
|
||||
public function followedDiscussions()
|
||||
{
|
||||
return $this->belongsToMany(DataTable::class, 'discussion_follows');
|
||||
return $this->belongsToMany(Table::class, 'discussion_follows');
|
||||
}
|
||||
|
||||
/** Reports sent by this user */
|
||||
@@ -73,12 +73,6 @@ class User extends Authenticatable
|
||||
return $this->hasMany(ContentReport::class, 'author_id');
|
||||
}
|
||||
|
||||
/** Reports of this user */
|
||||
public function reportsOf()
|
||||
{
|
||||
return $this->morphMany(ContentReport::class, 'object');
|
||||
}
|
||||
|
||||
/** Notifications for this user */
|
||||
public function notifications()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user