Files
nexusphp/app/Models/Bookmark.php

26 lines
457 B
PHP
Raw Normal View History

2021-12-14 16:22:03 +08:00
<?php
namespace App\Models;
class Bookmark extends NexusModel
{
protected $table = 'bookmarks';
protected $fillable = ['userid', 'torrentid'];
2022-03-26 16:09:39 +08:00
2025-09-14 04:42:37 +07:00
const FILTER_IGNORE = '0';
const FILTER_INCLUDE = '1';
const FILTER_EXCLUDE = '2';
2022-03-26 16:09:39 +08:00
public function torrent()
{
return $this->belongsTo(Torrent::class, 'torrentid');
}
public function user()
{
return $this->belongsTo(Torrent::class, 'userid');
}
2021-12-14 16:22:03 +08:00
}