mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-03 22:20:57 +08:00
26 lines
457 B
PHP
26 lines
457 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
class Bookmark extends NexusModel
|
|
{
|
|
protected $table = 'bookmarks';
|
|
|
|
protected $fillable = ['userid', 'torrentid'];
|
|
|
|
const FILTER_IGNORE = '0';
|
|
const FILTER_INCLUDE = '1';
|
|
const FILTER_EXCLUDE = '2';
|
|
|
|
public function torrent()
|
|
{
|
|
return $this->belongsTo(Torrent::class, 'torrentid');
|
|
}
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo(Torrent::class, 'userid');
|
|
}
|
|
}
|