|
@@ -22,23 +22,4 @@ class LiveChatModel extends BaseModel
|
|
|
// 设置数据表
|
|
// 设置数据表
|
|
|
protected $table = 'live_chat';
|
|
protected $table = 'live_chat';
|
|
|
|
|
|
|
|
- /**
|
|
|
|
|
- * 发送用户
|
|
|
|
|
- * @return \Illuminate\Database\Eloquent\Relations\HasOne
|
|
|
|
|
- */
|
|
|
|
|
- public function from()
|
|
|
|
|
- {
|
|
|
|
|
- return $this->hasOne(MemberModel::class, 'id','from_user_id')
|
|
|
|
|
- ->select(['id','nickname','avatar','status']);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- /**
|
|
|
|
|
- * 接收用户
|
|
|
|
|
- * @return \Illuminate\Database\Eloquent\Relations\HasOne
|
|
|
|
|
- */
|
|
|
|
|
- public function to()
|
|
|
|
|
- {
|
|
|
|
|
- return $this->hasOne(MemberModel::class, 'id','to_user_id')
|
|
|
|
|
- ->select(['id','nickname','avatar','status']);
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
}
|