mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-23 19:37:23 +08:00
ban/unban torrent send notification
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
class StaffMessage extends NexusModel
|
||||
{
|
||||
protected $table = 'staffmessages';
|
||||
|
||||
protected $fillable = [
|
||||
'sender', 'added', 'subject', 'msg', 'answeredby', 'answered', 'answer'
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'added' => 'datetime',
|
||||
];
|
||||
|
||||
public function send_user()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'sender')->withDefault(['id' => 0, 'username' => 'System']);
|
||||
}
|
||||
|
||||
public function answer_user()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'answeredby');
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user