love_php/app/Models/Live/ViewerShare.php

23 lines
504 B
PHP
Raw Normal View History

2026-04-02 09:20:51 +08:00
<?php
namespace App\Models\Live;
use Illuminate\Database\Eloquent\Model;
class ViewerShare extends Model
{
protected $table = 'viewer_share';
protected $guarded = [];
public function share(){
return $this->hasOne(Viewer::class,'id', 'viewer_id');
}
public function sharer(){
return $this->hasOne(Viewer::class,'id', 'sharer_id');
}
public function shareRoleViewer()
{
return $this->hasOne(ShareRoleViewer::class, 'viewer_id', 'viewer_id');
}
}