love_php/app/Models/CommunityStar.php

24 lines
485 B
PHP
Raw Normal View History

2026-04-02 09:20:51 +08:00
<?php
namespace App\Models;
use App\Models\Live\Viewer;
use Illuminate\Database\Eloquent\Model;
class CommunityStar extends Model
{
protected $table = 'community_stars';
public function user(){
return $this->belongsTo(User::class, 'user_id');
}
public function profile(){
return $this->belongsTo(ProfileCourtship::class, 'user_id', 'user_id');
}
public function viewer(){
return $this->belongsTo(Viewer::class, 'from_id');
}
}