love_php/app/Models/InteractLiveGiftLog.php
2026-04-02 09:20:51 +08:00

33 lines
650 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class InteractLiveGiftLog extends Model
{
protected $fillable = [];
protected $guarded = [];
public function gift()
{
return $this->hasOne(InteractLiveGift::class, 'id', 'gift_id');
}
public function otherUser()
{
return $this->hasOne(User::class, 'id', 'send_user_id');
}
public function gifts()
{
return $this->hasMany(InteractLiveGiftLog::class, 'send_user_id', 'send_user_id')->with('gift');
}
public function channelLog()
{
return $this->hasOne(GiftLogChannel::class, 'log_id', 'id');
}
}