finish elastic

This commit is contained in:
xiaomlove
2022-03-26 16:09:39 +08:00
parent 0bc1e2f9d3
commit d15a837188
8 changed files with 118 additions and 38 deletions

View File

@@ -8,4 +8,14 @@ class Bookmark extends NexusModel
protected $table = 'bookmarks';
protected $fillable = ['userid', 'torrentid'];
public function torrent()
{
return $this->belongsTo(Torrent::class, 'torrentid');
}
public function user()
{
return $this->belongsTo(Torrent::class, 'userid');
}
}