mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-03 14:10:57 +08:00
28 lines
482 B
PHP
28 lines
482 B
PHP
<?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');
|
|
}
|
|
}
|