torrent api + swip constants

This commit is contained in:
xiaomlove
2021-05-15 19:29:44 +08:00
parent 786095ca96
commit 33e99516b6
55 changed files with 1968 additions and 38 deletions
+27
View File
@@ -0,0 +1,27 @@
<?php
namespace App\Models;
class Comment extends NexusModel
{
protected $casts = [
'added' => 'datetime',
'editdate' => 'datetime',
];
public function related_torrent()
{
return $this->belongsTo(Torrent::class, 'torrent');
}
public function create_user()
{
return $this->belongsTo(User::class, 'user');
}
public function update_user()
{
return $this->belongsTo(User::class, 'editedby');
}
}