25 lines
452 B
PHP
25 lines
452 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Models;
|
||
|
|
|
||
|
|
use App\Models\Base;
|
||
|
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
|
||
|
|
class Notice extends Base
|
||
|
|
{
|
||
|
|
protected $fillable = [];
|
||
|
|
protected $guarded = [];
|
||
|
|
|
||
|
|
//发信息用户
|
||
|
|
public function otherUser()
|
||
|
|
{
|
||
|
|
return $this->hasOne('App\Models\User', 'id', 'send_user_id');
|
||
|
|
}
|
||
|
|
|
||
|
|
//收信息用户
|
||
|
|
public function receiveUser()
|
||
|
|
{
|
||
|
|
return $this->hasOne('App\Models\User', 'id', 'user_id');
|
||
|
|
}
|
||
|
|
}
|